generated-configure.sh revision 1728:82c695c9b53c
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_BIG
642JAVA_FLAGS
643JOBS
644MEMORY_SIZE
645NUM_CORES
646ENABLE_INTREE_EC
647SALIB_NAME
648HOTSPOT_MAKE_ARGS
649LIBZIP_CAN_USE_MMAP
650LIBDL
651LIBM
652USE_EXTERNAL_LCMS
653LCMS_LIBS
654LCMS_CFLAGS
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LIBGIF
660USE_EXTERNAL_LIBJPEG
661LLVM_LIBS
662LLVM_LDFLAGS
663LLVM_CFLAGS
664LLVM_CONFIG
665LIBFFI_LIBS
666LIBFFI_CFLAGS
667ALSA_LIBS
668ALSA_CFLAGS
669FREETYPE_BUNDLE_LIB_PATH
670FREETYPE_LIBS
671FREETYPE_CFLAGS
672CUPS_CFLAGS
673X_EXTRA_LIBS
674X_LIBS
675X_PRE_LIBS
676X_CFLAGS
677XMKMF
678MSVCP_DLL
679MSVCR_DLL
680LIBCXX
681STATIC_CXX_SETTING
682FIXPATH
683GCOV_ENABLED
684ZIP_DEBUGINFO_FILES
685ENABLE_DEBUG_SYMBOLS
686CFLAGS_WARNINGS_ARE_ERRORS
687DISABLE_WARNING_PREFIX
688WARNINGS_AS_ERRORS
689COMPILER_SUPPORTS_TARGET_BITS_FLAG
690ZERO_ARCHFLAG
691LDFLAGS_TESTEXE
692LDFLAGS_TESTLIB
693LDFLAGS_CXX_JDK
694JDKEXE_LIBS
695JDKLIB_LIBS
696LDFLAGS_JDKEXE
697LDFLAGS_JDKLIB
698CXXFLAGS_TESTEXE
699CXXFLAGS_TESTLIB
700CFLAGS_TESTEXE
701CFLAGS_TESTLIB
702CXXFLAGS_JDKEXE
703CXXFLAGS_JDKLIB
704CFLAGS_JDKEXE
705CFLAGS_JDKLIB
706MACOSX_VERSION_MIN
707CXX_O_FLAG_NONE
708CXX_O_FLAG_DEBUG
709CXX_O_FLAG_NORM
710CXX_O_FLAG_HI
711CXX_O_FLAG_HIGHEST
712C_O_FLAG_NONE
713C_O_FLAG_DEBUG
714C_O_FLAG_NORM
715C_O_FLAG_HI
716C_O_FLAG_HIGHEST
717CXXFLAGS_DEBUG_SYMBOLS
718CFLAGS_DEBUG_SYMBOLS
719CXX_FLAG_DEPS
720C_FLAG_DEPS
721SET_SHARED_LIBRARY_MAPFILE
722SET_SHARED_LIBRARY_NAME
723SET_SHARED_LIBRARY_ORIGIN
724SET_EXECUTABLE_ORIGIN
725CXX_FLAG_REORDER
726C_FLAG_REORDER
727RC_FLAGS
728AR_OUT_OPTION
729LD_OUT_OPTION
730EXE_OUT_OPTION
731CC_OUT_OPTION
732STRIPFLAGS
733ARFLAGS
734COMPILER_TARGET_BITS_FLAG
735JT_HOME
736JTREGEXE
737USING_BROKEN_SUSE_LD
738PACKAGE_PATH
739USE_CLANG
740HOTSPOT_LD
741HOTSPOT_CXX
742HOTSPOT_RC
743HOTSPOT_MT
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747BUILD_SYSROOT_LDFLAGS
748BUILD_SYSROOT_CFLAGS
749ac_ct_OBJDUMP
750OBJDUMP
751ac_ct_OBJCOPY
752OBJCOPY
753ac_ct_NM
754ac_ct_STRIP
755GNM
756NM
757STRIP
758MSBUILD
759DUMPBIN
760RC
761MT
762LIPO
763ac_ct_AR
764AR
765AS
766LDCXX
767LD
768CXXCPP
769CPP
770ac_ct_CXX
771CXXFLAGS
772CXX
773ac_ct_PROPER_COMPILER_CXX
774PROPER_COMPILER_CXX
775TOOLCHAIN_PATH_CXX
776POTENTIAL_CXX
777OBJEXT
778EXEEXT
779ac_ct_CC
780CPPFLAGS
781LDFLAGS
782CFLAGS
783CC
784ac_ct_PROPER_COMPILER_CC
785PROPER_COMPILER_CC
786TOOLCHAIN_PATH_CC
787POTENTIAL_CC
788VS_LIB
789VS_INCLUDE
790VS_PATH
791CYGWIN_LINK
792SYSROOT_LDFLAGS
793SYSROOT_CFLAGS
794LEGACY_EXTRA_LDFLAGS
795LEGACY_EXTRA_CXXFLAGS
796LEGACY_EXTRA_CFLAGS
797EXE_SUFFIX
798OBJ_SUFFIX
799STATIC_LIBRARY
800SHARED_LIBRARY
801STATIC_LIBRARY_SUFFIX
802SHARED_LIBRARY_SUFFIX
803LIBRARY_PREFIX
804TOOLCHAIN_TYPE
805BUILD_HOTSPOT
806HOTSPOT_DIST
807BUILD_OUTPUT
808OVERRIDE_SRC_ROOT
809ADD_SRC_ROOT
810JDK_TOPDIR
811NASHORN_TOPDIR
812HOTSPOT_TOPDIR
813JAXWS_TOPDIR
814JAXP_TOPDIR
815CORBA_TOPDIR
816LANGTOOLS_TOPDIR
817BOOT_JDK_BITS
818JAVAC_FLAGS
819BOOT_JDK_SOURCETARGET
820JARSIGNER
821JAR
822JAVAH
823JAVAC
824JAVA
825BOOT_JDK
826JAVA_CHECK
827JAVAC_CHECK
828COOKED_BUILD_NUMBER
829JDK_VERSION
830COPYRIGHT_YEAR
831MACOSX_BUNDLE_ID_BASE
832MACOSX_BUNDLE_NAME_BASE
833COMPANY_NAME
834JDK_RC_PLATFORM_NAME
835PRODUCT_SUFFIX
836PRODUCT_NAME
837LAUNCHER_NAME
838MILESTONE
839JDK_BUILD_NUMBER
840JDK_UPDATE_VERSION
841JDK_MICRO_VERSION
842JDK_MINOR_VERSION
843JDK_MAJOR_VERSION
844USER_RELEASE_SUFFIX
845COMPRESS_JARS
846UNLIMITED_CRYPTO
847CACERTS_FILE
848TEST_IN_BUILD
849BUILD_HEADLESS
850SUPPORT_HEADFUL
851SUPPORT_HEADLESS
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856BASH_ARGS
857SETFILE
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862PATCH
863TIME
864STAT
865HG
866READELF
867OTOOL
868LDD
869ZIP
870UNZIP
871FIND_DELETE
872OUTPUT_SYNC
873OUTPUT_SYNC_SUPPORTED
874CHECK_TOOLSDIR_MAKE
875CHECK_TOOLSDIR_GMAKE
876CHECK_MAKE
877CHECK_GMAKE
878MAKE
879PKGHANDLER
880CONFIGURESUPPORT_OUTPUTDIR
881OUTPUT_ROOT
882CONF_NAME
883SPEC
884SDKROOT
885XCODEBUILD
886BUILD_VARIANT_RELEASE
887DEBUG_CLASSFILES
888FASTDEBUG
889VARIANT
890DEBUG_LEVEL
891MACOSX_UNIVERSAL
892INCLUDE_SA
893JVM_VARIANT_CORE
894JVM_VARIANT_ZEROSHARK
895JVM_VARIANT_ZERO
896JVM_VARIANT_KERNEL
897JVM_VARIANT_MINIMAL1
898JVM_VARIANT_CLIENT
899JVM_VARIANT_SERVER
900JVM_VARIANTS
901JVM_INTERPRETER
902JDK_VARIANT
903SET_OPENJDK
904CANONICAL_TOPDIR
905ORIGINAL_TOPDIR
906TOPDIR
907PATH_SEP
908ZERO_ARCHDEF
909DEFINE_CROSS_COMPILE_ARCH
910LP64
911OPENJDK_TARGET_OS_EXPORT_DIR
912OPENJDK_TARGET_CPU_JLI_CFLAGS
913OPENJDK_TARGET_CPU_OSARCH
914OPENJDK_TARGET_CPU_ISADIR
915OPENJDK_TARGET_CPU_LIBDIR
916OPENJDK_TARGET_CPU_LEGACY_LIB
917OPENJDK_TARGET_CPU_LEGACY
918REQUIRED_OS_VERSION
919REQUIRED_OS_NAME
920COMPILE_TYPE
921OPENJDK_TARGET_CPU_ENDIAN
922OPENJDK_TARGET_CPU_BITS
923OPENJDK_TARGET_CPU_ARCH
924OPENJDK_TARGET_CPU
925OPENJDK_TARGET_OS_ENV
926OPENJDK_TARGET_OS_TYPE
927OPENJDK_TARGET_OS
928OPENJDK_BUILD_CPU_ENDIAN
929OPENJDK_BUILD_CPU_BITS
930OPENJDK_BUILD_CPU_ARCH
931OPENJDK_BUILD_CPU
932OPENJDK_BUILD_OS_ENV
933OPENJDK_BUILD_OS_TYPE
934OPENJDK_BUILD_OS
935OPENJDK_BUILD_AUTOCONF_NAME
936OPENJDK_TARGET_AUTOCONF_NAME
937target_os
938target_vendor
939target_cpu
940target
941host_os
942host_vendor
943host_cpu
944host
945build_os
946build_vendor
947build_cpu
948build
949NICE
950CPIO
951DF
952READLINK
953CYGPATH
954SED
955FGREP
956EGREP
957GREP
958AWK
959XARGS
960WHICH
961WC
962UNIQ
963UNAME
964TR
965TOUCH
966TEE
967TAR
968TAIL
969SORT
970SH
971RMDIR
972RM
973PRINTF
974NAWK
975MV
976MKTEMP
977MKDIR
978LS
979LN
980HEAD
981FIND
982FILE
983EXPR
984ECHO
985DIRNAME
986DIFF
987DATE
988CUT
989CP
990COMM
991CMP
992CHMOD
993CAT
994BASH
995BASENAME
996DATE_WHEN_CONFIGURED
997ORIGINAL_PATH
998CONFIGURE_COMMAND_LINE
999target_alias
1000host_alias
1001build_alias
1002LIBS
1003ECHO_T
1004ECHO_N
1005ECHO_C
1006DEFS
1007mandir
1008localedir
1009libdir
1010psdir
1011pdfdir
1012dvidir
1013htmldir
1014infodir
1015docdir
1016oldincludedir
1017includedir
1018localstatedir
1019sharedstatedir
1020sysconfdir
1021datadir
1022datarootdir
1023libexecdir
1024sbindir
1025bindir
1026program_transform_name
1027prefix
1028exec_prefix
1029PACKAGE_URL
1030PACKAGE_BUGREPORT
1031PACKAGE_STRING
1032PACKAGE_VERSION
1033PACKAGE_TARNAME
1034PACKAGE_NAME
1035PATH_SEPARATOR
1036SHELL'
1037ac_subst_files=''
1038ac_user_opts='
1039enable_option_checking
1040with_target_bits
1041enable_openjdk_only
1042with_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057enable_headful
1058enable_hotspot_test_in_build
1059with_cacerts_file
1060enable_unlimited_crypto
1061with_milestone
1062with_update_version
1063with_user_release_suffix
1064with_build_number
1065with_copyright_year
1066with_boot_jdk
1067with_add_source_root
1068with_override_source_root
1069with_adds_and_overrides
1070with_override_langtools
1071with_override_corba
1072with_override_jaxp
1073with_override_jaxws
1074with_override_hotspot
1075with_override_nashorn
1076with_override_jdk
1077with_import_hotspot
1078with_toolchain_type
1079with_extra_cflags
1080with_extra_cxxflags
1081with_extra_ldflags
1082with_toolchain_version
1083with_build_devkit
1084with_jtreg
1085enable_warnings_as_errors
1086enable_debug_symbols
1087enable_zip_debug_info
1088enable_native_coverage
1089with_stdc__lib
1090with_msvcr_dll
1091with_msvcp_dll
1092with_x
1093with_cups
1094with_cups_include
1095with_freetype
1096with_freetype_include
1097with_freetype_lib
1098with_freetype_src
1099enable_freetype_bundling
1100with_alsa
1101with_alsa_include
1102with_alsa_lib
1103with_libffi
1104with_libffi_include
1105with_libffi_lib
1106with_libjpeg
1107with_giflib
1108with_libpng
1109with_zlib
1110with_lcms
1111with_dxsdk
1112with_dxsdk_lib
1113with_dxsdk_include
1114with_num_cores
1115with_memory_size
1116with_jobs
1117with_boot_jdk_jvmargs
1118with_sjavac_server_java
1119enable_sjavac
1120enable_javac_server
1121enable_precompiled_headers
1122enable_ccache
1123with_ccache_dir
1124'
1125      ac_precious_vars='build_alias
1126host_alias
1127target_alias
1128BASENAME
1129BASH
1130CAT
1131CHMOD
1132CMP
1133COMM
1134CP
1135CUT
1136DATE
1137DIFF
1138DIRNAME
1139ECHO
1140EXPR
1141FILE
1142FIND
1143HEAD
1144LN
1145LS
1146MKDIR
1147MKTEMP
1148MV
1149NAWK
1150PRINTF
1151RM
1152RMDIR
1153SH
1154SORT
1155TAIL
1156TAR
1157TEE
1158TOUCH
1159TR
1160UNAME
1161UNIQ
1162WC
1163WHICH
1164XARGS
1165AWK
1166GREP
1167EGREP
1168FGREP
1169SED
1170CYGPATH
1171READLINK
1172DF
1173CPIO
1174NICE
1175MAKE
1176UNZIP
1177ZIP
1178LDD
1179OTOOL
1180READELF
1181HG
1182STAT
1183TIME
1184PATCH
1185DSYMUTIL
1186XATTR
1187CODESIGN
1188SETFILE
1189PKG_CONFIG
1190JAVA
1191JAVAC
1192JAVAH
1193JAR
1194JARSIGNER
1195CC
1196CFLAGS
1197LDFLAGS
1198LIBS
1199CPPFLAGS
1200CXX
1201CXXFLAGS
1202CCC
1203CPP
1204CXXCPP
1205AS
1206AR
1207LIPO
1208STRIP
1209NM
1210GNM
1211OBJCOPY
1212OBJDUMP
1213BUILD_CC
1214BUILD_CXX
1215JTREGEXE
1216XMKMF
1217FREETYPE_CFLAGS
1218FREETYPE_LIBS
1219ALSA_CFLAGS
1220ALSA_LIBS
1221LIBFFI_CFLAGS
1222LIBFFI_LIBS
1223PNG_CFLAGS
1224PNG_LIBS
1225LCMS_CFLAGS
1226LCMS_LIBS
1227CCACHE'
1228
1229
1230# Initialize some variables set by options.
1231ac_init_help=
1232ac_init_version=false
1233ac_unrecognized_opts=
1234ac_unrecognized_sep=
1235# The variables have the same names as the options, with
1236# dashes changed to underlines.
1237cache_file=/dev/null
1238exec_prefix=NONE
1239no_create=
1240no_recursion=
1241prefix=NONE
1242program_prefix=NONE
1243program_suffix=NONE
1244program_transform_name=s,x,x,
1245silent=
1246site=
1247srcdir=
1248verbose=
1249x_includes=NONE
1250x_libraries=NONE
1251
1252# Installation directory options.
1253# These are left unexpanded so users can "make install exec_prefix=/foo"
1254# and all the variables that are supposed to be based on exec_prefix
1255# by default will actually change.
1256# Use braces instead of parens because sh, perl, etc. also accept them.
1257# (The list follows the same order as the GNU Coding Standards.)
1258bindir='${exec_prefix}/bin'
1259sbindir='${exec_prefix}/sbin'
1260libexecdir='${exec_prefix}/libexec'
1261datarootdir='${prefix}/share'
1262datadir='${datarootdir}'
1263sysconfdir='${prefix}/etc'
1264sharedstatedir='${prefix}/com'
1265localstatedir='${prefix}/var'
1266includedir='${prefix}/include'
1267oldincludedir='/usr/include'
1268docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1269infodir='${datarootdir}/info'
1270htmldir='${docdir}'
1271dvidir='${docdir}'
1272pdfdir='${docdir}'
1273psdir='${docdir}'
1274libdir='${exec_prefix}/lib'
1275localedir='${datarootdir}/locale'
1276mandir='${datarootdir}/man'
1277
1278ac_prev=
1279ac_dashdash=
1280for ac_option
1281do
1282  # If the previous option needs an argument, assign it.
1283  if test -n "$ac_prev"; then
1284    eval $ac_prev=\$ac_option
1285    ac_prev=
1286    continue
1287  fi
1288
1289  case $ac_option in
1290  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1291  *=)   ac_optarg= ;;
1292  *)    ac_optarg=yes ;;
1293  esac
1294
1295  # Accept the important Cygnus configure options, so we can diagnose typos.
1296
1297  case $ac_dashdash$ac_option in
1298  --)
1299    ac_dashdash=yes ;;
1300
1301  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1302    ac_prev=bindir ;;
1303  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1304    bindir=$ac_optarg ;;
1305
1306  -build | --build | --buil | --bui | --bu)
1307    ac_prev=build_alias ;;
1308  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1309    build_alias=$ac_optarg ;;
1310
1311  -cache-file | --cache-file | --cache-fil | --cache-fi \
1312  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1313    ac_prev=cache_file ;;
1314  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1315  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1316    cache_file=$ac_optarg ;;
1317
1318  --config-cache | -C)
1319    cache_file=config.cache ;;
1320
1321  -datadir | --datadir | --datadi | --datad)
1322    ac_prev=datadir ;;
1323  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1324    datadir=$ac_optarg ;;
1325
1326  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1327  | --dataroo | --dataro | --datar)
1328    ac_prev=datarootdir ;;
1329  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1330  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1331    datarootdir=$ac_optarg ;;
1332
1333  -disable-* | --disable-*)
1334    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1335    # Reject names that are not valid shell variable names.
1336    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1337      as_fn_error $? "invalid feature name: $ac_useropt"
1338    ac_useropt_orig=$ac_useropt
1339    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1340    case $ac_user_opts in
1341      *"
1342"enable_$ac_useropt"
1343"*) ;;
1344      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1345	 ac_unrecognized_sep=', ';;
1346    esac
1347    eval enable_$ac_useropt=no ;;
1348
1349  -docdir | --docdir | --docdi | --doc | --do)
1350    ac_prev=docdir ;;
1351  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1352    docdir=$ac_optarg ;;
1353
1354  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1355    ac_prev=dvidir ;;
1356  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1357    dvidir=$ac_optarg ;;
1358
1359  -enable-* | --enable-*)
1360    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1361    # Reject names that are not valid shell variable names.
1362    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1363      as_fn_error $? "invalid feature name: $ac_useropt"
1364    ac_useropt_orig=$ac_useropt
1365    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1366    case $ac_user_opts in
1367      *"
1368"enable_$ac_useropt"
1369"*) ;;
1370      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1371	 ac_unrecognized_sep=', ';;
1372    esac
1373    eval enable_$ac_useropt=\$ac_optarg ;;
1374
1375  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1376  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1377  | --exec | --exe | --ex)
1378    ac_prev=exec_prefix ;;
1379  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1380  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1381  | --exec=* | --exe=* | --ex=*)
1382    exec_prefix=$ac_optarg ;;
1383
1384  -gas | --gas | --ga | --g)
1385    # Obsolete; use --with-gas.
1386    with_gas=yes ;;
1387
1388  -help | --help | --hel | --he | -h)
1389    ac_init_help=long ;;
1390  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1391    ac_init_help=recursive ;;
1392  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1393    ac_init_help=short ;;
1394
1395  -host | --host | --hos | --ho)
1396    ac_prev=host_alias ;;
1397  -host=* | --host=* | --hos=* | --ho=*)
1398    host_alias=$ac_optarg ;;
1399
1400  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1401    ac_prev=htmldir ;;
1402  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1403  | --ht=*)
1404    htmldir=$ac_optarg ;;
1405
1406  -includedir | --includedir | --includedi | --included | --include \
1407  | --includ | --inclu | --incl | --inc)
1408    ac_prev=includedir ;;
1409  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1410  | --includ=* | --inclu=* | --incl=* | --inc=*)
1411    includedir=$ac_optarg ;;
1412
1413  -infodir | --infodir | --infodi | --infod | --info | --inf)
1414    ac_prev=infodir ;;
1415  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1416    infodir=$ac_optarg ;;
1417
1418  -libdir | --libdir | --libdi | --libd)
1419    ac_prev=libdir ;;
1420  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1421    libdir=$ac_optarg ;;
1422
1423  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1424  | --libexe | --libex | --libe)
1425    ac_prev=libexecdir ;;
1426  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1427  | --libexe=* | --libex=* | --libe=*)
1428    libexecdir=$ac_optarg ;;
1429
1430  -localedir | --localedir | --localedi | --localed | --locale)
1431    ac_prev=localedir ;;
1432  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1433    localedir=$ac_optarg ;;
1434
1435  -localstatedir | --localstatedir | --localstatedi | --localstated \
1436  | --localstate | --localstat | --localsta | --localst | --locals)
1437    ac_prev=localstatedir ;;
1438  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1439  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1440    localstatedir=$ac_optarg ;;
1441
1442  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1443    ac_prev=mandir ;;
1444  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1445    mandir=$ac_optarg ;;
1446
1447  -nfp | --nfp | --nf)
1448    # Obsolete; use --without-fp.
1449    with_fp=no ;;
1450
1451  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1452  | --no-cr | --no-c | -n)
1453    no_create=yes ;;
1454
1455  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1456  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1457    no_recursion=yes ;;
1458
1459  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1460  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1461  | --oldin | --oldi | --old | --ol | --o)
1462    ac_prev=oldincludedir ;;
1463  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1464  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1465  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1466    oldincludedir=$ac_optarg ;;
1467
1468  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1469    ac_prev=prefix ;;
1470  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1471    prefix=$ac_optarg ;;
1472
1473  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1474  | --program-pre | --program-pr | --program-p)
1475    ac_prev=program_prefix ;;
1476  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1477  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1478    program_prefix=$ac_optarg ;;
1479
1480  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1481  | --program-suf | --program-su | --program-s)
1482    ac_prev=program_suffix ;;
1483  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1484  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1485    program_suffix=$ac_optarg ;;
1486
1487  -program-transform-name | --program-transform-name \
1488  | --program-transform-nam | --program-transform-na \
1489  | --program-transform-n | --program-transform- \
1490  | --program-transform | --program-transfor \
1491  | --program-transfo | --program-transf \
1492  | --program-trans | --program-tran \
1493  | --progr-tra | --program-tr | --program-t)
1494    ac_prev=program_transform_name ;;
1495  -program-transform-name=* | --program-transform-name=* \
1496  | --program-transform-nam=* | --program-transform-na=* \
1497  | --program-transform-n=* | --program-transform-=* \
1498  | --program-transform=* | --program-transfor=* \
1499  | --program-transfo=* | --program-transf=* \
1500  | --program-trans=* | --program-tran=* \
1501  | --progr-tra=* | --program-tr=* | --program-t=*)
1502    program_transform_name=$ac_optarg ;;
1503
1504  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1505    ac_prev=pdfdir ;;
1506  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1507    pdfdir=$ac_optarg ;;
1508
1509  -psdir | --psdir | --psdi | --psd | --ps)
1510    ac_prev=psdir ;;
1511  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1512    psdir=$ac_optarg ;;
1513
1514  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1515  | -silent | --silent | --silen | --sile | --sil)
1516    silent=yes ;;
1517
1518  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1519    ac_prev=sbindir ;;
1520  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1521  | --sbi=* | --sb=*)
1522    sbindir=$ac_optarg ;;
1523
1524  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1525  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1526  | --sharedst | --shareds | --shared | --share | --shar \
1527  | --sha | --sh)
1528    ac_prev=sharedstatedir ;;
1529  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1530  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1531  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1532  | --sha=* | --sh=*)
1533    sharedstatedir=$ac_optarg ;;
1534
1535  -site | --site | --sit)
1536    ac_prev=site ;;
1537  -site=* | --site=* | --sit=*)
1538    site=$ac_optarg ;;
1539
1540  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1541    ac_prev=srcdir ;;
1542  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1543    srcdir=$ac_optarg ;;
1544
1545  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1546  | --syscon | --sysco | --sysc | --sys | --sy)
1547    ac_prev=sysconfdir ;;
1548  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1549  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1550    sysconfdir=$ac_optarg ;;
1551
1552  -target | --target | --targe | --targ | --tar | --ta | --t)
1553    ac_prev=target_alias ;;
1554  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1555    target_alias=$ac_optarg ;;
1556
1557  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1558    verbose=yes ;;
1559
1560  -version | --version | --versio | --versi | --vers | -V)
1561    ac_init_version=: ;;
1562
1563  -with-* | --with-*)
1564    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1565    # Reject names that are not valid shell variable names.
1566    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1567      as_fn_error $? "invalid package name: $ac_useropt"
1568    ac_useropt_orig=$ac_useropt
1569    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1570    case $ac_user_opts in
1571      *"
1572"with_$ac_useropt"
1573"*) ;;
1574      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1575	 ac_unrecognized_sep=', ';;
1576    esac
1577    eval with_$ac_useropt=\$ac_optarg ;;
1578
1579  -without-* | --without-*)
1580    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1581    # Reject names that are not valid shell variable names.
1582    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1583      as_fn_error $? "invalid package name: $ac_useropt"
1584    ac_useropt_orig=$ac_useropt
1585    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1586    case $ac_user_opts in
1587      *"
1588"with_$ac_useropt"
1589"*) ;;
1590      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1591	 ac_unrecognized_sep=', ';;
1592    esac
1593    eval with_$ac_useropt=no ;;
1594
1595  --x)
1596    # Obsolete; use --with-x.
1597    with_x=yes ;;
1598
1599  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1600  | --x-incl | --x-inc | --x-in | --x-i)
1601    ac_prev=x_includes ;;
1602  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1603  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1604    x_includes=$ac_optarg ;;
1605
1606  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1607  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1608    ac_prev=x_libraries ;;
1609  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1610  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1611    x_libraries=$ac_optarg ;;
1612
1613  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1614Try \`$0 --help' for more information"
1615    ;;
1616
1617  *=*)
1618    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1619    # Reject names that are not valid shell variable names.
1620    case $ac_envvar in #(
1621      '' | [0-9]* | *[!_$as_cr_alnum]* )
1622      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1623    esac
1624    eval $ac_envvar=\$ac_optarg
1625    export $ac_envvar ;;
1626
1627  *)
1628    # FIXME: should be removed in autoconf 3.0.
1629    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1630    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1631      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1632    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1633    ;;
1634
1635  esac
1636done
1637
1638if test -n "$ac_prev"; then
1639  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1640  as_fn_error $? "missing argument to $ac_option"
1641fi
1642
1643if test -n "$ac_unrecognized_opts"; then
1644  case $enable_option_checking in
1645    no) ;;
1646    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1647    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1648  esac
1649fi
1650
1651# Check all directory arguments for consistency.
1652for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1653		datadir sysconfdir sharedstatedir localstatedir includedir \
1654		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1655		libdir localedir mandir
1656do
1657  eval ac_val=\$$ac_var
1658  # Remove trailing slashes.
1659  case $ac_val in
1660    */ )
1661      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1662      eval $ac_var=\$ac_val;;
1663  esac
1664  # Be sure to have absolute directory names.
1665  case $ac_val in
1666    [\\/$]* | ?:[\\/]* )  continue;;
1667    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1668  esac
1669  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1670done
1671
1672# There might be people who depend on the old broken behavior: `$host'
1673# used to hold the argument of --host etc.
1674# FIXME: To remove some day.
1675build=$build_alias
1676host=$host_alias
1677target=$target_alias
1678
1679# FIXME: To remove some day.
1680if test "x$host_alias" != x; then
1681  if test "x$build_alias" = x; then
1682    cross_compiling=maybe
1683  elif test "x$build_alias" != "x$host_alias"; then
1684    cross_compiling=yes
1685  fi
1686fi
1687
1688ac_tool_prefix=
1689test -n "$host_alias" && ac_tool_prefix=$host_alias-
1690
1691test "$silent" = yes && exec 6>/dev/null
1692
1693
1694ac_pwd=`pwd` && test -n "$ac_pwd" &&
1695ac_ls_di=`ls -di .` &&
1696ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1697  as_fn_error $? "working directory cannot be determined"
1698test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1699  as_fn_error $? "pwd does not report name of working directory"
1700
1701
1702# Find the source files, if location was not specified.
1703if test -z "$srcdir"; then
1704  ac_srcdir_defaulted=yes
1705  # Try the directory containing this script, then the parent directory.
1706  ac_confdir=`$as_dirname -- "$as_myself" ||
1707$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1708	 X"$as_myself" : 'X\(//\)[^/]' \| \
1709	 X"$as_myself" : 'X\(//\)$' \| \
1710	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1711$as_echo X"$as_myself" |
1712    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1713	    s//\1/
1714	    q
1715	  }
1716	  /^X\(\/\/\)[^/].*/{
1717	    s//\1/
1718	    q
1719	  }
1720	  /^X\(\/\/\)$/{
1721	    s//\1/
1722	    q
1723	  }
1724	  /^X\(\/\).*/{
1725	    s//\1/
1726	    q
1727	  }
1728	  s/.*/./; q'`
1729  srcdir=$ac_confdir
1730  if test ! -r "$srcdir/$ac_unique_file"; then
1731    srcdir=..
1732  fi
1733else
1734  ac_srcdir_defaulted=no
1735fi
1736if test ! -r "$srcdir/$ac_unique_file"; then
1737  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1738  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1739fi
1740ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1741ac_abs_confdir=`(
1742	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1743	pwd)`
1744# When building in place, set srcdir=.
1745if test "$ac_abs_confdir" = "$ac_pwd"; then
1746  srcdir=.
1747fi
1748# Remove unnecessary trailing slashes from srcdir.
1749# Double slashes in file names in object file debugging info
1750# mess up M-x gdb in Emacs.
1751case $srcdir in
1752*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1753esac
1754for ac_var in $ac_precious_vars; do
1755  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1756  eval ac_env_${ac_var}_value=\$${ac_var}
1757  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1758  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1759done
1760
1761#
1762# Report the --help message.
1763#
1764if test "$ac_init_help" = "long"; then
1765  # Omit some internal or obsolete options to make the list less imposing.
1766  # This message is too long to be a string in the A/UX 3.1 sh.
1767  cat <<_ACEOF
1768\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1769
1770Usage: $0 [OPTION]... [VAR=VALUE]...
1771
1772To assign environment variables (e.g., CC, CFLAGS...), specify them as
1773VAR=VALUE.  See below for descriptions of some of the useful variables.
1774
1775Defaults for the options are specified in brackets.
1776
1777Configuration:
1778  -h, --help              display this help and exit
1779      --help=short        display options specific to this package
1780      --help=recursive    display the short help of all the included packages
1781  -V, --version           display version information and exit
1782  -q, --quiet, --silent   do not print \`checking ...' messages
1783      --cache-file=FILE   cache test results in FILE [disabled]
1784  -C, --config-cache      alias for \`--cache-file=config.cache'
1785  -n, --no-create         do not create output files
1786      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1787
1788Installation directories:
1789  --prefix=PREFIX         install architecture-independent files in PREFIX
1790                          [$ac_default_prefix]
1791  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1792                          [PREFIX]
1793
1794By default, \`make install' will install all the files in
1795\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1796an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1797for instance \`--prefix=\$HOME'.
1798
1799For better control, use the options below.
1800
1801Fine tuning of the installation directories:
1802  --bindir=DIR            user executables [EPREFIX/bin]
1803  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1804  --libexecdir=DIR        program executables [EPREFIX/libexec]
1805  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1806  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1807  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1808  --libdir=DIR            object code libraries [EPREFIX/lib]
1809  --includedir=DIR        C header files [PREFIX/include]
1810  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1811  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1812  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1813  --infodir=DIR           info documentation [DATAROOTDIR/info]
1814  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1815  --mandir=DIR            man documentation [DATAROOTDIR/man]
1816  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1817  --htmldir=DIR           html documentation [DOCDIR]
1818  --dvidir=DIR            dvi documentation [DOCDIR]
1819  --pdfdir=DIR            pdf documentation [DOCDIR]
1820  --psdir=DIR             ps documentation [DOCDIR]
1821_ACEOF
1822
1823  cat <<\_ACEOF
1824
1825X features:
1826  --x-includes=DIR    X include files are in DIR
1827  --x-libraries=DIR   X library files are in DIR
1828
1829System types:
1830  --build=BUILD     configure for building on BUILD [guessed]
1831  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1832  --target=TARGET   configure for building compilers for TARGET [HOST]
1833_ACEOF
1834fi
1835
1836if test -n "$ac_init_help"; then
1837  case $ac_init_help in
1838     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1839   esac
1840  cat <<\_ACEOF
1841
1842Optional Features:
1843  --disable-option-checking  ignore unrecognized --enable/--with options
1844  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1845  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1846  --enable-openjdk-only   suppress building custom source even if present
1847                          [disabled]
1848  --enable-debug          set the debug level to fastdebug (shorthand for
1849                          --with-debug-level=fastdebug) [disabled]
1850  --disable-headful       disable building headful support (graphical UI
1851                          support) [enabled]
1852  --enable-hotspot-test-in-build
1853                          run the Queens test after Hotspot build [disabled]
1854  --enable-unlimited-crypto
1855                          Enable unlimited crypto policy [disabled]
1856  --disable-warnings-as-errors
1857                          do not consider native warnings to be an error
1858                          [enabled]
1859  --disable-debug-symbols disable generation of debug symbols [enabled]
1860  --disable-zip-debug-info
1861                          disable zipping of debug-info files [enabled]
1862  --enable-native-coverage
1863                          enable native compilation with code coverage
1864                          data[disabled]
1865  --disable-freetype-bundling
1866                          disable bundling of the freetype library with the
1867                          build result [enabled on Windows or when using
1868                          --with-freetype, disabled otherwise]
1869  --enable-sjavac         use sjavac to do fast incremental compiles
1870                          [disabled]
1871  --enable-javac-server   use only the server part of sjavac for faster javac
1872                          compiles [disabled]
1873  --disable-precompiled-headers
1874                          disable using precompiled headers when compiling C++
1875                          [enabled]
1876  --enable-ccache         enable using ccache to speed up recompilations
1877                          [disabled]
1878
1879Optional Packages:
1880  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1881  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1882  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1883                          support it), e.g. --with-target-bits=32 [guessed]
1884  --with-custom-make-dir  Deprecated. Option is kept for backwards
1885                          compatibility and is ignored
1886  --with-jdk-variant      JDK variant to build (normal) [normal]
1887  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1888  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1889                          client, minimal1, kernel, zero, zeroshark, core)
1890                          [server]
1891  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1892                          optimized (HotSpot build only)) [release]
1893  --with-devkit           use this devkit for compilers, tools and resources
1894  --with-sys-root         alias for --with-sysroot for backwards compatability
1895  --with-sysroot          use this directory as sysroot
1896  --with-tools-dir        alias for --with-toolchain-path for backwards
1897                          compatibility
1898  --with-toolchain-path   prepend these directories when searching for
1899                          toolchain binaries (compilers etc)
1900  --with-extra-path       prepend these directories to the default path
1901  --with-sdk-name         use the platform SDK of the given name. [macosx]
1902  --with-conf-name        use this as the name of the configuration [generated
1903                          from important configuration options]
1904  --with-output-sync      set make output sync type if supported by make.
1905                          [recurse]
1906  --with-cacerts-file     specify alternative cacerts file
1907  --with-milestone        Set milestone value for build [internal]
1908  --with-update-version   Set update version value for build [b00]
1909  --with-user-release-suffix
1910                          Add a custom string to the version string if build
1911                          number is not set.[username_builddateb00]
1912  --with-build-number     Set build number value for build [b00]
1913  --with-copyright-year   Set copyright year value for build [current year]
1914  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1915  --with-add-source-root  for each and every source directory, look in this
1916                          additional source root for the same directory; if it
1917                          exists and have files in it, include it in the build
1918  --with-override-source-root
1919                          for each and every source directory, look in this
1920                          override source root for the same directory; if it
1921                          exists, use that directory instead and ignore the
1922                          directory in the original source root
1923  --with-adds-and-overrides
1924                          use the subdirs 'adds' and 'overrides' in the
1925                          specified directory as add-source-root and
1926                          override-source-root
1927  --with-override-langtools
1928                          use this langtools dir for the build
1929  --with-override-corba   use this corba dir for the build
1930  --with-override-jaxp    use this jaxp dir for the build
1931  --with-override-jaxws   use this jaxws dir for the build
1932  --with-override-hotspot use this hotspot dir for the build
1933  --with-override-nashorn use this nashorn dir for the build
1934  --with-override-jdk     use this jdk dir for the build
1935  --with-import-hotspot   import hotspot binaries from this jdk image or
1936                          hotspot build dist dir instead of building from
1937                          source
1938  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1939                          to show possible values [platform dependent]
1940  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1941  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1942  --with-extra-ldflags    extra flags to be used when linking jdk
1943  --with-toolchain-version
1944                          the version of the toolchain to look for, use
1945                          '--help' to show possible values [platform
1946                          dependent]
1947  --with-build-devkit     Devkit to use for the build platform toolchain
1948  --with-jtreg            Regression Test Harness [probed]
1949  --with-stdc++lib=<static>,<dynamic>,<default>
1950                          force linking of the C++ runtime on Linux to either
1951                          static or dynamic, default is static with dynamic as
1952                          fallback
1953  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1954                          (Windows only) [probed]
1955  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1956                          (Windows only) [probed]
1957  --with-x                use the X Window System
1958  --with-cups             specify prefix directory for the cups package
1959                          (expecting the headers under PATH/include)
1960  --with-cups-include     specify directory for the cups include files
1961  --with-freetype         specify prefix directory for the freetype package
1962                          (expecting the libraries under PATH/lib and the
1963                          headers under PATH/include)
1964  --with-freetype-include specify directory for the freetype include files
1965  --with-freetype-lib     specify directory for the freetype library
1966  --with-freetype-src     specify directory with freetype sources to
1967                          automatically build the library (experimental,
1968                          Windows-only)
1969  --with-alsa             specify prefix directory for the alsa package
1970                          (expecting the libraries under PATH/lib and the
1971                          headers under PATH/include)
1972  --with-alsa-include     specify directory for the alsa include files
1973  --with-alsa-lib         specify directory for the alsa library
1974  --with-libffi           specify prefix directory for the libffi package
1975                          (expecting the libraries under PATH/lib and the
1976                          headers under PATH/include)
1977  --with-libffi-include   specify directory for the libffi include files
1978  --with-libffi-lib       specify directory for the libffi library
1979  --with-libjpeg          use libjpeg from build system or OpenJDK source
1980                          (system, bundled) [bundled]
1981  --with-giflib           use giflib from build system or OpenJDK source
1982                          (system, bundled) [bundled]
1983  --with-libpng           use libpng from build system or OpenJDK source
1984                          (system, bundled) [bundled]
1985  --with-zlib             use zlib from build system or OpenJDK source
1986                          (system, bundled) [bundled]
1987  --with-lcms             use lcms2 from build system or OpenJDK source
1988                          (system, bundled) [bundled]
1989  --with-dxsdk            Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-dxsdk-include    Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --with-num-cores        number of cores in the build system, e.g.
1996                          --with-num-cores=8 [probed]
1997  --with-memory-size      memory (in MB) available in the build system, e.g.
1998                          --with-memory-size=1024 [probed]
1999  --with-jobs             number of parallel jobs to let make run [calculated
2000                          based on cores and memory]
2001  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2002                          invocations of boot JDK, overriding the default
2003                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2004                          -enableassertions"
2005  --with-sjavac-server-java
2006                          use this java binary for running the sjavac
2007                          background server [Boot JDK java]
2008  --with-ccache-dir       where to store ccache files [~/.ccache]
2009
2010Some influential environment variables:
2011  BASENAME    Override default value for BASENAME
2012  BASH        Override default value for BASH
2013  CAT         Override default value for CAT
2014  CHMOD       Override default value for CHMOD
2015  CMP         Override default value for CMP
2016  COMM        Override default value for COMM
2017  CP          Override default value for CP
2018  CUT         Override default value for CUT
2019  DATE        Override default value for DATE
2020  DIFF        Override default value for DIFF
2021  DIRNAME     Override default value for DIRNAME
2022  ECHO        Override default value for ECHO
2023  EXPR        Override default value for EXPR
2024  FILE        Override default value for FILE
2025  FIND        Override default value for FIND
2026  HEAD        Override default value for HEAD
2027  LN          Override default value for LN
2028  LS          Override default value for LS
2029  MKDIR       Override default value for MKDIR
2030  MKTEMP      Override default value for MKTEMP
2031  MV          Override default value for MV
2032  NAWK        Override default value for NAWK
2033  PRINTF      Override default value for PRINTF
2034  RM          Override default value for RM
2035  RMDIR       Override default value for RMDIR
2036  SH          Override default value for SH
2037  SORT        Override default value for SORT
2038  TAIL        Override default value for TAIL
2039  TAR         Override default value for TAR
2040  TEE         Override default value for TEE
2041  TOUCH       Override default value for TOUCH
2042  TR          Override default value for TR
2043  UNAME       Override default value for UNAME
2044  UNIQ        Override default value for UNIQ
2045  WC          Override default value for WC
2046  WHICH       Override default value for WHICH
2047  XARGS       Override default value for XARGS
2048  AWK         Override default value for AWK
2049  GREP        Override default value for GREP
2050  EGREP       Override default value for EGREP
2051  FGREP       Override default value for FGREP
2052  SED         Override default value for SED
2053  CYGPATH     Override default value for CYGPATH
2054  READLINK    Override default value for READLINK
2055  DF          Override default value for DF
2056  CPIO        Override default value for CPIO
2057  NICE        Override default value for NICE
2058  MAKE        Override default value for MAKE
2059  UNZIP       Override default value for UNZIP
2060  ZIP         Override default value for ZIP
2061  LDD         Override default value for LDD
2062  OTOOL       Override default value for OTOOL
2063  READELF     Override default value for READELF
2064  HG          Override default value for HG
2065  STAT        Override default value for STAT
2066  TIME        Override default value for TIME
2067  PATCH       Override default value for PATCH
2068  DSYMUTIL    Override default value for DSYMUTIL
2069  XATTR       Override default value for XATTR
2070  CODESIGN    Override default value for CODESIGN
2071  SETFILE     Override default value for SETFILE
2072  PKG_CONFIG  path to pkg-config utility
2073  JAVA        Override default value for JAVA
2074  JAVAC       Override default value for JAVAC
2075  JAVAH       Override default value for JAVAH
2076  JAR         Override default value for JAR
2077  JARSIGNER   Override default value for JARSIGNER
2078  CC          C compiler command
2079  CFLAGS      C compiler flags
2080  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2081              nonstandard directory <lib dir>
2082  LIBS        libraries to pass to the linker, e.g. -l<library>
2083  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2084              you have headers in a nonstandard directory <include dir>
2085  CXX         C++ compiler command
2086  CXXFLAGS    C++ compiler flags
2087  CPP         C preprocessor
2088  CXXCPP      C++ preprocessor
2089  AS          Override default value for AS
2090  AR          Override default value for AR
2091  LIPO        Override default value for LIPO
2092  STRIP       Override default value for STRIP
2093  NM          Override default value for NM
2094  GNM         Override default value for GNM
2095  OBJCOPY     Override default value for OBJCOPY
2096  OBJDUMP     Override default value for OBJDUMP
2097  BUILD_CC    Override default value for BUILD_CC
2098  BUILD_CXX   Override default value for BUILD_CXX
2099  JTREGEXE    Override default value for JTREGEXE
2100  XMKMF       Path to xmkmf, Makefile generator for X Window System
2101  FREETYPE_CFLAGS
2102              C compiler flags for FREETYPE, overriding pkg-config
2103  FREETYPE_LIBS
2104              linker flags for FREETYPE, overriding pkg-config
2105  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2106  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2107  LIBFFI_CFLAGS
2108              C compiler flags for LIBFFI, overriding pkg-config
2109  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2110  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2111  PNG_LIBS    linker flags for PNG, overriding pkg-config
2112  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2113  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2114  CCACHE      Override default value for CCACHE
2115
2116Use these variables to override the choices made by `configure' or to help
2117it to find libraries and programs with nonstandard names/locations.
2118
2119Report bugs to <build-dev@openjdk.java.net>.
2120OpenJDK home page: <http://openjdk.java.net>.
2121_ACEOF
2122ac_status=$?
2123fi
2124
2125if test "$ac_init_help" = "recursive"; then
2126  # If there are subdirs, report their specific --help.
2127  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2128    test -d "$ac_dir" ||
2129      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2130      continue
2131    ac_builddir=.
2132
2133case "$ac_dir" in
2134.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2135*)
2136  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2137  # A ".." for each directory in $ac_dir_suffix.
2138  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2139  case $ac_top_builddir_sub in
2140  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2141  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2142  esac ;;
2143esac
2144ac_abs_top_builddir=$ac_pwd
2145ac_abs_builddir=$ac_pwd$ac_dir_suffix
2146# for backward compatibility:
2147ac_top_builddir=$ac_top_build_prefix
2148
2149case $srcdir in
2150  .)  # We are building in place.
2151    ac_srcdir=.
2152    ac_top_srcdir=$ac_top_builddir_sub
2153    ac_abs_top_srcdir=$ac_pwd ;;
2154  [\\/]* | ?:[\\/]* )  # Absolute name.
2155    ac_srcdir=$srcdir$ac_dir_suffix;
2156    ac_top_srcdir=$srcdir
2157    ac_abs_top_srcdir=$srcdir ;;
2158  *) # Relative name.
2159    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2160    ac_top_srcdir=$ac_top_build_prefix$srcdir
2161    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2162esac
2163ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2164
2165    cd "$ac_dir" || { ac_status=$?; continue; }
2166    # Check for guested configure.
2167    if test -f "$ac_srcdir/configure.gnu"; then
2168      echo &&
2169      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2170    elif test -f "$ac_srcdir/configure"; then
2171      echo &&
2172      $SHELL "$ac_srcdir/configure" --help=recursive
2173    else
2174      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2175    fi || ac_status=$?
2176    cd "$ac_pwd" || { ac_status=$?; break; }
2177  done
2178fi
2179
2180test -n "$ac_init_help" && exit $ac_status
2181if $ac_init_version; then
2182  cat <<\_ACEOF
2183OpenJDK configure jdk9
2184generated by GNU Autoconf 2.69
2185
2186Copyright (C) 2012 Free Software Foundation, Inc.
2187This configure script is free software; the Free Software Foundation
2188gives unlimited permission to copy, distribute and modify it.
2189_ACEOF
2190  exit
2191fi
2192
2193## ------------------------ ##
2194## Autoconf initialization. ##
2195## ------------------------ ##
2196
2197# ac_fn_c_try_compile LINENO
2198# --------------------------
2199# Try to compile conftest.$ac_ext, and return whether this succeeded.
2200ac_fn_c_try_compile ()
2201{
2202  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2203  rm -f conftest.$ac_objext
2204  if { { ac_try="$ac_compile"
2205case "(($ac_try" in
2206  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2207  *) ac_try_echo=$ac_try;;
2208esac
2209eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2210$as_echo "$ac_try_echo"; } >&5
2211  (eval "$ac_compile") 2>conftest.err
2212  ac_status=$?
2213  if test -s conftest.err; then
2214    grep -v '^ *+' conftest.err >conftest.er1
2215    cat conftest.er1 >&5
2216    mv -f conftest.er1 conftest.err
2217  fi
2218  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2219  test $ac_status = 0; } && {
2220	 test -z "$ac_c_werror_flag" ||
2221	 test ! -s conftest.err
2222       } && test -s conftest.$ac_objext; then :
2223  ac_retval=0
2224else
2225  $as_echo "$as_me: failed program was:" >&5
2226sed 's/^/| /' conftest.$ac_ext >&5
2227
2228	ac_retval=1
2229fi
2230  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2231  as_fn_set_status $ac_retval
2232
2233} # ac_fn_c_try_compile
2234
2235# ac_fn_cxx_try_compile LINENO
2236# ----------------------------
2237# Try to compile conftest.$ac_ext, and return whether this succeeded.
2238ac_fn_cxx_try_compile ()
2239{
2240  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241  rm -f conftest.$ac_objext
2242  if { { ac_try="$ac_compile"
2243case "(($ac_try" in
2244  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2245  *) ac_try_echo=$ac_try;;
2246esac
2247eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2248$as_echo "$ac_try_echo"; } >&5
2249  (eval "$ac_compile") 2>conftest.err
2250  ac_status=$?
2251  if test -s conftest.err; then
2252    grep -v '^ *+' conftest.err >conftest.er1
2253    cat conftest.er1 >&5
2254    mv -f conftest.er1 conftest.err
2255  fi
2256  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2257  test $ac_status = 0; } && {
2258	 test -z "$ac_cxx_werror_flag" ||
2259	 test ! -s conftest.err
2260       } && test -s conftest.$ac_objext; then :
2261  ac_retval=0
2262else
2263  $as_echo "$as_me: failed program was:" >&5
2264sed 's/^/| /' conftest.$ac_ext >&5
2265
2266	ac_retval=1
2267fi
2268  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2269  as_fn_set_status $ac_retval
2270
2271} # ac_fn_cxx_try_compile
2272
2273# ac_fn_c_try_cpp LINENO
2274# ----------------------
2275# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2276ac_fn_c_try_cpp ()
2277{
2278  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2279  if { { ac_try="$ac_cpp conftest.$ac_ext"
2280case "(($ac_try" in
2281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2282  *) ac_try_echo=$ac_try;;
2283esac
2284eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2285$as_echo "$ac_try_echo"; } >&5
2286  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2287  ac_status=$?
2288  if test -s conftest.err; then
2289    grep -v '^ *+' conftest.err >conftest.er1
2290    cat conftest.er1 >&5
2291    mv -f conftest.er1 conftest.err
2292  fi
2293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2294  test $ac_status = 0; } > conftest.i && {
2295	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2296	 test ! -s conftest.err
2297       }; then :
2298  ac_retval=0
2299else
2300  $as_echo "$as_me: failed program was:" >&5
2301sed 's/^/| /' conftest.$ac_ext >&5
2302
2303    ac_retval=1
2304fi
2305  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306  as_fn_set_status $ac_retval
2307
2308} # ac_fn_c_try_cpp
2309
2310# ac_fn_cxx_try_cpp LINENO
2311# ------------------------
2312# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2313ac_fn_cxx_try_cpp ()
2314{
2315  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316  if { { ac_try="$ac_cpp conftest.$ac_ext"
2317case "(($ac_try" in
2318  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2319  *) ac_try_echo=$ac_try;;
2320esac
2321eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2322$as_echo "$ac_try_echo"; } >&5
2323  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2324  ac_status=$?
2325  if test -s conftest.err; then
2326    grep -v '^ *+' conftest.err >conftest.er1
2327    cat conftest.er1 >&5
2328    mv -f conftest.er1 conftest.err
2329  fi
2330  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2331  test $ac_status = 0; } > conftest.i && {
2332	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2333	 test ! -s conftest.err
2334       }; then :
2335  ac_retval=0
2336else
2337  $as_echo "$as_me: failed program was:" >&5
2338sed 's/^/| /' conftest.$ac_ext >&5
2339
2340    ac_retval=1
2341fi
2342  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2343  as_fn_set_status $ac_retval
2344
2345} # ac_fn_cxx_try_cpp
2346
2347# ac_fn_c_try_link LINENO
2348# -----------------------
2349# Try to link conftest.$ac_ext, and return whether this succeeded.
2350ac_fn_c_try_link ()
2351{
2352  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353  rm -f conftest.$ac_objext conftest$ac_exeext
2354  if { { ac_try="$ac_link"
2355case "(($ac_try" in
2356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2357  *) ac_try_echo=$ac_try;;
2358esac
2359eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2360$as_echo "$ac_try_echo"; } >&5
2361  (eval "$ac_link") 2>conftest.err
2362  ac_status=$?
2363  if test -s conftest.err; then
2364    grep -v '^ *+' conftest.err >conftest.er1
2365    cat conftest.er1 >&5
2366    mv -f conftest.er1 conftest.err
2367  fi
2368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2369  test $ac_status = 0; } && {
2370	 test -z "$ac_c_werror_flag" ||
2371	 test ! -s conftest.err
2372       } && test -s conftest$ac_exeext && {
2373	 test "$cross_compiling" = yes ||
2374	 test -x conftest$ac_exeext
2375       }; then :
2376  ac_retval=0
2377else
2378  $as_echo "$as_me: failed program was:" >&5
2379sed 's/^/| /' conftest.$ac_ext >&5
2380
2381	ac_retval=1
2382fi
2383  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2384  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2385  # interfere with the next link command; also delete a directory that is
2386  # left behind by Apple's compiler.  We do this before executing the actions.
2387  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2388  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2389  as_fn_set_status $ac_retval
2390
2391} # ac_fn_c_try_link
2392
2393# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2394# ---------------------------------------------------------
2395# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2396# the include files in INCLUDES and setting the cache variable VAR
2397# accordingly.
2398ac_fn_cxx_check_header_mongrel ()
2399{
2400  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2401  if eval \${$3+:} false; then :
2402  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2403$as_echo_n "checking for $2... " >&6; }
2404if eval \${$3+:} false; then :
2405  $as_echo_n "(cached) " >&6
2406fi
2407eval ac_res=\$$3
2408	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2409$as_echo "$ac_res" >&6; }
2410else
2411  # Is the header compilable?
2412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2413$as_echo_n "checking $2 usability... " >&6; }
2414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2415/* end confdefs.h.  */
2416$4
2417#include <$2>
2418_ACEOF
2419if ac_fn_cxx_try_compile "$LINENO"; then :
2420  ac_header_compiler=yes
2421else
2422  ac_header_compiler=no
2423fi
2424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2426$as_echo "$ac_header_compiler" >&6; }
2427
2428# Is the header present?
2429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2430$as_echo_n "checking $2 presence... " >&6; }
2431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h.  */
2433#include <$2>
2434_ACEOF
2435if ac_fn_cxx_try_cpp "$LINENO"; then :
2436  ac_header_preproc=yes
2437else
2438  ac_header_preproc=no
2439fi
2440rm -f conftest.err conftest.i conftest.$ac_ext
2441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2442$as_echo "$ac_header_preproc" >&6; }
2443
2444# So?  What about this header?
2445case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2446  yes:no: )
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2448$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2450$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2451    ;;
2452  no:yes:* )
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2454$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2456$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2458$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2459    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2460$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2461    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2462$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2463( $as_echo "## ----------------------------------------- ##
2464## Report this to build-dev@openjdk.java.net ##
2465## ----------------------------------------- ##"
2466     ) | sed "s/^/$as_me: WARNING:     /" >&2
2467    ;;
2468esac
2469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2470$as_echo_n "checking for $2... " >&6; }
2471if eval \${$3+:} false; then :
2472  $as_echo_n "(cached) " >&6
2473else
2474  eval "$3=\$ac_header_compiler"
2475fi
2476eval ac_res=\$$3
2477	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2478$as_echo "$ac_res" >&6; }
2479fi
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481
2482} # ac_fn_cxx_check_header_mongrel
2483
2484# ac_fn_cxx_try_run LINENO
2485# ------------------------
2486# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2487# that executables *can* be run.
2488ac_fn_cxx_try_run ()
2489{
2490  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491  if { { ac_try="$ac_link"
2492case "(($ac_try" in
2493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494  *) ac_try_echo=$ac_try;;
2495esac
2496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2497$as_echo "$ac_try_echo"; } >&5
2498  (eval "$ac_link") 2>&5
2499  ac_status=$?
2500  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2501  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2502  { { case "(($ac_try" in
2503  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2504  *) ac_try_echo=$ac_try;;
2505esac
2506eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2507$as_echo "$ac_try_echo"; } >&5
2508  (eval "$ac_try") 2>&5
2509  ac_status=$?
2510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2511  test $ac_status = 0; }; }; then :
2512  ac_retval=0
2513else
2514  $as_echo "$as_me: program exited with status $ac_status" >&5
2515       $as_echo "$as_me: failed program was:" >&5
2516sed 's/^/| /' conftest.$ac_ext >&5
2517
2518       ac_retval=$ac_status
2519fi
2520  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2521  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2522  as_fn_set_status $ac_retval
2523
2524} # ac_fn_cxx_try_run
2525
2526# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2527# ---------------------------------------------------------
2528# Tests whether HEADER exists and can be compiled using the include files in
2529# INCLUDES, setting the cache variable VAR accordingly.
2530ac_fn_cxx_check_header_compile ()
2531{
2532  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2534$as_echo_n "checking for $2... " >&6; }
2535if eval \${$3+:} false; then :
2536  $as_echo_n "(cached) " >&6
2537else
2538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2539/* end confdefs.h.  */
2540$4
2541#include <$2>
2542_ACEOF
2543if ac_fn_cxx_try_compile "$LINENO"; then :
2544  eval "$3=yes"
2545else
2546  eval "$3=no"
2547fi
2548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2549fi
2550eval ac_res=\$$3
2551	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2552$as_echo "$ac_res" >&6; }
2553  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2554
2555} # ac_fn_cxx_check_header_compile
2556
2557# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2558# ----------------------------------------------
2559# Tries to find the compile-time value of EXPR in a program that includes
2560# INCLUDES, setting VAR accordingly. Returns whether the value could be
2561# computed
2562ac_fn_cxx_compute_int ()
2563{
2564  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565  if test "$cross_compiling" = yes; then
2566    # Depending upon the size, compute the lo and hi bounds.
2567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568/* end confdefs.h.  */
2569$4
2570int
2571main ()
2572{
2573static int test_array [1 - 2 * !(($2) >= 0)];
2574test_array [0] = 0;
2575return test_array [0];
2576
2577  ;
2578  return 0;
2579}
2580_ACEOF
2581if ac_fn_cxx_try_compile "$LINENO"; then :
2582  ac_lo=0 ac_mid=0
2583  while :; do
2584    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585/* end confdefs.h.  */
2586$4
2587int
2588main ()
2589{
2590static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2591test_array [0] = 0;
2592return test_array [0];
2593
2594  ;
2595  return 0;
2596}
2597_ACEOF
2598if ac_fn_cxx_try_compile "$LINENO"; then :
2599  ac_hi=$ac_mid; break
2600else
2601  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2602			if test $ac_lo -le $ac_mid; then
2603			  ac_lo= ac_hi=
2604			  break
2605			fi
2606			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2607fi
2608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2609  done
2610else
2611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2612/* end confdefs.h.  */
2613$4
2614int
2615main ()
2616{
2617static int test_array [1 - 2 * !(($2) < 0)];
2618test_array [0] = 0;
2619return test_array [0];
2620
2621  ;
2622  return 0;
2623}
2624_ACEOF
2625if ac_fn_cxx_try_compile "$LINENO"; then :
2626  ac_hi=-1 ac_mid=-1
2627  while :; do
2628    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2629/* end confdefs.h.  */
2630$4
2631int
2632main ()
2633{
2634static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2635test_array [0] = 0;
2636return test_array [0];
2637
2638  ;
2639  return 0;
2640}
2641_ACEOF
2642if ac_fn_cxx_try_compile "$LINENO"; then :
2643  ac_lo=$ac_mid; break
2644else
2645  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2646			if test $ac_mid -le $ac_hi; then
2647			  ac_lo= ac_hi=
2648			  break
2649			fi
2650			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2651fi
2652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2653  done
2654else
2655  ac_lo= ac_hi=
2656fi
2657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2658fi
2659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2660# Binary search between lo and hi bounds.
2661while test "x$ac_lo" != "x$ac_hi"; do
2662  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2664/* end confdefs.h.  */
2665$4
2666int
2667main ()
2668{
2669static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2670test_array [0] = 0;
2671return test_array [0];
2672
2673  ;
2674  return 0;
2675}
2676_ACEOF
2677if ac_fn_cxx_try_compile "$LINENO"; then :
2678  ac_hi=$ac_mid
2679else
2680  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2681fi
2682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2683done
2684case $ac_lo in #((
2685?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2686'') ac_retval=1 ;;
2687esac
2688  else
2689    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2690/* end confdefs.h.  */
2691$4
2692static long int longval () { return $2; }
2693static unsigned long int ulongval () { return $2; }
2694#include <stdio.h>
2695#include <stdlib.h>
2696int
2697main ()
2698{
2699
2700  FILE *f = fopen ("conftest.val", "w");
2701  if (! f)
2702    return 1;
2703  if (($2) < 0)
2704    {
2705      long int i = longval ();
2706      if (i != ($2))
2707	return 1;
2708      fprintf (f, "%ld", i);
2709    }
2710  else
2711    {
2712      unsigned long int i = ulongval ();
2713      if (i != ($2))
2714	return 1;
2715      fprintf (f, "%lu", i);
2716    }
2717  /* Do not output a trailing newline, as this causes \r\n confusion
2718     on some platforms.  */
2719  return ferror (f) || fclose (f) != 0;
2720
2721  ;
2722  return 0;
2723}
2724_ACEOF
2725if ac_fn_cxx_try_run "$LINENO"; then :
2726  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2727else
2728  ac_retval=1
2729fi
2730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2731  conftest.$ac_objext conftest.beam conftest.$ac_ext
2732rm -f conftest.val
2733
2734  fi
2735  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2736  as_fn_set_status $ac_retval
2737
2738} # ac_fn_cxx_compute_int
2739
2740# ac_fn_cxx_try_link LINENO
2741# -------------------------
2742# Try to link conftest.$ac_ext, and return whether this succeeded.
2743ac_fn_cxx_try_link ()
2744{
2745  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746  rm -f conftest.$ac_objext conftest$ac_exeext
2747  if { { ac_try="$ac_link"
2748case "(($ac_try" in
2749  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2750  *) ac_try_echo=$ac_try;;
2751esac
2752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2753$as_echo "$ac_try_echo"; } >&5
2754  (eval "$ac_link") 2>conftest.err
2755  ac_status=$?
2756  if test -s conftest.err; then
2757    grep -v '^ *+' conftest.err >conftest.er1
2758    cat conftest.er1 >&5
2759    mv -f conftest.er1 conftest.err
2760  fi
2761  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2762  test $ac_status = 0; } && {
2763	 test -z "$ac_cxx_werror_flag" ||
2764	 test ! -s conftest.err
2765       } && test -s conftest$ac_exeext && {
2766	 test "$cross_compiling" = yes ||
2767	 test -x conftest$ac_exeext
2768       }; then :
2769  ac_retval=0
2770else
2771  $as_echo "$as_me: failed program was:" >&5
2772sed 's/^/| /' conftest.$ac_ext >&5
2773
2774	ac_retval=1
2775fi
2776  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2777  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2778  # interfere with the next link command; also delete a directory that is
2779  # left behind by Apple's compiler.  We do this before executing the actions.
2780  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2781  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2782  as_fn_set_status $ac_retval
2783
2784} # ac_fn_cxx_try_link
2785
2786# ac_fn_cxx_check_func LINENO FUNC VAR
2787# ------------------------------------
2788# Tests whether FUNC exists, setting the cache variable VAR accordingly
2789ac_fn_cxx_check_func ()
2790{
2791  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2793$as_echo_n "checking for $2... " >&6; }
2794if eval \${$3+:} false; then :
2795  $as_echo_n "(cached) " >&6
2796else
2797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2798/* end confdefs.h.  */
2799/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2800   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2801#define $2 innocuous_$2
2802
2803/* System header to define __stub macros and hopefully few prototypes,
2804    which can conflict with char $2 (); below.
2805    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2806    <limits.h> exists even on freestanding compilers.  */
2807
2808#ifdef __STDC__
2809# include <limits.h>
2810#else
2811# include <assert.h>
2812#endif
2813
2814#undef $2
2815
2816/* Override any GCC internal prototype to avoid an error.
2817   Use char because int might match the return type of a GCC
2818   builtin and then its argument prototype would still apply.  */
2819#ifdef __cplusplus
2820extern "C"
2821#endif
2822char $2 ();
2823/* The GNU C library defines this for functions which it implements
2824    to always fail with ENOSYS.  Some functions are actually named
2825    something starting with __ and the normal name is an alias.  */
2826#if defined __stub_$2 || defined __stub___$2
2827choke me
2828#endif
2829
2830int
2831main ()
2832{
2833return $2 ();
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838if ac_fn_cxx_try_link "$LINENO"; then :
2839  eval "$3=yes"
2840else
2841  eval "$3=no"
2842fi
2843rm -f core conftest.err conftest.$ac_objext \
2844    conftest$ac_exeext conftest.$ac_ext
2845fi
2846eval ac_res=\$$3
2847	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2848$as_echo "$ac_res" >&6; }
2849  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2850
2851} # ac_fn_cxx_check_func
2852
2853# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2854# -------------------------------------------------------
2855# Tests whether HEADER exists and can be compiled using the include files in
2856# INCLUDES, setting the cache variable VAR accordingly.
2857ac_fn_c_check_header_compile ()
2858{
2859  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2861$as_echo_n "checking for $2... " >&6; }
2862if eval \${$3+:} false; then :
2863  $as_echo_n "(cached) " >&6
2864else
2865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866/* end confdefs.h.  */
2867$4
2868#include <$2>
2869_ACEOF
2870if ac_fn_c_try_compile "$LINENO"; then :
2871  eval "$3=yes"
2872else
2873  eval "$3=no"
2874fi
2875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2876fi
2877eval ac_res=\$$3
2878	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2879$as_echo "$ac_res" >&6; }
2880  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2881
2882} # ac_fn_c_check_header_compile
2883cat >config.log <<_ACEOF
2884This file contains any messages produced by compilers while
2885running configure, to aid debugging if configure makes a mistake.
2886
2887It was created by OpenJDK $as_me jdk9, which was
2888generated by GNU Autoconf 2.69.  Invocation command line was
2889
2890  $ $0 $@
2891
2892_ACEOF
2893exec 5>>config.log
2894{
2895cat <<_ASUNAME
2896## --------- ##
2897## Platform. ##
2898## --------- ##
2899
2900hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2901uname -m = `(uname -m) 2>/dev/null || echo unknown`
2902uname -r = `(uname -r) 2>/dev/null || echo unknown`
2903uname -s = `(uname -s) 2>/dev/null || echo unknown`
2904uname -v = `(uname -v) 2>/dev/null || echo unknown`
2905
2906/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2907/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2908
2909/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2910/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2911/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2912/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2913/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2914/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2915/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2916
2917_ASUNAME
2918
2919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2920for as_dir in $PATH
2921do
2922  IFS=$as_save_IFS
2923  test -z "$as_dir" && as_dir=.
2924    $as_echo "PATH: $as_dir"
2925  done
2926IFS=$as_save_IFS
2927
2928} >&5
2929
2930cat >&5 <<_ACEOF
2931
2932
2933## ----------- ##
2934## Core tests. ##
2935## ----------- ##
2936
2937_ACEOF
2938
2939
2940# Keep a trace of the command line.
2941# Strip out --no-create and --no-recursion so they do not pile up.
2942# Strip out --silent because we don't want to record it for future runs.
2943# Also quote any args containing shell meta-characters.
2944# Make two passes to allow for proper duplicate-argument suppression.
2945ac_configure_args=
2946ac_configure_args0=
2947ac_configure_args1=
2948ac_must_keep_next=false
2949for ac_pass in 1 2
2950do
2951  for ac_arg
2952  do
2953    case $ac_arg in
2954    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2955    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2956    | -silent | --silent | --silen | --sile | --sil)
2957      continue ;;
2958    *\'*)
2959      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2960    esac
2961    case $ac_pass in
2962    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2963    2)
2964      as_fn_append ac_configure_args1 " '$ac_arg'"
2965      if test $ac_must_keep_next = true; then
2966	ac_must_keep_next=false # Got value, back to normal.
2967      else
2968	case $ac_arg in
2969	  *=* | --config-cache | -C | -disable-* | --disable-* \
2970	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2971	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2972	  | -with-* | --with-* | -without-* | --without-* | --x)
2973	    case "$ac_configure_args0 " in
2974	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2975	    esac
2976	    ;;
2977	  -* ) ac_must_keep_next=true ;;
2978	esac
2979      fi
2980      as_fn_append ac_configure_args " '$ac_arg'"
2981      ;;
2982    esac
2983  done
2984done
2985{ ac_configure_args0=; unset ac_configure_args0;}
2986{ ac_configure_args1=; unset ac_configure_args1;}
2987
2988# When interrupted or exit'd, cleanup temporary files, and complete
2989# config.log.  We remove comments because anyway the quotes in there
2990# would cause problems or look ugly.
2991# WARNING: Use '\'' to represent an apostrophe within the trap.
2992# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2993trap 'exit_status=$?
2994  # Save into config.log some information that might help in debugging.
2995  {
2996    echo
2997
2998    $as_echo "## ---------------- ##
2999## Cache variables. ##
3000## ---------------- ##"
3001    echo
3002    # The following way of writing the cache mishandles newlines in values,
3003(
3004  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3005    eval ac_val=\$$ac_var
3006    case $ac_val in #(
3007    *${as_nl}*)
3008      case $ac_var in #(
3009      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3010$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3011      esac
3012      case $ac_var in #(
3013      _ | IFS | as_nl) ;; #(
3014      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3015      *) { eval $ac_var=; unset $ac_var;} ;;
3016      esac ;;
3017    esac
3018  done
3019  (set) 2>&1 |
3020    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3021    *${as_nl}ac_space=\ *)
3022      sed -n \
3023	"s/'\''/'\''\\\\'\'''\''/g;
3024	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3025      ;; #(
3026    *)
3027      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3028      ;;
3029    esac |
3030    sort
3031)
3032    echo
3033
3034    $as_echo "## ----------------- ##
3035## Output variables. ##
3036## ----------------- ##"
3037    echo
3038    for ac_var in $ac_subst_vars
3039    do
3040      eval ac_val=\$$ac_var
3041      case $ac_val in
3042      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3043      esac
3044      $as_echo "$ac_var='\''$ac_val'\''"
3045    done | sort
3046    echo
3047
3048    if test -n "$ac_subst_files"; then
3049      $as_echo "## ------------------- ##
3050## File substitutions. ##
3051## ------------------- ##"
3052      echo
3053      for ac_var in $ac_subst_files
3054      do
3055	eval ac_val=\$$ac_var
3056	case $ac_val in
3057	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3058	esac
3059	$as_echo "$ac_var='\''$ac_val'\''"
3060      done | sort
3061      echo
3062    fi
3063
3064    if test -s confdefs.h; then
3065      $as_echo "## ----------- ##
3066## confdefs.h. ##
3067## ----------- ##"
3068      echo
3069      cat confdefs.h
3070      echo
3071    fi
3072    test "$ac_signal" != 0 &&
3073      $as_echo "$as_me: caught signal $ac_signal"
3074    $as_echo "$as_me: exit $exit_status"
3075  } >&5
3076  rm -f core *.core core.conftest.* &&
3077    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3078    exit $exit_status
3079' 0
3080for ac_signal in 1 2 13 15; do
3081  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3082done
3083ac_signal=0
3084
3085# confdefs.h avoids OS command line length limits that DEFS can exceed.
3086rm -f -r conftest* confdefs.h
3087
3088$as_echo "/* confdefs.h */" > confdefs.h
3089
3090# Predefined preprocessor variables.
3091
3092cat >>confdefs.h <<_ACEOF
3093#define PACKAGE_NAME "$PACKAGE_NAME"
3094_ACEOF
3095
3096cat >>confdefs.h <<_ACEOF
3097#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3098_ACEOF
3099
3100cat >>confdefs.h <<_ACEOF
3101#define PACKAGE_VERSION "$PACKAGE_VERSION"
3102_ACEOF
3103
3104cat >>confdefs.h <<_ACEOF
3105#define PACKAGE_STRING "$PACKAGE_STRING"
3106_ACEOF
3107
3108cat >>confdefs.h <<_ACEOF
3109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3110_ACEOF
3111
3112cat >>confdefs.h <<_ACEOF
3113#define PACKAGE_URL "$PACKAGE_URL"
3114_ACEOF
3115
3116
3117# Let the site file select an alternate cache file if it wants to.
3118# Prefer an explicitly selected file to automatically selected ones.
3119ac_site_file1=NONE
3120ac_site_file2=NONE
3121if test -n "$CONFIG_SITE"; then
3122  # We do not want a PATH search for config.site.
3123  case $CONFIG_SITE in #((
3124    -*)  ac_site_file1=./$CONFIG_SITE;;
3125    */*) ac_site_file1=$CONFIG_SITE;;
3126    *)   ac_site_file1=./$CONFIG_SITE;;
3127  esac
3128elif test "x$prefix" != xNONE; then
3129  ac_site_file1=$prefix/share/config.site
3130  ac_site_file2=$prefix/etc/config.site
3131else
3132  ac_site_file1=$ac_default_prefix/share/config.site
3133  ac_site_file2=$ac_default_prefix/etc/config.site
3134fi
3135for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3136do
3137  test "x$ac_site_file" = xNONE && continue
3138  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3139    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3140$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3141    sed 's/^/| /' "$ac_site_file" >&5
3142    . "$ac_site_file" \
3143      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3145as_fn_error $? "failed to load site script $ac_site_file
3146See \`config.log' for more details" "$LINENO" 5; }
3147  fi
3148done
3149
3150if test -r "$cache_file"; then
3151  # Some versions of bash will fail to source /dev/null (special files
3152  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3153  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3154    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3155$as_echo "$as_me: loading cache $cache_file" >&6;}
3156    case $cache_file in
3157      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3158      *)                      . "./$cache_file";;
3159    esac
3160  fi
3161else
3162  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3163$as_echo "$as_me: creating cache $cache_file" >&6;}
3164  >$cache_file
3165fi
3166
3167# Check that the precious variables saved in the cache have kept the same
3168# value.
3169ac_cache_corrupted=false
3170for ac_var in $ac_precious_vars; do
3171  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3172  eval ac_new_set=\$ac_env_${ac_var}_set
3173  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3174  eval ac_new_val=\$ac_env_${ac_var}_value
3175  case $ac_old_set,$ac_new_set in
3176    set,)
3177      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3178$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3179      ac_cache_corrupted=: ;;
3180    ,set)
3181      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3182$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3183      ac_cache_corrupted=: ;;
3184    ,);;
3185    *)
3186      if test "x$ac_old_val" != "x$ac_new_val"; then
3187	# differences in whitespace do not lead to failure.
3188	ac_old_val_w=`echo x $ac_old_val`
3189	ac_new_val_w=`echo x $ac_new_val`
3190	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3191	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3192$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3193	  ac_cache_corrupted=:
3194	else
3195	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3196$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3197	  eval $ac_var=\$ac_old_val
3198	fi
3199	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3200$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3201	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3202$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3203      fi;;
3204  esac
3205  # Pass precious variables to config.status.
3206  if test "$ac_new_set" = set; then
3207    case $ac_new_val in
3208    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3209    *) ac_arg=$ac_var=$ac_new_val ;;
3210    esac
3211    case " $ac_configure_args " in
3212      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3213      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3214    esac
3215  fi
3216done
3217if $ac_cache_corrupted; then
3218  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3220  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3221$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3222  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3223fi
3224## -------------------- ##
3225## Main body of script. ##
3226## -------------------- ##
3227
3228ac_ext=c
3229ac_cpp='$CPP $CPPFLAGS'
3230ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3231ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3232ac_compiler_gnu=$ac_cv_c_compiler_gnu
3233
3234
3235
3236ac_aux_dir=
3237for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3238  if test -f "$ac_dir/install-sh"; then
3239    ac_aux_dir=$ac_dir
3240    ac_install_sh="$ac_aux_dir/install-sh -c"
3241    break
3242  elif test -f "$ac_dir/install.sh"; then
3243    ac_aux_dir=$ac_dir
3244    ac_install_sh="$ac_aux_dir/install.sh -c"
3245    break
3246  elif test -f "$ac_dir/shtool"; then
3247    ac_aux_dir=$ac_dir
3248    ac_install_sh="$ac_aux_dir/shtool install -c"
3249    break
3250  fi
3251done
3252if test -z "$ac_aux_dir"; then
3253  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
3254fi
3255
3256# These three variables are undocumented and unsupported,
3257# and are intended to be withdrawn in a future Autoconf release.
3258# They can cause serious problems if a builder's source tree is in a directory
3259# whose full name contains unusual characters.
3260ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3261ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3262ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3263
3264
3265# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3266
3267#
3268# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3269# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3270#
3271# This code is free software; you can redistribute it and/or modify it
3272# under the terms of the GNU General Public License version 2 only, as
3273# published by the Free Software Foundation.  Oracle designates this
3274# particular file as subject to the "Classpath" exception as provided
3275# by Oracle in the LICENSE file that accompanied this code.
3276#
3277# This code is distributed in the hope that it will be useful, but WITHOUT
3278# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3279# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3280# version 2 for more details (a copy is included in the LICENSE file that
3281# accompanied this code).
3282#
3283# You should have received a copy of the GNU General Public License version
3284# 2 along with this work; if not, write to the Free Software Foundation,
3285# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3286#
3287# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3288# or visit www.oracle.com if you need additional information or have any
3289# questions.
3290#
3291
3292#
3293# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3294#
3295# This program is free software; you can redistribute it and/or modify
3296# it under the terms of the GNU General Public License as published by
3297# the Free Software Foundation; either version 2 of the License, or
3298# (at your option) any later version.
3299#
3300# This program is distributed in the hope that it will be useful, but
3301# WITHOUT ANY WARRANTY; without even the implied warranty of
3302# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3303# General Public License for more details.
3304#
3305# You should have received a copy of the GNU General Public License
3306# along with this program; if not, write to the Free Software
3307# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3308#
3309# As a special exception to the GNU General Public License, if you
3310# distribute this file as part of a program that contains a
3311# configuration script generated by Autoconf, you may include it under
3312# the same distribution terms that you use for the rest of that program.
3313
3314# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3315# ----------------------------------
3316# PKG_PROG_PKG_CONFIG
3317
3318# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3319#
3320# Check to see whether a particular set of modules exists.  Similar
3321# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3322#
3323#
3324# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3325# this or PKG_CHECK_MODULES is called, or make sure to call
3326# PKG_CHECK_EXISTS manually
3327# --------------------------------------------------------------
3328
3329
3330
3331# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3332# ---------------------------------------------
3333# _PKG_CONFIG
3334
3335# _PKG_SHORT_ERRORS_SUPPORTED
3336# -----------------------------
3337# _PKG_SHORT_ERRORS_SUPPORTED
3338
3339
3340# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3341# [ACTION-IF-NOT-FOUND])
3342#
3343#
3344# Note that if there is a possibility the first call to
3345# PKG_CHECK_MODULES might not happen, you should be sure to include an
3346# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3347#
3348#
3349# --------------------------------------------------------------
3350# PKG_CHECK_MODULES
3351
3352
3353# Include these first...
3354#
3355# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3356# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3357#
3358# This code is free software; you can redistribute it and/or modify it
3359# under the terms of the GNU General Public License version 2 only, as
3360# published by the Free Software Foundation.  Oracle designates this
3361# particular file as subject to the "Classpath" exception as provided
3362# by Oracle in the LICENSE file that accompanied this code.
3363#
3364# This code is distributed in the hope that it will be useful, but WITHOUT
3365# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3366# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3367# version 2 for more details (a copy is included in the LICENSE file that
3368# accompanied this code).
3369#
3370# You should have received a copy of the GNU General Public License version
3371# 2 along with this work; if not, write to the Free Software Foundation,
3372# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3373#
3374# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3375# or visit www.oracle.com if you need additional information or have any
3376# questions.
3377#
3378
3379# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3380# If so, then append $1 to $2 \
3381# Also set JVM_ARG_OK to true/false depending on outcome.
3382
3383
3384# Appends a string to a path variable, only adding the : when needed.
3385
3386
3387# Prepends a string to a path variable, only adding the : when needed.
3388
3389
3390# This will make sure the given variable points to a full and proper
3391# path. This means:
3392# 1) There will be no spaces in the path. On unix platforms,
3393#    spaces in the path will result in an error. On Windows,
3394#    the path will be rewritten using short-style to be space-free.
3395# 2) The path will be absolute, and it will be in unix-style (on
3396#     cygwin).
3397# $1: The name of the variable to fix
3398
3399
3400# This will make sure the given variable points to a executable
3401# with a full and proper path. This means:
3402# 1) There will be no spaces in the path. On unix platforms,
3403#    spaces in the path will result in an error. On Windows,
3404#    the path will be rewritten using short-style to be space-free.
3405# 2) The path will be absolute, and it will be in unix-style (on
3406#     cygwin).
3407# Any arguments given to the executable is preserved.
3408# If the input variable does not have a directory specification, then
3409# it need to be in the PATH.
3410# $1: The name of the variable to fix
3411
3412
3413
3414
3415# Register a --with argument but mark it as deprecated
3416# $1: The name of the with argument to deprecate, not including --with-
3417
3418
3419# Register a --enable argument but mark it as deprecated
3420# $1: The name of the with argument to deprecate, not including --enable-
3421# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3422
3423
3424
3425
3426# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3427# $1: variable to check
3428
3429
3430# Check that there are no unprocessed overridden variables left.
3431# If so, they are an incorrect argument and we will exit with an error.
3432
3433
3434# Setup a tool for the given variable. If correctly specified by the user,
3435# use that value, otherwise search for the tool using the supplied code snippet.
3436# $1: variable to set
3437# $2: code snippet to call to look for the tool
3438# $3: code snippet to call if variable was used to find tool
3439
3440
3441# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3442# $1: variable to set
3443# $2: executable name (or list of names) to look for
3444
3445
3446# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3447# $1: variable to set
3448# $2: executable name (or list of names) to look for
3449
3450
3451# Like BASIC_PATH_PROGS but fails if no tool was found.
3452# $1: variable to set
3453# $2: executable name (or list of names) to look for
3454
3455
3456# Like BASIC_SETUP_TOOL but fails if no tool was found.
3457# $1: variable to set
3458# $2: autoconf macro to call to look for the special tool
3459
3460
3461# Setup the most fundamental tools that relies on not much else to set up,
3462# but is used by much of the early bootstrap code.
3463
3464
3465# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3466
3467
3468# Evaluates platform specific overrides for devkit variables.
3469# $1: Name of variable
3470
3471
3472
3473
3474
3475
3476#%%% Simple tools %%%
3477
3478# Check if we have found a usable version of make
3479# $1: the path to a potential make binary (or empty)
3480# $2: the description on how we found this
3481
3482
3483
3484
3485# Goes looking for a usable version of GNU make.
3486
3487
3488
3489
3490
3491
3492# Check if build directory is on local disk. If not possible to determine,
3493# we prefer to claim it's local.
3494# Argument 1: directory to test
3495# Argument 2: what to do if it is on local disk
3496# Argument 3: what to do otherwise (remote disk or failure)
3497
3498
3499# Check that source files have basic read permissions set. This might
3500# not be the case in cygwin in certain conditions.
3501
3502
3503
3504
3505# Check for support for specific options in bash
3506
3507
3508# Code to run after AC_OUTPUT
3509
3510
3511#
3512# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3513# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3514#
3515# This code is free software; you can redistribute it and/or modify it
3516# under the terms of the GNU General Public License version 2 only, as
3517# published by the Free Software Foundation.  Oracle designates this
3518# particular file as subject to the "Classpath" exception as provided
3519# by Oracle in the LICENSE file that accompanied this code.
3520#
3521# This code is distributed in the hope that it will be useful, but WITHOUT
3522# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3523# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3524# version 2 for more details (a copy is included in the LICENSE file that
3525# accompanied this code).
3526#
3527# You should have received a copy of the GNU General Public License version
3528# 2 along with this work; if not, write to the Free Software Foundation,
3529# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3530#
3531# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3532# or visit www.oracle.com if you need additional information or have any
3533# questions.
3534#
3535
3536
3537
3538
3539
3540# Helper function which possibly converts a path using DOS-style short mode.
3541# If so, the updated path is stored in $new_path.
3542# $1: The path to check
3543
3544
3545# Helper function which possibly converts a path using DOS-style short mode.
3546# If so, the updated path is stored in $new_path.
3547# $1: The path to check
3548
3549
3550# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3551# and could probably be heavily simplified. However, all changes in this
3552# area tend to need lot of testing in different scenarios, and in lack of
3553# proper unit testing, cleaning this up has not been deemed worth the effort
3554# at the moment.
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3565
3566
3567
3568
3569# ... then the rest
3570#
3571# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3572# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3573#
3574# This code is free software; you can redistribute it and/or modify it
3575# under the terms of the GNU General Public License version 2 only, as
3576# published by the Free Software Foundation.  Oracle designates this
3577# particular file as subject to the "Classpath" exception as provided
3578# by Oracle in the LICENSE file that accompanied this code.
3579#
3580# This code is distributed in the hope that it will be useful, but WITHOUT
3581# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3582# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3583# version 2 for more details (a copy is included in the LICENSE file that
3584# accompanied this code).
3585#
3586# You should have received a copy of the GNU General Public License version
3587# 2 along with this work; if not, write to the Free Software Foundation,
3588# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3589#
3590# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3591# or visit www.oracle.com if you need additional information or have any
3592# questions.
3593#
3594
3595########################################################################
3596# This file handles detection of the Boot JDK. The Boot JDK detection
3597# process has been developed as a response to solve a complex real-world
3598# problem. Initially, it was simple, but it has grown as platform after
3599# platform, idiosyncracy after idiosyncracy has been supported.
3600#
3601# The basic idea is this:
3602# 1) You need an acceptable *) JDK to use as a Boot JDK
3603# 2) There are several ways to locate a JDK, that are mostly platform
3604#    dependent **)
3605# 3) You can have multiple JDKs installed
3606# 4) If possible, configure should try to dig out an acceptable JDK
3607#    automatically, without having to resort to command-line options
3608#
3609# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3610#     javac) and not a JRE, etc.
3611#
3612# **) On Windows we typically use a well-known path.
3613#     On MacOSX we typically use the tool java_home.
3614#     On Linux we typically find javac in the $PATH, and then follow a
3615#     chain of symlinks that often ends up in a real JDK.
3616#
3617# This leads to the code where we check in different ways to locate a
3618# JDK, and if one is found, check if it is acceptable. If not, we print
3619# our reasons for rejecting it (useful when debugging non-working
3620# configure situations) and continue checking the next one.
3621########################################################################
3622
3623# Execute the check given as argument, and verify the result
3624# If the Boot JDK was previously found, do nothing
3625# $1 A command line (typically autoconf macro) to execute
3626
3627
3628# Test: Is bootjdk explicitely set by command line arguments?
3629
3630
3631# Test: Is $JAVA_HOME set?
3632
3633
3634# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3635
3636
3637# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3638# $1: Argument to the java_home binary (optional)
3639
3640
3641# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3642
3643
3644# Look for a jdk in the given path. If there are multiple, try to select the newest.
3645# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3646# $1 = Path to directory containing jdk installations.
3647# $2 = String to append to the found JDK directory to get the proper JDK home
3648
3649
3650# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3651# environmental variable as base for where to look.
3652# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3653
3654
3655# Test: Is there a JDK installed in default, well-known locations?
3656
3657
3658# Check that a command-line tool in the Boot JDK is correct
3659# $1 = name of variable to assign
3660# $2 = name of binary
3661
3662
3663###############################################################################
3664#
3665# We need a Boot JDK to bootstrap the build.
3666#
3667
3668
3669
3670
3671
3672#
3673# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3674# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3675#
3676# This code is free software; you can redistribute it and/or modify it
3677# under the terms of the GNU General Public License version 2 only, as
3678# published by the Free Software Foundation.  Oracle designates this
3679# particular file as subject to the "Classpath" exception as provided
3680# by Oracle in the LICENSE file that accompanied this code.
3681#
3682# This code is distributed in the hope that it will be useful, but WITHOUT
3683# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3684# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3685# version 2 for more details (a copy is included in the LICENSE file that
3686# accompanied this code).
3687#
3688# You should have received a copy of the GNU General Public License version
3689# 2 along with this work; if not, write to the Free Software Foundation,
3690# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3691#
3692# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3693# or visit www.oracle.com if you need additional information or have any
3694# questions.
3695#
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716#
3717# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3718# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3719#
3720# This code is free software; you can redistribute it and/or modify it
3721# under the terms of the GNU General Public License version 2 only, as
3722# published by the Free Software Foundation.  Oracle designates this
3723# particular file as subject to the "Classpath" exception as provided
3724# by Oracle in the LICENSE file that accompanied this code.
3725#
3726# This code is distributed in the hope that it will be useful, but WITHOUT
3727# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3728# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3729# version 2 for more details (a copy is included in the LICENSE file that
3730# accompanied this code).
3731#
3732# You should have received a copy of the GNU General Public License version
3733# 2 along with this work; if not, write to the Free Software Foundation,
3734# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3735#
3736# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3737# or visit www.oracle.com if you need additional information or have any
3738# questions.
3739#
3740
3741# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3742# corresponding configure arguments instead
3743
3744
3745# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3746# that configure can use them while detecting compilers.
3747# TOOLCHAIN_TYPE is available here.
3748# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3749
3750
3751
3752
3753
3754
3755# Documentation on common flags used for solstudio in HIGHEST.
3756#
3757# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3758#          done with care, there are some assumptions below that need to
3759#          be understood about the use of pointers, and IEEE behavior.
3760#
3761# -fns: Use non-standard floating point mode (not IEEE 754)
3762# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3763# -fsingle: Use single precision floating point with 'float'
3764# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3765#   (Source with excessing pointer casting and data access with mixed
3766#    pointer types are not recommended)
3767# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3768#   (If you expect perfect errno behavior, do not use this)
3769# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3770# -xrestrict: Pointer parameters to functions do not overlap
3771#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3772#    If you pass in multiple pointers to the same data, do not use this)
3773# -xlibmil: Inline some library routines
3774#   (If you expect perfect errno behavior, do not use this)
3775# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3776#   (If you expect perfect errno behavior, do not use this)
3777#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3778
3779    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3780    # Bug?
3781    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3782    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3783    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3784    #fi
3785
3786
3787
3788
3789
3790# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3791#                                   [RUN-IF-FALSE])
3792# ------------------------------------------------------------
3793# Check that the c and c++ compilers support an argument
3794
3795
3796# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3797#                                    [RUN-IF-FALSE])
3798# ------------------------------------------------------------
3799# Check that the linker support an argument
3800
3801
3802
3803
3804#
3805# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3806# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3807#
3808# This code is free software; you can redistribute it and/or modify it
3809# under the terms of the GNU General Public License version 2 only, as
3810# published by the Free Software Foundation.  Oracle designates this
3811# particular file as subject to the "Classpath" exception as provided
3812# by Oracle in the LICENSE file that accompanied this code.
3813#
3814# This code is distributed in the hope that it will be useful, but WITHOUT
3815# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3816# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3817# version 2 for more details (a copy is included in the LICENSE file that
3818# accompanied this code).
3819#
3820# You should have received a copy of the GNU General Public License version
3821# 2 along with this work; if not, write to the Free Software Foundation,
3822# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3823#
3824# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3825# or visit www.oracle.com if you need additional information or have any
3826# questions.
3827#
3828
3829
3830
3831
3832
3833cygwin_help() {
3834  case $1 in
3835    unzip)
3836      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3837      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3838      ;;
3839    zip)
3840      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3841      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3842      ;;
3843    make)
3844      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3845      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3846      ;;
3847    freetype)
3848      HELP_MSG="
3849The freetype library can now be build during the configure process.
3850Download the freetype sources and unpack them into an arbitrary directory:
3851
3852wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3853tar -xzf freetype-2.5.3.tar.gz
3854
3855Then run configure with '--with-freetype-src=<freetype_src>'. This will
3856automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3857builds or into '<freetype_src>/lib32' for 32-bit builds.
3858Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3859and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3860      ;;
3861  esac
3862}
3863
3864msys_help() {
3865  PKGHANDLER_COMMAND=""
3866}
3867
3868apt_help() {
3869  case $1 in
3870    reduced)
3871      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3872    devkit)
3873      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3874    openjdk)
3875      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3876    alsa)
3877      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3878    cups)
3879      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3880    freetype)
3881      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3882    ffi)
3883      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3884    x11)
3885      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3886    ccache)
3887      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3888  esac
3889}
3890
3891yum_help() {
3892  case $1 in
3893    devkit)
3894      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3895    openjdk)
3896      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3897    alsa)
3898      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3899    cups)
3900      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3901    freetype)
3902      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3903    x11)
3904      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3905    ccache)
3906      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3907  esac
3908}
3909
3910port_help() {
3911  PKGHANDLER_COMMAND=""
3912}
3913
3914pkgutil_help() {
3915  PKGHANDLER_COMMAND=""
3916}
3917
3918pkgadd_help() {
3919  PKGHANDLER_COMMAND=""
3920}
3921
3922# This function will check if we're called from the "configure" wrapper while
3923# printing --help. If so, we will print out additional information that can
3924# only be extracted within the autoconf script, and then exit. This must be
3925# called at the very beginning in configure.ac.
3926
3927
3928
3929
3930
3931
3932#
3933# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3935#
3936# This code is free software; you can redistribute it and/or modify it
3937# under the terms of the GNU General Public License version 2 only, as
3938# published by the Free Software Foundation.  Oracle designates this
3939# particular file as subject to the "Classpath" exception as provided
3940# by Oracle in the LICENSE file that accompanied this code.
3941#
3942# This code is distributed in the hope that it will be useful, but WITHOUT
3943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3945# version 2 for more details (a copy is included in the LICENSE file that
3946# accompanied this code).
3947#
3948# You should have received a copy of the GNU General Public License version
3949# 2 along with this work; if not, write to the Free Software Foundation,
3950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3951#
3952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3953# or visit www.oracle.com if you need additional information or have any
3954# questions.
3955#
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966###############################################################################
3967#
3968# Should we build only OpenJDK even if closed sources are present?
3969#
3970
3971
3972
3973
3974###############################################################################
3975#
3976# Setup version numbers
3977#
3978
3979
3980
3981
3982
3983
3984################################################################################
3985#
3986# Gcov coverage data for hotspot
3987#
3988
3989
3990#
3991# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3992# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3993#
3994# This code is free software; you can redistribute it and/or modify it
3995# under the terms of the GNU General Public License version 2 only, as
3996# published by the Free Software Foundation.  Oracle designates this
3997# particular file as subject to the "Classpath" exception as provided
3998# by Oracle in the LICENSE file that accompanied this code.
3999#
4000# This code is distributed in the hope that it will be useful, but WITHOUT
4001# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4002# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4003# version 2 for more details (a copy is included in the LICENSE file that
4004# accompanied this code).
4005#
4006# You should have received a copy of the GNU General Public License version
4007# 2 along with this work; if not, write to the Free Software Foundation,
4008# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4009#
4010# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4011# or visit www.oracle.com if you need additional information or have any
4012# questions.
4013#
4014
4015# Major library component reside in separate files.
4016#
4017# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4018# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4019#
4020# This code is free software; you can redistribute it and/or modify it
4021# under the terms of the GNU General Public License version 2 only, as
4022# published by the Free Software Foundation.  Oracle designates this
4023# particular file as subject to the "Classpath" exception as provided
4024# by Oracle in the LICENSE file that accompanied this code.
4025#
4026# This code is distributed in the hope that it will be useful, but WITHOUT
4027# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4028# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4029# version 2 for more details (a copy is included in the LICENSE file that
4030# accompanied this code).
4031#
4032# You should have received a copy of the GNU General Public License version
4033# 2 along with this work; if not, write to the Free Software Foundation,
4034# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4035#
4036# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4037# or visit www.oracle.com if you need additional information or have any
4038# questions.
4039#
4040
4041################################################################################
4042# Setup alsa (Advanced Linux Sound Architecture)
4043################################################################################
4044
4045
4046#
4047# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4048# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4049#
4050# This code is free software; you can redistribute it and/or modify it
4051# under the terms of the GNU General Public License version 2 only, as
4052# published by the Free Software Foundation.  Oracle designates this
4053# particular file as subject to the "Classpath" exception as provided
4054# by Oracle in the LICENSE file that accompanied this code.
4055#
4056# This code is distributed in the hope that it will be useful, but WITHOUT
4057# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4058# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4059# version 2 for more details (a copy is included in the LICENSE file that
4060# accompanied this code).
4061#
4062# You should have received a copy of the GNU General Public License version
4063# 2 along with this work; if not, write to the Free Software Foundation,
4064# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4065#
4066# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4067# or visit www.oracle.com if you need additional information or have any
4068# questions.
4069#
4070
4071################################################################################
4072# Setup bundled libraries.
4073#
4074# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4075# OpenJDK repository. Default is to use these libraries as bundled, but they
4076# might be replaced by en external version by the user.
4077################################################################################
4078
4079
4080################################################################################
4081# Setup libjpeg
4082################################################################################
4083
4084
4085################################################################################
4086# Setup giflib
4087################################################################################
4088
4089
4090################################################################################
4091# Setup libpng
4092################################################################################
4093
4094
4095################################################################################
4096# Setup zlib
4097################################################################################
4098
4099
4100################################################################################
4101# Setup lcms (Little CMS)
4102################################################################################
4103
4104
4105#
4106# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4107# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4108#
4109# This code is free software; you can redistribute it and/or modify it
4110# under the terms of the GNU General Public License version 2 only, as
4111# published by the Free Software Foundation.  Oracle designates this
4112# particular file as subject to the "Classpath" exception as provided
4113# by Oracle in the LICENSE file that accompanied this code.
4114#
4115# This code is distributed in the hope that it will be useful, but WITHOUT
4116# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4117# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4118# version 2 for more details (a copy is included in the LICENSE file that
4119# accompanied this code).
4120#
4121# You should have received a copy of the GNU General Public License version
4122# 2 along with this work; if not, write to the Free Software Foundation,
4123# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4124#
4125# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4126# or visit www.oracle.com if you need additional information or have any
4127# questions.
4128#
4129
4130################################################################################
4131# Setup cups (Common Unix Printing System)
4132################################################################################
4133
4134
4135#
4136# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4137# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4138#
4139# This code is free software; you can redistribute it and/or modify it
4140# under the terms of the GNU General Public License version 2 only, as
4141# published by the Free Software Foundation.  Oracle designates this
4142# particular file as subject to the "Classpath" exception as provided
4143# by Oracle in the LICENSE file that accompanied this code.
4144#
4145# This code is distributed in the hope that it will be useful, but WITHOUT
4146# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4147# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4148# version 2 for more details (a copy is included in the LICENSE file that
4149# accompanied this code).
4150#
4151# You should have received a copy of the GNU General Public License version
4152# 2 along with this work; if not, write to the Free Software Foundation,
4153# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4154#
4155# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4156# or visit www.oracle.com if you need additional information or have any
4157# questions.
4158#
4159
4160################################################################################
4161# Setup libffi (Foreign Function Interface)
4162################################################################################
4163
4164
4165#
4166# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4167# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4168#
4169# This code is free software; you can redistribute it and/or modify it
4170# under the terms of the GNU General Public License version 2 only, as
4171# published by the Free Software Foundation.  Oracle designates this
4172# particular file as subject to the "Classpath" exception as provided
4173# by Oracle in the LICENSE file that accompanied this code.
4174#
4175# This code is distributed in the hope that it will be useful, but WITHOUT
4176# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4177# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4178# version 2 for more details (a copy is included in the LICENSE file that
4179# accompanied this code).
4180#
4181# You should have received a copy of the GNU General Public License version
4182# 2 along with this work; if not, write to the Free Software Foundation,
4183# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4184#
4185# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4186# or visit www.oracle.com if you need additional information or have any
4187# questions.
4188#
4189
4190################################################################################
4191# Build the freetype lib from source
4192################################################################################
4193
4194
4195################################################################################
4196# Check if a potential freeype library match is correct and usable
4197################################################################################
4198
4199
4200################################################################################
4201# Setup freetype (The FreeType2 font rendering library)
4202################################################################################
4203
4204
4205#
4206# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4207# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4208#
4209# This code is free software; you can redistribute it and/or modify it
4210# under the terms of the GNU General Public License version 2 only, as
4211# published by the Free Software Foundation.  Oracle designates this
4212# particular file as subject to the "Classpath" exception as provided
4213# by Oracle in the LICENSE file that accompanied this code.
4214#
4215# This code is distributed in the hope that it will be useful, but WITHOUT
4216# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4217# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4218# version 2 for more details (a copy is included in the LICENSE file that
4219# accompanied this code).
4220#
4221# You should have received a copy of the GNU General Public License version
4222# 2 along with this work; if not, write to the Free Software Foundation,
4223# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4224#
4225# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4226# or visit www.oracle.com if you need additional information or have any
4227# questions.
4228#
4229
4230################################################################################
4231# Setup the standard C/C++ runtime libraries.
4232#
4233# Most importantly, determine if stdc++ should be linked statically or
4234# dynamically.
4235################################################################################
4236
4237
4238#
4239# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4240# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4241#
4242# This code is free software; you can redistribute it and/or modify it
4243# under the terms of the GNU General Public License version 2 only, as
4244# published by the Free Software Foundation.  Oracle designates this
4245# particular file as subject to the "Classpath" exception as provided
4246# by Oracle in the LICENSE file that accompanied this code.
4247#
4248# This code is distributed in the hope that it will be useful, but WITHOUT
4249# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4250# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4251# version 2 for more details (a copy is included in the LICENSE file that
4252# accompanied this code).
4253#
4254# You should have received a copy of the GNU General Public License version
4255# 2 along with this work; if not, write to the Free Software Foundation,
4256# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4257#
4258# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4259# or visit www.oracle.com if you need additional information or have any
4260# questions.
4261#
4262
4263################################################################################
4264# Setup X11 Windows system
4265################################################################################
4266
4267
4268
4269################################################################################
4270# Determine which libraries are needed for this configuration
4271################################################################################
4272
4273
4274################################################################################
4275# Parse library options, and setup needed libraries
4276################################################################################
4277
4278
4279################################################################################
4280# Setup llvm (Low-Level VM)
4281################################################################################
4282
4283
4284################################################################################
4285# Setup various libraries, typically small system libraries
4286################################################################################
4287
4288
4289#
4290# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4292#
4293# This code is free software; you can redistribute it and/or modify it
4294# under the terms of the GNU General Public License version 2 only, as
4295# published by the Free Software Foundation.  Oracle designates this
4296# particular file as subject to the "Classpath" exception as provided
4297# by Oracle in the LICENSE file that accompanied this code.
4298#
4299# This code is distributed in the hope that it will be useful, but WITHOUT
4300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4302# version 2 for more details (a copy is included in the LICENSE file that
4303# accompanied this code).
4304#
4305# You should have received a copy of the GNU General Public License version
4306# 2 along with this work; if not, write to the Free Software Foundation,
4307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4308#
4309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4310# or visit www.oracle.com if you need additional information or have any
4311# questions.
4312#
4313
4314# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4315# Converts autoconf style CPU name to OpenJDK style, into
4316# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4317
4318
4319# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4320# Converts autoconf style OS name to OpenJDK style, into
4321# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4322
4323
4324# Expects $host_os $host_cpu $build_os and $build_cpu
4325# and $with_target_bits to have been setup!
4326#
4327# Translate the standard triplet(quadruplet) definition
4328# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4329# OPENJDK_BUILD_OS, etc.
4330
4331
4332# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4333# accordingly. Must be done after setting up build and target system, but before
4334# doing anything else with these values.
4335
4336
4337# Setup the legacy variables, for controlling the old makefiles.
4338#
4339
4340
4341
4342
4343#%%% Build and target systems %%%
4344
4345
4346
4347
4348# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4349# Add -mX to various FLAGS variables.
4350
4351
4352
4353
4354
4355
4356#
4357# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4358# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4359#
4360# This code is free software; you can redistribute it and/or modify it
4361# under the terms of the GNU General Public License version 2 only, as
4362# published by the Free Software Foundation.  Oracle designates this
4363# particular file as subject to the "Classpath" exception as provided
4364# by Oracle in the LICENSE file that accompanied this code.
4365#
4366# This code is distributed in the hope that it will be useful, but WITHOUT
4367# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4368# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4369# version 2 for more details (a copy is included in the LICENSE file that
4370# accompanied this code).
4371#
4372# You should have received a copy of the GNU General Public License version
4373# 2 along with this work; if not, write to the Free Software Foundation,
4374# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4375#
4376# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4377# or visit www.oracle.com if you need additional information or have any
4378# questions.
4379#
4380
4381
4382
4383
4384
4385
4386
4387
4388#
4389# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4390# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4391#
4392# This code is free software; you can redistribute it and/or modify it
4393# under the terms of the GNU General Public License version 2 only, as
4394# published by the Free Software Foundation.  Oracle designates this
4395# particular file as subject to the "Classpath" exception as provided
4396# by Oracle in the LICENSE file that accompanied this code.
4397#
4398# This code is distributed in the hope that it will be useful, but WITHOUT
4399# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4400# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4401# version 2 for more details (a copy is included in the LICENSE file that
4402# accompanied this code).
4403#
4404# You should have received a copy of the GNU General Public License version
4405# 2 along with this work; if not, write to the Free Software Foundation,
4406# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4407#
4408# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4409# or visit www.oracle.com if you need additional information or have any
4410# questions.
4411#
4412
4413########################################################################
4414# This file is responsible for detecting, verifying and setting up the
4415# toolchain, i.e. the compiler, linker and related utilities. It will setup
4416# proper paths to the binaries, but it will not setup any flags.
4417#
4418# The binaries used is determined by the toolchain type, which is the family of
4419# compilers and related tools that are used.
4420########################################################################
4421
4422
4423# All valid toolchains, regardless of platform (used by help.m4)
4424VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4425
4426# These toolchains are valid on different platforms
4427VALID_TOOLCHAINS_linux="gcc clang"
4428VALID_TOOLCHAINS_solaris="solstudio"
4429VALID_TOOLCHAINS_macosx="gcc clang"
4430VALID_TOOLCHAINS_aix="xlc"
4431VALID_TOOLCHAINS_windows="microsoft"
4432
4433# Toolchain descriptions
4434TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4435TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4436TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4437TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4438TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4439
4440# Setup a number of variables describing how native output files are
4441# named on this platform/toolchain.
4442
4443
4444# Determine which toolchain type to use, and make sure it is valid for this
4445# platform. Setup various information about the selected toolchain.
4446
4447
4448# Before we start detecting the toolchain executables, we might need some
4449# special setup, e.g. additional paths etc.
4450
4451
4452# Restore path, etc
4453
4454
4455# Check if a compiler is of the toolchain type we expect, and save the version
4456# information from it. If the compiler does not match the expected type,
4457# this function will abort using AC_MSG_ERROR. If it matches, the version will
4458# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4459# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4460#
4461# $1 = compiler to test (CC or CXX)
4462# $2 = human readable name of compiler (C or C++)
4463
4464
4465# Try to locate the given C or C++ compiler in the path, or otherwise.
4466#
4467# $1 = compiler to test (CC or CXX)
4468# $2 = human readable name of compiler (C or C++)
4469# $3 = list of compiler names to search for
4470
4471
4472# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4473# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4474# archiver (AR). Verify that the compilers are correct according to the
4475# toolchain type.
4476
4477
4478# Setup additional tools that is considered a part of the toolchain, but not the
4479# core part. Many of these are highly platform-specific and do not exist,
4480# and/or are not needed on all platforms.
4481
4482
4483# Setup the build tools (i.e, the compiler and linker used to build programs
4484# that should be run on the build platform, not the target platform, as a build
4485# helper). Since the non-cross-compile case uses the normal, target compilers
4486# for this, we can only do this after these have been setup.
4487
4488
4489# Setup legacy variables that are still needed as alternative ways to refer to
4490# parts of the toolchain.
4491
4492
4493# Do some additional checks on the detected tools.
4494
4495
4496# Setup the JTReg Regression Test Harness.
4497
4498
4499#
4500# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4501# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4502#
4503# This code is free software; you can redistribute it and/or modify it
4504# under the terms of the GNU General Public License version 2 only, as
4505# published by the Free Software Foundation.  Oracle designates this
4506# particular file as subject to the "Classpath" exception as provided
4507# by Oracle in the LICENSE file that accompanied this code.
4508#
4509# This code is distributed in the hope that it will be useful, but WITHOUT
4510# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4511# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4512# version 2 for more details (a copy is included in the LICENSE file that
4513# accompanied this code).
4514#
4515# You should have received a copy of the GNU General Public License version
4516# 2 along with this work; if not, write to the Free Software Foundation,
4517# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4518#
4519# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4520# or visit www.oracle.com if you need additional information or have any
4521# questions.
4522#
4523
4524################################################################################
4525# The order of these defines the priority by which we try to find them.
4526VALID_VS_VERSIONS="2013 2012 2010"
4527
4528VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4529VS_VERSION_INTERNAL_2010=100
4530VS_MSVCR_2010=msvcr100.dll
4531# We don't use msvcp on Visual Studio 2010
4532#VS_MSVCP_2010=msvcp100.dll
4533VS_ENVVAR_2010="VS100COMNTOOLS"
4534VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4535VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4536VS_VS_PLATFORM_NAME_2010="v100"
4537VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4538
4539VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4540VS_VERSION_INTERNAL_2012=110
4541VS_MSVCR_2012=msvcr110.dll
4542VS_MSVCP_2012=msvcp110.dll
4543VS_ENVVAR_2012="VS110COMNTOOLS"
4544VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4545VS_SDK_INSTALLDIR_2012=
4546VS_VS_PLATFORM_NAME_2012="v110"
4547VS_SDK_PLATFORM_NAME_2012=
4548
4549VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4550VS_VERSION_INTERNAL_2013=120
4551VS_MSVCR_2013=msvcr120.dll
4552VS_MSVCP_2013=msvcp120.dll
4553VS_ENVVAR_2013="VS120COMNTOOLS"
4554VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4555VS_SDK_INSTALLDIR_2013=
4556VS_VS_PLATFORM_NAME_2013="v120"
4557VS_SDK_PLATFORM_NAME_2013=
4558
4559################################################################################
4560
4561
4562
4563################################################################################
4564
4565
4566
4567################################################################################
4568# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4569# build environment and assigns it to VS_ENV_CMD
4570
4571
4572################################################################################
4573
4574
4575
4576################################################################################
4577# Check if the VS env variables were setup prior to running configure.
4578# If not, then find vcvarsall.bat and run it automatically, and integrate
4579# the set env variables into the spec file.
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594# This line needs to be here, verbatim, after all includes and the dummy hook
4595# definitions. It is replaced with custom functionality when building
4596# custom sources.
4597#CUSTOM_AUTOCONF_INCLUDE
4598
4599# Do not change or remove the following line, it is needed for consistency checks:
4600DATE_WHEN_GENERATED=1446637466
4601
4602###############################################################################
4603#
4604# Initialization / Boot-strapping
4605#
4606# The bootstrapping process needs to solve the "chicken or the egg" problem,
4607# thus it jumps back and forth, each time gaining something needed later on.
4608#
4609###############################################################################
4610
4611# If we are requested to print additional help, do that and then exit.
4612# This must be the very first call.
4613
4614  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4615    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4616    $PRINTF "Which are valid to use depends on the build platform.\n"
4617    for toolchain in $VALID_TOOLCHAINS_all; do
4618      # Use indirect variable referencing
4619      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4620      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4621      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4622    done
4623
4624    # And now exit directly
4625    exit 0
4626  fi
4627
4628
4629# Basic initialization that must happen first of all in the normal process.
4630
4631  # Save the original command line. This is passed to us by the wrapper configure script.
4632
4633  # Save the path variable before it gets changed
4634  ORIGINAL_PATH="$PATH"
4635
4636  DATE_WHEN_CONFIGURED=`LANG=C date`
4637
4638  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4639$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4640  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4641$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4642
4643
4644  # Start with tools that do not need have cross compilation support
4645  # and can be expected to be found in the default PATH. These tools are
4646  # used by configure.
4647
4648  # First are all the simple required tools.
4649
4650
4651
4652  # Publish this variable in the help.
4653
4654
4655  if [ -z "${BASENAME+x}" ]; then
4656    # The variable is not set by user, try to locate tool using the code snippet
4657    for ac_prog in basename
4658do
4659  # Extract the first word of "$ac_prog", so it can be a program name with args.
4660set dummy $ac_prog; ac_word=$2
4661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4662$as_echo_n "checking for $ac_word... " >&6; }
4663if ${ac_cv_path_BASENAME+:} false; then :
4664  $as_echo_n "(cached) " >&6
4665else
4666  case $BASENAME in
4667  [\\/]* | ?:[\\/]*)
4668  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4669  ;;
4670  *)
4671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4672for as_dir in $PATH
4673do
4674  IFS=$as_save_IFS
4675  test -z "$as_dir" && as_dir=.
4676    for ac_exec_ext in '' $ac_executable_extensions; do
4677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4678    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4680    break 2
4681  fi
4682done
4683  done
4684IFS=$as_save_IFS
4685
4686  ;;
4687esac
4688fi
4689BASENAME=$ac_cv_path_BASENAME
4690if test -n "$BASENAME"; then
4691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4692$as_echo "$BASENAME" >&6; }
4693else
4694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4695$as_echo "no" >&6; }
4696fi
4697
4698
4699  test -n "$BASENAME" && break
4700done
4701
4702  else
4703    # The variable is set, but is it from the command line or the environment?
4704
4705    # Try to remove the string !BASENAME! from our list.
4706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4708      # If it failed, the variable was not from the command line. Ignore it,
4709      # but warn the user (except for BASH, which is always set by the calling BASH).
4710      if test "xBASENAME" != xBASH; then
4711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4712$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4713      fi
4714      # Try to locate tool using the code snippet
4715      for ac_prog in basename
4716do
4717  # Extract the first word of "$ac_prog", so it can be a program name with args.
4718set dummy $ac_prog; ac_word=$2
4719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4720$as_echo_n "checking for $ac_word... " >&6; }
4721if ${ac_cv_path_BASENAME+:} false; then :
4722  $as_echo_n "(cached) " >&6
4723else
4724  case $BASENAME in
4725  [\\/]* | ?:[\\/]*)
4726  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4727  ;;
4728  *)
4729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4730for as_dir in $PATH
4731do
4732  IFS=$as_save_IFS
4733  test -z "$as_dir" && as_dir=.
4734    for ac_exec_ext in '' $ac_executable_extensions; do
4735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4736    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4738    break 2
4739  fi
4740done
4741  done
4742IFS=$as_save_IFS
4743
4744  ;;
4745esac
4746fi
4747BASENAME=$ac_cv_path_BASENAME
4748if test -n "$BASENAME"; then
4749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4750$as_echo "$BASENAME" >&6; }
4751else
4752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4753$as_echo "no" >&6; }
4754fi
4755
4756
4757  test -n "$BASENAME" && break
4758done
4759
4760    else
4761      # If it succeeded, then it was overridden by the user. We will use it
4762      # for the tool.
4763
4764      # First remove it from the list of overridden variables, so we can test
4765      # for unknown variables in the end.
4766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4767
4768      # Check if we try to supply an empty value
4769      if test "x$BASENAME" = x; then
4770        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4771$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4773$as_echo_n "checking for BASENAME... " >&6; }
4774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4775$as_echo "disabled" >&6; }
4776      else
4777        # Check if the provided tool contains a complete path.
4778        tool_specified="$BASENAME"
4779        tool_basename="${tool_specified##*/}"
4780        if test "x$tool_basename" = "x$tool_specified"; then
4781          # A command without a complete path is provided, search $PATH.
4782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4783$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4784          # Extract the first word of "$tool_basename", so it can be a program name with args.
4785set dummy $tool_basename; ac_word=$2
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4787$as_echo_n "checking for $ac_word... " >&6; }
4788if ${ac_cv_path_BASENAME+:} false; then :
4789  $as_echo_n "(cached) " >&6
4790else
4791  case $BASENAME in
4792  [\\/]* | ?:[\\/]*)
4793  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4794  ;;
4795  *)
4796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4797for as_dir in $PATH
4798do
4799  IFS=$as_save_IFS
4800  test -z "$as_dir" && as_dir=.
4801    for ac_exec_ext in '' $ac_executable_extensions; do
4802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4803    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4805    break 2
4806  fi
4807done
4808  done
4809IFS=$as_save_IFS
4810
4811  ;;
4812esac
4813fi
4814BASENAME=$ac_cv_path_BASENAME
4815if test -n "$BASENAME"; then
4816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4817$as_echo "$BASENAME" >&6; }
4818else
4819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4820$as_echo "no" >&6; }
4821fi
4822
4823
4824          if test "x$BASENAME" = x; then
4825            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4826          fi
4827        else
4828          # Otherwise we believe it is a complete path. Use it as it is.
4829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4830$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4832$as_echo_n "checking for BASENAME... " >&6; }
4833          if test ! -x "$tool_specified"; then
4834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4835$as_echo "not found" >&6; }
4836            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4837          fi
4838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4839$as_echo "$tool_specified" >&6; }
4840        fi
4841      fi
4842    fi
4843
4844  fi
4845
4846
4847
4848  if test "x$BASENAME" = x; then
4849    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4850  fi
4851
4852
4853
4854
4855
4856  # Publish this variable in the help.
4857
4858
4859  if [ -z "${BASH+x}" ]; then
4860    # The variable is not set by user, try to locate tool using the code snippet
4861    for ac_prog in bash
4862do
4863  # Extract the first word of "$ac_prog", so it can be a program name with args.
4864set dummy $ac_prog; ac_word=$2
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4866$as_echo_n "checking for $ac_word... " >&6; }
4867if ${ac_cv_path_BASH+:} false; then :
4868  $as_echo_n "(cached) " >&6
4869else
4870  case $BASH in
4871  [\\/]* | ?:[\\/]*)
4872  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4873  ;;
4874  *)
4875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4876for as_dir in $PATH
4877do
4878  IFS=$as_save_IFS
4879  test -z "$as_dir" && as_dir=.
4880    for ac_exec_ext in '' $ac_executable_extensions; do
4881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4882    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4884    break 2
4885  fi
4886done
4887  done
4888IFS=$as_save_IFS
4889
4890  ;;
4891esac
4892fi
4893BASH=$ac_cv_path_BASH
4894if test -n "$BASH"; then
4895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4896$as_echo "$BASH" >&6; }
4897else
4898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899$as_echo "no" >&6; }
4900fi
4901
4902
4903  test -n "$BASH" && break
4904done
4905
4906  else
4907    # The variable is set, but is it from the command line or the environment?
4908
4909    # Try to remove the string !BASH! from our list.
4910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4912      # If it failed, the variable was not from the command line. Ignore it,
4913      # but warn the user (except for BASH, which is always set by the calling BASH).
4914      if test "xBASH" != xBASH; then
4915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4916$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4917      fi
4918      # Try to locate tool using the code snippet
4919      for ac_prog in bash
4920do
4921  # Extract the first word of "$ac_prog", so it can be a program name with args.
4922set dummy $ac_prog; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if ${ac_cv_path_BASH+:} false; then :
4926  $as_echo_n "(cached) " >&6
4927else
4928  case $BASH in
4929  [\\/]* | ?:[\\/]*)
4930  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4931  ;;
4932  *)
4933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934for as_dir in $PATH
4935do
4936  IFS=$as_save_IFS
4937  test -z "$as_dir" && as_dir=.
4938    for ac_exec_ext in '' $ac_executable_extensions; do
4939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4940    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942    break 2
4943  fi
4944done
4945  done
4946IFS=$as_save_IFS
4947
4948  ;;
4949esac
4950fi
4951BASH=$ac_cv_path_BASH
4952if test -n "$BASH"; then
4953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4954$as_echo "$BASH" >&6; }
4955else
4956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957$as_echo "no" >&6; }
4958fi
4959
4960
4961  test -n "$BASH" && break
4962done
4963
4964    else
4965      # If it succeeded, then it was overridden by the user. We will use it
4966      # for the tool.
4967
4968      # First remove it from the list of overridden variables, so we can test
4969      # for unknown variables in the end.
4970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4971
4972      # Check if we try to supply an empty value
4973      if test "x$BASH" = x; then
4974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4975$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4977$as_echo_n "checking for BASH... " >&6; }
4978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4979$as_echo "disabled" >&6; }
4980      else
4981        # Check if the provided tool contains a complete path.
4982        tool_specified="$BASH"
4983        tool_basename="${tool_specified##*/}"
4984        if test "x$tool_basename" = "x$tool_specified"; then
4985          # A command without a complete path is provided, search $PATH.
4986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4987$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4988          # Extract the first word of "$tool_basename", so it can be a program name with args.
4989set dummy $tool_basename; ac_word=$2
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
4992if ${ac_cv_path_BASH+:} false; then :
4993  $as_echo_n "(cached) " >&6
4994else
4995  case $BASH in
4996  [\\/]* | ?:[\\/]*)
4997  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4998  ;;
4999  *)
5000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001for as_dir in $PATH
5002do
5003  IFS=$as_save_IFS
5004  test -z "$as_dir" && as_dir=.
5005    for ac_exec_ext in '' $ac_executable_extensions; do
5006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5007    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5009    break 2
5010  fi
5011done
5012  done
5013IFS=$as_save_IFS
5014
5015  ;;
5016esac
5017fi
5018BASH=$ac_cv_path_BASH
5019if test -n "$BASH"; then
5020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5021$as_echo "$BASH" >&6; }
5022else
5023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5024$as_echo "no" >&6; }
5025fi
5026
5027
5028          if test "x$BASH" = x; then
5029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5030          fi
5031        else
5032          # Otherwise we believe it is a complete path. Use it as it is.
5033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5034$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5036$as_echo_n "checking for BASH... " >&6; }
5037          if test ! -x "$tool_specified"; then
5038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5039$as_echo "not found" >&6; }
5040            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5041          fi
5042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5043$as_echo "$tool_specified" >&6; }
5044        fi
5045      fi
5046    fi
5047
5048  fi
5049
5050
5051
5052  if test "x$BASH" = x; then
5053    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5054  fi
5055
5056
5057
5058
5059
5060  # Publish this variable in the help.
5061
5062
5063  if [ -z "${CAT+x}" ]; then
5064    # The variable is not set by user, try to locate tool using the code snippet
5065    for ac_prog in cat
5066do
5067  # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_path_CAT+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074  case $CAT in
5075  [\\/]* | ?:[\\/]*)
5076  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5077  ;;
5078  *)
5079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082  IFS=$as_save_IFS
5083  test -z "$as_dir" && as_dir=.
5084    for ac_exec_ext in '' $ac_executable_extensions; do
5085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5086    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088    break 2
5089  fi
5090done
5091  done
5092IFS=$as_save_IFS
5093
5094  ;;
5095esac
5096fi
5097CAT=$ac_cv_path_CAT
5098if test -n "$CAT"; then
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5100$as_echo "$CAT" >&6; }
5101else
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107  test -n "$CAT" && break
5108done
5109
5110  else
5111    # The variable is set, but is it from the command line or the environment?
5112
5113    # Try to remove the string !CAT! from our list.
5114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5116      # If it failed, the variable was not from the command line. Ignore it,
5117      # but warn the user (except for BASH, which is always set by the calling BASH).
5118      if test "xCAT" != xBASH; then
5119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5120$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5121      fi
5122      # Try to locate tool using the code snippet
5123      for ac_prog in cat
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if ${ac_cv_path_CAT+:} false; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $CAT in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5144    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155CAT=$ac_cv_path_CAT
5156if test -n "$CAT"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5158$as_echo "$CAT" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$CAT" && break
5166done
5167
5168    else
5169      # If it succeeded, then it was overridden by the user. We will use it
5170      # for the tool.
5171
5172      # First remove it from the list of overridden variables, so we can test
5173      # for unknown variables in the end.
5174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5175
5176      # Check if we try to supply an empty value
5177      if test "x$CAT" = x; then
5178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5179$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5181$as_echo_n "checking for CAT... " >&6; }
5182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5183$as_echo "disabled" >&6; }
5184      else
5185        # Check if the provided tool contains a complete path.
5186        tool_specified="$CAT"
5187        tool_basename="${tool_specified##*/}"
5188        if test "x$tool_basename" = "x$tool_specified"; then
5189          # A command without a complete path is provided, search $PATH.
5190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5191$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5192          # Extract the first word of "$tool_basename", so it can be a program name with args.
5193set dummy $tool_basename; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_path_CAT+:} false; then :
5197  $as_echo_n "(cached) " >&6
5198else
5199  case $CAT in
5200  [\\/]* | ?:[\\/]*)
5201  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5202  ;;
5203  *)
5204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207  IFS=$as_save_IFS
5208  test -z "$as_dir" && as_dir=.
5209    for ac_exec_ext in '' $ac_executable_extensions; do
5210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5211    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213    break 2
5214  fi
5215done
5216  done
5217IFS=$as_save_IFS
5218
5219  ;;
5220esac
5221fi
5222CAT=$ac_cv_path_CAT
5223if test -n "$CAT"; then
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5225$as_echo "$CAT" >&6; }
5226else
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230
5231
5232          if test "x$CAT" = x; then
5233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5234          fi
5235        else
5236          # Otherwise we believe it is a complete path. Use it as it is.
5237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5238$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5240$as_echo_n "checking for CAT... " >&6; }
5241          if test ! -x "$tool_specified"; then
5242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5243$as_echo "not found" >&6; }
5244            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5245          fi
5246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5247$as_echo "$tool_specified" >&6; }
5248        fi
5249      fi
5250    fi
5251
5252  fi
5253
5254
5255
5256  if test "x$CAT" = x; then
5257    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5258  fi
5259
5260
5261
5262
5263
5264  # Publish this variable in the help.
5265
5266
5267  if [ -z "${CHMOD+x}" ]; then
5268    # The variable is not set by user, try to locate tool using the code snippet
5269    for ac_prog in chmod
5270do
5271  # Extract the first word of "$ac_prog", so it can be a program name with args.
5272set dummy $ac_prog; ac_word=$2
5273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274$as_echo_n "checking for $ac_word... " >&6; }
5275if ${ac_cv_path_CHMOD+:} false; then :
5276  $as_echo_n "(cached) " >&6
5277else
5278  case $CHMOD in
5279  [\\/]* | ?:[\\/]*)
5280  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5281  ;;
5282  *)
5283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284for as_dir in $PATH
5285do
5286  IFS=$as_save_IFS
5287  test -z "$as_dir" && as_dir=.
5288    for ac_exec_ext in '' $ac_executable_extensions; do
5289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292    break 2
5293  fi
5294done
5295  done
5296IFS=$as_save_IFS
5297
5298  ;;
5299esac
5300fi
5301CHMOD=$ac_cv_path_CHMOD
5302if test -n "$CHMOD"; then
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5304$as_echo "$CHMOD" >&6; }
5305else
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
5308fi
5309
5310
5311  test -n "$CHMOD" && break
5312done
5313
5314  else
5315    # The variable is set, but is it from the command line or the environment?
5316
5317    # Try to remove the string !CHMOD! from our list.
5318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5320      # If it failed, the variable was not from the command line. Ignore it,
5321      # but warn the user (except for BASH, which is always set by the calling BASH).
5322      if test "xCHMOD" != xBASH; then
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5324$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5325      fi
5326      # Try to locate tool using the code snippet
5327      for ac_prog in chmod
5328do
5329  # Extract the first word of "$ac_prog", so it can be a program name with args.
5330set dummy $ac_prog; ac_word=$2
5331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5332$as_echo_n "checking for $ac_word... " >&6; }
5333if ${ac_cv_path_CHMOD+:} false; then :
5334  $as_echo_n "(cached) " >&6
5335else
5336  case $CHMOD in
5337  [\\/]* | ?:[\\/]*)
5338  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5339  ;;
5340  *)
5341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5342for as_dir in $PATH
5343do
5344  IFS=$as_save_IFS
5345  test -z "$as_dir" && as_dir=.
5346    for ac_exec_ext in '' $ac_executable_extensions; do
5347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5348    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5350    break 2
5351  fi
5352done
5353  done
5354IFS=$as_save_IFS
5355
5356  ;;
5357esac
5358fi
5359CHMOD=$ac_cv_path_CHMOD
5360if test -n "$CHMOD"; then
5361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5362$as_echo "$CHMOD" >&6; }
5363else
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5365$as_echo "no" >&6; }
5366fi
5367
5368
5369  test -n "$CHMOD" && break
5370done
5371
5372    else
5373      # If it succeeded, then it was overridden by the user. We will use it
5374      # for the tool.
5375
5376      # First remove it from the list of overridden variables, so we can test
5377      # for unknown variables in the end.
5378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5379
5380      # Check if we try to supply an empty value
5381      if test "x$CHMOD" = x; then
5382        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5383$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5385$as_echo_n "checking for CHMOD... " >&6; }
5386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5387$as_echo "disabled" >&6; }
5388      else
5389        # Check if the provided tool contains a complete path.
5390        tool_specified="$CHMOD"
5391        tool_basename="${tool_specified##*/}"
5392        if test "x$tool_basename" = "x$tool_specified"; then
5393          # A command without a complete path is provided, search $PATH.
5394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5395$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5396          # Extract the first word of "$tool_basename", so it can be a program name with args.
5397set dummy $tool_basename; ac_word=$2
5398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5399$as_echo_n "checking for $ac_word... " >&6; }
5400if ${ac_cv_path_CHMOD+:} false; then :
5401  $as_echo_n "(cached) " >&6
5402else
5403  case $CHMOD in
5404  [\\/]* | ?:[\\/]*)
5405  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5406  ;;
5407  *)
5408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5409for as_dir in $PATH
5410do
5411  IFS=$as_save_IFS
5412  test -z "$as_dir" && as_dir=.
5413    for ac_exec_ext in '' $ac_executable_extensions; do
5414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5415    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5417    break 2
5418  fi
5419done
5420  done
5421IFS=$as_save_IFS
5422
5423  ;;
5424esac
5425fi
5426CHMOD=$ac_cv_path_CHMOD
5427if test -n "$CHMOD"; then
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5429$as_echo "$CHMOD" >&6; }
5430else
5431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5432$as_echo "no" >&6; }
5433fi
5434
5435
5436          if test "x$CHMOD" = x; then
5437            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5438          fi
5439        else
5440          # Otherwise we believe it is a complete path. Use it as it is.
5441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5442$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5444$as_echo_n "checking for CHMOD... " >&6; }
5445          if test ! -x "$tool_specified"; then
5446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5447$as_echo "not found" >&6; }
5448            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5449          fi
5450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5451$as_echo "$tool_specified" >&6; }
5452        fi
5453      fi
5454    fi
5455
5456  fi
5457
5458
5459
5460  if test "x$CHMOD" = x; then
5461    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5462  fi
5463
5464
5465
5466
5467
5468  # Publish this variable in the help.
5469
5470
5471  if [ -z "${CMP+x}" ]; then
5472    # The variable is not set by user, try to locate tool using the code snippet
5473    for ac_prog in cmp
5474do
5475  # Extract the first word of "$ac_prog", so it can be a program name with args.
5476set dummy $ac_prog; ac_word=$2
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478$as_echo_n "checking for $ac_word... " >&6; }
5479if ${ac_cv_path_CMP+:} false; then :
5480  $as_echo_n "(cached) " >&6
5481else
5482  case $CMP in
5483  [\\/]* | ?:[\\/]*)
5484  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5485  ;;
5486  *)
5487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490  IFS=$as_save_IFS
5491  test -z "$as_dir" && as_dir=.
5492    for ac_exec_ext in '' $ac_executable_extensions; do
5493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496    break 2
5497  fi
5498done
5499  done
5500IFS=$as_save_IFS
5501
5502  ;;
5503esac
5504fi
5505CMP=$ac_cv_path_CMP
5506if test -n "$CMP"; then
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5508$as_echo "$CMP" >&6; }
5509else
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511$as_echo "no" >&6; }
5512fi
5513
5514
5515  test -n "$CMP" && break
5516done
5517
5518  else
5519    # The variable is set, but is it from the command line or the environment?
5520
5521    # Try to remove the string !CMP! from our list.
5522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5524      # If it failed, the variable was not from the command line. Ignore it,
5525      # but warn the user (except for BASH, which is always set by the calling BASH).
5526      if test "xCMP" != xBASH; then
5527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5528$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5529      fi
5530      # Try to locate tool using the code snippet
5531      for ac_prog in cmp
5532do
5533  # Extract the first word of "$ac_prog", so it can be a program name with args.
5534set dummy $ac_prog; ac_word=$2
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5536$as_echo_n "checking for $ac_word... " >&6; }
5537if ${ac_cv_path_CMP+:} false; then :
5538  $as_echo_n "(cached) " >&6
5539else
5540  case $CMP in
5541  [\\/]* | ?:[\\/]*)
5542  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5543  ;;
5544  *)
5545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5546for as_dir in $PATH
5547do
5548  IFS=$as_save_IFS
5549  test -z "$as_dir" && as_dir=.
5550    for ac_exec_ext in '' $ac_executable_extensions; do
5551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5552    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5554    break 2
5555  fi
5556done
5557  done
5558IFS=$as_save_IFS
5559
5560  ;;
5561esac
5562fi
5563CMP=$ac_cv_path_CMP
5564if test -n "$CMP"; then
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5566$as_echo "$CMP" >&6; }
5567else
5568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5569$as_echo "no" >&6; }
5570fi
5571
5572
5573  test -n "$CMP" && break
5574done
5575
5576    else
5577      # If it succeeded, then it was overridden by the user. We will use it
5578      # for the tool.
5579
5580      # First remove it from the list of overridden variables, so we can test
5581      # for unknown variables in the end.
5582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5583
5584      # Check if we try to supply an empty value
5585      if test "x$CMP" = x; then
5586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5587$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5589$as_echo_n "checking for CMP... " >&6; }
5590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5591$as_echo "disabled" >&6; }
5592      else
5593        # Check if the provided tool contains a complete path.
5594        tool_specified="$CMP"
5595        tool_basename="${tool_specified##*/}"
5596        if test "x$tool_basename" = "x$tool_specified"; then
5597          # A command without a complete path is provided, search $PATH.
5598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5599$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5600          # Extract the first word of "$tool_basename", so it can be a program name with args.
5601set dummy $tool_basename; ac_word=$2
5602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5603$as_echo_n "checking for $ac_word... " >&6; }
5604if ${ac_cv_path_CMP+:} false; then :
5605  $as_echo_n "(cached) " >&6
5606else
5607  case $CMP in
5608  [\\/]* | ?:[\\/]*)
5609  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5610  ;;
5611  *)
5612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5613for as_dir in $PATH
5614do
5615  IFS=$as_save_IFS
5616  test -z "$as_dir" && as_dir=.
5617    for ac_exec_ext in '' $ac_executable_extensions; do
5618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5619    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5621    break 2
5622  fi
5623done
5624  done
5625IFS=$as_save_IFS
5626
5627  ;;
5628esac
5629fi
5630CMP=$ac_cv_path_CMP
5631if test -n "$CMP"; then
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5633$as_echo "$CMP" >&6; }
5634else
5635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5636$as_echo "no" >&6; }
5637fi
5638
5639
5640          if test "x$CMP" = x; then
5641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5642          fi
5643        else
5644          # Otherwise we believe it is a complete path. Use it as it is.
5645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5646$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5648$as_echo_n "checking for CMP... " >&6; }
5649          if test ! -x "$tool_specified"; then
5650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5651$as_echo "not found" >&6; }
5652            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5653          fi
5654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5655$as_echo "$tool_specified" >&6; }
5656        fi
5657      fi
5658    fi
5659
5660  fi
5661
5662
5663
5664  if test "x$CMP" = x; then
5665    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5666  fi
5667
5668
5669
5670
5671
5672  # Publish this variable in the help.
5673
5674
5675  if [ -z "${COMM+x}" ]; then
5676    # The variable is not set by user, try to locate tool using the code snippet
5677    for ac_prog in comm
5678do
5679  # Extract the first word of "$ac_prog", so it can be a program name with args.
5680set dummy $ac_prog; ac_word=$2
5681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5682$as_echo_n "checking for $ac_word... " >&6; }
5683if ${ac_cv_path_COMM+:} false; then :
5684  $as_echo_n "(cached) " >&6
5685else
5686  case $COMM in
5687  [\\/]* | ?:[\\/]*)
5688  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5689  ;;
5690  *)
5691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5692for as_dir in $PATH
5693do
5694  IFS=$as_save_IFS
5695  test -z "$as_dir" && as_dir=.
5696    for ac_exec_ext in '' $ac_executable_extensions; do
5697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5698    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5700    break 2
5701  fi
5702done
5703  done
5704IFS=$as_save_IFS
5705
5706  ;;
5707esac
5708fi
5709COMM=$ac_cv_path_COMM
5710if test -n "$COMM"; then
5711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5712$as_echo "$COMM" >&6; }
5713else
5714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715$as_echo "no" >&6; }
5716fi
5717
5718
5719  test -n "$COMM" && break
5720done
5721
5722  else
5723    # The variable is set, but is it from the command line or the environment?
5724
5725    # Try to remove the string !COMM! from our list.
5726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5728      # If it failed, the variable was not from the command line. Ignore it,
5729      # but warn the user (except for BASH, which is always set by the calling BASH).
5730      if test "xCOMM" != xBASH; then
5731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5732$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5733      fi
5734      # Try to locate tool using the code snippet
5735      for ac_prog in comm
5736do
5737  # Extract the first word of "$ac_prog", so it can be a program name with args.
5738set dummy $ac_prog; ac_word=$2
5739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5740$as_echo_n "checking for $ac_word... " >&6; }
5741if ${ac_cv_path_COMM+:} false; then :
5742  $as_echo_n "(cached) " >&6
5743else
5744  case $COMM in
5745  [\\/]* | ?:[\\/]*)
5746  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5747  ;;
5748  *)
5749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750for as_dir in $PATH
5751do
5752  IFS=$as_save_IFS
5753  test -z "$as_dir" && as_dir=.
5754    for ac_exec_ext in '' $ac_executable_extensions; do
5755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5756    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5758    break 2
5759  fi
5760done
5761  done
5762IFS=$as_save_IFS
5763
5764  ;;
5765esac
5766fi
5767COMM=$ac_cv_path_COMM
5768if test -n "$COMM"; then
5769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5770$as_echo "$COMM" >&6; }
5771else
5772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773$as_echo "no" >&6; }
5774fi
5775
5776
5777  test -n "$COMM" && break
5778done
5779
5780    else
5781      # If it succeeded, then it was overridden by the user. We will use it
5782      # for the tool.
5783
5784      # First remove it from the list of overridden variables, so we can test
5785      # for unknown variables in the end.
5786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5787
5788      # Check if we try to supply an empty value
5789      if test "x$COMM" = x; then
5790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5791$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5793$as_echo_n "checking for COMM... " >&6; }
5794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5795$as_echo "disabled" >&6; }
5796      else
5797        # Check if the provided tool contains a complete path.
5798        tool_specified="$COMM"
5799        tool_basename="${tool_specified##*/}"
5800        if test "x$tool_basename" = "x$tool_specified"; then
5801          # A command without a complete path is provided, search $PATH.
5802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5803$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5804          # Extract the first word of "$tool_basename", so it can be a program name with args.
5805set dummy $tool_basename; ac_word=$2
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5807$as_echo_n "checking for $ac_word... " >&6; }
5808if ${ac_cv_path_COMM+:} false; then :
5809  $as_echo_n "(cached) " >&6
5810else
5811  case $COMM in
5812  [\\/]* | ?:[\\/]*)
5813  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5814  ;;
5815  *)
5816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5817for as_dir in $PATH
5818do
5819  IFS=$as_save_IFS
5820  test -z "$as_dir" && as_dir=.
5821    for ac_exec_ext in '' $ac_executable_extensions; do
5822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5823    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5825    break 2
5826  fi
5827done
5828  done
5829IFS=$as_save_IFS
5830
5831  ;;
5832esac
5833fi
5834COMM=$ac_cv_path_COMM
5835if test -n "$COMM"; then
5836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5837$as_echo "$COMM" >&6; }
5838else
5839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5840$as_echo "no" >&6; }
5841fi
5842
5843
5844          if test "x$COMM" = x; then
5845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5846          fi
5847        else
5848          # Otherwise we believe it is a complete path. Use it as it is.
5849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5850$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5852$as_echo_n "checking for COMM... " >&6; }
5853          if test ! -x "$tool_specified"; then
5854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5855$as_echo "not found" >&6; }
5856            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5857          fi
5858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5859$as_echo "$tool_specified" >&6; }
5860        fi
5861      fi
5862    fi
5863
5864  fi
5865
5866
5867
5868  if test "x$COMM" = x; then
5869    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5870  fi
5871
5872
5873
5874
5875
5876  # Publish this variable in the help.
5877
5878
5879  if [ -z "${CP+x}" ]; then
5880    # The variable is not set by user, try to locate tool using the code snippet
5881    for ac_prog in cp
5882do
5883  # Extract the first word of "$ac_prog", so it can be a program name with args.
5884set dummy $ac_prog; ac_word=$2
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5886$as_echo_n "checking for $ac_word... " >&6; }
5887if ${ac_cv_path_CP+:} false; then :
5888  $as_echo_n "(cached) " >&6
5889else
5890  case $CP in
5891  [\\/]* | ?:[\\/]*)
5892  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5893  ;;
5894  *)
5895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5896for as_dir in $PATH
5897do
5898  IFS=$as_save_IFS
5899  test -z "$as_dir" && as_dir=.
5900    for ac_exec_ext in '' $ac_executable_extensions; do
5901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5902    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5904    break 2
5905  fi
5906done
5907  done
5908IFS=$as_save_IFS
5909
5910  ;;
5911esac
5912fi
5913CP=$ac_cv_path_CP
5914if test -n "$CP"; then
5915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5916$as_echo "$CP" >&6; }
5917else
5918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5919$as_echo "no" >&6; }
5920fi
5921
5922
5923  test -n "$CP" && break
5924done
5925
5926  else
5927    # The variable is set, but is it from the command line or the environment?
5928
5929    # Try to remove the string !CP! from our list.
5930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5932      # If it failed, the variable was not from the command line. Ignore it,
5933      # but warn the user (except for BASH, which is always set by the calling BASH).
5934      if test "xCP" != xBASH; then
5935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5936$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5937      fi
5938      # Try to locate tool using the code snippet
5939      for ac_prog in cp
5940do
5941  # Extract the first word of "$ac_prog", so it can be a program name with args.
5942set dummy $ac_prog; ac_word=$2
5943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5944$as_echo_n "checking for $ac_word... " >&6; }
5945if ${ac_cv_path_CP+:} false; then :
5946  $as_echo_n "(cached) " >&6
5947else
5948  case $CP in
5949  [\\/]* | ?:[\\/]*)
5950  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5951  ;;
5952  *)
5953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5954for as_dir in $PATH
5955do
5956  IFS=$as_save_IFS
5957  test -z "$as_dir" && as_dir=.
5958    for ac_exec_ext in '' $ac_executable_extensions; do
5959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5960    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5962    break 2
5963  fi
5964done
5965  done
5966IFS=$as_save_IFS
5967
5968  ;;
5969esac
5970fi
5971CP=$ac_cv_path_CP
5972if test -n "$CP"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5974$as_echo "$CP" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981  test -n "$CP" && break
5982done
5983
5984    else
5985      # If it succeeded, then it was overridden by the user. We will use it
5986      # for the tool.
5987
5988      # First remove it from the list of overridden variables, so we can test
5989      # for unknown variables in the end.
5990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5991
5992      # Check if we try to supply an empty value
5993      if test "x$CP" = x; then
5994        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
5995$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
5996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5997$as_echo_n "checking for CP... " >&6; }
5998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5999$as_echo "disabled" >&6; }
6000      else
6001        # Check if the provided tool contains a complete path.
6002        tool_specified="$CP"
6003        tool_basename="${tool_specified##*/}"
6004        if test "x$tool_basename" = "x$tool_specified"; then
6005          # A command without a complete path is provided, search $PATH.
6006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6007$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6008          # Extract the first word of "$tool_basename", so it can be a program name with args.
6009set dummy $tool_basename; ac_word=$2
6010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6011$as_echo_n "checking for $ac_word... " >&6; }
6012if ${ac_cv_path_CP+:} false; then :
6013  $as_echo_n "(cached) " >&6
6014else
6015  case $CP in
6016  [\\/]* | ?:[\\/]*)
6017  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6018  ;;
6019  *)
6020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021for as_dir in $PATH
6022do
6023  IFS=$as_save_IFS
6024  test -z "$as_dir" && as_dir=.
6025    for ac_exec_ext in '' $ac_executable_extensions; do
6026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6027    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6029    break 2
6030  fi
6031done
6032  done
6033IFS=$as_save_IFS
6034
6035  ;;
6036esac
6037fi
6038CP=$ac_cv_path_CP
6039if test -n "$CP"; then
6040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6041$as_echo "$CP" >&6; }
6042else
6043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044$as_echo "no" >&6; }
6045fi
6046
6047
6048          if test "x$CP" = x; then
6049            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6050          fi
6051        else
6052          # Otherwise we believe it is a complete path. Use it as it is.
6053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6054$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6055          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6056$as_echo_n "checking for CP... " >&6; }
6057          if test ! -x "$tool_specified"; then
6058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6059$as_echo "not found" >&6; }
6060            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6061          fi
6062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6063$as_echo "$tool_specified" >&6; }
6064        fi
6065      fi
6066    fi
6067
6068  fi
6069
6070
6071
6072  if test "x$CP" = x; then
6073    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6074  fi
6075
6076
6077
6078
6079
6080  # Publish this variable in the help.
6081
6082
6083  if [ -z "${CUT+x}" ]; then
6084    # The variable is not set by user, try to locate tool using the code snippet
6085    for ac_prog in cut
6086do
6087  # Extract the first word of "$ac_prog", so it can be a program name with args.
6088set dummy $ac_prog; ac_word=$2
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
6091if ${ac_cv_path_CUT+:} false; then :
6092  $as_echo_n "(cached) " >&6
6093else
6094  case $CUT in
6095  [\\/]* | ?:[\\/]*)
6096  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6097  ;;
6098  *)
6099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100for as_dir in $PATH
6101do
6102  IFS=$as_save_IFS
6103  test -z "$as_dir" && as_dir=.
6104    for ac_exec_ext in '' $ac_executable_extensions; do
6105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6106    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108    break 2
6109  fi
6110done
6111  done
6112IFS=$as_save_IFS
6113
6114  ;;
6115esac
6116fi
6117CUT=$ac_cv_path_CUT
6118if test -n "$CUT"; then
6119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6120$as_echo "$CUT" >&6; }
6121else
6122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124fi
6125
6126
6127  test -n "$CUT" && break
6128done
6129
6130  else
6131    # The variable is set, but is it from the command line or the environment?
6132
6133    # Try to remove the string !CUT! from our list.
6134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6136      # If it failed, the variable was not from the command line. Ignore it,
6137      # but warn the user (except for BASH, which is always set by the calling BASH).
6138      if test "xCUT" != xBASH; then
6139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6140$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6141      fi
6142      # Try to locate tool using the code snippet
6143      for ac_prog in cut
6144do
6145  # Extract the first word of "$ac_prog", so it can be a program name with args.
6146set dummy $ac_prog; ac_word=$2
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6148$as_echo_n "checking for $ac_word... " >&6; }
6149if ${ac_cv_path_CUT+:} false; then :
6150  $as_echo_n "(cached) " >&6
6151else
6152  case $CUT in
6153  [\\/]* | ?:[\\/]*)
6154  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6155  ;;
6156  *)
6157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6158for as_dir in $PATH
6159do
6160  IFS=$as_save_IFS
6161  test -z "$as_dir" && as_dir=.
6162    for ac_exec_ext in '' $ac_executable_extensions; do
6163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6164    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6166    break 2
6167  fi
6168done
6169  done
6170IFS=$as_save_IFS
6171
6172  ;;
6173esac
6174fi
6175CUT=$ac_cv_path_CUT
6176if test -n "$CUT"; then
6177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6178$as_echo "$CUT" >&6; }
6179else
6180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }
6182fi
6183
6184
6185  test -n "$CUT" && break
6186done
6187
6188    else
6189      # If it succeeded, then it was overridden by the user. We will use it
6190      # for the tool.
6191
6192      # First remove it from the list of overridden variables, so we can test
6193      # for unknown variables in the end.
6194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6195
6196      # Check if we try to supply an empty value
6197      if test "x$CUT" = x; then
6198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6199$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6201$as_echo_n "checking for CUT... " >&6; }
6202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6203$as_echo "disabled" >&6; }
6204      else
6205        # Check if the provided tool contains a complete path.
6206        tool_specified="$CUT"
6207        tool_basename="${tool_specified##*/}"
6208        if test "x$tool_basename" = "x$tool_specified"; then
6209          # A command without a complete path is provided, search $PATH.
6210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6211$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6212          # Extract the first word of "$tool_basename", so it can be a program name with args.
6213set dummy $tool_basename; ac_word=$2
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
6216if ${ac_cv_path_CUT+:} false; then :
6217  $as_echo_n "(cached) " >&6
6218else
6219  case $CUT in
6220  [\\/]* | ?:[\\/]*)
6221  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6222  ;;
6223  *)
6224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6225for as_dir in $PATH
6226do
6227  IFS=$as_save_IFS
6228  test -z "$as_dir" && as_dir=.
6229    for ac_exec_ext in '' $ac_executable_extensions; do
6230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6231    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6233    break 2
6234  fi
6235done
6236  done
6237IFS=$as_save_IFS
6238
6239  ;;
6240esac
6241fi
6242CUT=$ac_cv_path_CUT
6243if test -n "$CUT"; then
6244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6245$as_echo "$CUT" >&6; }
6246else
6247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6248$as_echo "no" >&6; }
6249fi
6250
6251
6252          if test "x$CUT" = x; then
6253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6254          fi
6255        else
6256          # Otherwise we believe it is a complete path. Use it as it is.
6257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6258$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6260$as_echo_n "checking for CUT... " >&6; }
6261          if test ! -x "$tool_specified"; then
6262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6263$as_echo "not found" >&6; }
6264            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6265          fi
6266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6267$as_echo "$tool_specified" >&6; }
6268        fi
6269      fi
6270    fi
6271
6272  fi
6273
6274
6275
6276  if test "x$CUT" = x; then
6277    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6278  fi
6279
6280
6281
6282
6283
6284  # Publish this variable in the help.
6285
6286
6287  if [ -z "${DATE+x}" ]; then
6288    # The variable is not set by user, try to locate tool using the code snippet
6289    for ac_prog in date
6290do
6291  # Extract the first word of "$ac_prog", so it can be a program name with args.
6292set dummy $ac_prog; ac_word=$2
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6294$as_echo_n "checking for $ac_word... " >&6; }
6295if ${ac_cv_path_DATE+:} false; then :
6296  $as_echo_n "(cached) " >&6
6297else
6298  case $DATE in
6299  [\\/]* | ?:[\\/]*)
6300  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6301  ;;
6302  *)
6303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6304for as_dir in $PATH
6305do
6306  IFS=$as_save_IFS
6307  test -z "$as_dir" && as_dir=.
6308    for ac_exec_ext in '' $ac_executable_extensions; do
6309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6310    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6312    break 2
6313  fi
6314done
6315  done
6316IFS=$as_save_IFS
6317
6318  ;;
6319esac
6320fi
6321DATE=$ac_cv_path_DATE
6322if test -n "$DATE"; then
6323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6324$as_echo "$DATE" >&6; }
6325else
6326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6327$as_echo "no" >&6; }
6328fi
6329
6330
6331  test -n "$DATE" && break
6332done
6333
6334  else
6335    # The variable is set, but is it from the command line or the environment?
6336
6337    # Try to remove the string !DATE! from our list.
6338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6340      # If it failed, the variable was not from the command line. Ignore it,
6341      # but warn the user (except for BASH, which is always set by the calling BASH).
6342      if test "xDATE" != xBASH; then
6343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6344$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6345      fi
6346      # Try to locate tool using the code snippet
6347      for ac_prog in date
6348do
6349  # Extract the first word of "$ac_prog", so it can be a program name with args.
6350set dummy $ac_prog; ac_word=$2
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6352$as_echo_n "checking for $ac_word... " >&6; }
6353if ${ac_cv_path_DATE+:} false; then :
6354  $as_echo_n "(cached) " >&6
6355else
6356  case $DATE in
6357  [\\/]* | ?:[\\/]*)
6358  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6359  ;;
6360  *)
6361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364  IFS=$as_save_IFS
6365  test -z "$as_dir" && as_dir=.
6366    for ac_exec_ext in '' $ac_executable_extensions; do
6367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6368    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6370    break 2
6371  fi
6372done
6373  done
6374IFS=$as_save_IFS
6375
6376  ;;
6377esac
6378fi
6379DATE=$ac_cv_path_DATE
6380if test -n "$DATE"; then
6381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6382$as_echo "$DATE" >&6; }
6383else
6384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6385$as_echo "no" >&6; }
6386fi
6387
6388
6389  test -n "$DATE" && break
6390done
6391
6392    else
6393      # If it succeeded, then it was overridden by the user. We will use it
6394      # for the tool.
6395
6396      # First remove it from the list of overridden variables, so we can test
6397      # for unknown variables in the end.
6398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6399
6400      # Check if we try to supply an empty value
6401      if test "x$DATE" = x; then
6402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6403$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6405$as_echo_n "checking for DATE... " >&6; }
6406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6407$as_echo "disabled" >&6; }
6408      else
6409        # Check if the provided tool contains a complete path.
6410        tool_specified="$DATE"
6411        tool_basename="${tool_specified##*/}"
6412        if test "x$tool_basename" = "x$tool_specified"; then
6413          # A command without a complete path is provided, search $PATH.
6414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6415$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6416          # Extract the first word of "$tool_basename", so it can be a program name with args.
6417set dummy $tool_basename; ac_word=$2
6418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419$as_echo_n "checking for $ac_word... " >&6; }
6420if ${ac_cv_path_DATE+:} false; then :
6421  $as_echo_n "(cached) " >&6
6422else
6423  case $DATE in
6424  [\\/]* | ?:[\\/]*)
6425  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6426  ;;
6427  *)
6428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429for as_dir in $PATH
6430do
6431  IFS=$as_save_IFS
6432  test -z "$as_dir" && as_dir=.
6433    for ac_exec_ext in '' $ac_executable_extensions; do
6434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6435    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437    break 2
6438  fi
6439done
6440  done
6441IFS=$as_save_IFS
6442
6443  ;;
6444esac
6445fi
6446DATE=$ac_cv_path_DATE
6447if test -n "$DATE"; then
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6449$as_echo "$DATE" >&6; }
6450else
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452$as_echo "no" >&6; }
6453fi
6454
6455
6456          if test "x$DATE" = x; then
6457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6458          fi
6459        else
6460          # Otherwise we believe it is a complete path. Use it as it is.
6461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6462$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6464$as_echo_n "checking for DATE... " >&6; }
6465          if test ! -x "$tool_specified"; then
6466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6467$as_echo "not found" >&6; }
6468            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6469          fi
6470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6471$as_echo "$tool_specified" >&6; }
6472        fi
6473      fi
6474    fi
6475
6476  fi
6477
6478
6479
6480  if test "x$DATE" = x; then
6481    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6482  fi
6483
6484
6485
6486
6487
6488  # Publish this variable in the help.
6489
6490
6491  if [ -z "${DIFF+x}" ]; then
6492    # The variable is not set by user, try to locate tool using the code snippet
6493    for ac_prog in gdiff diff
6494do
6495  # Extract the first word of "$ac_prog", so it can be a program name with args.
6496set dummy $ac_prog; ac_word=$2
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498$as_echo_n "checking for $ac_word... " >&6; }
6499if ${ac_cv_path_DIFF+:} false; then :
6500  $as_echo_n "(cached) " >&6
6501else
6502  case $DIFF in
6503  [\\/]* | ?:[\\/]*)
6504  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6505  ;;
6506  *)
6507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508for as_dir in $PATH
6509do
6510  IFS=$as_save_IFS
6511  test -z "$as_dir" && as_dir=.
6512    for ac_exec_ext in '' $ac_executable_extensions; do
6513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6514    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516    break 2
6517  fi
6518done
6519  done
6520IFS=$as_save_IFS
6521
6522  ;;
6523esac
6524fi
6525DIFF=$ac_cv_path_DIFF
6526if test -n "$DIFF"; then
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6528$as_echo "$DIFF" >&6; }
6529else
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534
6535  test -n "$DIFF" && break
6536done
6537
6538  else
6539    # The variable is set, but is it from the command line or the environment?
6540
6541    # Try to remove the string !DIFF! from our list.
6542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6544      # If it failed, the variable was not from the command line. Ignore it,
6545      # but warn the user (except for BASH, which is always set by the calling BASH).
6546      if test "xDIFF" != xBASH; then
6547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6548$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6549      fi
6550      # Try to locate tool using the code snippet
6551      for ac_prog in gdiff diff
6552do
6553  # Extract the first word of "$ac_prog", so it can be a program name with args.
6554set dummy $ac_prog; ac_word=$2
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556$as_echo_n "checking for $ac_word... " >&6; }
6557if ${ac_cv_path_DIFF+:} false; then :
6558  $as_echo_n "(cached) " >&6
6559else
6560  case $DIFF in
6561  [\\/]* | ?:[\\/]*)
6562  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6563  ;;
6564  *)
6565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6566for as_dir in $PATH
6567do
6568  IFS=$as_save_IFS
6569  test -z "$as_dir" && as_dir=.
6570    for ac_exec_ext in '' $ac_executable_extensions; do
6571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6572    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6574    break 2
6575  fi
6576done
6577  done
6578IFS=$as_save_IFS
6579
6580  ;;
6581esac
6582fi
6583DIFF=$ac_cv_path_DIFF
6584if test -n "$DIFF"; then
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6586$as_echo "$DIFF" >&6; }
6587else
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
6590fi
6591
6592
6593  test -n "$DIFF" && break
6594done
6595
6596    else
6597      # If it succeeded, then it was overridden by the user. We will use it
6598      # for the tool.
6599
6600      # First remove it from the list of overridden variables, so we can test
6601      # for unknown variables in the end.
6602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6603
6604      # Check if we try to supply an empty value
6605      if test "x$DIFF" = x; then
6606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6607$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6609$as_echo_n "checking for DIFF... " >&6; }
6610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6611$as_echo "disabled" >&6; }
6612      else
6613        # Check if the provided tool contains a complete path.
6614        tool_specified="$DIFF"
6615        tool_basename="${tool_specified##*/}"
6616        if test "x$tool_basename" = "x$tool_specified"; then
6617          # A command without a complete path is provided, search $PATH.
6618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6619$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6620          # Extract the first word of "$tool_basename", so it can be a program name with args.
6621set dummy $tool_basename; ac_word=$2
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623$as_echo_n "checking for $ac_word... " >&6; }
6624if ${ac_cv_path_DIFF+:} false; then :
6625  $as_echo_n "(cached) " >&6
6626else
6627  case $DIFF in
6628  [\\/]* | ?:[\\/]*)
6629  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6630  ;;
6631  *)
6632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6633for as_dir in $PATH
6634do
6635  IFS=$as_save_IFS
6636  test -z "$as_dir" && as_dir=.
6637    for ac_exec_ext in '' $ac_executable_extensions; do
6638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6639    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6641    break 2
6642  fi
6643done
6644  done
6645IFS=$as_save_IFS
6646
6647  ;;
6648esac
6649fi
6650DIFF=$ac_cv_path_DIFF
6651if test -n "$DIFF"; then
6652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6653$as_echo "$DIFF" >&6; }
6654else
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
6657fi
6658
6659
6660          if test "x$DIFF" = x; then
6661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6662          fi
6663        else
6664          # Otherwise we believe it is a complete path. Use it as it is.
6665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6666$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6668$as_echo_n "checking for DIFF... " >&6; }
6669          if test ! -x "$tool_specified"; then
6670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6671$as_echo "not found" >&6; }
6672            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6673          fi
6674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6675$as_echo "$tool_specified" >&6; }
6676        fi
6677      fi
6678    fi
6679
6680  fi
6681
6682
6683
6684  if test "x$DIFF" = x; then
6685    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6686  fi
6687
6688
6689
6690
6691
6692  # Publish this variable in the help.
6693
6694
6695  if [ -z "${DIRNAME+x}" ]; then
6696    # The variable is not set by user, try to locate tool using the code snippet
6697    for ac_prog in dirname
6698do
6699  # Extract the first word of "$ac_prog", so it can be a program name with args.
6700set dummy $ac_prog; ac_word=$2
6701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6702$as_echo_n "checking for $ac_word... " >&6; }
6703if ${ac_cv_path_DIRNAME+:} false; then :
6704  $as_echo_n "(cached) " >&6
6705else
6706  case $DIRNAME in
6707  [\\/]* | ?:[\\/]*)
6708  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6709  ;;
6710  *)
6711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6712for as_dir in $PATH
6713do
6714  IFS=$as_save_IFS
6715  test -z "$as_dir" && as_dir=.
6716    for ac_exec_ext in '' $ac_executable_extensions; do
6717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6718    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6720    break 2
6721  fi
6722done
6723  done
6724IFS=$as_save_IFS
6725
6726  ;;
6727esac
6728fi
6729DIRNAME=$ac_cv_path_DIRNAME
6730if test -n "$DIRNAME"; then
6731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6732$as_echo "$DIRNAME" >&6; }
6733else
6734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6735$as_echo "no" >&6; }
6736fi
6737
6738
6739  test -n "$DIRNAME" && break
6740done
6741
6742  else
6743    # The variable is set, but is it from the command line or the environment?
6744
6745    # Try to remove the string !DIRNAME! from our list.
6746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6748      # If it failed, the variable was not from the command line. Ignore it,
6749      # but warn the user (except for BASH, which is always set by the calling BASH).
6750      if test "xDIRNAME" != xBASH; then
6751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6752$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6753      fi
6754      # Try to locate tool using the code snippet
6755      for ac_prog in dirname
6756do
6757  # Extract the first word of "$ac_prog", so it can be a program name with args.
6758set dummy $ac_prog; ac_word=$2
6759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6760$as_echo_n "checking for $ac_word... " >&6; }
6761if ${ac_cv_path_DIRNAME+:} false; then :
6762  $as_echo_n "(cached) " >&6
6763else
6764  case $DIRNAME in
6765  [\\/]* | ?:[\\/]*)
6766  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6767  ;;
6768  *)
6769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6770for as_dir in $PATH
6771do
6772  IFS=$as_save_IFS
6773  test -z "$as_dir" && as_dir=.
6774    for ac_exec_ext in '' $ac_executable_extensions; do
6775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6776    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6778    break 2
6779  fi
6780done
6781  done
6782IFS=$as_save_IFS
6783
6784  ;;
6785esac
6786fi
6787DIRNAME=$ac_cv_path_DIRNAME
6788if test -n "$DIRNAME"; then
6789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6790$as_echo "$DIRNAME" >&6; }
6791else
6792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6793$as_echo "no" >&6; }
6794fi
6795
6796
6797  test -n "$DIRNAME" && break
6798done
6799
6800    else
6801      # If it succeeded, then it was overridden by the user. We will use it
6802      # for the tool.
6803
6804      # First remove it from the list of overridden variables, so we can test
6805      # for unknown variables in the end.
6806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6807
6808      # Check if we try to supply an empty value
6809      if test "x$DIRNAME" = x; then
6810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6811$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6813$as_echo_n "checking for DIRNAME... " >&6; }
6814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6815$as_echo "disabled" >&6; }
6816      else
6817        # Check if the provided tool contains a complete path.
6818        tool_specified="$DIRNAME"
6819        tool_basename="${tool_specified##*/}"
6820        if test "x$tool_basename" = "x$tool_specified"; then
6821          # A command without a complete path is provided, search $PATH.
6822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6823$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6824          # Extract the first word of "$tool_basename", so it can be a program name with args.
6825set dummy $tool_basename; ac_word=$2
6826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6827$as_echo_n "checking for $ac_word... " >&6; }
6828if ${ac_cv_path_DIRNAME+:} false; then :
6829  $as_echo_n "(cached) " >&6
6830else
6831  case $DIRNAME in
6832  [\\/]* | ?:[\\/]*)
6833  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6834  ;;
6835  *)
6836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6837for as_dir in $PATH
6838do
6839  IFS=$as_save_IFS
6840  test -z "$as_dir" && as_dir=.
6841    for ac_exec_ext in '' $ac_executable_extensions; do
6842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6843    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6845    break 2
6846  fi
6847done
6848  done
6849IFS=$as_save_IFS
6850
6851  ;;
6852esac
6853fi
6854DIRNAME=$ac_cv_path_DIRNAME
6855if test -n "$DIRNAME"; then
6856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6857$as_echo "$DIRNAME" >&6; }
6858else
6859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6860$as_echo "no" >&6; }
6861fi
6862
6863
6864          if test "x$DIRNAME" = x; then
6865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6866          fi
6867        else
6868          # Otherwise we believe it is a complete path. Use it as it is.
6869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6870$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6872$as_echo_n "checking for DIRNAME... " >&6; }
6873          if test ! -x "$tool_specified"; then
6874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6875$as_echo "not found" >&6; }
6876            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6877          fi
6878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6879$as_echo "$tool_specified" >&6; }
6880        fi
6881      fi
6882    fi
6883
6884  fi
6885
6886
6887
6888  if test "x$DIRNAME" = x; then
6889    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6890  fi
6891
6892
6893
6894
6895
6896  # Publish this variable in the help.
6897
6898
6899  if [ -z "${ECHO+x}" ]; then
6900    # The variable is not set by user, try to locate tool using the code snippet
6901    for ac_prog in echo
6902do
6903  # Extract the first word of "$ac_prog", so it can be a program name with args.
6904set dummy $ac_prog; ac_word=$2
6905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6906$as_echo_n "checking for $ac_word... " >&6; }
6907if ${ac_cv_path_ECHO+:} false; then :
6908  $as_echo_n "(cached) " >&6
6909else
6910  case $ECHO in
6911  [\\/]* | ?:[\\/]*)
6912  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6913  ;;
6914  *)
6915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6916for as_dir in $PATH
6917do
6918  IFS=$as_save_IFS
6919  test -z "$as_dir" && as_dir=.
6920    for ac_exec_ext in '' $ac_executable_extensions; do
6921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6922    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6924    break 2
6925  fi
6926done
6927  done
6928IFS=$as_save_IFS
6929
6930  ;;
6931esac
6932fi
6933ECHO=$ac_cv_path_ECHO
6934if test -n "$ECHO"; then
6935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6936$as_echo "$ECHO" >&6; }
6937else
6938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6939$as_echo "no" >&6; }
6940fi
6941
6942
6943  test -n "$ECHO" && break
6944done
6945
6946  else
6947    # The variable is set, but is it from the command line or the environment?
6948
6949    # Try to remove the string !ECHO! from our list.
6950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6952      # If it failed, the variable was not from the command line. Ignore it,
6953      # but warn the user (except for BASH, which is always set by the calling BASH).
6954      if test "xECHO" != xBASH; then
6955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6956$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6957      fi
6958      # Try to locate tool using the code snippet
6959      for ac_prog in echo
6960do
6961  # Extract the first word of "$ac_prog", so it can be a program name with args.
6962set dummy $ac_prog; ac_word=$2
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6964$as_echo_n "checking for $ac_word... " >&6; }
6965if ${ac_cv_path_ECHO+:} false; then :
6966  $as_echo_n "(cached) " >&6
6967else
6968  case $ECHO in
6969  [\\/]* | ?:[\\/]*)
6970  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6971  ;;
6972  *)
6973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6974for as_dir in $PATH
6975do
6976  IFS=$as_save_IFS
6977  test -z "$as_dir" && as_dir=.
6978    for ac_exec_ext in '' $ac_executable_extensions; do
6979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6980    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6982    break 2
6983  fi
6984done
6985  done
6986IFS=$as_save_IFS
6987
6988  ;;
6989esac
6990fi
6991ECHO=$ac_cv_path_ECHO
6992if test -n "$ECHO"; then
6993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6994$as_echo "$ECHO" >&6; }
6995else
6996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6997$as_echo "no" >&6; }
6998fi
6999
7000
7001  test -n "$ECHO" && break
7002done
7003
7004    else
7005      # If it succeeded, then it was overridden by the user. We will use it
7006      # for the tool.
7007
7008      # First remove it from the list of overridden variables, so we can test
7009      # for unknown variables in the end.
7010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7011
7012      # Check if we try to supply an empty value
7013      if test "x$ECHO" = x; then
7014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7015$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7017$as_echo_n "checking for ECHO... " >&6; }
7018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7019$as_echo "disabled" >&6; }
7020      else
7021        # Check if the provided tool contains a complete path.
7022        tool_specified="$ECHO"
7023        tool_basename="${tool_specified##*/}"
7024        if test "x$tool_basename" = "x$tool_specified"; then
7025          # A command without a complete path is provided, search $PATH.
7026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7027$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7028          # Extract the first word of "$tool_basename", so it can be a program name with args.
7029set dummy $tool_basename; ac_word=$2
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7031$as_echo_n "checking for $ac_word... " >&6; }
7032if ${ac_cv_path_ECHO+:} false; then :
7033  $as_echo_n "(cached) " >&6
7034else
7035  case $ECHO in
7036  [\\/]* | ?:[\\/]*)
7037  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7038  ;;
7039  *)
7040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7041for as_dir in $PATH
7042do
7043  IFS=$as_save_IFS
7044  test -z "$as_dir" && as_dir=.
7045    for ac_exec_ext in '' $ac_executable_extensions; do
7046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7047    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7049    break 2
7050  fi
7051done
7052  done
7053IFS=$as_save_IFS
7054
7055  ;;
7056esac
7057fi
7058ECHO=$ac_cv_path_ECHO
7059if test -n "$ECHO"; then
7060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7061$as_echo "$ECHO" >&6; }
7062else
7063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7064$as_echo "no" >&6; }
7065fi
7066
7067
7068          if test "x$ECHO" = x; then
7069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7070          fi
7071        else
7072          # Otherwise we believe it is a complete path. Use it as it is.
7073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7074$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7076$as_echo_n "checking for ECHO... " >&6; }
7077          if test ! -x "$tool_specified"; then
7078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7079$as_echo "not found" >&6; }
7080            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7081          fi
7082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7083$as_echo "$tool_specified" >&6; }
7084        fi
7085      fi
7086    fi
7087
7088  fi
7089
7090
7091
7092  if test "x$ECHO" = x; then
7093    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7094  fi
7095
7096
7097
7098
7099
7100  # Publish this variable in the help.
7101
7102
7103  if [ -z "${EXPR+x}" ]; then
7104    # The variable is not set by user, try to locate tool using the code snippet
7105    for ac_prog in expr
7106do
7107  # Extract the first word of "$ac_prog", so it can be a program name with args.
7108set dummy $ac_prog; ac_word=$2
7109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7110$as_echo_n "checking for $ac_word... " >&6; }
7111if ${ac_cv_path_EXPR+:} false; then :
7112  $as_echo_n "(cached) " >&6
7113else
7114  case $EXPR in
7115  [\\/]* | ?:[\\/]*)
7116  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7117  ;;
7118  *)
7119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7120for as_dir in $PATH
7121do
7122  IFS=$as_save_IFS
7123  test -z "$as_dir" && as_dir=.
7124    for ac_exec_ext in '' $ac_executable_extensions; do
7125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7126    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7128    break 2
7129  fi
7130done
7131  done
7132IFS=$as_save_IFS
7133
7134  ;;
7135esac
7136fi
7137EXPR=$ac_cv_path_EXPR
7138if test -n "$EXPR"; then
7139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7140$as_echo "$EXPR" >&6; }
7141else
7142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7143$as_echo "no" >&6; }
7144fi
7145
7146
7147  test -n "$EXPR" && break
7148done
7149
7150  else
7151    # The variable is set, but is it from the command line or the environment?
7152
7153    # Try to remove the string !EXPR! from our list.
7154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7156      # If it failed, the variable was not from the command line. Ignore it,
7157      # but warn the user (except for BASH, which is always set by the calling BASH).
7158      if test "xEXPR" != xBASH; then
7159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7160$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7161      fi
7162      # Try to locate tool using the code snippet
7163      for ac_prog in expr
7164do
7165  # Extract the first word of "$ac_prog", so it can be a program name with args.
7166set dummy $ac_prog; ac_word=$2
7167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7168$as_echo_n "checking for $ac_word... " >&6; }
7169if ${ac_cv_path_EXPR+:} false; then :
7170  $as_echo_n "(cached) " >&6
7171else
7172  case $EXPR in
7173  [\\/]* | ?:[\\/]*)
7174  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7175  ;;
7176  *)
7177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178for as_dir in $PATH
7179do
7180  IFS=$as_save_IFS
7181  test -z "$as_dir" && as_dir=.
7182    for ac_exec_ext in '' $ac_executable_extensions; do
7183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7184    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7186    break 2
7187  fi
7188done
7189  done
7190IFS=$as_save_IFS
7191
7192  ;;
7193esac
7194fi
7195EXPR=$ac_cv_path_EXPR
7196if test -n "$EXPR"; then
7197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7198$as_echo "$EXPR" >&6; }
7199else
7200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7201$as_echo "no" >&6; }
7202fi
7203
7204
7205  test -n "$EXPR" && break
7206done
7207
7208    else
7209      # If it succeeded, then it was overridden by the user. We will use it
7210      # for the tool.
7211
7212      # First remove it from the list of overridden variables, so we can test
7213      # for unknown variables in the end.
7214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7215
7216      # Check if we try to supply an empty value
7217      if test "x$EXPR" = x; then
7218        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7219$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7221$as_echo_n "checking for EXPR... " >&6; }
7222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7223$as_echo "disabled" >&6; }
7224      else
7225        # Check if the provided tool contains a complete path.
7226        tool_specified="$EXPR"
7227        tool_basename="${tool_specified##*/}"
7228        if test "x$tool_basename" = "x$tool_specified"; then
7229          # A command without a complete path is provided, search $PATH.
7230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7231$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7232          # Extract the first word of "$tool_basename", so it can be a program name with args.
7233set dummy $tool_basename; ac_word=$2
7234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7235$as_echo_n "checking for $ac_word... " >&6; }
7236if ${ac_cv_path_EXPR+:} false; then :
7237  $as_echo_n "(cached) " >&6
7238else
7239  case $EXPR in
7240  [\\/]* | ?:[\\/]*)
7241  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7242  ;;
7243  *)
7244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7245for as_dir in $PATH
7246do
7247  IFS=$as_save_IFS
7248  test -z "$as_dir" && as_dir=.
7249    for ac_exec_ext in '' $ac_executable_extensions; do
7250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7251    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7253    break 2
7254  fi
7255done
7256  done
7257IFS=$as_save_IFS
7258
7259  ;;
7260esac
7261fi
7262EXPR=$ac_cv_path_EXPR
7263if test -n "$EXPR"; then
7264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7265$as_echo "$EXPR" >&6; }
7266else
7267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7268$as_echo "no" >&6; }
7269fi
7270
7271
7272          if test "x$EXPR" = x; then
7273            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7274          fi
7275        else
7276          # Otherwise we believe it is a complete path. Use it as it is.
7277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7278$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7279          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7280$as_echo_n "checking for EXPR... " >&6; }
7281          if test ! -x "$tool_specified"; then
7282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7283$as_echo "not found" >&6; }
7284            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7285          fi
7286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7287$as_echo "$tool_specified" >&6; }
7288        fi
7289      fi
7290    fi
7291
7292  fi
7293
7294
7295
7296  if test "x$EXPR" = x; then
7297    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7298  fi
7299
7300
7301
7302
7303
7304  # Publish this variable in the help.
7305
7306
7307  if [ -z "${FILE+x}" ]; then
7308    # The variable is not set by user, try to locate tool using the code snippet
7309    for ac_prog in file
7310do
7311  # Extract the first word of "$ac_prog", so it can be a program name with args.
7312set dummy $ac_prog; ac_word=$2
7313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7314$as_echo_n "checking for $ac_word... " >&6; }
7315if ${ac_cv_path_FILE+:} false; then :
7316  $as_echo_n "(cached) " >&6
7317else
7318  case $FILE in
7319  [\\/]* | ?:[\\/]*)
7320  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7321  ;;
7322  *)
7323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7324for as_dir in $PATH
7325do
7326  IFS=$as_save_IFS
7327  test -z "$as_dir" && as_dir=.
7328    for ac_exec_ext in '' $ac_executable_extensions; do
7329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7330    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7332    break 2
7333  fi
7334done
7335  done
7336IFS=$as_save_IFS
7337
7338  ;;
7339esac
7340fi
7341FILE=$ac_cv_path_FILE
7342if test -n "$FILE"; then
7343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7344$as_echo "$FILE" >&6; }
7345else
7346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7347$as_echo "no" >&6; }
7348fi
7349
7350
7351  test -n "$FILE" && break
7352done
7353
7354  else
7355    # The variable is set, but is it from the command line or the environment?
7356
7357    # Try to remove the string !FILE! from our list.
7358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7360      # If it failed, the variable was not from the command line. Ignore it,
7361      # but warn the user (except for BASH, which is always set by the calling BASH).
7362      if test "xFILE" != xBASH; then
7363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7364$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7365      fi
7366      # Try to locate tool using the code snippet
7367      for ac_prog in file
7368do
7369  # Extract the first word of "$ac_prog", so it can be a program name with args.
7370set dummy $ac_prog; ac_word=$2
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7372$as_echo_n "checking for $ac_word... " >&6; }
7373if ${ac_cv_path_FILE+:} false; then :
7374  $as_echo_n "(cached) " >&6
7375else
7376  case $FILE in
7377  [\\/]* | ?:[\\/]*)
7378  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7379  ;;
7380  *)
7381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7382for as_dir in $PATH
7383do
7384  IFS=$as_save_IFS
7385  test -z "$as_dir" && as_dir=.
7386    for ac_exec_ext in '' $ac_executable_extensions; do
7387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7388    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7390    break 2
7391  fi
7392done
7393  done
7394IFS=$as_save_IFS
7395
7396  ;;
7397esac
7398fi
7399FILE=$ac_cv_path_FILE
7400if test -n "$FILE"; then
7401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7402$as_echo "$FILE" >&6; }
7403else
7404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7405$as_echo "no" >&6; }
7406fi
7407
7408
7409  test -n "$FILE" && break
7410done
7411
7412    else
7413      # If it succeeded, then it was overridden by the user. We will use it
7414      # for the tool.
7415
7416      # First remove it from the list of overridden variables, so we can test
7417      # for unknown variables in the end.
7418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7419
7420      # Check if we try to supply an empty value
7421      if test "x$FILE" = x; then
7422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7423$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7425$as_echo_n "checking for FILE... " >&6; }
7426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7427$as_echo "disabled" >&6; }
7428      else
7429        # Check if the provided tool contains a complete path.
7430        tool_specified="$FILE"
7431        tool_basename="${tool_specified##*/}"
7432        if test "x$tool_basename" = "x$tool_specified"; then
7433          # A command without a complete path is provided, search $PATH.
7434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7435$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7436          # Extract the first word of "$tool_basename", so it can be a program name with args.
7437set dummy $tool_basename; ac_word=$2
7438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7439$as_echo_n "checking for $ac_word... " >&6; }
7440if ${ac_cv_path_FILE+:} false; then :
7441  $as_echo_n "(cached) " >&6
7442else
7443  case $FILE in
7444  [\\/]* | ?:[\\/]*)
7445  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7446  ;;
7447  *)
7448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7449for as_dir in $PATH
7450do
7451  IFS=$as_save_IFS
7452  test -z "$as_dir" && as_dir=.
7453    for ac_exec_ext in '' $ac_executable_extensions; do
7454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7455    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7457    break 2
7458  fi
7459done
7460  done
7461IFS=$as_save_IFS
7462
7463  ;;
7464esac
7465fi
7466FILE=$ac_cv_path_FILE
7467if test -n "$FILE"; then
7468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7469$as_echo "$FILE" >&6; }
7470else
7471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7472$as_echo "no" >&6; }
7473fi
7474
7475
7476          if test "x$FILE" = x; then
7477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7478          fi
7479        else
7480          # Otherwise we believe it is a complete path. Use it as it is.
7481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7482$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7484$as_echo_n "checking for FILE... " >&6; }
7485          if test ! -x "$tool_specified"; then
7486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7487$as_echo "not found" >&6; }
7488            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7489          fi
7490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7491$as_echo "$tool_specified" >&6; }
7492        fi
7493      fi
7494    fi
7495
7496  fi
7497
7498
7499
7500  if test "x$FILE" = x; then
7501    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7502  fi
7503
7504
7505
7506
7507
7508  # Publish this variable in the help.
7509
7510
7511  if [ -z "${FIND+x}" ]; then
7512    # The variable is not set by user, try to locate tool using the code snippet
7513    for ac_prog in find
7514do
7515  # Extract the first word of "$ac_prog", so it can be a program name with args.
7516set dummy $ac_prog; ac_word=$2
7517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7518$as_echo_n "checking for $ac_word... " >&6; }
7519if ${ac_cv_path_FIND+:} false; then :
7520  $as_echo_n "(cached) " >&6
7521else
7522  case $FIND in
7523  [\\/]* | ?:[\\/]*)
7524  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7525  ;;
7526  *)
7527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528for as_dir in $PATH
7529do
7530  IFS=$as_save_IFS
7531  test -z "$as_dir" && as_dir=.
7532    for ac_exec_ext in '' $ac_executable_extensions; do
7533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7534    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7536    break 2
7537  fi
7538done
7539  done
7540IFS=$as_save_IFS
7541
7542  ;;
7543esac
7544fi
7545FIND=$ac_cv_path_FIND
7546if test -n "$FIND"; then
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7548$as_echo "$FIND" >&6; }
7549else
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7551$as_echo "no" >&6; }
7552fi
7553
7554
7555  test -n "$FIND" && break
7556done
7557
7558  else
7559    # The variable is set, but is it from the command line or the environment?
7560
7561    # Try to remove the string !FIND! from our list.
7562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7564      # If it failed, the variable was not from the command line. Ignore it,
7565      # but warn the user (except for BASH, which is always set by the calling BASH).
7566      if test "xFIND" != xBASH; then
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7568$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7569      fi
7570      # Try to locate tool using the code snippet
7571      for ac_prog in find
7572do
7573  # Extract the first word of "$ac_prog", so it can be a program name with args.
7574set dummy $ac_prog; ac_word=$2
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
7577if ${ac_cv_path_FIND+:} false; then :
7578  $as_echo_n "(cached) " >&6
7579else
7580  case $FIND in
7581  [\\/]* | ?:[\\/]*)
7582  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7583  ;;
7584  *)
7585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588  IFS=$as_save_IFS
7589  test -z "$as_dir" && as_dir=.
7590    for ac_exec_ext in '' $ac_executable_extensions; do
7591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7592    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7594    break 2
7595  fi
7596done
7597  done
7598IFS=$as_save_IFS
7599
7600  ;;
7601esac
7602fi
7603FIND=$ac_cv_path_FIND
7604if test -n "$FIND"; then
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7606$as_echo "$FIND" >&6; }
7607else
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
7610fi
7611
7612
7613  test -n "$FIND" && break
7614done
7615
7616    else
7617      # If it succeeded, then it was overridden by the user. We will use it
7618      # for the tool.
7619
7620      # First remove it from the list of overridden variables, so we can test
7621      # for unknown variables in the end.
7622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7623
7624      # Check if we try to supply an empty value
7625      if test "x$FIND" = x; then
7626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7627$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7629$as_echo_n "checking for FIND... " >&6; }
7630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7631$as_echo "disabled" >&6; }
7632      else
7633        # Check if the provided tool contains a complete path.
7634        tool_specified="$FIND"
7635        tool_basename="${tool_specified##*/}"
7636        if test "x$tool_basename" = "x$tool_specified"; then
7637          # A command without a complete path is provided, search $PATH.
7638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7639$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7640          # Extract the first word of "$tool_basename", so it can be a program name with args.
7641set dummy $tool_basename; ac_word=$2
7642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7643$as_echo_n "checking for $ac_word... " >&6; }
7644if ${ac_cv_path_FIND+:} false; then :
7645  $as_echo_n "(cached) " >&6
7646else
7647  case $FIND in
7648  [\\/]* | ?:[\\/]*)
7649  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7650  ;;
7651  *)
7652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7653for as_dir in $PATH
7654do
7655  IFS=$as_save_IFS
7656  test -z "$as_dir" && as_dir=.
7657    for ac_exec_ext in '' $ac_executable_extensions; do
7658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7659    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7661    break 2
7662  fi
7663done
7664  done
7665IFS=$as_save_IFS
7666
7667  ;;
7668esac
7669fi
7670FIND=$ac_cv_path_FIND
7671if test -n "$FIND"; then
7672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7673$as_echo "$FIND" >&6; }
7674else
7675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7676$as_echo "no" >&6; }
7677fi
7678
7679
7680          if test "x$FIND" = x; then
7681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7682          fi
7683        else
7684          # Otherwise we believe it is a complete path. Use it as it is.
7685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7686$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7688$as_echo_n "checking for FIND... " >&6; }
7689          if test ! -x "$tool_specified"; then
7690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7691$as_echo "not found" >&6; }
7692            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7693          fi
7694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7695$as_echo "$tool_specified" >&6; }
7696        fi
7697      fi
7698    fi
7699
7700  fi
7701
7702
7703
7704  if test "x$FIND" = x; then
7705    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7706  fi
7707
7708
7709
7710
7711
7712  # Publish this variable in the help.
7713
7714
7715  if [ -z "${HEAD+x}" ]; then
7716    # The variable is not set by user, try to locate tool using the code snippet
7717    for ac_prog in head
7718do
7719  # Extract the first word of "$ac_prog", so it can be a program name with args.
7720set dummy $ac_prog; ac_word=$2
7721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7722$as_echo_n "checking for $ac_word... " >&6; }
7723if ${ac_cv_path_HEAD+:} false; then :
7724  $as_echo_n "(cached) " >&6
7725else
7726  case $HEAD in
7727  [\\/]* | ?:[\\/]*)
7728  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7729  ;;
7730  *)
7731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7732for as_dir in $PATH
7733do
7734  IFS=$as_save_IFS
7735  test -z "$as_dir" && as_dir=.
7736    for ac_exec_ext in '' $ac_executable_extensions; do
7737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7738    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7740    break 2
7741  fi
7742done
7743  done
7744IFS=$as_save_IFS
7745
7746  ;;
7747esac
7748fi
7749HEAD=$ac_cv_path_HEAD
7750if test -n "$HEAD"; then
7751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7752$as_echo "$HEAD" >&6; }
7753else
7754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7755$as_echo "no" >&6; }
7756fi
7757
7758
7759  test -n "$HEAD" && break
7760done
7761
7762  else
7763    # The variable is set, but is it from the command line or the environment?
7764
7765    # Try to remove the string !HEAD! from our list.
7766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7768      # If it failed, the variable was not from the command line. Ignore it,
7769      # but warn the user (except for BASH, which is always set by the calling BASH).
7770      if test "xHEAD" != xBASH; then
7771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7772$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7773      fi
7774      # Try to locate tool using the code snippet
7775      for ac_prog in head
7776do
7777  # Extract the first word of "$ac_prog", so it can be a program name with args.
7778set dummy $ac_prog; ac_word=$2
7779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7780$as_echo_n "checking for $ac_word... " >&6; }
7781if ${ac_cv_path_HEAD+:} false; then :
7782  $as_echo_n "(cached) " >&6
7783else
7784  case $HEAD in
7785  [\\/]* | ?:[\\/]*)
7786  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7787  ;;
7788  *)
7789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7790for as_dir in $PATH
7791do
7792  IFS=$as_save_IFS
7793  test -z "$as_dir" && as_dir=.
7794    for ac_exec_ext in '' $ac_executable_extensions; do
7795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7796    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7798    break 2
7799  fi
7800done
7801  done
7802IFS=$as_save_IFS
7803
7804  ;;
7805esac
7806fi
7807HEAD=$ac_cv_path_HEAD
7808if test -n "$HEAD"; then
7809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7810$as_echo "$HEAD" >&6; }
7811else
7812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7813$as_echo "no" >&6; }
7814fi
7815
7816
7817  test -n "$HEAD" && break
7818done
7819
7820    else
7821      # If it succeeded, then it was overridden by the user. We will use it
7822      # for the tool.
7823
7824      # First remove it from the list of overridden variables, so we can test
7825      # for unknown variables in the end.
7826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7827
7828      # Check if we try to supply an empty value
7829      if test "x$HEAD" = x; then
7830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7831$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7833$as_echo_n "checking for HEAD... " >&6; }
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7835$as_echo "disabled" >&6; }
7836      else
7837        # Check if the provided tool contains a complete path.
7838        tool_specified="$HEAD"
7839        tool_basename="${tool_specified##*/}"
7840        if test "x$tool_basename" = "x$tool_specified"; then
7841          # A command without a complete path is provided, search $PATH.
7842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7843$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7844          # Extract the first word of "$tool_basename", so it can be a program name with args.
7845set dummy $tool_basename; ac_word=$2
7846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7847$as_echo_n "checking for $ac_word... " >&6; }
7848if ${ac_cv_path_HEAD+:} false; then :
7849  $as_echo_n "(cached) " >&6
7850else
7851  case $HEAD in
7852  [\\/]* | ?:[\\/]*)
7853  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7854  ;;
7855  *)
7856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7857for as_dir in $PATH
7858do
7859  IFS=$as_save_IFS
7860  test -z "$as_dir" && as_dir=.
7861    for ac_exec_ext in '' $ac_executable_extensions; do
7862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7863    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7865    break 2
7866  fi
7867done
7868  done
7869IFS=$as_save_IFS
7870
7871  ;;
7872esac
7873fi
7874HEAD=$ac_cv_path_HEAD
7875if test -n "$HEAD"; then
7876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7877$as_echo "$HEAD" >&6; }
7878else
7879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7880$as_echo "no" >&6; }
7881fi
7882
7883
7884          if test "x$HEAD" = x; then
7885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7886          fi
7887        else
7888          # Otherwise we believe it is a complete path. Use it as it is.
7889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7890$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7892$as_echo_n "checking for HEAD... " >&6; }
7893          if test ! -x "$tool_specified"; then
7894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7895$as_echo "not found" >&6; }
7896            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7897          fi
7898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7899$as_echo "$tool_specified" >&6; }
7900        fi
7901      fi
7902    fi
7903
7904  fi
7905
7906
7907
7908  if test "x$HEAD" = x; then
7909    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7910  fi
7911
7912
7913
7914
7915
7916  # Publish this variable in the help.
7917
7918
7919  if [ -z "${LN+x}" ]; then
7920    # The variable is not set by user, try to locate tool using the code snippet
7921    for ac_prog in ln
7922do
7923  # Extract the first word of "$ac_prog", so it can be a program name with args.
7924set dummy $ac_prog; ac_word=$2
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7926$as_echo_n "checking for $ac_word... " >&6; }
7927if ${ac_cv_path_LN+:} false; then :
7928  $as_echo_n "(cached) " >&6
7929else
7930  case $LN in
7931  [\\/]* | ?:[\\/]*)
7932  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7933  ;;
7934  *)
7935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7936for as_dir in $PATH
7937do
7938  IFS=$as_save_IFS
7939  test -z "$as_dir" && as_dir=.
7940    for ac_exec_ext in '' $ac_executable_extensions; do
7941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7942    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7944    break 2
7945  fi
7946done
7947  done
7948IFS=$as_save_IFS
7949
7950  ;;
7951esac
7952fi
7953LN=$ac_cv_path_LN
7954if test -n "$LN"; then
7955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7956$as_echo "$LN" >&6; }
7957else
7958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7959$as_echo "no" >&6; }
7960fi
7961
7962
7963  test -n "$LN" && break
7964done
7965
7966  else
7967    # The variable is set, but is it from the command line or the environment?
7968
7969    # Try to remove the string !LN! from our list.
7970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7972      # If it failed, the variable was not from the command line. Ignore it,
7973      # but warn the user (except for BASH, which is always set by the calling BASH).
7974      if test "xLN" != xBASH; then
7975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7976$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7977      fi
7978      # Try to locate tool using the code snippet
7979      for ac_prog in ln
7980do
7981  # Extract the first word of "$ac_prog", so it can be a program name with args.
7982set dummy $ac_prog; ac_word=$2
7983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7984$as_echo_n "checking for $ac_word... " >&6; }
7985if ${ac_cv_path_LN+:} false; then :
7986  $as_echo_n "(cached) " >&6
7987else
7988  case $LN in
7989  [\\/]* | ?:[\\/]*)
7990  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7991  ;;
7992  *)
7993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7994for as_dir in $PATH
7995do
7996  IFS=$as_save_IFS
7997  test -z "$as_dir" && as_dir=.
7998    for ac_exec_ext in '' $ac_executable_extensions; do
7999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8000    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8002    break 2
8003  fi
8004done
8005  done
8006IFS=$as_save_IFS
8007
8008  ;;
8009esac
8010fi
8011LN=$ac_cv_path_LN
8012if test -n "$LN"; then
8013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8014$as_echo "$LN" >&6; }
8015else
8016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8017$as_echo "no" >&6; }
8018fi
8019
8020
8021  test -n "$LN" && break
8022done
8023
8024    else
8025      # If it succeeded, then it was overridden by the user. We will use it
8026      # for the tool.
8027
8028      # First remove it from the list of overridden variables, so we can test
8029      # for unknown variables in the end.
8030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8031
8032      # Check if we try to supply an empty value
8033      if test "x$LN" = x; then
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8035$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8037$as_echo_n "checking for LN... " >&6; }
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8039$as_echo "disabled" >&6; }
8040      else
8041        # Check if the provided tool contains a complete path.
8042        tool_specified="$LN"
8043        tool_basename="${tool_specified##*/}"
8044        if test "x$tool_basename" = "x$tool_specified"; then
8045          # A command without a complete path is provided, search $PATH.
8046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8047$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8048          # Extract the first word of "$tool_basename", so it can be a program name with args.
8049set dummy $tool_basename; ac_word=$2
8050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8051$as_echo_n "checking for $ac_word... " >&6; }
8052if ${ac_cv_path_LN+:} false; then :
8053  $as_echo_n "(cached) " >&6
8054else
8055  case $LN in
8056  [\\/]* | ?:[\\/]*)
8057  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8058  ;;
8059  *)
8060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8061for as_dir in $PATH
8062do
8063  IFS=$as_save_IFS
8064  test -z "$as_dir" && as_dir=.
8065    for ac_exec_ext in '' $ac_executable_extensions; do
8066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8067    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8069    break 2
8070  fi
8071done
8072  done
8073IFS=$as_save_IFS
8074
8075  ;;
8076esac
8077fi
8078LN=$ac_cv_path_LN
8079if test -n "$LN"; then
8080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8081$as_echo "$LN" >&6; }
8082else
8083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8084$as_echo "no" >&6; }
8085fi
8086
8087
8088          if test "x$LN" = x; then
8089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8090          fi
8091        else
8092          # Otherwise we believe it is a complete path. Use it as it is.
8093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8094$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8096$as_echo_n "checking for LN... " >&6; }
8097          if test ! -x "$tool_specified"; then
8098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8099$as_echo "not found" >&6; }
8100            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8101          fi
8102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8103$as_echo "$tool_specified" >&6; }
8104        fi
8105      fi
8106    fi
8107
8108  fi
8109
8110
8111
8112  if test "x$LN" = x; then
8113    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8114  fi
8115
8116
8117
8118
8119
8120  # Publish this variable in the help.
8121
8122
8123  if [ -z "${LS+x}" ]; then
8124    # The variable is not set by user, try to locate tool using the code snippet
8125    for ac_prog in ls
8126do
8127  # Extract the first word of "$ac_prog", so it can be a program name with args.
8128set dummy $ac_prog; ac_word=$2
8129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8130$as_echo_n "checking for $ac_word... " >&6; }
8131if ${ac_cv_path_LS+:} false; then :
8132  $as_echo_n "(cached) " >&6
8133else
8134  case $LS in
8135  [\\/]* | ?:[\\/]*)
8136  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8137  ;;
8138  *)
8139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8140for as_dir in $PATH
8141do
8142  IFS=$as_save_IFS
8143  test -z "$as_dir" && as_dir=.
8144    for ac_exec_ext in '' $ac_executable_extensions; do
8145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8146    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8148    break 2
8149  fi
8150done
8151  done
8152IFS=$as_save_IFS
8153
8154  ;;
8155esac
8156fi
8157LS=$ac_cv_path_LS
8158if test -n "$LS"; then
8159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8160$as_echo "$LS" >&6; }
8161else
8162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163$as_echo "no" >&6; }
8164fi
8165
8166
8167  test -n "$LS" && break
8168done
8169
8170  else
8171    # The variable is set, but is it from the command line or the environment?
8172
8173    # Try to remove the string !LS! from our list.
8174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8176      # If it failed, the variable was not from the command line. Ignore it,
8177      # but warn the user (except for BASH, which is always set by the calling BASH).
8178      if test "xLS" != xBASH; then
8179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8180$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8181      fi
8182      # Try to locate tool using the code snippet
8183      for ac_prog in ls
8184do
8185  # Extract the first word of "$ac_prog", so it can be a program name with args.
8186set dummy $ac_prog; ac_word=$2
8187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8188$as_echo_n "checking for $ac_word... " >&6; }
8189if ${ac_cv_path_LS+:} false; then :
8190  $as_echo_n "(cached) " >&6
8191else
8192  case $LS in
8193  [\\/]* | ?:[\\/]*)
8194  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8195  ;;
8196  *)
8197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8198for as_dir in $PATH
8199do
8200  IFS=$as_save_IFS
8201  test -z "$as_dir" && as_dir=.
8202    for ac_exec_ext in '' $ac_executable_extensions; do
8203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8204    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8206    break 2
8207  fi
8208done
8209  done
8210IFS=$as_save_IFS
8211
8212  ;;
8213esac
8214fi
8215LS=$ac_cv_path_LS
8216if test -n "$LS"; then
8217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8218$as_echo "$LS" >&6; }
8219else
8220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8221$as_echo "no" >&6; }
8222fi
8223
8224
8225  test -n "$LS" && break
8226done
8227
8228    else
8229      # If it succeeded, then it was overridden by the user. We will use it
8230      # for the tool.
8231
8232      # First remove it from the list of overridden variables, so we can test
8233      # for unknown variables in the end.
8234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8235
8236      # Check if we try to supply an empty value
8237      if test "x$LS" = x; then
8238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8239$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8241$as_echo_n "checking for LS... " >&6; }
8242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8243$as_echo "disabled" >&6; }
8244      else
8245        # Check if the provided tool contains a complete path.
8246        tool_specified="$LS"
8247        tool_basename="${tool_specified##*/}"
8248        if test "x$tool_basename" = "x$tool_specified"; then
8249          # A command without a complete path is provided, search $PATH.
8250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8251$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8252          # Extract the first word of "$tool_basename", so it can be a program name with args.
8253set dummy $tool_basename; ac_word=$2
8254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8255$as_echo_n "checking for $ac_word... " >&6; }
8256if ${ac_cv_path_LS+:} false; then :
8257  $as_echo_n "(cached) " >&6
8258else
8259  case $LS in
8260  [\\/]* | ?:[\\/]*)
8261  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8262  ;;
8263  *)
8264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8265for as_dir in $PATH
8266do
8267  IFS=$as_save_IFS
8268  test -z "$as_dir" && as_dir=.
8269    for ac_exec_ext in '' $ac_executable_extensions; do
8270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8271    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8273    break 2
8274  fi
8275done
8276  done
8277IFS=$as_save_IFS
8278
8279  ;;
8280esac
8281fi
8282LS=$ac_cv_path_LS
8283if test -n "$LS"; then
8284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8285$as_echo "$LS" >&6; }
8286else
8287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8288$as_echo "no" >&6; }
8289fi
8290
8291
8292          if test "x$LS" = x; then
8293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8294          fi
8295        else
8296          # Otherwise we believe it is a complete path. Use it as it is.
8297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8298$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8300$as_echo_n "checking for LS... " >&6; }
8301          if test ! -x "$tool_specified"; then
8302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8303$as_echo "not found" >&6; }
8304            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8305          fi
8306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8307$as_echo "$tool_specified" >&6; }
8308        fi
8309      fi
8310    fi
8311
8312  fi
8313
8314
8315
8316  if test "x$LS" = x; then
8317    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8318  fi
8319
8320
8321
8322
8323
8324  # Publish this variable in the help.
8325
8326
8327  if [ -z "${MKDIR+x}" ]; then
8328    # The variable is not set by user, try to locate tool using the code snippet
8329    for ac_prog in mkdir
8330do
8331  # Extract the first word of "$ac_prog", so it can be a program name with args.
8332set dummy $ac_prog; ac_word=$2
8333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8334$as_echo_n "checking for $ac_word... " >&6; }
8335if ${ac_cv_path_MKDIR+:} false; then :
8336  $as_echo_n "(cached) " >&6
8337else
8338  case $MKDIR in
8339  [\\/]* | ?:[\\/]*)
8340  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8341  ;;
8342  *)
8343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344for as_dir in $PATH
8345do
8346  IFS=$as_save_IFS
8347  test -z "$as_dir" && as_dir=.
8348    for ac_exec_ext in '' $ac_executable_extensions; do
8349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8350    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8352    break 2
8353  fi
8354done
8355  done
8356IFS=$as_save_IFS
8357
8358  ;;
8359esac
8360fi
8361MKDIR=$ac_cv_path_MKDIR
8362if test -n "$MKDIR"; then
8363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8364$as_echo "$MKDIR" >&6; }
8365else
8366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8367$as_echo "no" >&6; }
8368fi
8369
8370
8371  test -n "$MKDIR" && break
8372done
8373
8374  else
8375    # The variable is set, but is it from the command line or the environment?
8376
8377    # Try to remove the string !MKDIR! from our list.
8378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8380      # If it failed, the variable was not from the command line. Ignore it,
8381      # but warn the user (except for BASH, which is always set by the calling BASH).
8382      if test "xMKDIR" != xBASH; then
8383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8384$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8385      fi
8386      # Try to locate tool using the code snippet
8387      for ac_prog in mkdir
8388do
8389  # Extract the first word of "$ac_prog", so it can be a program name with args.
8390set dummy $ac_prog; ac_word=$2
8391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8392$as_echo_n "checking for $ac_word... " >&6; }
8393if ${ac_cv_path_MKDIR+:} false; then :
8394  $as_echo_n "(cached) " >&6
8395else
8396  case $MKDIR in
8397  [\\/]* | ?:[\\/]*)
8398  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8399  ;;
8400  *)
8401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8402for as_dir in $PATH
8403do
8404  IFS=$as_save_IFS
8405  test -z "$as_dir" && as_dir=.
8406    for ac_exec_ext in '' $ac_executable_extensions; do
8407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8408    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8410    break 2
8411  fi
8412done
8413  done
8414IFS=$as_save_IFS
8415
8416  ;;
8417esac
8418fi
8419MKDIR=$ac_cv_path_MKDIR
8420if test -n "$MKDIR"; then
8421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8422$as_echo "$MKDIR" >&6; }
8423else
8424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8425$as_echo "no" >&6; }
8426fi
8427
8428
8429  test -n "$MKDIR" && break
8430done
8431
8432    else
8433      # If it succeeded, then it was overridden by the user. We will use it
8434      # for the tool.
8435
8436      # First remove it from the list of overridden variables, so we can test
8437      # for unknown variables in the end.
8438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8439
8440      # Check if we try to supply an empty value
8441      if test "x$MKDIR" = x; then
8442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8443$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8445$as_echo_n "checking for MKDIR... " >&6; }
8446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8447$as_echo "disabled" >&6; }
8448      else
8449        # Check if the provided tool contains a complete path.
8450        tool_specified="$MKDIR"
8451        tool_basename="${tool_specified##*/}"
8452        if test "x$tool_basename" = "x$tool_specified"; then
8453          # A command without a complete path is provided, search $PATH.
8454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8455$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8456          # Extract the first word of "$tool_basename", so it can be a program name with args.
8457set dummy $tool_basename; ac_word=$2
8458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8459$as_echo_n "checking for $ac_word... " >&6; }
8460if ${ac_cv_path_MKDIR+:} false; then :
8461  $as_echo_n "(cached) " >&6
8462else
8463  case $MKDIR in
8464  [\\/]* | ?:[\\/]*)
8465  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8466  ;;
8467  *)
8468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8469for as_dir in $PATH
8470do
8471  IFS=$as_save_IFS
8472  test -z "$as_dir" && as_dir=.
8473    for ac_exec_ext in '' $ac_executable_extensions; do
8474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8475    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8477    break 2
8478  fi
8479done
8480  done
8481IFS=$as_save_IFS
8482
8483  ;;
8484esac
8485fi
8486MKDIR=$ac_cv_path_MKDIR
8487if test -n "$MKDIR"; then
8488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8489$as_echo "$MKDIR" >&6; }
8490else
8491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8492$as_echo "no" >&6; }
8493fi
8494
8495
8496          if test "x$MKDIR" = x; then
8497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8498          fi
8499        else
8500          # Otherwise we believe it is a complete path. Use it as it is.
8501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8502$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8504$as_echo_n "checking for MKDIR... " >&6; }
8505          if test ! -x "$tool_specified"; then
8506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8507$as_echo "not found" >&6; }
8508            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8509          fi
8510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8511$as_echo "$tool_specified" >&6; }
8512        fi
8513      fi
8514    fi
8515
8516  fi
8517
8518
8519
8520  if test "x$MKDIR" = x; then
8521    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8522  fi
8523
8524
8525
8526
8527
8528  # Publish this variable in the help.
8529
8530
8531  if [ -z "${MKTEMP+x}" ]; then
8532    # The variable is not set by user, try to locate tool using the code snippet
8533    for ac_prog in mktemp
8534do
8535  # Extract the first word of "$ac_prog", so it can be a program name with args.
8536set dummy $ac_prog; ac_word=$2
8537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8538$as_echo_n "checking for $ac_word... " >&6; }
8539if ${ac_cv_path_MKTEMP+:} false; then :
8540  $as_echo_n "(cached) " >&6
8541else
8542  case $MKTEMP in
8543  [\\/]* | ?:[\\/]*)
8544  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8545  ;;
8546  *)
8547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8548for as_dir in $PATH
8549do
8550  IFS=$as_save_IFS
8551  test -z "$as_dir" && as_dir=.
8552    for ac_exec_ext in '' $ac_executable_extensions; do
8553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8554    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8556    break 2
8557  fi
8558done
8559  done
8560IFS=$as_save_IFS
8561
8562  ;;
8563esac
8564fi
8565MKTEMP=$ac_cv_path_MKTEMP
8566if test -n "$MKTEMP"; then
8567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8568$as_echo "$MKTEMP" >&6; }
8569else
8570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8571$as_echo "no" >&6; }
8572fi
8573
8574
8575  test -n "$MKTEMP" && break
8576done
8577
8578  else
8579    # The variable is set, but is it from the command line or the environment?
8580
8581    # Try to remove the string !MKTEMP! from our list.
8582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8584      # If it failed, the variable was not from the command line. Ignore it,
8585      # but warn the user (except for BASH, which is always set by the calling BASH).
8586      if test "xMKTEMP" != xBASH; then
8587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8588$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8589      fi
8590      # Try to locate tool using the code snippet
8591      for ac_prog in mktemp
8592do
8593  # Extract the first word of "$ac_prog", so it can be a program name with args.
8594set dummy $ac_prog; ac_word=$2
8595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8596$as_echo_n "checking for $ac_word... " >&6; }
8597if ${ac_cv_path_MKTEMP+:} false; then :
8598  $as_echo_n "(cached) " >&6
8599else
8600  case $MKTEMP in
8601  [\\/]* | ?:[\\/]*)
8602  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8603  ;;
8604  *)
8605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8606for as_dir in $PATH
8607do
8608  IFS=$as_save_IFS
8609  test -z "$as_dir" && as_dir=.
8610    for ac_exec_ext in '' $ac_executable_extensions; do
8611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8612    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8614    break 2
8615  fi
8616done
8617  done
8618IFS=$as_save_IFS
8619
8620  ;;
8621esac
8622fi
8623MKTEMP=$ac_cv_path_MKTEMP
8624if test -n "$MKTEMP"; then
8625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8626$as_echo "$MKTEMP" >&6; }
8627else
8628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8629$as_echo "no" >&6; }
8630fi
8631
8632
8633  test -n "$MKTEMP" && break
8634done
8635
8636    else
8637      # If it succeeded, then it was overridden by the user. We will use it
8638      # for the tool.
8639
8640      # First remove it from the list of overridden variables, so we can test
8641      # for unknown variables in the end.
8642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8643
8644      # Check if we try to supply an empty value
8645      if test "x$MKTEMP" = x; then
8646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8647$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8649$as_echo_n "checking for MKTEMP... " >&6; }
8650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8651$as_echo "disabled" >&6; }
8652      else
8653        # Check if the provided tool contains a complete path.
8654        tool_specified="$MKTEMP"
8655        tool_basename="${tool_specified##*/}"
8656        if test "x$tool_basename" = "x$tool_specified"; then
8657          # A command without a complete path is provided, search $PATH.
8658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8659$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8660          # Extract the first word of "$tool_basename", so it can be a program name with args.
8661set dummy $tool_basename; ac_word=$2
8662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8663$as_echo_n "checking for $ac_word... " >&6; }
8664if ${ac_cv_path_MKTEMP+:} false; then :
8665  $as_echo_n "(cached) " >&6
8666else
8667  case $MKTEMP in
8668  [\\/]* | ?:[\\/]*)
8669  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8670  ;;
8671  *)
8672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8673for as_dir in $PATH
8674do
8675  IFS=$as_save_IFS
8676  test -z "$as_dir" && as_dir=.
8677    for ac_exec_ext in '' $ac_executable_extensions; do
8678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8679    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8681    break 2
8682  fi
8683done
8684  done
8685IFS=$as_save_IFS
8686
8687  ;;
8688esac
8689fi
8690MKTEMP=$ac_cv_path_MKTEMP
8691if test -n "$MKTEMP"; then
8692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8693$as_echo "$MKTEMP" >&6; }
8694else
8695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8696$as_echo "no" >&6; }
8697fi
8698
8699
8700          if test "x$MKTEMP" = x; then
8701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8702          fi
8703        else
8704          # Otherwise we believe it is a complete path. Use it as it is.
8705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8706$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8708$as_echo_n "checking for MKTEMP... " >&6; }
8709          if test ! -x "$tool_specified"; then
8710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8711$as_echo "not found" >&6; }
8712            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8713          fi
8714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8715$as_echo "$tool_specified" >&6; }
8716        fi
8717      fi
8718    fi
8719
8720  fi
8721
8722
8723
8724  if test "x$MKTEMP" = x; then
8725    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8726  fi
8727
8728
8729
8730
8731
8732  # Publish this variable in the help.
8733
8734
8735  if [ -z "${MV+x}" ]; then
8736    # The variable is not set by user, try to locate tool using the code snippet
8737    for ac_prog in mv
8738do
8739  # Extract the first word of "$ac_prog", so it can be a program name with args.
8740set dummy $ac_prog; ac_word=$2
8741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8742$as_echo_n "checking for $ac_word... " >&6; }
8743if ${ac_cv_path_MV+:} false; then :
8744  $as_echo_n "(cached) " >&6
8745else
8746  case $MV in
8747  [\\/]* | ?:[\\/]*)
8748  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8749  ;;
8750  *)
8751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8752for as_dir in $PATH
8753do
8754  IFS=$as_save_IFS
8755  test -z "$as_dir" && as_dir=.
8756    for ac_exec_ext in '' $ac_executable_extensions; do
8757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8758    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8760    break 2
8761  fi
8762done
8763  done
8764IFS=$as_save_IFS
8765
8766  ;;
8767esac
8768fi
8769MV=$ac_cv_path_MV
8770if test -n "$MV"; then
8771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8772$as_echo "$MV" >&6; }
8773else
8774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8775$as_echo "no" >&6; }
8776fi
8777
8778
8779  test -n "$MV" && break
8780done
8781
8782  else
8783    # The variable is set, but is it from the command line or the environment?
8784
8785    # Try to remove the string !MV! from our list.
8786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8788      # If it failed, the variable was not from the command line. Ignore it,
8789      # but warn the user (except for BASH, which is always set by the calling BASH).
8790      if test "xMV" != xBASH; then
8791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8792$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8793      fi
8794      # Try to locate tool using the code snippet
8795      for ac_prog in mv
8796do
8797  # Extract the first word of "$ac_prog", so it can be a program name with args.
8798set dummy $ac_prog; ac_word=$2
8799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8800$as_echo_n "checking for $ac_word... " >&6; }
8801if ${ac_cv_path_MV+:} false; then :
8802  $as_echo_n "(cached) " >&6
8803else
8804  case $MV in
8805  [\\/]* | ?:[\\/]*)
8806  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8807  ;;
8808  *)
8809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8810for as_dir in $PATH
8811do
8812  IFS=$as_save_IFS
8813  test -z "$as_dir" && as_dir=.
8814    for ac_exec_ext in '' $ac_executable_extensions; do
8815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8816    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8818    break 2
8819  fi
8820done
8821  done
8822IFS=$as_save_IFS
8823
8824  ;;
8825esac
8826fi
8827MV=$ac_cv_path_MV
8828if test -n "$MV"; then
8829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8830$as_echo "$MV" >&6; }
8831else
8832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8833$as_echo "no" >&6; }
8834fi
8835
8836
8837  test -n "$MV" && break
8838done
8839
8840    else
8841      # If it succeeded, then it was overridden by the user. We will use it
8842      # for the tool.
8843
8844      # First remove it from the list of overridden variables, so we can test
8845      # for unknown variables in the end.
8846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8847
8848      # Check if we try to supply an empty value
8849      if test "x$MV" = x; then
8850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8851$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8853$as_echo_n "checking for MV... " >&6; }
8854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8855$as_echo "disabled" >&6; }
8856      else
8857        # Check if the provided tool contains a complete path.
8858        tool_specified="$MV"
8859        tool_basename="${tool_specified##*/}"
8860        if test "x$tool_basename" = "x$tool_specified"; then
8861          # A command without a complete path is provided, search $PATH.
8862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8863$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8864          # Extract the first word of "$tool_basename", so it can be a program name with args.
8865set dummy $tool_basename; ac_word=$2
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8867$as_echo_n "checking for $ac_word... " >&6; }
8868if ${ac_cv_path_MV+:} false; then :
8869  $as_echo_n "(cached) " >&6
8870else
8871  case $MV in
8872  [\\/]* | ?:[\\/]*)
8873  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8874  ;;
8875  *)
8876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877for as_dir in $PATH
8878do
8879  IFS=$as_save_IFS
8880  test -z "$as_dir" && as_dir=.
8881    for ac_exec_ext in '' $ac_executable_extensions; do
8882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885    break 2
8886  fi
8887done
8888  done
8889IFS=$as_save_IFS
8890
8891  ;;
8892esac
8893fi
8894MV=$ac_cv_path_MV
8895if test -n "$MV"; then
8896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8897$as_echo "$MV" >&6; }
8898else
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8900$as_echo "no" >&6; }
8901fi
8902
8903
8904          if test "x$MV" = x; then
8905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8906          fi
8907        else
8908          # Otherwise we believe it is a complete path. Use it as it is.
8909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8910$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8912$as_echo_n "checking for MV... " >&6; }
8913          if test ! -x "$tool_specified"; then
8914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8915$as_echo "not found" >&6; }
8916            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8917          fi
8918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8919$as_echo "$tool_specified" >&6; }
8920        fi
8921      fi
8922    fi
8923
8924  fi
8925
8926
8927
8928  if test "x$MV" = x; then
8929    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8930  fi
8931
8932
8933
8934
8935
8936  # Publish this variable in the help.
8937
8938
8939  if [ -z "${NAWK+x}" ]; then
8940    # The variable is not set by user, try to locate tool using the code snippet
8941    for ac_prog in nawk gawk awk
8942do
8943  # Extract the first word of "$ac_prog", so it can be a program name with args.
8944set dummy $ac_prog; ac_word=$2
8945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8946$as_echo_n "checking for $ac_word... " >&6; }
8947if ${ac_cv_path_NAWK+:} false; then :
8948  $as_echo_n "(cached) " >&6
8949else
8950  case $NAWK in
8951  [\\/]* | ?:[\\/]*)
8952  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8953  ;;
8954  *)
8955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8956for as_dir in $PATH
8957do
8958  IFS=$as_save_IFS
8959  test -z "$as_dir" && as_dir=.
8960    for ac_exec_ext in '' $ac_executable_extensions; do
8961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8962    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8964    break 2
8965  fi
8966done
8967  done
8968IFS=$as_save_IFS
8969
8970  ;;
8971esac
8972fi
8973NAWK=$ac_cv_path_NAWK
8974if test -n "$NAWK"; then
8975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8976$as_echo "$NAWK" >&6; }
8977else
8978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8979$as_echo "no" >&6; }
8980fi
8981
8982
8983  test -n "$NAWK" && break
8984done
8985
8986  else
8987    # The variable is set, but is it from the command line or the environment?
8988
8989    # Try to remove the string !NAWK! from our list.
8990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8992      # If it failed, the variable was not from the command line. Ignore it,
8993      # but warn the user (except for BASH, which is always set by the calling BASH).
8994      if test "xNAWK" != xBASH; then
8995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8996$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8997      fi
8998      # Try to locate tool using the code snippet
8999      for ac_prog in nawk gawk awk
9000do
9001  # Extract the first word of "$ac_prog", so it can be a program name with args.
9002set dummy $ac_prog; ac_word=$2
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9004$as_echo_n "checking for $ac_word... " >&6; }
9005if ${ac_cv_path_NAWK+:} false; then :
9006  $as_echo_n "(cached) " >&6
9007else
9008  case $NAWK in
9009  [\\/]* | ?:[\\/]*)
9010  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9011  ;;
9012  *)
9013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9014for as_dir in $PATH
9015do
9016  IFS=$as_save_IFS
9017  test -z "$as_dir" && as_dir=.
9018    for ac_exec_ext in '' $ac_executable_extensions; do
9019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9020    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9022    break 2
9023  fi
9024done
9025  done
9026IFS=$as_save_IFS
9027
9028  ;;
9029esac
9030fi
9031NAWK=$ac_cv_path_NAWK
9032if test -n "$NAWK"; then
9033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9034$as_echo "$NAWK" >&6; }
9035else
9036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9037$as_echo "no" >&6; }
9038fi
9039
9040
9041  test -n "$NAWK" && break
9042done
9043
9044    else
9045      # If it succeeded, then it was overridden by the user. We will use it
9046      # for the tool.
9047
9048      # First remove it from the list of overridden variables, so we can test
9049      # for unknown variables in the end.
9050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9051
9052      # Check if we try to supply an empty value
9053      if test "x$NAWK" = x; then
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9055$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9057$as_echo_n "checking for NAWK... " >&6; }
9058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9059$as_echo "disabled" >&6; }
9060      else
9061        # Check if the provided tool contains a complete path.
9062        tool_specified="$NAWK"
9063        tool_basename="${tool_specified##*/}"
9064        if test "x$tool_basename" = "x$tool_specified"; then
9065          # A command without a complete path is provided, search $PATH.
9066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9067$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9068          # Extract the first word of "$tool_basename", so it can be a program name with args.
9069set dummy $tool_basename; ac_word=$2
9070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9071$as_echo_n "checking for $ac_word... " >&6; }
9072if ${ac_cv_path_NAWK+:} false; then :
9073  $as_echo_n "(cached) " >&6
9074else
9075  case $NAWK in
9076  [\\/]* | ?:[\\/]*)
9077  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9078  ;;
9079  *)
9080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9081for as_dir in $PATH
9082do
9083  IFS=$as_save_IFS
9084  test -z "$as_dir" && as_dir=.
9085    for ac_exec_ext in '' $ac_executable_extensions; do
9086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9087    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9089    break 2
9090  fi
9091done
9092  done
9093IFS=$as_save_IFS
9094
9095  ;;
9096esac
9097fi
9098NAWK=$ac_cv_path_NAWK
9099if test -n "$NAWK"; then
9100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9101$as_echo "$NAWK" >&6; }
9102else
9103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9104$as_echo "no" >&6; }
9105fi
9106
9107
9108          if test "x$NAWK" = x; then
9109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9110          fi
9111        else
9112          # Otherwise we believe it is a complete path. Use it as it is.
9113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9114$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9116$as_echo_n "checking for NAWK... " >&6; }
9117          if test ! -x "$tool_specified"; then
9118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9119$as_echo "not found" >&6; }
9120            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9121          fi
9122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9123$as_echo "$tool_specified" >&6; }
9124        fi
9125      fi
9126    fi
9127
9128  fi
9129
9130
9131
9132  if test "x$NAWK" = x; then
9133    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9134  fi
9135
9136
9137
9138
9139
9140  # Publish this variable in the help.
9141
9142
9143  if [ -z "${PRINTF+x}" ]; then
9144    # The variable is not set by user, try to locate tool using the code snippet
9145    for ac_prog in printf
9146do
9147  # Extract the first word of "$ac_prog", so it can be a program name with args.
9148set dummy $ac_prog; ac_word=$2
9149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9150$as_echo_n "checking for $ac_word... " >&6; }
9151if ${ac_cv_path_PRINTF+:} false; then :
9152  $as_echo_n "(cached) " >&6
9153else
9154  case $PRINTF in
9155  [\\/]* | ?:[\\/]*)
9156  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9157  ;;
9158  *)
9159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9160for as_dir in $PATH
9161do
9162  IFS=$as_save_IFS
9163  test -z "$as_dir" && as_dir=.
9164    for ac_exec_ext in '' $ac_executable_extensions; do
9165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9166    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9168    break 2
9169  fi
9170done
9171  done
9172IFS=$as_save_IFS
9173
9174  ;;
9175esac
9176fi
9177PRINTF=$ac_cv_path_PRINTF
9178if test -n "$PRINTF"; then
9179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9180$as_echo "$PRINTF" >&6; }
9181else
9182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183$as_echo "no" >&6; }
9184fi
9185
9186
9187  test -n "$PRINTF" && break
9188done
9189
9190  else
9191    # The variable is set, but is it from the command line or the environment?
9192
9193    # Try to remove the string !PRINTF! from our list.
9194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9196      # If it failed, the variable was not from the command line. Ignore it,
9197      # but warn the user (except for BASH, which is always set by the calling BASH).
9198      if test "xPRINTF" != xBASH; then
9199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9200$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9201      fi
9202      # Try to locate tool using the code snippet
9203      for ac_prog in printf
9204do
9205  # Extract the first word of "$ac_prog", so it can be a program name with args.
9206set dummy $ac_prog; ac_word=$2
9207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9208$as_echo_n "checking for $ac_word... " >&6; }
9209if ${ac_cv_path_PRINTF+:} false; then :
9210  $as_echo_n "(cached) " >&6
9211else
9212  case $PRINTF in
9213  [\\/]* | ?:[\\/]*)
9214  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9215  ;;
9216  *)
9217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9218for as_dir in $PATH
9219do
9220  IFS=$as_save_IFS
9221  test -z "$as_dir" && as_dir=.
9222    for ac_exec_ext in '' $ac_executable_extensions; do
9223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9224    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9226    break 2
9227  fi
9228done
9229  done
9230IFS=$as_save_IFS
9231
9232  ;;
9233esac
9234fi
9235PRINTF=$ac_cv_path_PRINTF
9236if test -n "$PRINTF"; then
9237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9238$as_echo "$PRINTF" >&6; }
9239else
9240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241$as_echo "no" >&6; }
9242fi
9243
9244
9245  test -n "$PRINTF" && break
9246done
9247
9248    else
9249      # If it succeeded, then it was overridden by the user. We will use it
9250      # for the tool.
9251
9252      # First remove it from the list of overridden variables, so we can test
9253      # for unknown variables in the end.
9254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9255
9256      # Check if we try to supply an empty value
9257      if test "x$PRINTF" = x; then
9258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9259$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9261$as_echo_n "checking for PRINTF... " >&6; }
9262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9263$as_echo "disabled" >&6; }
9264      else
9265        # Check if the provided tool contains a complete path.
9266        tool_specified="$PRINTF"
9267        tool_basename="${tool_specified##*/}"
9268        if test "x$tool_basename" = "x$tool_specified"; then
9269          # A command without a complete path is provided, search $PATH.
9270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9271$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9272          # Extract the first word of "$tool_basename", so it can be a program name with args.
9273set dummy $tool_basename; ac_word=$2
9274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9275$as_echo_n "checking for $ac_word... " >&6; }
9276if ${ac_cv_path_PRINTF+:} false; then :
9277  $as_echo_n "(cached) " >&6
9278else
9279  case $PRINTF in
9280  [\\/]* | ?:[\\/]*)
9281  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9282  ;;
9283  *)
9284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9285for as_dir in $PATH
9286do
9287  IFS=$as_save_IFS
9288  test -z "$as_dir" && as_dir=.
9289    for ac_exec_ext in '' $ac_executable_extensions; do
9290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9291    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9293    break 2
9294  fi
9295done
9296  done
9297IFS=$as_save_IFS
9298
9299  ;;
9300esac
9301fi
9302PRINTF=$ac_cv_path_PRINTF
9303if test -n "$PRINTF"; then
9304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9305$as_echo "$PRINTF" >&6; }
9306else
9307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9308$as_echo "no" >&6; }
9309fi
9310
9311
9312          if test "x$PRINTF" = x; then
9313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9314          fi
9315        else
9316          # Otherwise we believe it is a complete path. Use it as it is.
9317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9318$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9320$as_echo_n "checking for PRINTF... " >&6; }
9321          if test ! -x "$tool_specified"; then
9322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9323$as_echo "not found" >&6; }
9324            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9325          fi
9326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9327$as_echo "$tool_specified" >&6; }
9328        fi
9329      fi
9330    fi
9331
9332  fi
9333
9334
9335
9336  if test "x$PRINTF" = x; then
9337    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9338  fi
9339
9340
9341
9342
9343
9344  # Publish this variable in the help.
9345
9346
9347  if [ -z "${RM+x}" ]; then
9348    # The variable is not set by user, try to locate tool using the code snippet
9349    for ac_prog in rm
9350do
9351  # Extract the first word of "$ac_prog", so it can be a program name with args.
9352set dummy $ac_prog; ac_word=$2
9353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9354$as_echo_n "checking for $ac_word... " >&6; }
9355if ${ac_cv_path_RM+:} false; then :
9356  $as_echo_n "(cached) " >&6
9357else
9358  case $RM in
9359  [\\/]* | ?:[\\/]*)
9360  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9361  ;;
9362  *)
9363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9364for as_dir in $PATH
9365do
9366  IFS=$as_save_IFS
9367  test -z "$as_dir" && as_dir=.
9368    for ac_exec_ext in '' $ac_executable_extensions; do
9369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9370    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9372    break 2
9373  fi
9374done
9375  done
9376IFS=$as_save_IFS
9377
9378  ;;
9379esac
9380fi
9381RM=$ac_cv_path_RM
9382if test -n "$RM"; then
9383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9384$as_echo "$RM" >&6; }
9385else
9386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9387$as_echo "no" >&6; }
9388fi
9389
9390
9391  test -n "$RM" && break
9392done
9393
9394  else
9395    # The variable is set, but is it from the command line or the environment?
9396
9397    # Try to remove the string !RM! from our list.
9398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9400      # If it failed, the variable was not from the command line. Ignore it,
9401      # but warn the user (except for BASH, which is always set by the calling BASH).
9402      if test "xRM" != xBASH; then
9403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9404$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9405      fi
9406      # Try to locate tool using the code snippet
9407      for ac_prog in rm
9408do
9409  # Extract the first word of "$ac_prog", so it can be a program name with args.
9410set dummy $ac_prog; ac_word=$2
9411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9412$as_echo_n "checking for $ac_word... " >&6; }
9413if ${ac_cv_path_RM+:} false; then :
9414  $as_echo_n "(cached) " >&6
9415else
9416  case $RM in
9417  [\\/]* | ?:[\\/]*)
9418  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9419  ;;
9420  *)
9421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9422for as_dir in $PATH
9423do
9424  IFS=$as_save_IFS
9425  test -z "$as_dir" && as_dir=.
9426    for ac_exec_ext in '' $ac_executable_extensions; do
9427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9428    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9430    break 2
9431  fi
9432done
9433  done
9434IFS=$as_save_IFS
9435
9436  ;;
9437esac
9438fi
9439RM=$ac_cv_path_RM
9440if test -n "$RM"; then
9441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9442$as_echo "$RM" >&6; }
9443else
9444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445$as_echo "no" >&6; }
9446fi
9447
9448
9449  test -n "$RM" && break
9450done
9451
9452    else
9453      # If it succeeded, then it was overridden by the user. We will use it
9454      # for the tool.
9455
9456      # First remove it from the list of overridden variables, so we can test
9457      # for unknown variables in the end.
9458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9459
9460      # Check if we try to supply an empty value
9461      if test "x$RM" = x; then
9462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9463$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9465$as_echo_n "checking for RM... " >&6; }
9466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9467$as_echo "disabled" >&6; }
9468      else
9469        # Check if the provided tool contains a complete path.
9470        tool_specified="$RM"
9471        tool_basename="${tool_specified##*/}"
9472        if test "x$tool_basename" = "x$tool_specified"; then
9473          # A command without a complete path is provided, search $PATH.
9474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9475$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9476          # Extract the first word of "$tool_basename", so it can be a program name with args.
9477set dummy $tool_basename; ac_word=$2
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9479$as_echo_n "checking for $ac_word... " >&6; }
9480if ${ac_cv_path_RM+:} false; then :
9481  $as_echo_n "(cached) " >&6
9482else
9483  case $RM in
9484  [\\/]* | ?:[\\/]*)
9485  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9486  ;;
9487  *)
9488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9489for as_dir in $PATH
9490do
9491  IFS=$as_save_IFS
9492  test -z "$as_dir" && as_dir=.
9493    for ac_exec_ext in '' $ac_executable_extensions; do
9494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9495    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9497    break 2
9498  fi
9499done
9500  done
9501IFS=$as_save_IFS
9502
9503  ;;
9504esac
9505fi
9506RM=$ac_cv_path_RM
9507if test -n "$RM"; then
9508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9509$as_echo "$RM" >&6; }
9510else
9511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512$as_echo "no" >&6; }
9513fi
9514
9515
9516          if test "x$RM" = x; then
9517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9518          fi
9519        else
9520          # Otherwise we believe it is a complete path. Use it as it is.
9521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9522$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9524$as_echo_n "checking for RM... " >&6; }
9525          if test ! -x "$tool_specified"; then
9526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9527$as_echo "not found" >&6; }
9528            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9529          fi
9530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9531$as_echo "$tool_specified" >&6; }
9532        fi
9533      fi
9534    fi
9535
9536  fi
9537
9538
9539
9540  if test "x$RM" = x; then
9541    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9542  fi
9543
9544
9545
9546
9547
9548  # Publish this variable in the help.
9549
9550
9551  if [ -z "${RMDIR+x}" ]; then
9552    # The variable is not set by user, try to locate tool using the code snippet
9553    for ac_prog in rmdir
9554do
9555  # Extract the first word of "$ac_prog", so it can be a program name with args.
9556set dummy $ac_prog; ac_word=$2
9557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9558$as_echo_n "checking for $ac_word... " >&6; }
9559if ${ac_cv_path_RMDIR+:} false; then :
9560  $as_echo_n "(cached) " >&6
9561else
9562  case $RMDIR in
9563  [\\/]* | ?:[\\/]*)
9564  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9565  ;;
9566  *)
9567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9568for as_dir in $PATH
9569do
9570  IFS=$as_save_IFS
9571  test -z "$as_dir" && as_dir=.
9572    for ac_exec_ext in '' $ac_executable_extensions; do
9573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9574    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9576    break 2
9577  fi
9578done
9579  done
9580IFS=$as_save_IFS
9581
9582  ;;
9583esac
9584fi
9585RMDIR=$ac_cv_path_RMDIR
9586if test -n "$RMDIR"; then
9587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9588$as_echo "$RMDIR" >&6; }
9589else
9590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9591$as_echo "no" >&6; }
9592fi
9593
9594
9595  test -n "$RMDIR" && break
9596done
9597
9598  else
9599    # The variable is set, but is it from the command line or the environment?
9600
9601    # Try to remove the string !RMDIR! from our list.
9602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9604      # If it failed, the variable was not from the command line. Ignore it,
9605      # but warn the user (except for BASH, which is always set by the calling BASH).
9606      if test "xRMDIR" != xBASH; then
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9608$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9609      fi
9610      # Try to locate tool using the code snippet
9611      for ac_prog in rmdir
9612do
9613  # Extract the first word of "$ac_prog", so it can be a program name with args.
9614set dummy $ac_prog; ac_word=$2
9615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9616$as_echo_n "checking for $ac_word... " >&6; }
9617if ${ac_cv_path_RMDIR+:} false; then :
9618  $as_echo_n "(cached) " >&6
9619else
9620  case $RMDIR in
9621  [\\/]* | ?:[\\/]*)
9622  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9623  ;;
9624  *)
9625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9626for as_dir in $PATH
9627do
9628  IFS=$as_save_IFS
9629  test -z "$as_dir" && as_dir=.
9630    for ac_exec_ext in '' $ac_executable_extensions; do
9631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9632    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9634    break 2
9635  fi
9636done
9637  done
9638IFS=$as_save_IFS
9639
9640  ;;
9641esac
9642fi
9643RMDIR=$ac_cv_path_RMDIR
9644if test -n "$RMDIR"; then
9645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9646$as_echo "$RMDIR" >&6; }
9647else
9648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9649$as_echo "no" >&6; }
9650fi
9651
9652
9653  test -n "$RMDIR" && break
9654done
9655
9656    else
9657      # If it succeeded, then it was overridden by the user. We will use it
9658      # for the tool.
9659
9660      # First remove it from the list of overridden variables, so we can test
9661      # for unknown variables in the end.
9662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9663
9664      # Check if we try to supply an empty value
9665      if test "x$RMDIR" = x; then
9666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9667$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9669$as_echo_n "checking for RMDIR... " >&6; }
9670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9671$as_echo "disabled" >&6; }
9672      else
9673        # Check if the provided tool contains a complete path.
9674        tool_specified="$RMDIR"
9675        tool_basename="${tool_specified##*/}"
9676        if test "x$tool_basename" = "x$tool_specified"; then
9677          # A command without a complete path is provided, search $PATH.
9678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9679$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9680          # Extract the first word of "$tool_basename", so it can be a program name with args.
9681set dummy $tool_basename; ac_word=$2
9682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9683$as_echo_n "checking for $ac_word... " >&6; }
9684if ${ac_cv_path_RMDIR+:} false; then :
9685  $as_echo_n "(cached) " >&6
9686else
9687  case $RMDIR in
9688  [\\/]* | ?:[\\/]*)
9689  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9690  ;;
9691  *)
9692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9693for as_dir in $PATH
9694do
9695  IFS=$as_save_IFS
9696  test -z "$as_dir" && as_dir=.
9697    for ac_exec_ext in '' $ac_executable_extensions; do
9698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9699    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9701    break 2
9702  fi
9703done
9704  done
9705IFS=$as_save_IFS
9706
9707  ;;
9708esac
9709fi
9710RMDIR=$ac_cv_path_RMDIR
9711if test -n "$RMDIR"; then
9712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9713$as_echo "$RMDIR" >&6; }
9714else
9715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9716$as_echo "no" >&6; }
9717fi
9718
9719
9720          if test "x$RMDIR" = x; then
9721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9722          fi
9723        else
9724          # Otherwise we believe it is a complete path. Use it as it is.
9725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9726$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9728$as_echo_n "checking for RMDIR... " >&6; }
9729          if test ! -x "$tool_specified"; then
9730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9731$as_echo "not found" >&6; }
9732            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9733          fi
9734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9735$as_echo "$tool_specified" >&6; }
9736        fi
9737      fi
9738    fi
9739
9740  fi
9741
9742
9743
9744  if test "x$RMDIR" = x; then
9745    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9746  fi
9747
9748
9749
9750
9751
9752  # Publish this variable in the help.
9753
9754
9755  if [ -z "${SH+x}" ]; then
9756    # The variable is not set by user, try to locate tool using the code snippet
9757    for ac_prog in sh
9758do
9759  # Extract the first word of "$ac_prog", so it can be a program name with args.
9760set dummy $ac_prog; ac_word=$2
9761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9762$as_echo_n "checking for $ac_word... " >&6; }
9763if ${ac_cv_path_SH+:} false; then :
9764  $as_echo_n "(cached) " >&6
9765else
9766  case $SH in
9767  [\\/]* | ?:[\\/]*)
9768  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9769  ;;
9770  *)
9771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9772for as_dir in $PATH
9773do
9774  IFS=$as_save_IFS
9775  test -z "$as_dir" && as_dir=.
9776    for ac_exec_ext in '' $ac_executable_extensions; do
9777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9778    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9780    break 2
9781  fi
9782done
9783  done
9784IFS=$as_save_IFS
9785
9786  ;;
9787esac
9788fi
9789SH=$ac_cv_path_SH
9790if test -n "$SH"; then
9791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9792$as_echo "$SH" >&6; }
9793else
9794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9795$as_echo "no" >&6; }
9796fi
9797
9798
9799  test -n "$SH" && break
9800done
9801
9802  else
9803    # The variable is set, but is it from the command line or the environment?
9804
9805    # Try to remove the string !SH! from our list.
9806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9808      # If it failed, the variable was not from the command line. Ignore it,
9809      # but warn the user (except for BASH, which is always set by the calling BASH).
9810      if test "xSH" != xBASH; then
9811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9812$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9813      fi
9814      # Try to locate tool using the code snippet
9815      for ac_prog in sh
9816do
9817  # Extract the first word of "$ac_prog", so it can be a program name with args.
9818set dummy $ac_prog; ac_word=$2
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9820$as_echo_n "checking for $ac_word... " >&6; }
9821if ${ac_cv_path_SH+:} false; then :
9822  $as_echo_n "(cached) " >&6
9823else
9824  case $SH in
9825  [\\/]* | ?:[\\/]*)
9826  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9827  ;;
9828  *)
9829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9830for as_dir in $PATH
9831do
9832  IFS=$as_save_IFS
9833  test -z "$as_dir" && as_dir=.
9834    for ac_exec_ext in '' $ac_executable_extensions; do
9835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9836    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9838    break 2
9839  fi
9840done
9841  done
9842IFS=$as_save_IFS
9843
9844  ;;
9845esac
9846fi
9847SH=$ac_cv_path_SH
9848if test -n "$SH"; then
9849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9850$as_echo "$SH" >&6; }
9851else
9852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
9854fi
9855
9856
9857  test -n "$SH" && break
9858done
9859
9860    else
9861      # If it succeeded, then it was overridden by the user. We will use it
9862      # for the tool.
9863
9864      # First remove it from the list of overridden variables, so we can test
9865      # for unknown variables in the end.
9866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9867
9868      # Check if we try to supply an empty value
9869      if test "x$SH" = x; then
9870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9871$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9873$as_echo_n "checking for SH... " >&6; }
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9875$as_echo "disabled" >&6; }
9876      else
9877        # Check if the provided tool contains a complete path.
9878        tool_specified="$SH"
9879        tool_basename="${tool_specified##*/}"
9880        if test "x$tool_basename" = "x$tool_specified"; then
9881          # A command without a complete path is provided, search $PATH.
9882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9883$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9884          # Extract the first word of "$tool_basename", so it can be a program name with args.
9885set dummy $tool_basename; ac_word=$2
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9887$as_echo_n "checking for $ac_word... " >&6; }
9888if ${ac_cv_path_SH+:} false; then :
9889  $as_echo_n "(cached) " >&6
9890else
9891  case $SH in
9892  [\\/]* | ?:[\\/]*)
9893  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9894  ;;
9895  *)
9896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9897for as_dir in $PATH
9898do
9899  IFS=$as_save_IFS
9900  test -z "$as_dir" && as_dir=.
9901    for ac_exec_ext in '' $ac_executable_extensions; do
9902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9903    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9905    break 2
9906  fi
9907done
9908  done
9909IFS=$as_save_IFS
9910
9911  ;;
9912esac
9913fi
9914SH=$ac_cv_path_SH
9915if test -n "$SH"; then
9916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9917$as_echo "$SH" >&6; }
9918else
9919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9920$as_echo "no" >&6; }
9921fi
9922
9923
9924          if test "x$SH" = x; then
9925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9926          fi
9927        else
9928          # Otherwise we believe it is a complete path. Use it as it is.
9929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9930$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9932$as_echo_n "checking for SH... " >&6; }
9933          if test ! -x "$tool_specified"; then
9934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9935$as_echo "not found" >&6; }
9936            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9937          fi
9938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9939$as_echo "$tool_specified" >&6; }
9940        fi
9941      fi
9942    fi
9943
9944  fi
9945
9946
9947
9948  if test "x$SH" = x; then
9949    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9950  fi
9951
9952
9953
9954
9955
9956  # Publish this variable in the help.
9957
9958
9959  if [ -z "${SORT+x}" ]; then
9960    # The variable is not set by user, try to locate tool using the code snippet
9961    for ac_prog in sort
9962do
9963  # Extract the first word of "$ac_prog", so it can be a program name with args.
9964set dummy $ac_prog; ac_word=$2
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9966$as_echo_n "checking for $ac_word... " >&6; }
9967if ${ac_cv_path_SORT+:} false; then :
9968  $as_echo_n "(cached) " >&6
9969else
9970  case $SORT in
9971  [\\/]* | ?:[\\/]*)
9972  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9973  ;;
9974  *)
9975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9976for as_dir in $PATH
9977do
9978  IFS=$as_save_IFS
9979  test -z "$as_dir" && as_dir=.
9980    for ac_exec_ext in '' $ac_executable_extensions; do
9981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9982    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9984    break 2
9985  fi
9986done
9987  done
9988IFS=$as_save_IFS
9989
9990  ;;
9991esac
9992fi
9993SORT=$ac_cv_path_SORT
9994if test -n "$SORT"; then
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9996$as_echo "$SORT" >&6; }
9997else
9998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
10000fi
10001
10002
10003  test -n "$SORT" && break
10004done
10005
10006  else
10007    # The variable is set, but is it from the command line or the environment?
10008
10009    # Try to remove the string !SORT! from our list.
10010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10012      # If it failed, the variable was not from the command line. Ignore it,
10013      # but warn the user (except for BASH, which is always set by the calling BASH).
10014      if test "xSORT" != xBASH; then
10015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10016$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10017      fi
10018      # Try to locate tool using the code snippet
10019      for ac_prog in sort
10020do
10021  # Extract the first word of "$ac_prog", so it can be a program name with args.
10022set dummy $ac_prog; ac_word=$2
10023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10024$as_echo_n "checking for $ac_word... " >&6; }
10025if ${ac_cv_path_SORT+:} false; then :
10026  $as_echo_n "(cached) " >&6
10027else
10028  case $SORT in
10029  [\\/]* | ?:[\\/]*)
10030  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10031  ;;
10032  *)
10033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10034for as_dir in $PATH
10035do
10036  IFS=$as_save_IFS
10037  test -z "$as_dir" && as_dir=.
10038    for ac_exec_ext in '' $ac_executable_extensions; do
10039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10040    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10042    break 2
10043  fi
10044done
10045  done
10046IFS=$as_save_IFS
10047
10048  ;;
10049esac
10050fi
10051SORT=$ac_cv_path_SORT
10052if test -n "$SORT"; then
10053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10054$as_echo "$SORT" >&6; }
10055else
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
10058fi
10059
10060
10061  test -n "$SORT" && break
10062done
10063
10064    else
10065      # If it succeeded, then it was overridden by the user. We will use it
10066      # for the tool.
10067
10068      # First remove it from the list of overridden variables, so we can test
10069      # for unknown variables in the end.
10070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10071
10072      # Check if we try to supply an empty value
10073      if test "x$SORT" = x; then
10074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10075$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10077$as_echo_n "checking for SORT... " >&6; }
10078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10079$as_echo "disabled" >&6; }
10080      else
10081        # Check if the provided tool contains a complete path.
10082        tool_specified="$SORT"
10083        tool_basename="${tool_specified##*/}"
10084        if test "x$tool_basename" = "x$tool_specified"; then
10085          # A command without a complete path is provided, search $PATH.
10086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10087$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10088          # Extract the first word of "$tool_basename", so it can be a program name with args.
10089set dummy $tool_basename; ac_word=$2
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10091$as_echo_n "checking for $ac_word... " >&6; }
10092if ${ac_cv_path_SORT+:} false; then :
10093  $as_echo_n "(cached) " >&6
10094else
10095  case $SORT in
10096  [\\/]* | ?:[\\/]*)
10097  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10098  ;;
10099  *)
10100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10101for as_dir in $PATH
10102do
10103  IFS=$as_save_IFS
10104  test -z "$as_dir" && as_dir=.
10105    for ac_exec_ext in '' $ac_executable_extensions; do
10106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10107    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10109    break 2
10110  fi
10111done
10112  done
10113IFS=$as_save_IFS
10114
10115  ;;
10116esac
10117fi
10118SORT=$ac_cv_path_SORT
10119if test -n "$SORT"; then
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10121$as_echo "$SORT" >&6; }
10122else
10123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124$as_echo "no" >&6; }
10125fi
10126
10127
10128          if test "x$SORT" = x; then
10129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10130          fi
10131        else
10132          # Otherwise we believe it is a complete path. Use it as it is.
10133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10134$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10136$as_echo_n "checking for SORT... " >&6; }
10137          if test ! -x "$tool_specified"; then
10138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10139$as_echo "not found" >&6; }
10140            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10141          fi
10142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10143$as_echo "$tool_specified" >&6; }
10144        fi
10145      fi
10146    fi
10147
10148  fi
10149
10150
10151
10152  if test "x$SORT" = x; then
10153    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10154  fi
10155
10156
10157
10158
10159
10160  # Publish this variable in the help.
10161
10162
10163  if [ -z "${TAIL+x}" ]; then
10164    # The variable is not set by user, try to locate tool using the code snippet
10165    for ac_prog in tail
10166do
10167  # Extract the first word of "$ac_prog", so it can be a program name with args.
10168set dummy $ac_prog; ac_word=$2
10169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10170$as_echo_n "checking for $ac_word... " >&6; }
10171if ${ac_cv_path_TAIL+:} false; then :
10172  $as_echo_n "(cached) " >&6
10173else
10174  case $TAIL in
10175  [\\/]* | ?:[\\/]*)
10176  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10177  ;;
10178  *)
10179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10180for as_dir in $PATH
10181do
10182  IFS=$as_save_IFS
10183  test -z "$as_dir" && as_dir=.
10184    for ac_exec_ext in '' $ac_executable_extensions; do
10185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10186    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10188    break 2
10189  fi
10190done
10191  done
10192IFS=$as_save_IFS
10193
10194  ;;
10195esac
10196fi
10197TAIL=$ac_cv_path_TAIL
10198if test -n "$TAIL"; then
10199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10200$as_echo "$TAIL" >&6; }
10201else
10202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10203$as_echo "no" >&6; }
10204fi
10205
10206
10207  test -n "$TAIL" && break
10208done
10209
10210  else
10211    # The variable is set, but is it from the command line or the environment?
10212
10213    # Try to remove the string !TAIL! from our list.
10214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10216      # If it failed, the variable was not from the command line. Ignore it,
10217      # but warn the user (except for BASH, which is always set by the calling BASH).
10218      if test "xTAIL" != xBASH; then
10219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10220$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10221      fi
10222      # Try to locate tool using the code snippet
10223      for ac_prog in tail
10224do
10225  # Extract the first word of "$ac_prog", so it can be a program name with args.
10226set dummy $ac_prog; ac_word=$2
10227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10228$as_echo_n "checking for $ac_word... " >&6; }
10229if ${ac_cv_path_TAIL+:} false; then :
10230  $as_echo_n "(cached) " >&6
10231else
10232  case $TAIL in
10233  [\\/]* | ?:[\\/]*)
10234  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10235  ;;
10236  *)
10237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10238for as_dir in $PATH
10239do
10240  IFS=$as_save_IFS
10241  test -z "$as_dir" && as_dir=.
10242    for ac_exec_ext in '' $ac_executable_extensions; do
10243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10244    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10246    break 2
10247  fi
10248done
10249  done
10250IFS=$as_save_IFS
10251
10252  ;;
10253esac
10254fi
10255TAIL=$ac_cv_path_TAIL
10256if test -n "$TAIL"; then
10257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10258$as_echo "$TAIL" >&6; }
10259else
10260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10261$as_echo "no" >&6; }
10262fi
10263
10264
10265  test -n "$TAIL" && break
10266done
10267
10268    else
10269      # If it succeeded, then it was overridden by the user. We will use it
10270      # for the tool.
10271
10272      # First remove it from the list of overridden variables, so we can test
10273      # for unknown variables in the end.
10274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10275
10276      # Check if we try to supply an empty value
10277      if test "x$TAIL" = x; then
10278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10279$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10281$as_echo_n "checking for TAIL... " >&6; }
10282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10283$as_echo "disabled" >&6; }
10284      else
10285        # Check if the provided tool contains a complete path.
10286        tool_specified="$TAIL"
10287        tool_basename="${tool_specified##*/}"
10288        if test "x$tool_basename" = "x$tool_specified"; then
10289          # A command without a complete path is provided, search $PATH.
10290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10291$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10292          # Extract the first word of "$tool_basename", so it can be a program name with args.
10293set dummy $tool_basename; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if ${ac_cv_path_TAIL+:} false; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $TAIL in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322TAIL=$ac_cv_path_TAIL
10323if test -n "$TAIL"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10325$as_echo "$TAIL" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332          if test "x$TAIL" = x; then
10333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10334          fi
10335        else
10336          # Otherwise we believe it is a complete path. Use it as it is.
10337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10338$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10340$as_echo_n "checking for TAIL... " >&6; }
10341          if test ! -x "$tool_specified"; then
10342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10343$as_echo "not found" >&6; }
10344            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10345          fi
10346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10347$as_echo "$tool_specified" >&6; }
10348        fi
10349      fi
10350    fi
10351
10352  fi
10353
10354
10355
10356  if test "x$TAIL" = x; then
10357    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10358  fi
10359
10360
10361
10362
10363
10364  # Publish this variable in the help.
10365
10366
10367  if [ -z "${TAR+x}" ]; then
10368    # The variable is not set by user, try to locate tool using the code snippet
10369    for ac_prog in tar
10370do
10371  # Extract the first word of "$ac_prog", so it can be a program name with args.
10372set dummy $ac_prog; ac_word=$2
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10374$as_echo_n "checking for $ac_word... " >&6; }
10375if ${ac_cv_path_TAR+:} false; then :
10376  $as_echo_n "(cached) " >&6
10377else
10378  case $TAR in
10379  [\\/]* | ?:[\\/]*)
10380  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10381  ;;
10382  *)
10383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10384for as_dir in $PATH
10385do
10386  IFS=$as_save_IFS
10387  test -z "$as_dir" && as_dir=.
10388    for ac_exec_ext in '' $ac_executable_extensions; do
10389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10390    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10392    break 2
10393  fi
10394done
10395  done
10396IFS=$as_save_IFS
10397
10398  ;;
10399esac
10400fi
10401TAR=$ac_cv_path_TAR
10402if test -n "$TAR"; then
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10404$as_echo "$TAR" >&6; }
10405else
10406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407$as_echo "no" >&6; }
10408fi
10409
10410
10411  test -n "$TAR" && break
10412done
10413
10414  else
10415    # The variable is set, but is it from the command line or the environment?
10416
10417    # Try to remove the string !TAR! from our list.
10418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10420      # If it failed, the variable was not from the command line. Ignore it,
10421      # but warn the user (except for BASH, which is always set by the calling BASH).
10422      if test "xTAR" != xBASH; then
10423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10424$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10425      fi
10426      # Try to locate tool using the code snippet
10427      for ac_prog in tar
10428do
10429  # Extract the first word of "$ac_prog", so it can be a program name with args.
10430set dummy $ac_prog; ac_word=$2
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10432$as_echo_n "checking for $ac_word... " >&6; }
10433if ${ac_cv_path_TAR+:} false; then :
10434  $as_echo_n "(cached) " >&6
10435else
10436  case $TAR in
10437  [\\/]* | ?:[\\/]*)
10438  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10439  ;;
10440  *)
10441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10442for as_dir in $PATH
10443do
10444  IFS=$as_save_IFS
10445  test -z "$as_dir" && as_dir=.
10446    for ac_exec_ext in '' $ac_executable_extensions; do
10447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10448    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10450    break 2
10451  fi
10452done
10453  done
10454IFS=$as_save_IFS
10455
10456  ;;
10457esac
10458fi
10459TAR=$ac_cv_path_TAR
10460if test -n "$TAR"; then
10461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10462$as_echo "$TAR" >&6; }
10463else
10464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10465$as_echo "no" >&6; }
10466fi
10467
10468
10469  test -n "$TAR" && break
10470done
10471
10472    else
10473      # If it succeeded, then it was overridden by the user. We will use it
10474      # for the tool.
10475
10476      # First remove it from the list of overridden variables, so we can test
10477      # for unknown variables in the end.
10478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10479
10480      # Check if we try to supply an empty value
10481      if test "x$TAR" = x; then
10482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10483$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10485$as_echo_n "checking for TAR... " >&6; }
10486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10487$as_echo "disabled" >&6; }
10488      else
10489        # Check if the provided tool contains a complete path.
10490        tool_specified="$TAR"
10491        tool_basename="${tool_specified##*/}"
10492        if test "x$tool_basename" = "x$tool_specified"; then
10493          # A command without a complete path is provided, search $PATH.
10494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10495$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10496          # Extract the first word of "$tool_basename", so it can be a program name with args.
10497set dummy $tool_basename; ac_word=$2
10498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10499$as_echo_n "checking for $ac_word... " >&6; }
10500if ${ac_cv_path_TAR+:} false; then :
10501  $as_echo_n "(cached) " >&6
10502else
10503  case $TAR in
10504  [\\/]* | ?:[\\/]*)
10505  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10506  ;;
10507  *)
10508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10509for as_dir in $PATH
10510do
10511  IFS=$as_save_IFS
10512  test -z "$as_dir" && as_dir=.
10513    for ac_exec_ext in '' $ac_executable_extensions; do
10514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10515    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10517    break 2
10518  fi
10519done
10520  done
10521IFS=$as_save_IFS
10522
10523  ;;
10524esac
10525fi
10526TAR=$ac_cv_path_TAR
10527if test -n "$TAR"; then
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10529$as_echo "$TAR" >&6; }
10530else
10531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10532$as_echo "no" >&6; }
10533fi
10534
10535
10536          if test "x$TAR" = x; then
10537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10538          fi
10539        else
10540          # Otherwise we believe it is a complete path. Use it as it is.
10541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10542$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10544$as_echo_n "checking for TAR... " >&6; }
10545          if test ! -x "$tool_specified"; then
10546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10547$as_echo "not found" >&6; }
10548            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10549          fi
10550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10551$as_echo "$tool_specified" >&6; }
10552        fi
10553      fi
10554    fi
10555
10556  fi
10557
10558
10559
10560  if test "x$TAR" = x; then
10561    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10562  fi
10563
10564
10565
10566
10567
10568  # Publish this variable in the help.
10569
10570
10571  if [ -z "${TEE+x}" ]; then
10572    # The variable is not set by user, try to locate tool using the code snippet
10573    for ac_prog in tee
10574do
10575  # Extract the first word of "$ac_prog", so it can be a program name with args.
10576set dummy $ac_prog; ac_word=$2
10577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10578$as_echo_n "checking for $ac_word... " >&6; }
10579if ${ac_cv_path_TEE+:} false; then :
10580  $as_echo_n "(cached) " >&6
10581else
10582  case $TEE in
10583  [\\/]* | ?:[\\/]*)
10584  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10585  ;;
10586  *)
10587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10588for as_dir in $PATH
10589do
10590  IFS=$as_save_IFS
10591  test -z "$as_dir" && as_dir=.
10592    for ac_exec_ext in '' $ac_executable_extensions; do
10593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10594    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10596    break 2
10597  fi
10598done
10599  done
10600IFS=$as_save_IFS
10601
10602  ;;
10603esac
10604fi
10605TEE=$ac_cv_path_TEE
10606if test -n "$TEE"; then
10607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10608$as_echo "$TEE" >&6; }
10609else
10610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611$as_echo "no" >&6; }
10612fi
10613
10614
10615  test -n "$TEE" && break
10616done
10617
10618  else
10619    # The variable is set, but is it from the command line or the environment?
10620
10621    # Try to remove the string !TEE! from our list.
10622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10624      # If it failed, the variable was not from the command line. Ignore it,
10625      # but warn the user (except for BASH, which is always set by the calling BASH).
10626      if test "xTEE" != xBASH; then
10627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10628$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10629      fi
10630      # Try to locate tool using the code snippet
10631      for ac_prog in tee
10632do
10633  # Extract the first word of "$ac_prog", so it can be a program name with args.
10634set dummy $ac_prog; ac_word=$2
10635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10636$as_echo_n "checking for $ac_word... " >&6; }
10637if ${ac_cv_path_TEE+:} false; then :
10638  $as_echo_n "(cached) " >&6
10639else
10640  case $TEE in
10641  [\\/]* | ?:[\\/]*)
10642  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10643  ;;
10644  *)
10645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10646for as_dir in $PATH
10647do
10648  IFS=$as_save_IFS
10649  test -z "$as_dir" && as_dir=.
10650    for ac_exec_ext in '' $ac_executable_extensions; do
10651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10652    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10654    break 2
10655  fi
10656done
10657  done
10658IFS=$as_save_IFS
10659
10660  ;;
10661esac
10662fi
10663TEE=$ac_cv_path_TEE
10664if test -n "$TEE"; then
10665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10666$as_echo "$TEE" >&6; }
10667else
10668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669$as_echo "no" >&6; }
10670fi
10671
10672
10673  test -n "$TEE" && break
10674done
10675
10676    else
10677      # If it succeeded, then it was overridden by the user. We will use it
10678      # for the tool.
10679
10680      # First remove it from the list of overridden variables, so we can test
10681      # for unknown variables in the end.
10682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10683
10684      # Check if we try to supply an empty value
10685      if test "x$TEE" = x; then
10686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10687$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10689$as_echo_n "checking for TEE... " >&6; }
10690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10691$as_echo "disabled" >&6; }
10692      else
10693        # Check if the provided tool contains a complete path.
10694        tool_specified="$TEE"
10695        tool_basename="${tool_specified##*/}"
10696        if test "x$tool_basename" = "x$tool_specified"; then
10697          # A command without a complete path is provided, search $PATH.
10698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10699$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10700          # Extract the first word of "$tool_basename", so it can be a program name with args.
10701set dummy $tool_basename; ac_word=$2
10702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10703$as_echo_n "checking for $ac_word... " >&6; }
10704if ${ac_cv_path_TEE+:} false; then :
10705  $as_echo_n "(cached) " >&6
10706else
10707  case $TEE in
10708  [\\/]* | ?:[\\/]*)
10709  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10710  ;;
10711  *)
10712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10713for as_dir in $PATH
10714do
10715  IFS=$as_save_IFS
10716  test -z "$as_dir" && as_dir=.
10717    for ac_exec_ext in '' $ac_executable_extensions; do
10718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10719    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10721    break 2
10722  fi
10723done
10724  done
10725IFS=$as_save_IFS
10726
10727  ;;
10728esac
10729fi
10730TEE=$ac_cv_path_TEE
10731if test -n "$TEE"; then
10732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10733$as_echo "$TEE" >&6; }
10734else
10735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10736$as_echo "no" >&6; }
10737fi
10738
10739
10740          if test "x$TEE" = x; then
10741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10742          fi
10743        else
10744          # Otherwise we believe it is a complete path. Use it as it is.
10745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10746$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10748$as_echo_n "checking for TEE... " >&6; }
10749          if test ! -x "$tool_specified"; then
10750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10751$as_echo "not found" >&6; }
10752            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10753          fi
10754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10755$as_echo "$tool_specified" >&6; }
10756        fi
10757      fi
10758    fi
10759
10760  fi
10761
10762
10763
10764  if test "x$TEE" = x; then
10765    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10766  fi
10767
10768
10769
10770
10771
10772  # Publish this variable in the help.
10773
10774
10775  if [ -z "${TOUCH+x}" ]; then
10776    # The variable is not set by user, try to locate tool using the code snippet
10777    for ac_prog in touch
10778do
10779  # Extract the first word of "$ac_prog", so it can be a program name with args.
10780set dummy $ac_prog; ac_word=$2
10781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10782$as_echo_n "checking for $ac_word... " >&6; }
10783if ${ac_cv_path_TOUCH+:} false; then :
10784  $as_echo_n "(cached) " >&6
10785else
10786  case $TOUCH in
10787  [\\/]* | ?:[\\/]*)
10788  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10789  ;;
10790  *)
10791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10792for as_dir in $PATH
10793do
10794  IFS=$as_save_IFS
10795  test -z "$as_dir" && as_dir=.
10796    for ac_exec_ext in '' $ac_executable_extensions; do
10797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10798    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10800    break 2
10801  fi
10802done
10803  done
10804IFS=$as_save_IFS
10805
10806  ;;
10807esac
10808fi
10809TOUCH=$ac_cv_path_TOUCH
10810if test -n "$TOUCH"; then
10811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10812$as_echo "$TOUCH" >&6; }
10813else
10814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
10816fi
10817
10818
10819  test -n "$TOUCH" && break
10820done
10821
10822  else
10823    # The variable is set, but is it from the command line or the environment?
10824
10825    # Try to remove the string !TOUCH! from our list.
10826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10828      # If it failed, the variable was not from the command line. Ignore it,
10829      # but warn the user (except for BASH, which is always set by the calling BASH).
10830      if test "xTOUCH" != xBASH; then
10831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10832$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10833      fi
10834      # Try to locate tool using the code snippet
10835      for ac_prog in touch
10836do
10837  # Extract the first word of "$ac_prog", so it can be a program name with args.
10838set dummy $ac_prog; ac_word=$2
10839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10840$as_echo_n "checking for $ac_word... " >&6; }
10841if ${ac_cv_path_TOUCH+:} false; then :
10842  $as_echo_n "(cached) " >&6
10843else
10844  case $TOUCH in
10845  [\\/]* | ?:[\\/]*)
10846  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10847  ;;
10848  *)
10849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10850for as_dir in $PATH
10851do
10852  IFS=$as_save_IFS
10853  test -z "$as_dir" && as_dir=.
10854    for ac_exec_ext in '' $ac_executable_extensions; do
10855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10856    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10858    break 2
10859  fi
10860done
10861  done
10862IFS=$as_save_IFS
10863
10864  ;;
10865esac
10866fi
10867TOUCH=$ac_cv_path_TOUCH
10868if test -n "$TOUCH"; then
10869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10870$as_echo "$TOUCH" >&6; }
10871else
10872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10873$as_echo "no" >&6; }
10874fi
10875
10876
10877  test -n "$TOUCH" && break
10878done
10879
10880    else
10881      # If it succeeded, then it was overridden by the user. We will use it
10882      # for the tool.
10883
10884      # First remove it from the list of overridden variables, so we can test
10885      # for unknown variables in the end.
10886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10887
10888      # Check if we try to supply an empty value
10889      if test "x$TOUCH" = x; then
10890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10891$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10893$as_echo_n "checking for TOUCH... " >&6; }
10894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10895$as_echo "disabled" >&6; }
10896      else
10897        # Check if the provided tool contains a complete path.
10898        tool_specified="$TOUCH"
10899        tool_basename="${tool_specified##*/}"
10900        if test "x$tool_basename" = "x$tool_specified"; then
10901          # A command without a complete path is provided, search $PATH.
10902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10903$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10904          # Extract the first word of "$tool_basename", so it can be a program name with args.
10905set dummy $tool_basename; ac_word=$2
10906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10907$as_echo_n "checking for $ac_word... " >&6; }
10908if ${ac_cv_path_TOUCH+:} false; then :
10909  $as_echo_n "(cached) " >&6
10910else
10911  case $TOUCH in
10912  [\\/]* | ?:[\\/]*)
10913  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10914  ;;
10915  *)
10916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10917for as_dir in $PATH
10918do
10919  IFS=$as_save_IFS
10920  test -z "$as_dir" && as_dir=.
10921    for ac_exec_ext in '' $ac_executable_extensions; do
10922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10923    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10925    break 2
10926  fi
10927done
10928  done
10929IFS=$as_save_IFS
10930
10931  ;;
10932esac
10933fi
10934TOUCH=$ac_cv_path_TOUCH
10935if test -n "$TOUCH"; then
10936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10937$as_echo "$TOUCH" >&6; }
10938else
10939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10940$as_echo "no" >&6; }
10941fi
10942
10943
10944          if test "x$TOUCH" = x; then
10945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10946          fi
10947        else
10948          # Otherwise we believe it is a complete path. Use it as it is.
10949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10950$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10952$as_echo_n "checking for TOUCH... " >&6; }
10953          if test ! -x "$tool_specified"; then
10954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10955$as_echo "not found" >&6; }
10956            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10957          fi
10958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10959$as_echo "$tool_specified" >&6; }
10960        fi
10961      fi
10962    fi
10963
10964  fi
10965
10966
10967
10968  if test "x$TOUCH" = x; then
10969    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10970  fi
10971
10972
10973
10974
10975
10976  # Publish this variable in the help.
10977
10978
10979  if [ -z "${TR+x}" ]; then
10980    # The variable is not set by user, try to locate tool using the code snippet
10981    for ac_prog in tr
10982do
10983  # Extract the first word of "$ac_prog", so it can be a program name with args.
10984set dummy $ac_prog; ac_word=$2
10985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10986$as_echo_n "checking for $ac_word... " >&6; }
10987if ${ac_cv_path_TR+:} false; then :
10988  $as_echo_n "(cached) " >&6
10989else
10990  case $TR in
10991  [\\/]* | ?:[\\/]*)
10992  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10993  ;;
10994  *)
10995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10996for as_dir in $PATH
10997do
10998  IFS=$as_save_IFS
10999  test -z "$as_dir" && as_dir=.
11000    for ac_exec_ext in '' $ac_executable_extensions; do
11001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11002    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11004    break 2
11005  fi
11006done
11007  done
11008IFS=$as_save_IFS
11009
11010  ;;
11011esac
11012fi
11013TR=$ac_cv_path_TR
11014if test -n "$TR"; then
11015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11016$as_echo "$TR" >&6; }
11017else
11018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019$as_echo "no" >&6; }
11020fi
11021
11022
11023  test -n "$TR" && break
11024done
11025
11026  else
11027    # The variable is set, but is it from the command line or the environment?
11028
11029    # Try to remove the string !TR! from our list.
11030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11032      # If it failed, the variable was not from the command line. Ignore it,
11033      # but warn the user (except for BASH, which is always set by the calling BASH).
11034      if test "xTR" != xBASH; then
11035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11036$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11037      fi
11038      # Try to locate tool using the code snippet
11039      for ac_prog in tr
11040do
11041  # Extract the first word of "$ac_prog", so it can be a program name with args.
11042set dummy $ac_prog; ac_word=$2
11043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11044$as_echo_n "checking for $ac_word... " >&6; }
11045if ${ac_cv_path_TR+:} false; then :
11046  $as_echo_n "(cached) " >&6
11047else
11048  case $TR in
11049  [\\/]* | ?:[\\/]*)
11050  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11051  ;;
11052  *)
11053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11054for as_dir in $PATH
11055do
11056  IFS=$as_save_IFS
11057  test -z "$as_dir" && as_dir=.
11058    for ac_exec_ext in '' $ac_executable_extensions; do
11059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11060    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11062    break 2
11063  fi
11064done
11065  done
11066IFS=$as_save_IFS
11067
11068  ;;
11069esac
11070fi
11071TR=$ac_cv_path_TR
11072if test -n "$TR"; then
11073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11074$as_echo "$TR" >&6; }
11075else
11076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11077$as_echo "no" >&6; }
11078fi
11079
11080
11081  test -n "$TR" && break
11082done
11083
11084    else
11085      # If it succeeded, then it was overridden by the user. We will use it
11086      # for the tool.
11087
11088      # First remove it from the list of overridden variables, so we can test
11089      # for unknown variables in the end.
11090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11091
11092      # Check if we try to supply an empty value
11093      if test "x$TR" = x; then
11094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11095$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11097$as_echo_n "checking for TR... " >&6; }
11098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11099$as_echo "disabled" >&6; }
11100      else
11101        # Check if the provided tool contains a complete path.
11102        tool_specified="$TR"
11103        tool_basename="${tool_specified##*/}"
11104        if test "x$tool_basename" = "x$tool_specified"; then
11105          # A command without a complete path is provided, search $PATH.
11106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11107$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11108          # Extract the first word of "$tool_basename", so it can be a program name with args.
11109set dummy $tool_basename; ac_word=$2
11110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11111$as_echo_n "checking for $ac_word... " >&6; }
11112if ${ac_cv_path_TR+:} false; then :
11113  $as_echo_n "(cached) " >&6
11114else
11115  case $TR in
11116  [\\/]* | ?:[\\/]*)
11117  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11118  ;;
11119  *)
11120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11121for as_dir in $PATH
11122do
11123  IFS=$as_save_IFS
11124  test -z "$as_dir" && as_dir=.
11125    for ac_exec_ext in '' $ac_executable_extensions; do
11126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11127    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11129    break 2
11130  fi
11131done
11132  done
11133IFS=$as_save_IFS
11134
11135  ;;
11136esac
11137fi
11138TR=$ac_cv_path_TR
11139if test -n "$TR"; then
11140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11141$as_echo "$TR" >&6; }
11142else
11143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11144$as_echo "no" >&6; }
11145fi
11146
11147
11148          if test "x$TR" = x; then
11149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11150          fi
11151        else
11152          # Otherwise we believe it is a complete path. Use it as it is.
11153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11154$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11156$as_echo_n "checking for TR... " >&6; }
11157          if test ! -x "$tool_specified"; then
11158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11159$as_echo "not found" >&6; }
11160            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11161          fi
11162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11163$as_echo "$tool_specified" >&6; }
11164        fi
11165      fi
11166    fi
11167
11168  fi
11169
11170
11171
11172  if test "x$TR" = x; then
11173    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11174  fi
11175
11176
11177
11178
11179
11180  # Publish this variable in the help.
11181
11182
11183  if [ -z "${UNAME+x}" ]; then
11184    # The variable is not set by user, try to locate tool using the code snippet
11185    for ac_prog in uname
11186do
11187  # Extract the first word of "$ac_prog", so it can be a program name with args.
11188set dummy $ac_prog; ac_word=$2
11189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11190$as_echo_n "checking for $ac_word... " >&6; }
11191if ${ac_cv_path_UNAME+:} false; then :
11192  $as_echo_n "(cached) " >&6
11193else
11194  case $UNAME in
11195  [\\/]* | ?:[\\/]*)
11196  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11197  ;;
11198  *)
11199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11200for as_dir in $PATH
11201do
11202  IFS=$as_save_IFS
11203  test -z "$as_dir" && as_dir=.
11204    for ac_exec_ext in '' $ac_executable_extensions; do
11205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11206    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11208    break 2
11209  fi
11210done
11211  done
11212IFS=$as_save_IFS
11213
11214  ;;
11215esac
11216fi
11217UNAME=$ac_cv_path_UNAME
11218if test -n "$UNAME"; then
11219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11220$as_echo "$UNAME" >&6; }
11221else
11222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223$as_echo "no" >&6; }
11224fi
11225
11226
11227  test -n "$UNAME" && break
11228done
11229
11230  else
11231    # The variable is set, but is it from the command line or the environment?
11232
11233    # Try to remove the string !UNAME! from our list.
11234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11236      # If it failed, the variable was not from the command line. Ignore it,
11237      # but warn the user (except for BASH, which is always set by the calling BASH).
11238      if test "xUNAME" != xBASH; then
11239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11240$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11241      fi
11242      # Try to locate tool using the code snippet
11243      for ac_prog in uname
11244do
11245  # Extract the first word of "$ac_prog", so it can be a program name with args.
11246set dummy $ac_prog; ac_word=$2
11247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11248$as_echo_n "checking for $ac_word... " >&6; }
11249if ${ac_cv_path_UNAME+:} false; then :
11250  $as_echo_n "(cached) " >&6
11251else
11252  case $UNAME in
11253  [\\/]* | ?:[\\/]*)
11254  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11255  ;;
11256  *)
11257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11258for as_dir in $PATH
11259do
11260  IFS=$as_save_IFS
11261  test -z "$as_dir" && as_dir=.
11262    for ac_exec_ext in '' $ac_executable_extensions; do
11263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11264    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11266    break 2
11267  fi
11268done
11269  done
11270IFS=$as_save_IFS
11271
11272  ;;
11273esac
11274fi
11275UNAME=$ac_cv_path_UNAME
11276if test -n "$UNAME"; then
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11278$as_echo "$UNAME" >&6; }
11279else
11280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11281$as_echo "no" >&6; }
11282fi
11283
11284
11285  test -n "$UNAME" && break
11286done
11287
11288    else
11289      # If it succeeded, then it was overridden by the user. We will use it
11290      # for the tool.
11291
11292      # First remove it from the list of overridden variables, so we can test
11293      # for unknown variables in the end.
11294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11295
11296      # Check if we try to supply an empty value
11297      if test "x$UNAME" = x; then
11298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11299$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11301$as_echo_n "checking for UNAME... " >&6; }
11302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11303$as_echo "disabled" >&6; }
11304      else
11305        # Check if the provided tool contains a complete path.
11306        tool_specified="$UNAME"
11307        tool_basename="${tool_specified##*/}"
11308        if test "x$tool_basename" = "x$tool_specified"; then
11309          # A command without a complete path is provided, search $PATH.
11310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11311$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11312          # Extract the first word of "$tool_basename", so it can be a program name with args.
11313set dummy $tool_basename; ac_word=$2
11314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11315$as_echo_n "checking for $ac_word... " >&6; }
11316if ${ac_cv_path_UNAME+:} false; then :
11317  $as_echo_n "(cached) " >&6
11318else
11319  case $UNAME in
11320  [\\/]* | ?:[\\/]*)
11321  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11322  ;;
11323  *)
11324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11325for as_dir in $PATH
11326do
11327  IFS=$as_save_IFS
11328  test -z "$as_dir" && as_dir=.
11329    for ac_exec_ext in '' $ac_executable_extensions; do
11330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11331    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11333    break 2
11334  fi
11335done
11336  done
11337IFS=$as_save_IFS
11338
11339  ;;
11340esac
11341fi
11342UNAME=$ac_cv_path_UNAME
11343if test -n "$UNAME"; then
11344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11345$as_echo "$UNAME" >&6; }
11346else
11347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11348$as_echo "no" >&6; }
11349fi
11350
11351
11352          if test "x$UNAME" = x; then
11353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11354          fi
11355        else
11356          # Otherwise we believe it is a complete path. Use it as it is.
11357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11358$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11360$as_echo_n "checking for UNAME... " >&6; }
11361          if test ! -x "$tool_specified"; then
11362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11363$as_echo "not found" >&6; }
11364            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11365          fi
11366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11367$as_echo "$tool_specified" >&6; }
11368        fi
11369      fi
11370    fi
11371
11372  fi
11373
11374
11375
11376  if test "x$UNAME" = x; then
11377    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11378  fi
11379
11380
11381
11382
11383
11384  # Publish this variable in the help.
11385
11386
11387  if [ -z "${UNIQ+x}" ]; then
11388    # The variable is not set by user, try to locate tool using the code snippet
11389    for ac_prog in uniq
11390do
11391  # Extract the first word of "$ac_prog", so it can be a program name with args.
11392set dummy $ac_prog; ac_word=$2
11393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11394$as_echo_n "checking for $ac_word... " >&6; }
11395if ${ac_cv_path_UNIQ+:} false; then :
11396  $as_echo_n "(cached) " >&6
11397else
11398  case $UNIQ in
11399  [\\/]* | ?:[\\/]*)
11400  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11401  ;;
11402  *)
11403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11404for as_dir in $PATH
11405do
11406  IFS=$as_save_IFS
11407  test -z "$as_dir" && as_dir=.
11408    for ac_exec_ext in '' $ac_executable_extensions; do
11409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11410    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11412    break 2
11413  fi
11414done
11415  done
11416IFS=$as_save_IFS
11417
11418  ;;
11419esac
11420fi
11421UNIQ=$ac_cv_path_UNIQ
11422if test -n "$UNIQ"; then
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11424$as_echo "$UNIQ" >&6; }
11425else
11426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
11428fi
11429
11430
11431  test -n "$UNIQ" && break
11432done
11433
11434  else
11435    # The variable is set, but is it from the command line or the environment?
11436
11437    # Try to remove the string !UNIQ! from our list.
11438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11440      # If it failed, the variable was not from the command line. Ignore it,
11441      # but warn the user (except for BASH, which is always set by the calling BASH).
11442      if test "xUNIQ" != xBASH; then
11443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11444$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11445      fi
11446      # Try to locate tool using the code snippet
11447      for ac_prog in uniq
11448do
11449  # Extract the first word of "$ac_prog", so it can be a program name with args.
11450set dummy $ac_prog; ac_word=$2
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11452$as_echo_n "checking for $ac_word... " >&6; }
11453if ${ac_cv_path_UNIQ+:} false; then :
11454  $as_echo_n "(cached) " >&6
11455else
11456  case $UNIQ in
11457  [\\/]* | ?:[\\/]*)
11458  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11459  ;;
11460  *)
11461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462for as_dir in $PATH
11463do
11464  IFS=$as_save_IFS
11465  test -z "$as_dir" && as_dir=.
11466    for ac_exec_ext in '' $ac_executable_extensions; do
11467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470    break 2
11471  fi
11472done
11473  done
11474IFS=$as_save_IFS
11475
11476  ;;
11477esac
11478fi
11479UNIQ=$ac_cv_path_UNIQ
11480if test -n "$UNIQ"; then
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11482$as_echo "$UNIQ" >&6; }
11483else
11484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
11486fi
11487
11488
11489  test -n "$UNIQ" && break
11490done
11491
11492    else
11493      # If it succeeded, then it was overridden by the user. We will use it
11494      # for the tool.
11495
11496      # First remove it from the list of overridden variables, so we can test
11497      # for unknown variables in the end.
11498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11499
11500      # Check if we try to supply an empty value
11501      if test "x$UNIQ" = x; then
11502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11503$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11505$as_echo_n "checking for UNIQ... " >&6; }
11506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11507$as_echo "disabled" >&6; }
11508      else
11509        # Check if the provided tool contains a complete path.
11510        tool_specified="$UNIQ"
11511        tool_basename="${tool_specified##*/}"
11512        if test "x$tool_basename" = "x$tool_specified"; then
11513          # A command without a complete path is provided, search $PATH.
11514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11515$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11516          # Extract the first word of "$tool_basename", so it can be a program name with args.
11517set dummy $tool_basename; ac_word=$2
11518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11519$as_echo_n "checking for $ac_word... " >&6; }
11520if ${ac_cv_path_UNIQ+:} false; then :
11521  $as_echo_n "(cached) " >&6
11522else
11523  case $UNIQ in
11524  [\\/]* | ?:[\\/]*)
11525  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11526  ;;
11527  *)
11528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11529for as_dir in $PATH
11530do
11531  IFS=$as_save_IFS
11532  test -z "$as_dir" && as_dir=.
11533    for ac_exec_ext in '' $ac_executable_extensions; do
11534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11535    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11537    break 2
11538  fi
11539done
11540  done
11541IFS=$as_save_IFS
11542
11543  ;;
11544esac
11545fi
11546UNIQ=$ac_cv_path_UNIQ
11547if test -n "$UNIQ"; then
11548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11549$as_echo "$UNIQ" >&6; }
11550else
11551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
11553fi
11554
11555
11556          if test "x$UNIQ" = x; then
11557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11558          fi
11559        else
11560          # Otherwise we believe it is a complete path. Use it as it is.
11561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11562$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11564$as_echo_n "checking for UNIQ... " >&6; }
11565          if test ! -x "$tool_specified"; then
11566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11567$as_echo "not found" >&6; }
11568            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11569          fi
11570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11571$as_echo "$tool_specified" >&6; }
11572        fi
11573      fi
11574    fi
11575
11576  fi
11577
11578
11579
11580  if test "x$UNIQ" = x; then
11581    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11582  fi
11583
11584
11585
11586
11587
11588  # Publish this variable in the help.
11589
11590
11591  if [ -z "${WC+x}" ]; then
11592    # The variable is not set by user, try to locate tool using the code snippet
11593    for ac_prog in wc
11594do
11595  # Extract the first word of "$ac_prog", so it can be a program name with args.
11596set dummy $ac_prog; ac_word=$2
11597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11598$as_echo_n "checking for $ac_word... " >&6; }
11599if ${ac_cv_path_WC+:} false; then :
11600  $as_echo_n "(cached) " >&6
11601else
11602  case $WC in
11603  [\\/]* | ?:[\\/]*)
11604  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11605  ;;
11606  *)
11607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11608for as_dir in $PATH
11609do
11610  IFS=$as_save_IFS
11611  test -z "$as_dir" && as_dir=.
11612    for ac_exec_ext in '' $ac_executable_extensions; do
11613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11614    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11616    break 2
11617  fi
11618done
11619  done
11620IFS=$as_save_IFS
11621
11622  ;;
11623esac
11624fi
11625WC=$ac_cv_path_WC
11626if test -n "$WC"; then
11627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11628$as_echo "$WC" >&6; }
11629else
11630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11631$as_echo "no" >&6; }
11632fi
11633
11634
11635  test -n "$WC" && break
11636done
11637
11638  else
11639    # The variable is set, but is it from the command line or the environment?
11640
11641    # Try to remove the string !WC! from our list.
11642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11644      # If it failed, the variable was not from the command line. Ignore it,
11645      # but warn the user (except for BASH, which is always set by the calling BASH).
11646      if test "xWC" != xBASH; then
11647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11648$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11649      fi
11650      # Try to locate tool using the code snippet
11651      for ac_prog in wc
11652do
11653  # Extract the first word of "$ac_prog", so it can be a program name with args.
11654set dummy $ac_prog; ac_word=$2
11655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11656$as_echo_n "checking for $ac_word... " >&6; }
11657if ${ac_cv_path_WC+:} false; then :
11658  $as_echo_n "(cached) " >&6
11659else
11660  case $WC in
11661  [\\/]* | ?:[\\/]*)
11662  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11663  ;;
11664  *)
11665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11666for as_dir in $PATH
11667do
11668  IFS=$as_save_IFS
11669  test -z "$as_dir" && as_dir=.
11670    for ac_exec_ext in '' $ac_executable_extensions; do
11671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11672    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11674    break 2
11675  fi
11676done
11677  done
11678IFS=$as_save_IFS
11679
11680  ;;
11681esac
11682fi
11683WC=$ac_cv_path_WC
11684if test -n "$WC"; then
11685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11686$as_echo "$WC" >&6; }
11687else
11688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
11690fi
11691
11692
11693  test -n "$WC" && break
11694done
11695
11696    else
11697      # If it succeeded, then it was overridden by the user. We will use it
11698      # for the tool.
11699
11700      # First remove it from the list of overridden variables, so we can test
11701      # for unknown variables in the end.
11702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11703
11704      # Check if we try to supply an empty value
11705      if test "x$WC" = x; then
11706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11707$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11709$as_echo_n "checking for WC... " >&6; }
11710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11711$as_echo "disabled" >&6; }
11712      else
11713        # Check if the provided tool contains a complete path.
11714        tool_specified="$WC"
11715        tool_basename="${tool_specified##*/}"
11716        if test "x$tool_basename" = "x$tool_specified"; then
11717          # A command without a complete path is provided, search $PATH.
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11719$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11720          # Extract the first word of "$tool_basename", so it can be a program name with args.
11721set dummy $tool_basename; ac_word=$2
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11723$as_echo_n "checking for $ac_word... " >&6; }
11724if ${ac_cv_path_WC+:} false; then :
11725  $as_echo_n "(cached) " >&6
11726else
11727  case $WC in
11728  [\\/]* | ?:[\\/]*)
11729  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11730  ;;
11731  *)
11732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11733for as_dir in $PATH
11734do
11735  IFS=$as_save_IFS
11736  test -z "$as_dir" && as_dir=.
11737    for ac_exec_ext in '' $ac_executable_extensions; do
11738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11739    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11741    break 2
11742  fi
11743done
11744  done
11745IFS=$as_save_IFS
11746
11747  ;;
11748esac
11749fi
11750WC=$ac_cv_path_WC
11751if test -n "$WC"; then
11752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11753$as_echo "$WC" >&6; }
11754else
11755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11756$as_echo "no" >&6; }
11757fi
11758
11759
11760          if test "x$WC" = x; then
11761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11762          fi
11763        else
11764          # Otherwise we believe it is a complete path. Use it as it is.
11765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11766$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11768$as_echo_n "checking for WC... " >&6; }
11769          if test ! -x "$tool_specified"; then
11770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11771$as_echo "not found" >&6; }
11772            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11773          fi
11774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11775$as_echo "$tool_specified" >&6; }
11776        fi
11777      fi
11778    fi
11779
11780  fi
11781
11782
11783
11784  if test "x$WC" = x; then
11785    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11786  fi
11787
11788
11789
11790
11791
11792  # Publish this variable in the help.
11793
11794
11795  if [ -z "${WHICH+x}" ]; then
11796    # The variable is not set by user, try to locate tool using the code snippet
11797    for ac_prog in which
11798do
11799  # Extract the first word of "$ac_prog", so it can be a program name with args.
11800set dummy $ac_prog; ac_word=$2
11801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11802$as_echo_n "checking for $ac_word... " >&6; }
11803if ${ac_cv_path_WHICH+:} false; then :
11804  $as_echo_n "(cached) " >&6
11805else
11806  case $WHICH in
11807  [\\/]* | ?:[\\/]*)
11808  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11809  ;;
11810  *)
11811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11812for as_dir in $PATH
11813do
11814  IFS=$as_save_IFS
11815  test -z "$as_dir" && as_dir=.
11816    for ac_exec_ext in '' $ac_executable_extensions; do
11817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11818    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11820    break 2
11821  fi
11822done
11823  done
11824IFS=$as_save_IFS
11825
11826  ;;
11827esac
11828fi
11829WHICH=$ac_cv_path_WHICH
11830if test -n "$WHICH"; then
11831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11832$as_echo "$WHICH" >&6; }
11833else
11834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11835$as_echo "no" >&6; }
11836fi
11837
11838
11839  test -n "$WHICH" && break
11840done
11841
11842  else
11843    # The variable is set, but is it from the command line or the environment?
11844
11845    # Try to remove the string !WHICH! from our list.
11846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11848      # If it failed, the variable was not from the command line. Ignore it,
11849      # but warn the user (except for BASH, which is always set by the calling BASH).
11850      if test "xWHICH" != xBASH; then
11851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11852$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11853      fi
11854      # Try to locate tool using the code snippet
11855      for ac_prog in which
11856do
11857  # Extract the first word of "$ac_prog", so it can be a program name with args.
11858set dummy $ac_prog; ac_word=$2
11859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11860$as_echo_n "checking for $ac_word... " >&6; }
11861if ${ac_cv_path_WHICH+:} false; then :
11862  $as_echo_n "(cached) " >&6
11863else
11864  case $WHICH in
11865  [\\/]* | ?:[\\/]*)
11866  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11867  ;;
11868  *)
11869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11870for as_dir in $PATH
11871do
11872  IFS=$as_save_IFS
11873  test -z "$as_dir" && as_dir=.
11874    for ac_exec_ext in '' $ac_executable_extensions; do
11875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11876    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11878    break 2
11879  fi
11880done
11881  done
11882IFS=$as_save_IFS
11883
11884  ;;
11885esac
11886fi
11887WHICH=$ac_cv_path_WHICH
11888if test -n "$WHICH"; then
11889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11890$as_echo "$WHICH" >&6; }
11891else
11892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11893$as_echo "no" >&6; }
11894fi
11895
11896
11897  test -n "$WHICH" && break
11898done
11899
11900    else
11901      # If it succeeded, then it was overridden by the user. We will use it
11902      # for the tool.
11903
11904      # First remove it from the list of overridden variables, so we can test
11905      # for unknown variables in the end.
11906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11907
11908      # Check if we try to supply an empty value
11909      if test "x$WHICH" = x; then
11910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11911$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11913$as_echo_n "checking for WHICH... " >&6; }
11914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11915$as_echo "disabled" >&6; }
11916      else
11917        # Check if the provided tool contains a complete path.
11918        tool_specified="$WHICH"
11919        tool_basename="${tool_specified##*/}"
11920        if test "x$tool_basename" = "x$tool_specified"; then
11921          # A command without a complete path is provided, search $PATH.
11922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11923$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11924          # Extract the first word of "$tool_basename", so it can be a program name with args.
11925set dummy $tool_basename; ac_word=$2
11926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11927$as_echo_n "checking for $ac_word... " >&6; }
11928if ${ac_cv_path_WHICH+:} false; then :
11929  $as_echo_n "(cached) " >&6
11930else
11931  case $WHICH in
11932  [\\/]* | ?:[\\/]*)
11933  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11934  ;;
11935  *)
11936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11937for as_dir in $PATH
11938do
11939  IFS=$as_save_IFS
11940  test -z "$as_dir" && as_dir=.
11941    for ac_exec_ext in '' $ac_executable_extensions; do
11942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11943    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11945    break 2
11946  fi
11947done
11948  done
11949IFS=$as_save_IFS
11950
11951  ;;
11952esac
11953fi
11954WHICH=$ac_cv_path_WHICH
11955if test -n "$WHICH"; then
11956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11957$as_echo "$WHICH" >&6; }
11958else
11959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11960$as_echo "no" >&6; }
11961fi
11962
11963
11964          if test "x$WHICH" = x; then
11965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11966          fi
11967        else
11968          # Otherwise we believe it is a complete path. Use it as it is.
11969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11970$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11972$as_echo_n "checking for WHICH... " >&6; }
11973          if test ! -x "$tool_specified"; then
11974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11975$as_echo "not found" >&6; }
11976            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11977          fi
11978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11979$as_echo "$tool_specified" >&6; }
11980        fi
11981      fi
11982    fi
11983
11984  fi
11985
11986
11987
11988  if test "x$WHICH" = x; then
11989    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11990  fi
11991
11992
11993
11994
11995
11996  # Publish this variable in the help.
11997
11998
11999  if [ -z "${XARGS+x}" ]; then
12000    # The variable is not set by user, try to locate tool using the code snippet
12001    for ac_prog in xargs
12002do
12003  # Extract the first word of "$ac_prog", so it can be a program name with args.
12004set dummy $ac_prog; ac_word=$2
12005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12006$as_echo_n "checking for $ac_word... " >&6; }
12007if ${ac_cv_path_XARGS+:} false; then :
12008  $as_echo_n "(cached) " >&6
12009else
12010  case $XARGS in
12011  [\\/]* | ?:[\\/]*)
12012  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12013  ;;
12014  *)
12015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12016for as_dir in $PATH
12017do
12018  IFS=$as_save_IFS
12019  test -z "$as_dir" && as_dir=.
12020    for ac_exec_ext in '' $ac_executable_extensions; do
12021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12022    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12024    break 2
12025  fi
12026done
12027  done
12028IFS=$as_save_IFS
12029
12030  ;;
12031esac
12032fi
12033XARGS=$ac_cv_path_XARGS
12034if test -n "$XARGS"; then
12035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12036$as_echo "$XARGS" >&6; }
12037else
12038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12039$as_echo "no" >&6; }
12040fi
12041
12042
12043  test -n "$XARGS" && break
12044done
12045
12046  else
12047    # The variable is set, but is it from the command line or the environment?
12048
12049    # Try to remove the string !XARGS! from our list.
12050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12052      # If it failed, the variable was not from the command line. Ignore it,
12053      # but warn the user (except for BASH, which is always set by the calling BASH).
12054      if test "xXARGS" != xBASH; then
12055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12056$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12057      fi
12058      # Try to locate tool using the code snippet
12059      for ac_prog in xargs
12060do
12061  # Extract the first word of "$ac_prog", so it can be a program name with args.
12062set dummy $ac_prog; ac_word=$2
12063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12064$as_echo_n "checking for $ac_word... " >&6; }
12065if ${ac_cv_path_XARGS+:} false; then :
12066  $as_echo_n "(cached) " >&6
12067else
12068  case $XARGS in
12069  [\\/]* | ?:[\\/]*)
12070  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12071  ;;
12072  *)
12073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12074for as_dir in $PATH
12075do
12076  IFS=$as_save_IFS
12077  test -z "$as_dir" && as_dir=.
12078    for ac_exec_ext in '' $ac_executable_extensions; do
12079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12080    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12082    break 2
12083  fi
12084done
12085  done
12086IFS=$as_save_IFS
12087
12088  ;;
12089esac
12090fi
12091XARGS=$ac_cv_path_XARGS
12092if test -n "$XARGS"; then
12093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12094$as_echo "$XARGS" >&6; }
12095else
12096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
12098fi
12099
12100
12101  test -n "$XARGS" && break
12102done
12103
12104    else
12105      # If it succeeded, then it was overridden by the user. We will use it
12106      # for the tool.
12107
12108      # First remove it from the list of overridden variables, so we can test
12109      # for unknown variables in the end.
12110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12111
12112      # Check if we try to supply an empty value
12113      if test "x$XARGS" = x; then
12114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12115$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12117$as_echo_n "checking for XARGS... " >&6; }
12118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12119$as_echo "disabled" >&6; }
12120      else
12121        # Check if the provided tool contains a complete path.
12122        tool_specified="$XARGS"
12123        tool_basename="${tool_specified##*/}"
12124        if test "x$tool_basename" = "x$tool_specified"; then
12125          # A command without a complete path is provided, search $PATH.
12126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12127$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12128          # Extract the first word of "$tool_basename", so it can be a program name with args.
12129set dummy $tool_basename; ac_word=$2
12130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12131$as_echo_n "checking for $ac_word... " >&6; }
12132if ${ac_cv_path_XARGS+:} false; then :
12133  $as_echo_n "(cached) " >&6
12134else
12135  case $XARGS in
12136  [\\/]* | ?:[\\/]*)
12137  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12138  ;;
12139  *)
12140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12141for as_dir in $PATH
12142do
12143  IFS=$as_save_IFS
12144  test -z "$as_dir" && as_dir=.
12145    for ac_exec_ext in '' $ac_executable_extensions; do
12146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12147    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12149    break 2
12150  fi
12151done
12152  done
12153IFS=$as_save_IFS
12154
12155  ;;
12156esac
12157fi
12158XARGS=$ac_cv_path_XARGS
12159if test -n "$XARGS"; then
12160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12161$as_echo "$XARGS" >&6; }
12162else
12163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12164$as_echo "no" >&6; }
12165fi
12166
12167
12168          if test "x$XARGS" = x; then
12169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12170          fi
12171        else
12172          # Otherwise we believe it is a complete path. Use it as it is.
12173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12174$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12176$as_echo_n "checking for XARGS... " >&6; }
12177          if test ! -x "$tool_specified"; then
12178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12179$as_echo "not found" >&6; }
12180            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12181          fi
12182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12183$as_echo "$tool_specified" >&6; }
12184        fi
12185      fi
12186    fi
12187
12188  fi
12189
12190
12191
12192  if test "x$XARGS" = x; then
12193    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12194  fi
12195
12196
12197
12198  # Then required tools that require some special treatment.
12199
12200
12201  # Publish this variable in the help.
12202
12203
12204  if [ -z "${AWK+x}" ]; then
12205    # The variable is not set by user, try to locate tool using the code snippet
12206    for ac_prog in gawk mawk nawk awk
12207do
12208  # Extract the first word of "$ac_prog", so it can be a program name with args.
12209set dummy $ac_prog; ac_word=$2
12210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12211$as_echo_n "checking for $ac_word... " >&6; }
12212if ${ac_cv_prog_AWK+:} false; then :
12213  $as_echo_n "(cached) " >&6
12214else
12215  if test -n "$AWK"; then
12216  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12217else
12218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12219for as_dir in $PATH
12220do
12221  IFS=$as_save_IFS
12222  test -z "$as_dir" && as_dir=.
12223    for ac_exec_ext in '' $ac_executable_extensions; do
12224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12225    ac_cv_prog_AWK="$ac_prog"
12226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12227    break 2
12228  fi
12229done
12230  done
12231IFS=$as_save_IFS
12232
12233fi
12234fi
12235AWK=$ac_cv_prog_AWK
12236if test -n "$AWK"; then
12237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12238$as_echo "$AWK" >&6; }
12239else
12240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12241$as_echo "no" >&6; }
12242fi
12243
12244
12245  test -n "$AWK" && break
12246done
12247
12248  else
12249    # The variable is set, but is it from the command line or the environment?
12250
12251    # Try to remove the string !AWK! from our list.
12252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12254      # If it failed, the variable was not from the command line. Ignore it,
12255      # but warn the user (except for BASH, which is always set by the calling BASH).
12256      if test "xAWK" != xBASH; then
12257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12258$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12259      fi
12260      # Try to locate tool using the code snippet
12261      for ac_prog in gawk mawk nawk awk
12262do
12263  # Extract the first word of "$ac_prog", so it can be a program name with args.
12264set dummy $ac_prog; ac_word=$2
12265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12266$as_echo_n "checking for $ac_word... " >&6; }
12267if ${ac_cv_prog_AWK+:} false; then :
12268  $as_echo_n "(cached) " >&6
12269else
12270  if test -n "$AWK"; then
12271  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12272else
12273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12274for as_dir in $PATH
12275do
12276  IFS=$as_save_IFS
12277  test -z "$as_dir" && as_dir=.
12278    for ac_exec_ext in '' $ac_executable_extensions; do
12279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12280    ac_cv_prog_AWK="$ac_prog"
12281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12282    break 2
12283  fi
12284done
12285  done
12286IFS=$as_save_IFS
12287
12288fi
12289fi
12290AWK=$ac_cv_prog_AWK
12291if test -n "$AWK"; then
12292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12293$as_echo "$AWK" >&6; }
12294else
12295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12296$as_echo "no" >&6; }
12297fi
12298
12299
12300  test -n "$AWK" && break
12301done
12302
12303    else
12304      # If it succeeded, then it was overridden by the user. We will use it
12305      # for the tool.
12306
12307      # First remove it from the list of overridden variables, so we can test
12308      # for unknown variables in the end.
12309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12310
12311      # Check if we try to supply an empty value
12312      if test "x$AWK" = x; then
12313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12314$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12316$as_echo_n "checking for AWK... " >&6; }
12317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12318$as_echo "disabled" >&6; }
12319      else
12320        # Check if the provided tool contains a complete path.
12321        tool_specified="$AWK"
12322        tool_basename="${tool_specified##*/}"
12323        if test "x$tool_basename" = "x$tool_specified"; then
12324          # A command without a complete path is provided, search $PATH.
12325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12326$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12327          # Extract the first word of "$tool_basename", so it can be a program name with args.
12328set dummy $tool_basename; ac_word=$2
12329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12330$as_echo_n "checking for $ac_word... " >&6; }
12331if ${ac_cv_path_AWK+:} false; then :
12332  $as_echo_n "(cached) " >&6
12333else
12334  case $AWK in
12335  [\\/]* | ?:[\\/]*)
12336  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12337  ;;
12338  *)
12339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12340for as_dir in $PATH
12341do
12342  IFS=$as_save_IFS
12343  test -z "$as_dir" && as_dir=.
12344    for ac_exec_ext in '' $ac_executable_extensions; do
12345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12346    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12348    break 2
12349  fi
12350done
12351  done
12352IFS=$as_save_IFS
12353
12354  ;;
12355esac
12356fi
12357AWK=$ac_cv_path_AWK
12358if test -n "$AWK"; then
12359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12360$as_echo "$AWK" >&6; }
12361else
12362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12363$as_echo "no" >&6; }
12364fi
12365
12366
12367          if test "x$AWK" = x; then
12368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12369          fi
12370        else
12371          # Otherwise we believe it is a complete path. Use it as it is.
12372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12373$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12375$as_echo_n "checking for AWK... " >&6; }
12376          if test ! -x "$tool_specified"; then
12377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12378$as_echo "not found" >&6; }
12379            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12380          fi
12381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12382$as_echo "$tool_specified" >&6; }
12383        fi
12384      fi
12385    fi
12386
12387  fi
12388
12389
12390  if test "x$AWK" = x; then
12391    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12392  fi
12393
12394
12395
12396
12397  # Publish this variable in the help.
12398
12399
12400  if [ -z "${GREP+x}" ]; then
12401    # The variable is not set by user, try to locate tool using the code snippet
12402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12403$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12404if ${ac_cv_path_GREP+:} false; then :
12405  $as_echo_n "(cached) " >&6
12406else
12407  if test -z "$GREP"; then
12408  ac_path_GREP_found=false
12409  # Loop through the user's path and test for each of PROGNAME-LIST
12410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12411for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12412do
12413  IFS=$as_save_IFS
12414  test -z "$as_dir" && as_dir=.
12415    for ac_prog in grep ggrep; do
12416    for ac_exec_ext in '' $ac_executable_extensions; do
12417      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12418      as_fn_executable_p "$ac_path_GREP" || continue
12419# Check for GNU ac_path_GREP and select it if it is found.
12420  # Check for GNU $ac_path_GREP
12421case `"$ac_path_GREP" --version 2>&1` in
12422*GNU*)
12423  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12424*)
12425  ac_count=0
12426  $as_echo_n 0123456789 >"conftest.in"
12427  while :
12428  do
12429    cat "conftest.in" "conftest.in" >"conftest.tmp"
12430    mv "conftest.tmp" "conftest.in"
12431    cp "conftest.in" "conftest.nl"
12432    $as_echo 'GREP' >> "conftest.nl"
12433    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12434    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12435    as_fn_arith $ac_count + 1 && ac_count=$as_val
12436    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12437      # Best one so far, save it but keep looking for a better one
12438      ac_cv_path_GREP="$ac_path_GREP"
12439      ac_path_GREP_max=$ac_count
12440    fi
12441    # 10*(2^10) chars as input seems more than enough
12442    test $ac_count -gt 10 && break
12443  done
12444  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12445esac
12446
12447      $ac_path_GREP_found && break 3
12448    done
12449  done
12450  done
12451IFS=$as_save_IFS
12452  if test -z "$ac_cv_path_GREP"; then
12453    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12454  fi
12455else
12456  ac_cv_path_GREP=$GREP
12457fi
12458
12459fi
12460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12461$as_echo "$ac_cv_path_GREP" >&6; }
12462 GREP="$ac_cv_path_GREP"
12463
12464
12465  else
12466    # The variable is set, but is it from the command line or the environment?
12467
12468    # Try to remove the string !GREP! from our list.
12469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12471      # If it failed, the variable was not from the command line. Ignore it,
12472      # but warn the user (except for BASH, which is always set by the calling BASH).
12473      if test "xGREP" != xBASH; then
12474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12475$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12476      fi
12477      # Try to locate tool using the code snippet
12478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12479$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12480if ${ac_cv_path_GREP+:} false; then :
12481  $as_echo_n "(cached) " >&6
12482else
12483  if test -z "$GREP"; then
12484  ac_path_GREP_found=false
12485  # Loop through the user's path and test for each of PROGNAME-LIST
12486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12487for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12488do
12489  IFS=$as_save_IFS
12490  test -z "$as_dir" && as_dir=.
12491    for ac_prog in grep ggrep; do
12492    for ac_exec_ext in '' $ac_executable_extensions; do
12493      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12494      as_fn_executable_p "$ac_path_GREP" || continue
12495# Check for GNU ac_path_GREP and select it if it is found.
12496  # Check for GNU $ac_path_GREP
12497case `"$ac_path_GREP" --version 2>&1` in
12498*GNU*)
12499  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12500*)
12501  ac_count=0
12502  $as_echo_n 0123456789 >"conftest.in"
12503  while :
12504  do
12505    cat "conftest.in" "conftest.in" >"conftest.tmp"
12506    mv "conftest.tmp" "conftest.in"
12507    cp "conftest.in" "conftest.nl"
12508    $as_echo 'GREP' >> "conftest.nl"
12509    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12510    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12511    as_fn_arith $ac_count + 1 && ac_count=$as_val
12512    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12513      # Best one so far, save it but keep looking for a better one
12514      ac_cv_path_GREP="$ac_path_GREP"
12515      ac_path_GREP_max=$ac_count
12516    fi
12517    # 10*(2^10) chars as input seems more than enough
12518    test $ac_count -gt 10 && break
12519  done
12520  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12521esac
12522
12523      $ac_path_GREP_found && break 3
12524    done
12525  done
12526  done
12527IFS=$as_save_IFS
12528  if test -z "$ac_cv_path_GREP"; then
12529    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12530  fi
12531else
12532  ac_cv_path_GREP=$GREP
12533fi
12534
12535fi
12536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12537$as_echo "$ac_cv_path_GREP" >&6; }
12538 GREP="$ac_cv_path_GREP"
12539
12540
12541    else
12542      # If it succeeded, then it was overridden by the user. We will use it
12543      # for the tool.
12544
12545      # First remove it from the list of overridden variables, so we can test
12546      # for unknown variables in the end.
12547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12548
12549      # Check if we try to supply an empty value
12550      if test "x$GREP" = x; then
12551        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12552$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12554$as_echo_n "checking for GREP... " >&6; }
12555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12556$as_echo "disabled" >&6; }
12557      else
12558        # Check if the provided tool contains a complete path.
12559        tool_specified="$GREP"
12560        tool_basename="${tool_specified##*/}"
12561        if test "x$tool_basename" = "x$tool_specified"; then
12562          # A command without a complete path is provided, search $PATH.
12563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12564$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12565          # Extract the first word of "$tool_basename", so it can be a program name with args.
12566set dummy $tool_basename; ac_word=$2
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12568$as_echo_n "checking for $ac_word... " >&6; }
12569if ${ac_cv_path_GREP+:} false; then :
12570  $as_echo_n "(cached) " >&6
12571else
12572  case $GREP in
12573  [\\/]* | ?:[\\/]*)
12574  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12575  ;;
12576  *)
12577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12578for as_dir in $PATH
12579do
12580  IFS=$as_save_IFS
12581  test -z "$as_dir" && as_dir=.
12582    for ac_exec_ext in '' $ac_executable_extensions; do
12583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12584    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12586    break 2
12587  fi
12588done
12589  done
12590IFS=$as_save_IFS
12591
12592  ;;
12593esac
12594fi
12595GREP=$ac_cv_path_GREP
12596if test -n "$GREP"; then
12597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12598$as_echo "$GREP" >&6; }
12599else
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601$as_echo "no" >&6; }
12602fi
12603
12604
12605          if test "x$GREP" = x; then
12606            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12607          fi
12608        else
12609          # Otherwise we believe it is a complete path. Use it as it is.
12610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12611$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12612          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12613$as_echo_n "checking for GREP... " >&6; }
12614          if test ! -x "$tool_specified"; then
12615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12616$as_echo "not found" >&6; }
12617            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12618          fi
12619          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12620$as_echo "$tool_specified" >&6; }
12621        fi
12622      fi
12623    fi
12624
12625  fi
12626
12627
12628  if test "x$GREP" = x; then
12629    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12630  fi
12631
12632
12633
12634
12635  # Publish this variable in the help.
12636
12637
12638  if [ -z "${EGREP+x}" ]; then
12639    # The variable is not set by user, try to locate tool using the code snippet
12640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12641$as_echo_n "checking for egrep... " >&6; }
12642if ${ac_cv_path_EGREP+:} false; then :
12643  $as_echo_n "(cached) " >&6
12644else
12645  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12646   then ac_cv_path_EGREP="$GREP -E"
12647   else
12648     if test -z "$EGREP"; then
12649  ac_path_EGREP_found=false
12650  # Loop through the user's path and test for each of PROGNAME-LIST
12651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12652for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12653do
12654  IFS=$as_save_IFS
12655  test -z "$as_dir" && as_dir=.
12656    for ac_prog in egrep; do
12657    for ac_exec_ext in '' $ac_executable_extensions; do
12658      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12659      as_fn_executable_p "$ac_path_EGREP" || continue
12660# Check for GNU ac_path_EGREP and select it if it is found.
12661  # Check for GNU $ac_path_EGREP
12662case `"$ac_path_EGREP" --version 2>&1` in
12663*GNU*)
12664  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12665*)
12666  ac_count=0
12667  $as_echo_n 0123456789 >"conftest.in"
12668  while :
12669  do
12670    cat "conftest.in" "conftest.in" >"conftest.tmp"
12671    mv "conftest.tmp" "conftest.in"
12672    cp "conftest.in" "conftest.nl"
12673    $as_echo 'EGREP' >> "conftest.nl"
12674    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12675    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12676    as_fn_arith $ac_count + 1 && ac_count=$as_val
12677    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12678      # Best one so far, save it but keep looking for a better one
12679      ac_cv_path_EGREP="$ac_path_EGREP"
12680      ac_path_EGREP_max=$ac_count
12681    fi
12682    # 10*(2^10) chars as input seems more than enough
12683    test $ac_count -gt 10 && break
12684  done
12685  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12686esac
12687
12688      $ac_path_EGREP_found && break 3
12689    done
12690  done
12691  done
12692IFS=$as_save_IFS
12693  if test -z "$ac_cv_path_EGREP"; then
12694    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12695  fi
12696else
12697  ac_cv_path_EGREP=$EGREP
12698fi
12699
12700   fi
12701fi
12702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12703$as_echo "$ac_cv_path_EGREP" >&6; }
12704 EGREP="$ac_cv_path_EGREP"
12705
12706
12707  else
12708    # The variable is set, but is it from the command line or the environment?
12709
12710    # Try to remove the string !EGREP! from our list.
12711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12713      # If it failed, the variable was not from the command line. Ignore it,
12714      # but warn the user (except for BASH, which is always set by the calling BASH).
12715      if test "xEGREP" != xBASH; then
12716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12717$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12718      fi
12719      # Try to locate tool using the code snippet
12720      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12721$as_echo_n "checking for egrep... " >&6; }
12722if ${ac_cv_path_EGREP+:} false; then :
12723  $as_echo_n "(cached) " >&6
12724else
12725  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12726   then ac_cv_path_EGREP="$GREP -E"
12727   else
12728     if test -z "$EGREP"; then
12729  ac_path_EGREP_found=false
12730  # Loop through the user's path and test for each of PROGNAME-LIST
12731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12732for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12733do
12734  IFS=$as_save_IFS
12735  test -z "$as_dir" && as_dir=.
12736    for ac_prog in egrep; do
12737    for ac_exec_ext in '' $ac_executable_extensions; do
12738      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12739      as_fn_executable_p "$ac_path_EGREP" || continue
12740# Check for GNU ac_path_EGREP and select it if it is found.
12741  # Check for GNU $ac_path_EGREP
12742case `"$ac_path_EGREP" --version 2>&1` in
12743*GNU*)
12744  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12745*)
12746  ac_count=0
12747  $as_echo_n 0123456789 >"conftest.in"
12748  while :
12749  do
12750    cat "conftest.in" "conftest.in" >"conftest.tmp"
12751    mv "conftest.tmp" "conftest.in"
12752    cp "conftest.in" "conftest.nl"
12753    $as_echo 'EGREP' >> "conftest.nl"
12754    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12755    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12756    as_fn_arith $ac_count + 1 && ac_count=$as_val
12757    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12758      # Best one so far, save it but keep looking for a better one
12759      ac_cv_path_EGREP="$ac_path_EGREP"
12760      ac_path_EGREP_max=$ac_count
12761    fi
12762    # 10*(2^10) chars as input seems more than enough
12763    test $ac_count -gt 10 && break
12764  done
12765  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12766esac
12767
12768      $ac_path_EGREP_found && break 3
12769    done
12770  done
12771  done
12772IFS=$as_save_IFS
12773  if test -z "$ac_cv_path_EGREP"; then
12774    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12775  fi
12776else
12777  ac_cv_path_EGREP=$EGREP
12778fi
12779
12780   fi
12781fi
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12783$as_echo "$ac_cv_path_EGREP" >&6; }
12784 EGREP="$ac_cv_path_EGREP"
12785
12786
12787    else
12788      # If it succeeded, then it was overridden by the user. We will use it
12789      # for the tool.
12790
12791      # First remove it from the list of overridden variables, so we can test
12792      # for unknown variables in the end.
12793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12794
12795      # Check if we try to supply an empty value
12796      if test "x$EGREP" = x; then
12797        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12798$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12800$as_echo_n "checking for EGREP... " >&6; }
12801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12802$as_echo "disabled" >&6; }
12803      else
12804        # Check if the provided tool contains a complete path.
12805        tool_specified="$EGREP"
12806        tool_basename="${tool_specified##*/}"
12807        if test "x$tool_basename" = "x$tool_specified"; then
12808          # A command without a complete path is provided, search $PATH.
12809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12810$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12811          # Extract the first word of "$tool_basename", so it can be a program name with args.
12812set dummy $tool_basename; ac_word=$2
12813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12814$as_echo_n "checking for $ac_word... " >&6; }
12815if ${ac_cv_path_EGREP+:} false; then :
12816  $as_echo_n "(cached) " >&6
12817else
12818  case $EGREP in
12819  [\\/]* | ?:[\\/]*)
12820  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12821  ;;
12822  *)
12823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12824for as_dir in $PATH
12825do
12826  IFS=$as_save_IFS
12827  test -z "$as_dir" && as_dir=.
12828    for ac_exec_ext in '' $ac_executable_extensions; do
12829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12830    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12832    break 2
12833  fi
12834done
12835  done
12836IFS=$as_save_IFS
12837
12838  ;;
12839esac
12840fi
12841EGREP=$ac_cv_path_EGREP
12842if test -n "$EGREP"; then
12843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12844$as_echo "$EGREP" >&6; }
12845else
12846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12847$as_echo "no" >&6; }
12848fi
12849
12850
12851          if test "x$EGREP" = x; then
12852            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12853          fi
12854        else
12855          # Otherwise we believe it is a complete path. Use it as it is.
12856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12857$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12858          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12859$as_echo_n "checking for EGREP... " >&6; }
12860          if test ! -x "$tool_specified"; then
12861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12862$as_echo "not found" >&6; }
12863            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12864          fi
12865          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12866$as_echo "$tool_specified" >&6; }
12867        fi
12868      fi
12869    fi
12870
12871  fi
12872
12873
12874  if test "x$EGREP" = x; then
12875    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12876  fi
12877
12878
12879
12880
12881  # Publish this variable in the help.
12882
12883
12884  if [ -z "${FGREP+x}" ]; then
12885    # The variable is not set by user, try to locate tool using the code snippet
12886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12887$as_echo_n "checking for fgrep... " >&6; }
12888if ${ac_cv_path_FGREP+:} false; then :
12889  $as_echo_n "(cached) " >&6
12890else
12891  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12892   then ac_cv_path_FGREP="$GREP -F"
12893   else
12894     if test -z "$FGREP"; then
12895  ac_path_FGREP_found=false
12896  # Loop through the user's path and test for each of PROGNAME-LIST
12897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12898for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12899do
12900  IFS=$as_save_IFS
12901  test -z "$as_dir" && as_dir=.
12902    for ac_prog in fgrep; do
12903    for ac_exec_ext in '' $ac_executable_extensions; do
12904      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12905      as_fn_executable_p "$ac_path_FGREP" || continue
12906# Check for GNU ac_path_FGREP and select it if it is found.
12907  # Check for GNU $ac_path_FGREP
12908case `"$ac_path_FGREP" --version 2>&1` in
12909*GNU*)
12910  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12911*)
12912  ac_count=0
12913  $as_echo_n 0123456789 >"conftest.in"
12914  while :
12915  do
12916    cat "conftest.in" "conftest.in" >"conftest.tmp"
12917    mv "conftest.tmp" "conftest.in"
12918    cp "conftest.in" "conftest.nl"
12919    $as_echo 'FGREP' >> "conftest.nl"
12920    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12921    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12922    as_fn_arith $ac_count + 1 && ac_count=$as_val
12923    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12924      # Best one so far, save it but keep looking for a better one
12925      ac_cv_path_FGREP="$ac_path_FGREP"
12926      ac_path_FGREP_max=$ac_count
12927    fi
12928    # 10*(2^10) chars as input seems more than enough
12929    test $ac_count -gt 10 && break
12930  done
12931  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12932esac
12933
12934      $ac_path_FGREP_found && break 3
12935    done
12936  done
12937  done
12938IFS=$as_save_IFS
12939  if test -z "$ac_cv_path_FGREP"; then
12940    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12941  fi
12942else
12943  ac_cv_path_FGREP=$FGREP
12944fi
12945
12946   fi
12947fi
12948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12949$as_echo "$ac_cv_path_FGREP" >&6; }
12950 FGREP="$ac_cv_path_FGREP"
12951
12952
12953  else
12954    # The variable is set, but is it from the command line or the environment?
12955
12956    # Try to remove the string !FGREP! from our list.
12957    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12958    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12959      # If it failed, the variable was not from the command line. Ignore it,
12960      # but warn the user (except for BASH, which is always set by the calling BASH).
12961      if test "xFGREP" != xBASH; then
12962        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12963$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12964      fi
12965      # Try to locate tool using the code snippet
12966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12967$as_echo_n "checking for fgrep... " >&6; }
12968if ${ac_cv_path_FGREP+:} false; then :
12969  $as_echo_n "(cached) " >&6
12970else
12971  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12972   then ac_cv_path_FGREP="$GREP -F"
12973   else
12974     if test -z "$FGREP"; then
12975  ac_path_FGREP_found=false
12976  # Loop through the user's path and test for each of PROGNAME-LIST
12977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12978for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12979do
12980  IFS=$as_save_IFS
12981  test -z "$as_dir" && as_dir=.
12982    for ac_prog in fgrep; do
12983    for ac_exec_ext in '' $ac_executable_extensions; do
12984      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12985      as_fn_executable_p "$ac_path_FGREP" || continue
12986# Check for GNU ac_path_FGREP and select it if it is found.
12987  # Check for GNU $ac_path_FGREP
12988case `"$ac_path_FGREP" --version 2>&1` in
12989*GNU*)
12990  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12991*)
12992  ac_count=0
12993  $as_echo_n 0123456789 >"conftest.in"
12994  while :
12995  do
12996    cat "conftest.in" "conftest.in" >"conftest.tmp"
12997    mv "conftest.tmp" "conftest.in"
12998    cp "conftest.in" "conftest.nl"
12999    $as_echo 'FGREP' >> "conftest.nl"
13000    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13001    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13002    as_fn_arith $ac_count + 1 && ac_count=$as_val
13003    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13004      # Best one so far, save it but keep looking for a better one
13005      ac_cv_path_FGREP="$ac_path_FGREP"
13006      ac_path_FGREP_max=$ac_count
13007    fi
13008    # 10*(2^10) chars as input seems more than enough
13009    test $ac_count -gt 10 && break
13010  done
13011  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13012esac
13013
13014      $ac_path_FGREP_found && break 3
13015    done
13016  done
13017  done
13018IFS=$as_save_IFS
13019  if test -z "$ac_cv_path_FGREP"; then
13020    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13021  fi
13022else
13023  ac_cv_path_FGREP=$FGREP
13024fi
13025
13026   fi
13027fi
13028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13029$as_echo "$ac_cv_path_FGREP" >&6; }
13030 FGREP="$ac_cv_path_FGREP"
13031
13032
13033    else
13034      # If it succeeded, then it was overridden by the user. We will use it
13035      # for the tool.
13036
13037      # First remove it from the list of overridden variables, so we can test
13038      # for unknown variables in the end.
13039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13040
13041      # Check if we try to supply an empty value
13042      if test "x$FGREP" = x; then
13043        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13044$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13046$as_echo_n "checking for FGREP... " >&6; }
13047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13048$as_echo "disabled" >&6; }
13049      else
13050        # Check if the provided tool contains a complete path.
13051        tool_specified="$FGREP"
13052        tool_basename="${tool_specified##*/}"
13053        if test "x$tool_basename" = "x$tool_specified"; then
13054          # A command without a complete path is provided, search $PATH.
13055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13056$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13057          # Extract the first word of "$tool_basename", so it can be a program name with args.
13058set dummy $tool_basename; ac_word=$2
13059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13060$as_echo_n "checking for $ac_word... " >&6; }
13061if ${ac_cv_path_FGREP+:} false; then :
13062  $as_echo_n "(cached) " >&6
13063else
13064  case $FGREP in
13065  [\\/]* | ?:[\\/]*)
13066  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13067  ;;
13068  *)
13069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13070for as_dir in $PATH
13071do
13072  IFS=$as_save_IFS
13073  test -z "$as_dir" && as_dir=.
13074    for ac_exec_ext in '' $ac_executable_extensions; do
13075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13076    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13078    break 2
13079  fi
13080done
13081  done
13082IFS=$as_save_IFS
13083
13084  ;;
13085esac
13086fi
13087FGREP=$ac_cv_path_FGREP
13088if test -n "$FGREP"; then
13089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13090$as_echo "$FGREP" >&6; }
13091else
13092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13093$as_echo "no" >&6; }
13094fi
13095
13096
13097          if test "x$FGREP" = x; then
13098            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13099          fi
13100        else
13101          # Otherwise we believe it is a complete path. Use it as it is.
13102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13103$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13105$as_echo_n "checking for FGREP... " >&6; }
13106          if test ! -x "$tool_specified"; then
13107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13108$as_echo "not found" >&6; }
13109            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13110          fi
13111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13112$as_echo "$tool_specified" >&6; }
13113        fi
13114      fi
13115    fi
13116
13117  fi
13118
13119
13120  if test "x$FGREP" = x; then
13121    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13122  fi
13123
13124
13125
13126
13127  # Publish this variable in the help.
13128
13129
13130  if [ -z "${SED+x}" ]; then
13131    # The variable is not set by user, try to locate tool using the code snippet
13132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13133$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13134if ${ac_cv_path_SED+:} false; then :
13135  $as_echo_n "(cached) " >&6
13136else
13137            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13138     for ac_i in 1 2 3 4 5 6 7; do
13139       ac_script="$ac_script$as_nl$ac_script"
13140     done
13141     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13142     { ac_script=; unset ac_script;}
13143     if test -z "$SED"; then
13144  ac_path_SED_found=false
13145  # Loop through the user's path and test for each of PROGNAME-LIST
13146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147for as_dir in $PATH
13148do
13149  IFS=$as_save_IFS
13150  test -z "$as_dir" && as_dir=.
13151    for ac_prog in sed gsed; do
13152    for ac_exec_ext in '' $ac_executable_extensions; do
13153      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13154      as_fn_executable_p "$ac_path_SED" || continue
13155# Check for GNU ac_path_SED and select it if it is found.
13156  # Check for GNU $ac_path_SED
13157case `"$ac_path_SED" --version 2>&1` in
13158*GNU*)
13159  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13160*)
13161  ac_count=0
13162  $as_echo_n 0123456789 >"conftest.in"
13163  while :
13164  do
13165    cat "conftest.in" "conftest.in" >"conftest.tmp"
13166    mv "conftest.tmp" "conftest.in"
13167    cp "conftest.in" "conftest.nl"
13168    $as_echo '' >> "conftest.nl"
13169    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13170    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13171    as_fn_arith $ac_count + 1 && ac_count=$as_val
13172    if test $ac_count -gt ${ac_path_SED_max-0}; then
13173      # Best one so far, save it but keep looking for a better one
13174      ac_cv_path_SED="$ac_path_SED"
13175      ac_path_SED_max=$ac_count
13176    fi
13177    # 10*(2^10) chars as input seems more than enough
13178    test $ac_count -gt 10 && break
13179  done
13180  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13181esac
13182
13183      $ac_path_SED_found && break 3
13184    done
13185  done
13186  done
13187IFS=$as_save_IFS
13188  if test -z "$ac_cv_path_SED"; then
13189    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13190  fi
13191else
13192  ac_cv_path_SED=$SED
13193fi
13194
13195fi
13196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13197$as_echo "$ac_cv_path_SED" >&6; }
13198 SED="$ac_cv_path_SED"
13199  rm -f conftest.sed
13200
13201  else
13202    # The variable is set, but is it from the command line or the environment?
13203
13204    # Try to remove the string !SED! from our list.
13205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13207      # If it failed, the variable was not from the command line. Ignore it,
13208      # but warn the user (except for BASH, which is always set by the calling BASH).
13209      if test "xSED" != xBASH; then
13210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13211$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13212      fi
13213      # Try to locate tool using the code snippet
13214      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13215$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13216if ${ac_cv_path_SED+:} false; then :
13217  $as_echo_n "(cached) " >&6
13218else
13219            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13220     for ac_i in 1 2 3 4 5 6 7; do
13221       ac_script="$ac_script$as_nl$ac_script"
13222     done
13223     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13224     { ac_script=; unset ac_script;}
13225     if test -z "$SED"; then
13226  ac_path_SED_found=false
13227  # Loop through the user's path and test for each of PROGNAME-LIST
13228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13229for as_dir in $PATH
13230do
13231  IFS=$as_save_IFS
13232  test -z "$as_dir" && as_dir=.
13233    for ac_prog in sed gsed; do
13234    for ac_exec_ext in '' $ac_executable_extensions; do
13235      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13236      as_fn_executable_p "$ac_path_SED" || continue
13237# Check for GNU ac_path_SED and select it if it is found.
13238  # Check for GNU $ac_path_SED
13239case `"$ac_path_SED" --version 2>&1` in
13240*GNU*)
13241  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13242*)
13243  ac_count=0
13244  $as_echo_n 0123456789 >"conftest.in"
13245  while :
13246  do
13247    cat "conftest.in" "conftest.in" >"conftest.tmp"
13248    mv "conftest.tmp" "conftest.in"
13249    cp "conftest.in" "conftest.nl"
13250    $as_echo '' >> "conftest.nl"
13251    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13252    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13253    as_fn_arith $ac_count + 1 && ac_count=$as_val
13254    if test $ac_count -gt ${ac_path_SED_max-0}; then
13255      # Best one so far, save it but keep looking for a better one
13256      ac_cv_path_SED="$ac_path_SED"
13257      ac_path_SED_max=$ac_count
13258    fi
13259    # 10*(2^10) chars as input seems more than enough
13260    test $ac_count -gt 10 && break
13261  done
13262  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13263esac
13264
13265      $ac_path_SED_found && break 3
13266    done
13267  done
13268  done
13269IFS=$as_save_IFS
13270  if test -z "$ac_cv_path_SED"; then
13271    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13272  fi
13273else
13274  ac_cv_path_SED=$SED
13275fi
13276
13277fi
13278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13279$as_echo "$ac_cv_path_SED" >&6; }
13280 SED="$ac_cv_path_SED"
13281  rm -f conftest.sed
13282
13283    else
13284      # If it succeeded, then it was overridden by the user. We will use it
13285      # for the tool.
13286
13287      # First remove it from the list of overridden variables, so we can test
13288      # for unknown variables in the end.
13289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13290
13291      # Check if we try to supply an empty value
13292      if test "x$SED" = x; then
13293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13294$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13296$as_echo_n "checking for SED... " >&6; }
13297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13298$as_echo "disabled" >&6; }
13299      else
13300        # Check if the provided tool contains a complete path.
13301        tool_specified="$SED"
13302        tool_basename="${tool_specified##*/}"
13303        if test "x$tool_basename" = "x$tool_specified"; then
13304          # A command without a complete path is provided, search $PATH.
13305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13306$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13307          # Extract the first word of "$tool_basename", so it can be a program name with args.
13308set dummy $tool_basename; ac_word=$2
13309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13310$as_echo_n "checking for $ac_word... " >&6; }
13311if ${ac_cv_path_SED+:} false; then :
13312  $as_echo_n "(cached) " >&6
13313else
13314  case $SED in
13315  [\\/]* | ?:[\\/]*)
13316  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13317  ;;
13318  *)
13319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13320for as_dir in $PATH
13321do
13322  IFS=$as_save_IFS
13323  test -z "$as_dir" && as_dir=.
13324    for ac_exec_ext in '' $ac_executable_extensions; do
13325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13326    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13328    break 2
13329  fi
13330done
13331  done
13332IFS=$as_save_IFS
13333
13334  ;;
13335esac
13336fi
13337SED=$ac_cv_path_SED
13338if test -n "$SED"; then
13339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13340$as_echo "$SED" >&6; }
13341else
13342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13343$as_echo "no" >&6; }
13344fi
13345
13346
13347          if test "x$SED" = x; then
13348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13349          fi
13350        else
13351          # Otherwise we believe it is a complete path. Use it as it is.
13352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13353$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13355$as_echo_n "checking for SED... " >&6; }
13356          if test ! -x "$tool_specified"; then
13357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13358$as_echo "not found" >&6; }
13359            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13360          fi
13361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13362$as_echo "$tool_specified" >&6; }
13363        fi
13364      fi
13365    fi
13366
13367  fi
13368
13369
13370  if test "x$SED" = x; then
13371    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13372  fi
13373
13374
13375
13376  # Always force rm.
13377  RM="$RM -f"
13378
13379  # pwd behaves differently on various platforms and some don't support the -L flag.
13380  # Always use the bash builtin pwd to get uniform behavior.
13381  THEPWDCMD=pwd
13382
13383  # These are not required on all platforms
13384
13385
13386  # Publish this variable in the help.
13387
13388
13389  if [ -z "${CYGPATH+x}" ]; then
13390    # The variable is not set by user, try to locate tool using the code snippet
13391    for ac_prog in cygpath
13392do
13393  # Extract the first word of "$ac_prog", so it can be a program name with args.
13394set dummy $ac_prog; ac_word=$2
13395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13396$as_echo_n "checking for $ac_word... " >&6; }
13397if ${ac_cv_path_CYGPATH+:} false; then :
13398  $as_echo_n "(cached) " >&6
13399else
13400  case $CYGPATH in
13401  [\\/]* | ?:[\\/]*)
13402  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13403  ;;
13404  *)
13405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13406for as_dir in $PATH
13407do
13408  IFS=$as_save_IFS
13409  test -z "$as_dir" && as_dir=.
13410    for ac_exec_ext in '' $ac_executable_extensions; do
13411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13412    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13414    break 2
13415  fi
13416done
13417  done
13418IFS=$as_save_IFS
13419
13420  ;;
13421esac
13422fi
13423CYGPATH=$ac_cv_path_CYGPATH
13424if test -n "$CYGPATH"; then
13425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13426$as_echo "$CYGPATH" >&6; }
13427else
13428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13429$as_echo "no" >&6; }
13430fi
13431
13432
13433  test -n "$CYGPATH" && break
13434done
13435
13436  else
13437    # The variable is set, but is it from the command line or the environment?
13438
13439    # Try to remove the string !CYGPATH! from our list.
13440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13442      # If it failed, the variable was not from the command line. Ignore it,
13443      # but warn the user (except for BASH, which is always set by the calling BASH).
13444      if test "xCYGPATH" != xBASH; then
13445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13446$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13447      fi
13448      # Try to locate tool using the code snippet
13449      for ac_prog in cygpath
13450do
13451  # Extract the first word of "$ac_prog", so it can be a program name with args.
13452set dummy $ac_prog; ac_word=$2
13453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13454$as_echo_n "checking for $ac_word... " >&6; }
13455if ${ac_cv_path_CYGPATH+:} false; then :
13456  $as_echo_n "(cached) " >&6
13457else
13458  case $CYGPATH in
13459  [\\/]* | ?:[\\/]*)
13460  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13461  ;;
13462  *)
13463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13464for as_dir in $PATH
13465do
13466  IFS=$as_save_IFS
13467  test -z "$as_dir" && as_dir=.
13468    for ac_exec_ext in '' $ac_executable_extensions; do
13469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13470    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13472    break 2
13473  fi
13474done
13475  done
13476IFS=$as_save_IFS
13477
13478  ;;
13479esac
13480fi
13481CYGPATH=$ac_cv_path_CYGPATH
13482if test -n "$CYGPATH"; then
13483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13484$as_echo "$CYGPATH" >&6; }
13485else
13486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13487$as_echo "no" >&6; }
13488fi
13489
13490
13491  test -n "$CYGPATH" && break
13492done
13493
13494    else
13495      # If it succeeded, then it was overridden by the user. We will use it
13496      # for the tool.
13497
13498      # First remove it from the list of overridden variables, so we can test
13499      # for unknown variables in the end.
13500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13501
13502      # Check if we try to supply an empty value
13503      if test "x$CYGPATH" = x; then
13504        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13505$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13507$as_echo_n "checking for CYGPATH... " >&6; }
13508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13509$as_echo "disabled" >&6; }
13510      else
13511        # Check if the provided tool contains a complete path.
13512        tool_specified="$CYGPATH"
13513        tool_basename="${tool_specified##*/}"
13514        if test "x$tool_basename" = "x$tool_specified"; then
13515          # A command without a complete path is provided, search $PATH.
13516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13517$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13518          # Extract the first word of "$tool_basename", so it can be a program name with args.
13519set dummy $tool_basename; ac_word=$2
13520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13521$as_echo_n "checking for $ac_word... " >&6; }
13522if ${ac_cv_path_CYGPATH+:} false; then :
13523  $as_echo_n "(cached) " >&6
13524else
13525  case $CYGPATH in
13526  [\\/]* | ?:[\\/]*)
13527  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13528  ;;
13529  *)
13530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13531for as_dir in $PATH
13532do
13533  IFS=$as_save_IFS
13534  test -z "$as_dir" && as_dir=.
13535    for ac_exec_ext in '' $ac_executable_extensions; do
13536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13537    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13539    break 2
13540  fi
13541done
13542  done
13543IFS=$as_save_IFS
13544
13545  ;;
13546esac
13547fi
13548CYGPATH=$ac_cv_path_CYGPATH
13549if test -n "$CYGPATH"; then
13550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13551$as_echo "$CYGPATH" >&6; }
13552else
13553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13554$as_echo "no" >&6; }
13555fi
13556
13557
13558          if test "x$CYGPATH" = x; then
13559            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13560          fi
13561        else
13562          # Otherwise we believe it is a complete path. Use it as it is.
13563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13564$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13565          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13566$as_echo_n "checking for CYGPATH... " >&6; }
13567          if test ! -x "$tool_specified"; then
13568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13569$as_echo "not found" >&6; }
13570            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13571          fi
13572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13573$as_echo "$tool_specified" >&6; }
13574        fi
13575      fi
13576    fi
13577
13578  fi
13579
13580
13581
13582
13583  # Publish this variable in the help.
13584
13585
13586  if [ -z "${READLINK+x}" ]; then
13587    # The variable is not set by user, try to locate tool using the code snippet
13588    for ac_prog in greadlink readlink
13589do
13590  # Extract the first word of "$ac_prog", so it can be a program name with args.
13591set dummy $ac_prog; ac_word=$2
13592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13593$as_echo_n "checking for $ac_word... " >&6; }
13594if ${ac_cv_path_READLINK+:} false; then :
13595  $as_echo_n "(cached) " >&6
13596else
13597  case $READLINK in
13598  [\\/]* | ?:[\\/]*)
13599  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13600  ;;
13601  *)
13602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13603for as_dir in $PATH
13604do
13605  IFS=$as_save_IFS
13606  test -z "$as_dir" && as_dir=.
13607    for ac_exec_ext in '' $ac_executable_extensions; do
13608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13609    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13611    break 2
13612  fi
13613done
13614  done
13615IFS=$as_save_IFS
13616
13617  ;;
13618esac
13619fi
13620READLINK=$ac_cv_path_READLINK
13621if test -n "$READLINK"; then
13622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13623$as_echo "$READLINK" >&6; }
13624else
13625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13626$as_echo "no" >&6; }
13627fi
13628
13629
13630  test -n "$READLINK" && break
13631done
13632
13633  else
13634    # The variable is set, but is it from the command line or the environment?
13635
13636    # Try to remove the string !READLINK! from our list.
13637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13639      # If it failed, the variable was not from the command line. Ignore it,
13640      # but warn the user (except for BASH, which is always set by the calling BASH).
13641      if test "xREADLINK" != xBASH; then
13642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13643$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13644      fi
13645      # Try to locate tool using the code snippet
13646      for ac_prog in greadlink readlink
13647do
13648  # Extract the first word of "$ac_prog", so it can be a program name with args.
13649set dummy $ac_prog; ac_word=$2
13650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13651$as_echo_n "checking for $ac_word... " >&6; }
13652if ${ac_cv_path_READLINK+:} false; then :
13653  $as_echo_n "(cached) " >&6
13654else
13655  case $READLINK in
13656  [\\/]* | ?:[\\/]*)
13657  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13658  ;;
13659  *)
13660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13661for as_dir in $PATH
13662do
13663  IFS=$as_save_IFS
13664  test -z "$as_dir" && as_dir=.
13665    for ac_exec_ext in '' $ac_executable_extensions; do
13666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13667    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13669    break 2
13670  fi
13671done
13672  done
13673IFS=$as_save_IFS
13674
13675  ;;
13676esac
13677fi
13678READLINK=$ac_cv_path_READLINK
13679if test -n "$READLINK"; then
13680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13681$as_echo "$READLINK" >&6; }
13682else
13683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13684$as_echo "no" >&6; }
13685fi
13686
13687
13688  test -n "$READLINK" && break
13689done
13690
13691    else
13692      # If it succeeded, then it was overridden by the user. We will use it
13693      # for the tool.
13694
13695      # First remove it from the list of overridden variables, so we can test
13696      # for unknown variables in the end.
13697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13698
13699      # Check if we try to supply an empty value
13700      if test "x$READLINK" = x; then
13701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13702$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13704$as_echo_n "checking for READLINK... " >&6; }
13705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13706$as_echo "disabled" >&6; }
13707      else
13708        # Check if the provided tool contains a complete path.
13709        tool_specified="$READLINK"
13710        tool_basename="${tool_specified##*/}"
13711        if test "x$tool_basename" = "x$tool_specified"; then
13712          # A command without a complete path is provided, search $PATH.
13713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13714$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13715          # Extract the first word of "$tool_basename", so it can be a program name with args.
13716set dummy $tool_basename; ac_word=$2
13717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13718$as_echo_n "checking for $ac_word... " >&6; }
13719if ${ac_cv_path_READLINK+:} false; then :
13720  $as_echo_n "(cached) " >&6
13721else
13722  case $READLINK in
13723  [\\/]* | ?:[\\/]*)
13724  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13725  ;;
13726  *)
13727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13728for as_dir in $PATH
13729do
13730  IFS=$as_save_IFS
13731  test -z "$as_dir" && as_dir=.
13732    for ac_exec_ext in '' $ac_executable_extensions; do
13733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13734    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13736    break 2
13737  fi
13738done
13739  done
13740IFS=$as_save_IFS
13741
13742  ;;
13743esac
13744fi
13745READLINK=$ac_cv_path_READLINK
13746if test -n "$READLINK"; then
13747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13748$as_echo "$READLINK" >&6; }
13749else
13750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13751$as_echo "no" >&6; }
13752fi
13753
13754
13755          if test "x$READLINK" = x; then
13756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13757          fi
13758        else
13759          # Otherwise we believe it is a complete path. Use it as it is.
13760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13761$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13763$as_echo_n "checking for READLINK... " >&6; }
13764          if test ! -x "$tool_specified"; then
13765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13766$as_echo "not found" >&6; }
13767            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13768          fi
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13770$as_echo "$tool_specified" >&6; }
13771        fi
13772      fi
13773    fi
13774
13775  fi
13776
13777
13778
13779
13780  # Publish this variable in the help.
13781
13782
13783  if [ -z "${DF+x}" ]; then
13784    # The variable is not set by user, try to locate tool using the code snippet
13785    for ac_prog in df
13786do
13787  # Extract the first word of "$ac_prog", so it can be a program name with args.
13788set dummy $ac_prog; ac_word=$2
13789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13790$as_echo_n "checking for $ac_word... " >&6; }
13791if ${ac_cv_path_DF+:} false; then :
13792  $as_echo_n "(cached) " >&6
13793else
13794  case $DF in
13795  [\\/]* | ?:[\\/]*)
13796  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13797  ;;
13798  *)
13799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13800for as_dir in $PATH
13801do
13802  IFS=$as_save_IFS
13803  test -z "$as_dir" && as_dir=.
13804    for ac_exec_ext in '' $ac_executable_extensions; do
13805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13806    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13808    break 2
13809  fi
13810done
13811  done
13812IFS=$as_save_IFS
13813
13814  ;;
13815esac
13816fi
13817DF=$ac_cv_path_DF
13818if test -n "$DF"; then
13819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13820$as_echo "$DF" >&6; }
13821else
13822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13823$as_echo "no" >&6; }
13824fi
13825
13826
13827  test -n "$DF" && break
13828done
13829
13830  else
13831    # The variable is set, but is it from the command line or the environment?
13832
13833    # Try to remove the string !DF! from our list.
13834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13836      # If it failed, the variable was not from the command line. Ignore it,
13837      # but warn the user (except for BASH, which is always set by the calling BASH).
13838      if test "xDF" != xBASH; then
13839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13840$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13841      fi
13842      # Try to locate tool using the code snippet
13843      for ac_prog in df
13844do
13845  # Extract the first word of "$ac_prog", so it can be a program name with args.
13846set dummy $ac_prog; ac_word=$2
13847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13848$as_echo_n "checking for $ac_word... " >&6; }
13849if ${ac_cv_path_DF+:} false; then :
13850  $as_echo_n "(cached) " >&6
13851else
13852  case $DF in
13853  [\\/]* | ?:[\\/]*)
13854  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13855  ;;
13856  *)
13857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13858for as_dir in $PATH
13859do
13860  IFS=$as_save_IFS
13861  test -z "$as_dir" && as_dir=.
13862    for ac_exec_ext in '' $ac_executable_extensions; do
13863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13864    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13866    break 2
13867  fi
13868done
13869  done
13870IFS=$as_save_IFS
13871
13872  ;;
13873esac
13874fi
13875DF=$ac_cv_path_DF
13876if test -n "$DF"; then
13877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13878$as_echo "$DF" >&6; }
13879else
13880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13881$as_echo "no" >&6; }
13882fi
13883
13884
13885  test -n "$DF" && break
13886done
13887
13888    else
13889      # If it succeeded, then it was overridden by the user. We will use it
13890      # for the tool.
13891
13892      # First remove it from the list of overridden variables, so we can test
13893      # for unknown variables in the end.
13894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13895
13896      # Check if we try to supply an empty value
13897      if test "x$DF" = x; then
13898        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13899$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13901$as_echo_n "checking for DF... " >&6; }
13902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13903$as_echo "disabled" >&6; }
13904      else
13905        # Check if the provided tool contains a complete path.
13906        tool_specified="$DF"
13907        tool_basename="${tool_specified##*/}"
13908        if test "x$tool_basename" = "x$tool_specified"; then
13909          # A command without a complete path is provided, search $PATH.
13910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13911$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13912          # Extract the first word of "$tool_basename", so it can be a program name with args.
13913set dummy $tool_basename; ac_word=$2
13914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13915$as_echo_n "checking for $ac_word... " >&6; }
13916if ${ac_cv_path_DF+:} false; then :
13917  $as_echo_n "(cached) " >&6
13918else
13919  case $DF in
13920  [\\/]* | ?:[\\/]*)
13921  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13922  ;;
13923  *)
13924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13925for as_dir in $PATH
13926do
13927  IFS=$as_save_IFS
13928  test -z "$as_dir" && as_dir=.
13929    for ac_exec_ext in '' $ac_executable_extensions; do
13930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13931    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13933    break 2
13934  fi
13935done
13936  done
13937IFS=$as_save_IFS
13938
13939  ;;
13940esac
13941fi
13942DF=$ac_cv_path_DF
13943if test -n "$DF"; then
13944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13945$as_echo "$DF" >&6; }
13946else
13947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13948$as_echo "no" >&6; }
13949fi
13950
13951
13952          if test "x$DF" = x; then
13953            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13954          fi
13955        else
13956          # Otherwise we believe it is a complete path. Use it as it is.
13957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13958$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13959          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13960$as_echo_n "checking for DF... " >&6; }
13961          if test ! -x "$tool_specified"; then
13962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13963$as_echo "not found" >&6; }
13964            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13965          fi
13966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13967$as_echo "$tool_specified" >&6; }
13968        fi
13969      fi
13970    fi
13971
13972  fi
13973
13974
13975
13976
13977  # Publish this variable in the help.
13978
13979
13980  if [ -z "${CPIO+x}" ]; then
13981    # The variable is not set by user, try to locate tool using the code snippet
13982    for ac_prog in cpio bsdcpio
13983do
13984  # Extract the first word of "$ac_prog", so it can be a program name with args.
13985set dummy $ac_prog; ac_word=$2
13986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13987$as_echo_n "checking for $ac_word... " >&6; }
13988if ${ac_cv_path_CPIO+:} false; then :
13989  $as_echo_n "(cached) " >&6
13990else
13991  case $CPIO in
13992  [\\/]* | ?:[\\/]*)
13993  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13994  ;;
13995  *)
13996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13997for as_dir in $PATH
13998do
13999  IFS=$as_save_IFS
14000  test -z "$as_dir" && as_dir=.
14001    for ac_exec_ext in '' $ac_executable_extensions; do
14002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14003    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14005    break 2
14006  fi
14007done
14008  done
14009IFS=$as_save_IFS
14010
14011  ;;
14012esac
14013fi
14014CPIO=$ac_cv_path_CPIO
14015if test -n "$CPIO"; then
14016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14017$as_echo "$CPIO" >&6; }
14018else
14019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14020$as_echo "no" >&6; }
14021fi
14022
14023
14024  test -n "$CPIO" && break
14025done
14026
14027  else
14028    # The variable is set, but is it from the command line or the environment?
14029
14030    # Try to remove the string !CPIO! from our list.
14031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14033      # If it failed, the variable was not from the command line. Ignore it,
14034      # but warn the user (except for BASH, which is always set by the calling BASH).
14035      if test "xCPIO" != xBASH; then
14036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14037$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14038      fi
14039      # Try to locate tool using the code snippet
14040      for ac_prog in cpio bsdcpio
14041do
14042  # Extract the first word of "$ac_prog", so it can be a program name with args.
14043set dummy $ac_prog; ac_word=$2
14044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14045$as_echo_n "checking for $ac_word... " >&6; }
14046if ${ac_cv_path_CPIO+:} false; then :
14047  $as_echo_n "(cached) " >&6
14048else
14049  case $CPIO in
14050  [\\/]* | ?:[\\/]*)
14051  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14052  ;;
14053  *)
14054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14055for as_dir in $PATH
14056do
14057  IFS=$as_save_IFS
14058  test -z "$as_dir" && as_dir=.
14059    for ac_exec_ext in '' $ac_executable_extensions; do
14060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14061    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14063    break 2
14064  fi
14065done
14066  done
14067IFS=$as_save_IFS
14068
14069  ;;
14070esac
14071fi
14072CPIO=$ac_cv_path_CPIO
14073if test -n "$CPIO"; then
14074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14075$as_echo "$CPIO" >&6; }
14076else
14077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14078$as_echo "no" >&6; }
14079fi
14080
14081
14082  test -n "$CPIO" && break
14083done
14084
14085    else
14086      # If it succeeded, then it was overridden by the user. We will use it
14087      # for the tool.
14088
14089      # First remove it from the list of overridden variables, so we can test
14090      # for unknown variables in the end.
14091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14092
14093      # Check if we try to supply an empty value
14094      if test "x$CPIO" = x; then
14095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14096$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14098$as_echo_n "checking for CPIO... " >&6; }
14099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14100$as_echo "disabled" >&6; }
14101      else
14102        # Check if the provided tool contains a complete path.
14103        tool_specified="$CPIO"
14104        tool_basename="${tool_specified##*/}"
14105        if test "x$tool_basename" = "x$tool_specified"; then
14106          # A command without a complete path is provided, search $PATH.
14107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14108$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14109          # Extract the first word of "$tool_basename", so it can be a program name with args.
14110set dummy $tool_basename; ac_word=$2
14111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14112$as_echo_n "checking for $ac_word... " >&6; }
14113if ${ac_cv_path_CPIO+:} false; then :
14114  $as_echo_n "(cached) " >&6
14115else
14116  case $CPIO in
14117  [\\/]* | ?:[\\/]*)
14118  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14119  ;;
14120  *)
14121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14122for as_dir in $PATH
14123do
14124  IFS=$as_save_IFS
14125  test -z "$as_dir" && as_dir=.
14126    for ac_exec_ext in '' $ac_executable_extensions; do
14127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14128    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14130    break 2
14131  fi
14132done
14133  done
14134IFS=$as_save_IFS
14135
14136  ;;
14137esac
14138fi
14139CPIO=$ac_cv_path_CPIO
14140if test -n "$CPIO"; then
14141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14142$as_echo "$CPIO" >&6; }
14143else
14144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14145$as_echo "no" >&6; }
14146fi
14147
14148
14149          if test "x$CPIO" = x; then
14150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14151          fi
14152        else
14153          # Otherwise we believe it is a complete path. Use it as it is.
14154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14155$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14157$as_echo_n "checking for CPIO... " >&6; }
14158          if test ! -x "$tool_specified"; then
14159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14160$as_echo "not found" >&6; }
14161            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14162          fi
14163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14164$as_echo "$tool_specified" >&6; }
14165        fi
14166      fi
14167    fi
14168
14169  fi
14170
14171
14172
14173
14174  # Publish this variable in the help.
14175
14176
14177  if [ -z "${NICE+x}" ]; then
14178    # The variable is not set by user, try to locate tool using the code snippet
14179    for ac_prog in nice
14180do
14181  # Extract the first word of "$ac_prog", so it can be a program name with args.
14182set dummy $ac_prog; ac_word=$2
14183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14184$as_echo_n "checking for $ac_word... " >&6; }
14185if ${ac_cv_path_NICE+:} false; then :
14186  $as_echo_n "(cached) " >&6
14187else
14188  case $NICE in
14189  [\\/]* | ?:[\\/]*)
14190  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14191  ;;
14192  *)
14193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14194for as_dir in $PATH
14195do
14196  IFS=$as_save_IFS
14197  test -z "$as_dir" && as_dir=.
14198    for ac_exec_ext in '' $ac_executable_extensions; do
14199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14200    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14202    break 2
14203  fi
14204done
14205  done
14206IFS=$as_save_IFS
14207
14208  ;;
14209esac
14210fi
14211NICE=$ac_cv_path_NICE
14212if test -n "$NICE"; then
14213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14214$as_echo "$NICE" >&6; }
14215else
14216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14217$as_echo "no" >&6; }
14218fi
14219
14220
14221  test -n "$NICE" && break
14222done
14223
14224  else
14225    # The variable is set, but is it from the command line or the environment?
14226
14227    # Try to remove the string !NICE! from our list.
14228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14230      # If it failed, the variable was not from the command line. Ignore it,
14231      # but warn the user (except for BASH, which is always set by the calling BASH).
14232      if test "xNICE" != xBASH; then
14233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14234$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14235      fi
14236      # Try to locate tool using the code snippet
14237      for ac_prog in nice
14238do
14239  # Extract the first word of "$ac_prog", so it can be a program name with args.
14240set dummy $ac_prog; ac_word=$2
14241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14242$as_echo_n "checking for $ac_word... " >&6; }
14243if ${ac_cv_path_NICE+:} false; then :
14244  $as_echo_n "(cached) " >&6
14245else
14246  case $NICE in
14247  [\\/]* | ?:[\\/]*)
14248  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14249  ;;
14250  *)
14251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14252for as_dir in $PATH
14253do
14254  IFS=$as_save_IFS
14255  test -z "$as_dir" && as_dir=.
14256    for ac_exec_ext in '' $ac_executable_extensions; do
14257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14258    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14260    break 2
14261  fi
14262done
14263  done
14264IFS=$as_save_IFS
14265
14266  ;;
14267esac
14268fi
14269NICE=$ac_cv_path_NICE
14270if test -n "$NICE"; then
14271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14272$as_echo "$NICE" >&6; }
14273else
14274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14275$as_echo "no" >&6; }
14276fi
14277
14278
14279  test -n "$NICE" && break
14280done
14281
14282    else
14283      # If it succeeded, then it was overridden by the user. We will use it
14284      # for the tool.
14285
14286      # First remove it from the list of overridden variables, so we can test
14287      # for unknown variables in the end.
14288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14289
14290      # Check if we try to supply an empty value
14291      if test "x$NICE" = x; then
14292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14293$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14295$as_echo_n "checking for NICE... " >&6; }
14296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14297$as_echo "disabled" >&6; }
14298      else
14299        # Check if the provided tool contains a complete path.
14300        tool_specified="$NICE"
14301        tool_basename="${tool_specified##*/}"
14302        if test "x$tool_basename" = "x$tool_specified"; then
14303          # A command without a complete path is provided, search $PATH.
14304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14305$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14306          # Extract the first word of "$tool_basename", so it can be a program name with args.
14307set dummy $tool_basename; ac_word=$2
14308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14309$as_echo_n "checking for $ac_word... " >&6; }
14310if ${ac_cv_path_NICE+:} false; then :
14311  $as_echo_n "(cached) " >&6
14312else
14313  case $NICE in
14314  [\\/]* | ?:[\\/]*)
14315  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14316  ;;
14317  *)
14318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14319for as_dir in $PATH
14320do
14321  IFS=$as_save_IFS
14322  test -z "$as_dir" && as_dir=.
14323    for ac_exec_ext in '' $ac_executable_extensions; do
14324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14325    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14327    break 2
14328  fi
14329done
14330  done
14331IFS=$as_save_IFS
14332
14333  ;;
14334esac
14335fi
14336NICE=$ac_cv_path_NICE
14337if test -n "$NICE"; then
14338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14339$as_echo "$NICE" >&6; }
14340else
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14342$as_echo "no" >&6; }
14343fi
14344
14345
14346          if test "x$NICE" = x; then
14347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14348          fi
14349        else
14350          # Otherwise we believe it is a complete path. Use it as it is.
14351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14352$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14354$as_echo_n "checking for NICE... " >&6; }
14355          if test ! -x "$tool_specified"; then
14356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14357$as_echo "not found" >&6; }
14358            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14359          fi
14360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14361$as_echo "$tool_specified" >&6; }
14362        fi
14363      fi
14364    fi
14365
14366  fi
14367
14368
14369
14370
14371# Now we can determine OpenJDK build and target platforms. This is required to
14372# have early on.
14373# Make sure we can run config.sub.
14374$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14375  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14376
14377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14378$as_echo_n "checking build system type... " >&6; }
14379if ${ac_cv_build+:} false; then :
14380  $as_echo_n "(cached) " >&6
14381else
14382  ac_build_alias=$build_alias
14383test "x$ac_build_alias" = x &&
14384  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14385test "x$ac_build_alias" = x &&
14386  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14387ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14388  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14389
14390fi
14391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14392$as_echo "$ac_cv_build" >&6; }
14393case $ac_cv_build in
14394*-*-*) ;;
14395*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14396esac
14397build=$ac_cv_build
14398ac_save_IFS=$IFS; IFS='-'
14399set x $ac_cv_build
14400shift
14401build_cpu=$1
14402build_vendor=$2
14403shift; shift
14404# Remember, the first character of IFS is used to create $*,
14405# except with old shells:
14406build_os=$*
14407IFS=$ac_save_IFS
14408case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14409
14410
14411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14412$as_echo_n "checking host system type... " >&6; }
14413if ${ac_cv_host+:} false; then :
14414  $as_echo_n "(cached) " >&6
14415else
14416  if test "x$host_alias" = x; then
14417  ac_cv_host=$ac_cv_build
14418else
14419  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14420    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14421fi
14422
14423fi
14424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14425$as_echo "$ac_cv_host" >&6; }
14426case $ac_cv_host in
14427*-*-*) ;;
14428*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14429esac
14430host=$ac_cv_host
14431ac_save_IFS=$IFS; IFS='-'
14432set x $ac_cv_host
14433shift
14434host_cpu=$1
14435host_vendor=$2
14436shift; shift
14437# Remember, the first character of IFS is used to create $*,
14438# except with old shells:
14439host_os=$*
14440IFS=$ac_save_IFS
14441case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14442
14443
14444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14445$as_echo_n "checking target system type... " >&6; }
14446if ${ac_cv_target+:} false; then :
14447  $as_echo_n "(cached) " >&6
14448else
14449  if test "x$target_alias" = x; then
14450  ac_cv_target=$ac_cv_host
14451else
14452  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14453    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14454fi
14455
14456fi
14457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14458$as_echo "$ac_cv_target" >&6; }
14459case $ac_cv_target in
14460*-*-*) ;;
14461*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14462esac
14463target=$ac_cv_target
14464ac_save_IFS=$IFS; IFS='-'
14465set x $ac_cv_target
14466shift
14467target_cpu=$1
14468target_vendor=$2
14469shift; shift
14470# Remember, the first character of IFS is used to create $*,
14471# except with old shells:
14472target_os=$*
14473IFS=$ac_save_IFS
14474case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14475
14476
14477# The aliases save the names the user supplied, while $host etc.
14478# will get canonicalized.
14479test -n "$target_alias" &&
14480  test "$program_prefix$program_suffix$program_transform_name" = \
14481    NONENONEs,x,x, &&
14482  program_prefix=${target_alias}-
14483
14484  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14485  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14486  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14487  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14488  # to use the configure naming style.
14489
14490
14491
14492
14493
14494  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14495  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14496  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14497  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14498  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14499  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14500
14501
14502
14503  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14504
14505  case "$build_os" in
14506    *linux*)
14507      VAR_OS=linux
14508      VAR_OS_TYPE=unix
14509      ;;
14510    *solaris*)
14511      VAR_OS=solaris
14512      VAR_OS_TYPE=unix
14513      ;;
14514    *darwin*)
14515      VAR_OS=macosx
14516      VAR_OS_TYPE=unix
14517      ;;
14518    *bsd*)
14519      VAR_OS=bsd
14520      VAR_OS_TYPE=unix
14521      ;;
14522    *cygwin*)
14523      VAR_OS=windows
14524      VAR_OS_ENV=windows.cygwin
14525      ;;
14526    *mingw*)
14527      VAR_OS=windows
14528      VAR_OS_ENV=windows.msys
14529      ;;
14530    *aix*)
14531      VAR_OS=aix
14532      VAR_OS_TYPE=unix
14533      ;;
14534    *)
14535      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14536      ;;
14537  esac
14538
14539
14540  # First argument is the cpu name from the trip/quad
14541  case "$build_cpu" in
14542    x86_64)
14543      VAR_CPU=x86_64
14544      VAR_CPU_ARCH=x86
14545      VAR_CPU_BITS=64
14546      VAR_CPU_ENDIAN=little
14547      ;;
14548    i?86)
14549      VAR_CPU=x86
14550      VAR_CPU_ARCH=x86
14551      VAR_CPU_BITS=32
14552      VAR_CPU_ENDIAN=little
14553      ;;
14554    arm*)
14555      VAR_CPU=arm
14556      VAR_CPU_ARCH=arm
14557      VAR_CPU_BITS=32
14558      VAR_CPU_ENDIAN=little
14559      ;;
14560    aarch64)
14561      VAR_CPU=aarch64
14562      VAR_CPU_ARCH=aarch64
14563      VAR_CPU_BITS=64
14564      VAR_CPU_ENDIAN=little
14565      ;;
14566    powerpc)
14567      VAR_CPU=ppc
14568      VAR_CPU_ARCH=ppc
14569      VAR_CPU_BITS=32
14570      VAR_CPU_ENDIAN=big
14571      ;;
14572    powerpc64)
14573      VAR_CPU=ppc64
14574      VAR_CPU_ARCH=ppc
14575      VAR_CPU_BITS=64
14576      VAR_CPU_ENDIAN=big
14577      ;;
14578    powerpc64le)
14579      VAR_CPU=ppc64
14580      VAR_CPU_ARCH=ppc
14581      VAR_CPU_BITS=64
14582      VAR_CPU_ENDIAN=little
14583      ;;
14584    s390)
14585      VAR_CPU=s390
14586      VAR_CPU_ARCH=s390
14587      VAR_CPU_BITS=32
14588      VAR_CPU_ENDIAN=big
14589      ;;
14590    s390x)
14591      VAR_CPU=s390x
14592      VAR_CPU_ARCH=s390
14593      VAR_CPU_BITS=64
14594      VAR_CPU_ENDIAN=big
14595      ;;
14596    sparc)
14597      VAR_CPU=sparc
14598      VAR_CPU_ARCH=sparc
14599      VAR_CPU_BITS=32
14600      VAR_CPU_ENDIAN=big
14601      ;;
14602    sparcv9|sparc64)
14603      VAR_CPU=sparcv9
14604      VAR_CPU_ARCH=sparc
14605      VAR_CPU_BITS=64
14606      VAR_CPU_ENDIAN=big
14607      ;;
14608    *)
14609      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14610      ;;
14611  esac
14612
14613  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14614  OPENJDK_BUILD_OS="$VAR_OS"
14615  if test "x$VAR_OS_TYPE" != x; then
14616    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14617  else
14618    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14619  fi
14620  if test "x$VAR_OS_ENV" != x; then
14621    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14622  else
14623    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14624  fi
14625  OPENJDK_BUILD_CPU="$VAR_CPU"
14626  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14627  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14628  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14629
14630
14631
14632
14633
14634
14635
14636
14637  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14638$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14640$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14641
14642  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14643
14644  case "$host_os" in
14645    *linux*)
14646      VAR_OS=linux
14647      VAR_OS_TYPE=unix
14648      ;;
14649    *solaris*)
14650      VAR_OS=solaris
14651      VAR_OS_TYPE=unix
14652      ;;
14653    *darwin*)
14654      VAR_OS=macosx
14655      VAR_OS_TYPE=unix
14656      ;;
14657    *bsd*)
14658      VAR_OS=bsd
14659      VAR_OS_TYPE=unix
14660      ;;
14661    *cygwin*)
14662      VAR_OS=windows
14663      VAR_OS_ENV=windows.cygwin
14664      ;;
14665    *mingw*)
14666      VAR_OS=windows
14667      VAR_OS_ENV=windows.msys
14668      ;;
14669    *aix*)
14670      VAR_OS=aix
14671      VAR_OS_TYPE=unix
14672      ;;
14673    *)
14674      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14675      ;;
14676  esac
14677
14678
14679  # First argument is the cpu name from the trip/quad
14680  case "$host_cpu" in
14681    x86_64)
14682      VAR_CPU=x86_64
14683      VAR_CPU_ARCH=x86
14684      VAR_CPU_BITS=64
14685      VAR_CPU_ENDIAN=little
14686      ;;
14687    i?86)
14688      VAR_CPU=x86
14689      VAR_CPU_ARCH=x86
14690      VAR_CPU_BITS=32
14691      VAR_CPU_ENDIAN=little
14692      ;;
14693    arm*)
14694      VAR_CPU=arm
14695      VAR_CPU_ARCH=arm
14696      VAR_CPU_BITS=32
14697      VAR_CPU_ENDIAN=little
14698      ;;
14699    aarch64)
14700      VAR_CPU=aarch64
14701      VAR_CPU_ARCH=aarch64
14702      VAR_CPU_BITS=64
14703      VAR_CPU_ENDIAN=little
14704      ;;
14705    powerpc)
14706      VAR_CPU=ppc
14707      VAR_CPU_ARCH=ppc
14708      VAR_CPU_BITS=32
14709      VAR_CPU_ENDIAN=big
14710      ;;
14711    powerpc64)
14712      VAR_CPU=ppc64
14713      VAR_CPU_ARCH=ppc
14714      VAR_CPU_BITS=64
14715      VAR_CPU_ENDIAN=big
14716      ;;
14717    powerpc64le)
14718      VAR_CPU=ppc64
14719      VAR_CPU_ARCH=ppc
14720      VAR_CPU_BITS=64
14721      VAR_CPU_ENDIAN=little
14722      ;;
14723    s390)
14724      VAR_CPU=s390
14725      VAR_CPU_ARCH=s390
14726      VAR_CPU_BITS=32
14727      VAR_CPU_ENDIAN=big
14728      ;;
14729    s390x)
14730      VAR_CPU=s390x
14731      VAR_CPU_ARCH=s390
14732      VAR_CPU_BITS=64
14733      VAR_CPU_ENDIAN=big
14734      ;;
14735    sparc)
14736      VAR_CPU=sparc
14737      VAR_CPU_ARCH=sparc
14738      VAR_CPU_BITS=32
14739      VAR_CPU_ENDIAN=big
14740      ;;
14741    sparcv9|sparc64)
14742      VAR_CPU=sparcv9
14743      VAR_CPU_ARCH=sparc
14744      VAR_CPU_BITS=64
14745      VAR_CPU_ENDIAN=big
14746      ;;
14747    *)
14748      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14749      ;;
14750  esac
14751
14752  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14753  OPENJDK_TARGET_OS="$VAR_OS"
14754  if test "x$VAR_OS_TYPE" != x; then
14755    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14756  else
14757    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14758  fi
14759  if test "x$VAR_OS_ENV" != x; then
14760    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14761  else
14762    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14763  fi
14764  OPENJDK_TARGET_CPU="$VAR_CPU"
14765  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14766  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14767  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14768
14769
14770
14771
14772
14773
14774
14775
14776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14777$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14779$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14780
14781
14782
14783# Check whether --with-target-bits was given.
14784if test "${with_target_bits+set}" = set; then :
14785  withval=$with_target_bits;
14786fi
14787
14788
14789  # We have three types of compiles:
14790  # native  == normal compilation, target system == build system
14791  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14792  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14793  #
14794  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14795    # We're doing a proper cross-compilation
14796    COMPILE_TYPE="cross"
14797  else
14798    COMPILE_TYPE="native"
14799  fi
14800
14801  if test "x$with_target_bits" != x; then
14802    if test "x$COMPILE_TYPE" = "xcross"; then
14803      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14804    fi
14805
14806    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14807      # A reduced build is requested
14808      COMPILE_TYPE="reduced"
14809      OPENJDK_TARGET_CPU_BITS=32
14810      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14811        OPENJDK_TARGET_CPU=x86
14812      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14813        OPENJDK_TARGET_CPU=sparc
14814      else
14815        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14816      fi
14817    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14818      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
14819    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14820      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14821$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14822    else
14823      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14824    fi
14825  fi
14826
14827
14828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14829$as_echo_n "checking compilation type... " >&6; }
14830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14831$as_echo "$COMPILE_TYPE" >&6; }
14832
14833
14834  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14835    REQUIRED_OS_NAME=SunOS
14836    REQUIRED_OS_VERSION=5.10
14837  fi
14838  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14839    REQUIRED_OS_NAME=Linux
14840    REQUIRED_OS_VERSION=2.6
14841  fi
14842  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14843    REQUIRED_OS_NAME=Windows
14844    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14845      REQUIRED_OS_VERSION=5.2
14846    else
14847      REQUIRED_OS_VERSION=5.1
14848    fi
14849  fi
14850  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14851    REQUIRED_OS_NAME=Darwin
14852    REQUIRED_OS_VERSION=11.2
14853  fi
14854
14855
14856
14857
14858
14859  # Also store the legacy naming of the cpu.
14860  # Ie i586 and amd64 instead of x86 and x86_64
14861  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14862  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14863    OPENJDK_TARGET_CPU_LEGACY="i586"
14864  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14865    # On all platforms except MacOSX replace x86_64 with amd64.
14866    OPENJDK_TARGET_CPU_LEGACY="amd64"
14867  fi
14868
14869
14870  # And the second legacy naming of the cpu.
14871  # Ie i386 and amd64 instead of x86 and x86_64.
14872  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14873  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14874    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14875  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14876    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14877  fi
14878
14879
14880  # This is the name of the cpu (but using i386 and amd64 instead of
14881  # x86 and x86_64, respectively), preceeded by a /, to be used when
14882  # locating libraries. On macosx, it's empty, though.
14883  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14884  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14885    OPENJDK_TARGET_CPU_LIBDIR=""
14886  fi
14887
14888
14889  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14890  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14891  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14892  OPENJDK_TARGET_CPU_ISADIR=""
14893  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14894    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14895      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14896    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14897      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14898    fi
14899  fi
14900
14901
14902  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14903  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14904  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14905    # On linux only, we replace x86 with i386.
14906    OPENJDK_TARGET_CPU_OSARCH="i386"
14907  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14908    # On all platforms except macosx, we replace x86_64 with amd64.
14909    OPENJDK_TARGET_CPU_OSARCH="amd64"
14910  fi
14911
14912
14913  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14914  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14915    OPENJDK_TARGET_CPU_JLI="i386"
14916  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14917    # On all platforms except macosx, we replace x86_64 with amd64.
14918    OPENJDK_TARGET_CPU_JLI="amd64"
14919  fi
14920  # Now setup the -D flags for building libjli.
14921  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14922  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14923    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14924      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14925    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14926      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14927    fi
14928  fi
14929
14930
14931  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14932      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14933  else
14934      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14935  fi
14936
14937
14938  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14939    A_LP64="LP64:="
14940    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14941    # unpack200.exe
14942    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14943      ADD_LP64="-D_LP64=1"
14944    fi
14945  fi
14946  LP64=$A_LP64
14947
14948
14949  if test "x$COMPILE_TYPE" = "xcross"; then
14950    # FIXME: ... or should this include reduced builds..?
14951    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14952  else
14953    DEFINE_CROSS_COMPILE_ARCH=""
14954  fi
14955
14956
14957  # ZERO_ARCHDEF is used to enable architecture-specific code
14958  case "${OPENJDK_TARGET_CPU}" in
14959    ppc)     ZERO_ARCHDEF=PPC32 ;;
14960    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14961    s390*)   ZERO_ARCHDEF=S390  ;;
14962    sparc*)  ZERO_ARCHDEF=SPARC ;;
14963    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14964    x86)     ZERO_ARCHDEF=IA32  ;;
14965    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14966  esac
14967
14968
14969
14970
14971# Continue setting up basic stuff. Most remaining code require fundamental tools.
14972
14973  # Save the current directory this script was started from
14974  CURDIR="$PWD"
14975
14976  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14977  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14978  # was not available at that time.
14979  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14980  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14981    ORIGINAL_PATH="$REWRITTEN_PATH"
14982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
14983$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
14984  fi
14985
14986  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14987    PATH_SEP=";"
14988
14989  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14990  if test $SRC_ROOT_LENGTH -gt 100; then
14991    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14992  fi
14993
14994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14996$as_echo_n "checking cygwin release... " >&6; }
14997    CYGWIN_VERSION=`$UNAME -r`
14998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14999$as_echo "$CYGWIN_VERSION" >&6; }
15000    WINDOWS_ENV_VENDOR='cygwin'
15001    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15002
15003    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15004    if test "x$CYGWIN_VERSION_OLD" != x; then
15005      { $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
15006$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;}
15007      as_fn_error $? "Cannot continue" "$LINENO" 5
15008    fi
15009    if test "x$CYGPATH" = x; then
15010      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15011    fi
15012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15013$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15014    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15015    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15016    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15017    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15019$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15020    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15021    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15022    if test "x$test_cygdrive_prefix" = x; then
15023      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15024    fi
15025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15027$as_echo_n "checking msys release... " >&6; }
15028    MSYS_VERSION=`$UNAME -r`
15029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15030$as_echo "$MSYS_VERSION" >&6; }
15031
15032    WINDOWS_ENV_VENDOR='msys'
15033    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15034
15035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15036$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15037    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15038    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15039
15040  windows_path="$MSYS_ROOT_PATH"
15041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15042    unix_path=`$CYGPATH -u "$windows_path"`
15043    MSYS_ROOT_PATH="$unix_path"
15044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15046    MSYS_ROOT_PATH="$unix_path"
15047  fi
15048
15049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15050$as_echo "$MSYS_ROOT_PATH" >&6; }
15051    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15052  else
15053    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15054  fi
15055
15056  # Test if windows or unix (cygwin/msys) find is first in path.
15057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15058$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15059  FIND_BINARY_OUTPUT=`find --version 2>&1`
15060  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15062$as_echo "unix style" >&6; }
15063  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15065$as_echo "Windows" >&6; }
15066    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15067$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15068    { $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
15069$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15070    as_fn_error $? "Cannot continue" "$LINENO" 5
15071  else
15072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15073$as_echo "unknown" >&6; }
15074    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15075$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15076  fi
15077
15078  else
15079    PATH_SEP=":"
15080  fi
15081
15082
15083  # We get the top-level directory from the supporting wrappers.
15084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15085$as_echo_n "checking for top-level directory... " >&6; }
15086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15087$as_echo "$TOPDIR" >&6; }
15088
15089
15090  # Save the original version of TOPDIR for string comparisons
15091  ORIGINAL_TOPDIR="$TOPDIR"
15092
15093
15094  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15095
15096  # Only process if variable expands to non-empty
15097
15098  if test "x$CURDIR" != x; then
15099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15100
15101  # Input might be given as Windows format, start by converting to
15102  # unix format.
15103  path="$CURDIR"
15104  new_path=`$CYGPATH -u "$path"`
15105
15106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15109  # "foo.exe" is OK but "foo" is an error.
15110  #
15111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15112  # It is also a way to make sure we got the proper file name for the real test later on.
15113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15114  if test "x$test_shortpath" = x; then
15115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15116$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15117    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15118  fi
15119
15120  # Call helper function which possibly converts this using DOS-style short mode.
15121  # If so, the updated path is stored in $new_path.
15122
15123  input_path="$new_path"
15124  # Check if we need to convert this using DOS-style short mode. If the path
15125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15126  # take no chances and rewrite it.
15127  # Note: m4 eats our [], so we need to use [ and ] instead.
15128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15129  if test "x$has_forbidden_chars" != x; then
15130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15134      # Going to short mode and back again did indeed matter. Since short mode is
15135      # case insensitive, let's make it lowercase to improve readability.
15136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15137      # Now convert it back to Unix-style (cygpath)
15138      input_path=`$CYGPATH -u "$shortmode_path"`
15139      new_path="$input_path"
15140    fi
15141  fi
15142
15143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15144  if test "x$test_cygdrive_prefix" = x; then
15145    # As a simple fix, exclude /usr/bin since it's not a real path.
15146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15148      # a path prefixed by /cygdrive for fixpath to work.
15149      new_path="$CYGWIN_ROOT_PATH$input_path"
15150    fi
15151  fi
15152
15153
15154  if test "x$path" != "x$new_path"; then
15155    CURDIR="$new_path"
15156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15157$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15158  fi
15159
15160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15161
15162  path="$CURDIR"
15163  has_colon=`$ECHO $path | $GREP ^.:`
15164  new_path="$path"
15165  if test "x$has_colon" = x; then
15166    # Not in mixed or Windows style, start by that.
15167    new_path=`cmd //c echo $path`
15168  fi
15169
15170
15171  input_path="$new_path"
15172  # Check if we need to convert this using DOS-style short mode. If the path
15173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15174  # take no chances and rewrite it.
15175  # Note: m4 eats our [], so we need to use [ and ] instead.
15176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15177  if test "x$has_forbidden_chars" != x; then
15178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15180  fi
15181
15182
15183  windows_path="$new_path"
15184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15185    unix_path=`$CYGPATH -u "$windows_path"`
15186    new_path="$unix_path"
15187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15189    new_path="$unix_path"
15190  fi
15191
15192  if test "x$path" != "x$new_path"; then
15193    CURDIR="$new_path"
15194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15195$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15196  fi
15197
15198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15200
15201    else
15202      # We're on a unix platform. Hooray! :)
15203      path="$CURDIR"
15204      has_space=`$ECHO "$path" | $GREP " "`
15205      if test "x$has_space" != x; then
15206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15207$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15209      fi
15210
15211      # Use eval to expand a potential ~
15212      eval path="$path"
15213      if test ! -f "$path" && test ! -d "$path"; then
15214        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15215      fi
15216
15217      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15218    fi
15219  fi
15220
15221
15222  # Only process if variable expands to non-empty
15223
15224  if test "x$TOPDIR" != x; then
15225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15226
15227  # Input might be given as Windows format, start by converting to
15228  # unix format.
15229  path="$TOPDIR"
15230  new_path=`$CYGPATH -u "$path"`
15231
15232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15235  # "foo.exe" is OK but "foo" is an error.
15236  #
15237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15238  # It is also a way to make sure we got the proper file name for the real test later on.
15239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15240  if test "x$test_shortpath" = x; then
15241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15242$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15243    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15244  fi
15245
15246  # Call helper function which possibly converts this using DOS-style short mode.
15247  # If so, the updated path is stored in $new_path.
15248
15249  input_path="$new_path"
15250  # Check if we need to convert this using DOS-style short mode. If the path
15251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15252  # take no chances and rewrite it.
15253  # Note: m4 eats our [], so we need to use [ and ] instead.
15254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15255  if test "x$has_forbidden_chars" != x; then
15256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15260      # Going to short mode and back again did indeed matter. Since short mode is
15261      # case insensitive, let's make it lowercase to improve readability.
15262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15263      # Now convert it back to Unix-style (cygpath)
15264      input_path=`$CYGPATH -u "$shortmode_path"`
15265      new_path="$input_path"
15266    fi
15267  fi
15268
15269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15270  if test "x$test_cygdrive_prefix" = x; then
15271    # As a simple fix, exclude /usr/bin since it's not a real path.
15272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15274      # a path prefixed by /cygdrive for fixpath to work.
15275      new_path="$CYGWIN_ROOT_PATH$input_path"
15276    fi
15277  fi
15278
15279
15280  if test "x$path" != "x$new_path"; then
15281    TOPDIR="$new_path"
15282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15283$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15284  fi
15285
15286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15287
15288  path="$TOPDIR"
15289  has_colon=`$ECHO $path | $GREP ^.:`
15290  new_path="$path"
15291  if test "x$has_colon" = x; then
15292    # Not in mixed or Windows style, start by that.
15293    new_path=`cmd //c echo $path`
15294  fi
15295
15296
15297  input_path="$new_path"
15298  # Check if we need to convert this using DOS-style short mode. If the path
15299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15300  # take no chances and rewrite it.
15301  # Note: m4 eats our [], so we need to use [ and ] instead.
15302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15303  if test "x$has_forbidden_chars" != x; then
15304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15306  fi
15307
15308
15309  windows_path="$new_path"
15310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15311    unix_path=`$CYGPATH -u "$windows_path"`
15312    new_path="$unix_path"
15313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15315    new_path="$unix_path"
15316  fi
15317
15318  if test "x$path" != "x$new_path"; then
15319    TOPDIR="$new_path"
15320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15321$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15322  fi
15323
15324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15326
15327    else
15328      # We're on a unix platform. Hooray! :)
15329      path="$TOPDIR"
15330      has_space=`$ECHO "$path" | $GREP " "`
15331      if test "x$has_space" != x; then
15332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15333$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15335      fi
15336
15337      # Use eval to expand a potential ~
15338      eval path="$path"
15339      if test ! -f "$path" && test ! -d "$path"; then
15340        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15341      fi
15342
15343      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15344    fi
15345  fi
15346
15347  # SRC_ROOT is a traditional alias for TOPDIR.
15348  SRC_ROOT=$TOPDIR
15349
15350  # Calculate a canonical version of TOPDIR for string comparisons
15351  CANONICAL_TOPDIR=$TOPDIR
15352
15353  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15354    # Follow a chain of symbolic links. Use readlink
15355    # where it exists, else fall back to horribly
15356    # complicated shell code.
15357    if test "x$READLINK_TESTED" != yes; then
15358      # On MacOSX there is a readlink tool with a different
15359      # purpose than the GNU readlink tool. Check the found readlink.
15360      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15361      if test "x$ISGNU" = x; then
15362        # A readlink that we do not know how to use.
15363        # Are there other non-GNU readlinks out there?
15364        READLINK_TESTED=yes
15365        READLINK=
15366      fi
15367    fi
15368
15369    if test "x$READLINK" != x; then
15370      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15371    else
15372      # Save the current directory for restoring afterwards
15373      STARTDIR=$PWD
15374      COUNTER=0
15375      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15376      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15377      cd $sym_link_dir
15378      # Use -P flag to resolve symlinks in directories.
15379      cd `$THEPWDCMD -P`
15380      sym_link_dir=`$THEPWDCMD -P`
15381      # Resolve file symlinks
15382      while test $COUNTER -lt 20; do
15383        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15384        if test "x$ISLINK" == x; then
15385          # This is not a symbolic link! We are done!
15386          break
15387        fi
15388        # Again resolve directory symlinks since the target of the just found
15389        # link could be in a different directory
15390        cd `$DIRNAME $ISLINK`
15391        sym_link_dir=`$THEPWDCMD -P`
15392        sym_link_file=`$BASENAME $ISLINK`
15393        let COUNTER=COUNTER+1
15394      done
15395      cd $STARTDIR
15396      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15397    fi
15398  fi
15399
15400
15401
15402  # Locate the directory of this script.
15403  AUTOCONF_DIR=$TOPDIR/common/autoconf
15404
15405
15406# Check if it's a pure open build or if custom sources are to be used.
15407
15408  # Check whether --enable-openjdk-only was given.
15409if test "${enable_openjdk_only+set}" = set; then :
15410  enableval=$enable_openjdk_only;
15411else
15412  enable_openjdk_only="no"
15413fi
15414
15415
15416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15417$as_echo_n "checking for presence of closed sources... " >&6; }
15418  if test -d "$SRC_ROOT/jdk/src/closed"; then
15419    CLOSED_SOURCE_PRESENT=yes
15420  else
15421    CLOSED_SOURCE_PRESENT=no
15422  fi
15423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15424$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15425
15426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15427$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15428  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15430$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15431
15432  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15433    OPENJDK=true
15434    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15435      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15436$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15437    fi
15438  else
15439    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15440      OPENJDK=true
15441    else
15442      OPENJDK=false
15443    fi
15444  fi
15445
15446  if test "x$OPENJDK" = "xtrue"; then
15447    SET_OPENJDK="OPENJDK=true"
15448  fi
15449
15450
15451
15452  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15453  # the IncludeCustomExtension macro.
15454
15455
15456# Check whether --with-custom-make-dir was given.
15457if test "${with_custom_make_dir+set}" = set; then :
15458  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
15459$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15460fi
15461
15462
15463
15464
15465# These are needed to be able to create a configuration name (and thus the output directory)
15466
15467  ###############################################################################
15468  #
15469  # Check which variant of the JDK that we want to build.
15470  # Currently we have:
15471  #    normal:   standard edition
15472  # but the custom make system may add other variants
15473  #
15474  # Effectively the JDK variant gives a name to a specific set of
15475  # modules to compile into the JDK. In the future, these modules
15476  # might even be Jigsaw modules.
15477  #
15478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15479$as_echo_n "checking which variant of the JDK to build... " >&6; }
15480
15481# Check whether --with-jdk-variant was given.
15482if test "${with_jdk_variant+set}" = set; then :
15483  withval=$with_jdk_variant;
15484fi
15485
15486
15487  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15488    JDK_VARIANT="normal"
15489  else
15490    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15491  fi
15492
15493
15494
15495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15496$as_echo "$JDK_VARIANT" >&6; }
15497
15498
15499###############################################################################
15500#
15501# Check which interpreter of the JVM we want to build.
15502# Currently we have:
15503#    template: Template interpreter (the default)
15504#    cpp     : C++ interpreter
15505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15506$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15507
15508# Check whether --with-jvm-interpreter was given.
15509if test "${with_jvm_interpreter+set}" = set; then :
15510  withval=$with_jvm_interpreter;
15511fi
15512
15513
15514if test "x$with_jvm_interpreter" = x; then
15515     with_jvm_interpreter="template"
15516fi
15517
15518JVM_INTERPRETER="$with_jvm_interpreter"
15519
15520if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15521   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15522fi
15523
15524
15525
15526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15527$as_echo "$with_jvm_interpreter" >&6; }
15528
15529
15530
15531  ###############################################################################
15532  #
15533  # Check which variants of the JVM that we want to build.
15534  # Currently we have:
15535  #    server: normal interpreter and a tiered C1/C2 compiler
15536  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15537  #    minimal1: reduced form of client with optional VM services and features stripped out
15538  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15539  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15540  #    zero: no machine code interpreter, no compiler
15541  #    zeroshark: zero interpreter and shark/llvm compiler backend
15542#    core: interpreter only, no compiler (only works on some platforms)
15543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15544$as_echo_n "checking which variants of the JVM to build... " >&6; }
15545
15546# Check whether --with-jvm-variants was given.
15547if test "${with_jvm_variants+set}" = set; then :
15548  withval=$with_jvm_variants;
15549fi
15550
15551
15552  if test "x$with_jvm_variants" = x; then
15553    with_jvm_variants="server"
15554  fi
15555
15556  JVM_VARIANTS=",$with_jvm_variants,"
15557  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,//'`
15558
15559  if test "x$TEST_VARIANTS" != "x,"; then
15560     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15561  fi
15562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15563$as_echo "$with_jvm_variants" >&6; }
15564
15565  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15566  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15567  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15568  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15569  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15570  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15571  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15572
15573  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15574    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15575      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15576    fi
15577  fi
15578  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15579    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15580      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15581    fi
15582  fi
15583  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15584    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15585      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15586    fi
15587  fi
15588
15589  # Replace the commas with AND for use in the build directory name.
15590  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15591  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/'`
15592  if test "x$COUNT_VARIANTS" != "x,1"; then
15593    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15594  else
15595    BUILDING_MULTIPLE_JVM_VARIANTS=no
15596  fi
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607  INCLUDE_SA=true
15608  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15609    INCLUDE_SA=false
15610  fi
15611  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15612    INCLUDE_SA=false
15613  fi
15614  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15615    INCLUDE_SA=false
15616  fi
15617  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15618    INCLUDE_SA=false
15619  fi
15620
15621
15622  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15623    MACOSX_UNIVERSAL="true"
15624  fi
15625
15626
15627
15628
15629  ###############################################################################
15630  #
15631  # Set the debug level
15632  #    release: no debug information, all optimizations, no asserts.
15633  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15634  #    fastdebug: debug information (-g), all optimizations, all asserts
15635  #    slowdebug: debug information (-g), no optimizations, all asserts
15636  #
15637  DEBUG_LEVEL="release"
15638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15639$as_echo_n "checking which debug level to use... " >&6; }
15640  # Check whether --enable-debug was given.
15641if test "${enable_debug+set}" = set; then :
15642  enableval=$enable_debug;
15643        ENABLE_DEBUG="${enableval}"
15644        DEBUG_LEVEL="fastdebug"
15645
15646else
15647  ENABLE_DEBUG="no"
15648fi
15649
15650
15651
15652# Check whether --with-debug-level was given.
15653if test "${with_debug_level+set}" = set; then :
15654  withval=$with_debug_level;
15655        DEBUG_LEVEL="${withval}"
15656        if test "x$ENABLE_DEBUG" = xyes; then
15657          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15658        fi
15659
15660fi
15661
15662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15663$as_echo "$DEBUG_LEVEL" >&6; }
15664
15665  if test "x$DEBUG_LEVEL" != xrelease && \
15666      test "x$DEBUG_LEVEL" != xoptimized && \
15667      test "x$DEBUG_LEVEL" != xfastdebug && \
15668      test "x$DEBUG_LEVEL" != xslowdebug; then
15669    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15670  fi
15671
15672
15673  ###############################################################################
15674  #
15675  # Setup legacy vars/targets and new vars to deal with different debug levels.
15676  #
15677
15678  case $DEBUG_LEVEL in
15679    release )
15680      VARIANT="OPT"
15681      FASTDEBUG="false"
15682      DEBUG_CLASSFILES="false"
15683      BUILD_VARIANT_RELEASE=""
15684      HOTSPOT_DEBUG_LEVEL="product"
15685      HOTSPOT_EXPORT="product"
15686      ;;
15687    fastdebug )
15688      VARIANT="DBG"
15689      FASTDEBUG="true"
15690      DEBUG_CLASSFILES="true"
15691      BUILD_VARIANT_RELEASE="-fastdebug"
15692      HOTSPOT_DEBUG_LEVEL="fastdebug"
15693      HOTSPOT_EXPORT="fastdebug"
15694      ;;
15695    slowdebug )
15696      VARIANT="DBG"
15697      FASTDEBUG="false"
15698      DEBUG_CLASSFILES="true"
15699      BUILD_VARIANT_RELEASE="-debug"
15700      HOTSPOT_DEBUG_LEVEL="debug"
15701      HOTSPOT_EXPORT="debug"
15702      ;;
15703    optimized )
15704      VARIANT="OPT"
15705      FASTDEBUG="false"
15706      DEBUG_CLASSFILES="false"
15707      BUILD_VARIANT_RELEASE="-optimized"
15708      HOTSPOT_DEBUG_LEVEL="optimized"
15709      HOTSPOT_EXPORT="optimized"
15710      ;;
15711  esac
15712
15713  # The debug level 'optimized' is a little special because it is currently only
15714  # applicable to the HotSpot build where it means to build a completely
15715  # optimized version of the VM without any debugging code (like for the
15716  # 'release' debug level which is called 'product' in the HotSpot build) but
15717  # with the exception that it can contain additional code which is otherwise
15718  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15719  # test new and/or experimental features which are not intended for customer
15720  # shipment. Because these new features need to be tested and benchmarked in
15721  # real world scenarios, we want to build the containing JDK at the 'release'
15722  # debug level.
15723  if test "x$DEBUG_LEVEL" = xoptimized; then
15724    DEBUG_LEVEL="release"
15725  fi
15726
15727  #####
15728  # Generate the legacy makefile targets for hotspot.
15729  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15730  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15731  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15732  # But until then ...
15733  HOTSPOT_TARGET=""
15734
15735  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15736    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15737  fi
15738
15739  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15740    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15741  fi
15742
15743  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15744    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15745  fi
15746
15747  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15748    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15749  fi
15750
15751  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15752    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15753  fi
15754
15755  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15756    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15757  fi
15758
15759  if test "x$JVM_VARIANT_CORE" = xtrue; then
15760    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15761  fi
15762
15763  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15764
15765  # On Macosx universal binaries are produced, but they only contain
15766  # 64 bit intel. This invalidates control of which jvms are built
15767  # from configure, but only server is valid anyway. Fix this
15768  # when hotspot makefiles are rewritten.
15769  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15770    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15771  fi
15772
15773  #####
15774
15775
15776
15777
15778
15779
15780
15781
15782# With basic setup done, call the custom early hook.
15783
15784
15785# Check if we have devkits, extra paths or sysroot set.
15786
15787
15788# Check whether --with-devkit was given.
15789if test "${with_devkit+set}" = set; then :
15790  withval=$with_devkit;
15791
15792  # Only process if variable expands to non-empty
15793
15794  if test "x$with_devkit" != x; then
15795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15796
15797  # Input might be given as Windows format, start by converting to
15798  # unix format.
15799  path="$with_devkit"
15800  new_path=`$CYGPATH -u "$path"`
15801
15802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15805  # "foo.exe" is OK but "foo" is an error.
15806  #
15807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15808  # It is also a way to make sure we got the proper file name for the real test later on.
15809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15810  if test "x$test_shortpath" = x; then
15811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15812$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15813    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15814  fi
15815
15816  # Call helper function which possibly converts this using DOS-style short mode.
15817  # If so, the updated path is stored in $new_path.
15818
15819  input_path="$new_path"
15820  # Check if we need to convert this using DOS-style short mode. If the path
15821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15822  # take no chances and rewrite it.
15823  # Note: m4 eats our [], so we need to use [ and ] instead.
15824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15825  if test "x$has_forbidden_chars" != x; then
15826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15830      # Going to short mode and back again did indeed matter. Since short mode is
15831      # case insensitive, let's make it lowercase to improve readability.
15832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15833      # Now convert it back to Unix-style (cygpath)
15834      input_path=`$CYGPATH -u "$shortmode_path"`
15835      new_path="$input_path"
15836    fi
15837  fi
15838
15839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15840  if test "x$test_cygdrive_prefix" = x; then
15841    # As a simple fix, exclude /usr/bin since it's not a real path.
15842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15844      # a path prefixed by /cygdrive for fixpath to work.
15845      new_path="$CYGWIN_ROOT_PATH$input_path"
15846    fi
15847  fi
15848
15849
15850  if test "x$path" != "x$new_path"; then
15851    with_devkit="$new_path"
15852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15853$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15854  fi
15855
15856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15857
15858  path="$with_devkit"
15859  has_colon=`$ECHO $path | $GREP ^.:`
15860  new_path="$path"
15861  if test "x$has_colon" = x; then
15862    # Not in mixed or Windows style, start by that.
15863    new_path=`cmd //c echo $path`
15864  fi
15865
15866
15867  input_path="$new_path"
15868  # Check if we need to convert this using DOS-style short mode. If the path
15869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15870  # take no chances and rewrite it.
15871  # Note: m4 eats our [], so we need to use [ and ] instead.
15872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15873  if test "x$has_forbidden_chars" != x; then
15874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15876  fi
15877
15878
15879  windows_path="$new_path"
15880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15881    unix_path=`$CYGPATH -u "$windows_path"`
15882    new_path="$unix_path"
15883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15885    new_path="$unix_path"
15886  fi
15887
15888  if test "x$path" != "x$new_path"; then
15889    with_devkit="$new_path"
15890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15891$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15892  fi
15893
15894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15896
15897    else
15898      # We're on a unix platform. Hooray! :)
15899      path="$with_devkit"
15900      has_space=`$ECHO "$path" | $GREP " "`
15901      if test "x$has_space" != x; then
15902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15903$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15905      fi
15906
15907      # Use eval to expand a potential ~
15908      eval path="$path"
15909      if test ! -f "$path" && test ! -d "$path"; then
15910        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15911      fi
15912
15913      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15914    fi
15915  fi
15916
15917        DEVKIT_ROOT="$with_devkit"
15918        # Check for a meta data info file in the root of the devkit
15919        if test -f "$DEVKIT_ROOT/devkit.info"; then
15920          . $DEVKIT_ROOT/devkit.info
15921          # This potentially sets the following:
15922          # A descriptive name of the devkit
15923
15924  if test "x$DEVKIT_NAME" = x; then
15925    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15926  fi
15927
15928          # Corresponds to --with-extra-path
15929
15930  if test "x$DEVKIT_EXTRA_PATH" = x; then
15931    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15932  fi
15933
15934          # Corresponds to --with-toolchain-path
15935
15936  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15937    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15938  fi
15939
15940          # Corresponds to --with-sysroot
15941
15942  if test "x$DEVKIT_SYSROOT" = x; then
15943    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15944  fi
15945
15946
15947          # Identifies the Visual Studio version in the devkit
15948
15949  if test "x$DEVKIT_VS_VERSION" = x; then
15950    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15951  fi
15952
15953          # The Visual Studio include environment variable
15954
15955  if test "x$DEVKIT_VS_INCLUDE" = x; then
15956    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15957  fi
15958
15959          # The Visual Studio lib environment variable
15960
15961  if test "x$DEVKIT_VS_LIB" = x; then
15962    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15963  fi
15964
15965          # Corresponds to --with-msvcr-dll
15966
15967  if test "x$DEVKIT_MSVCR_DLL" = x; then
15968    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15969  fi
15970
15971          # Corresponds to --with-msvcp-dll
15972
15973  if test "x$DEVKIT_MSVCP_DLL" = x; then
15974    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15975  fi
15976
15977        fi
15978
15979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15980$as_echo_n "checking for devkit... " >&6; }
15981        if test "x$DEVKIT_NAME" != x; then
15982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15983$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15984        else
15985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15986$as_echo "$DEVKIT_ROOT" >&6; }
15987        fi
15988
15989
15990  if test "x$DEVKIT_EXTRA_PATH" != x; then
15991    if test "x$EXTRA_PATH" = x; then
15992      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15993    else
15994      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15995    fi
15996  fi
15997
15998
15999        # Fallback default of just /bin if DEVKIT_PATH is not defined
16000        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16001          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16002        fi
16003
16004  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16005    if test "x$TOOLCHAIN_PATH" = x; then
16006      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16007    else
16008      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16009    fi
16010  fi
16011
16012
16013        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16014        # places for backwards compatiblity.
16015        if test "x$DEVKIT_SYSROOT" != x; then
16016          SYSROOT="$DEVKIT_SYSROOT"
16017        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16018          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16019        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16020          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16021        fi
16022
16023
16024fi
16025
16026
16027  # You can force the sysroot if the sysroot encoded into the compiler tools
16028  # is not correct.
16029
16030# Check whether --with-sys-root was given.
16031if test "${with_sys_root+set}" = set; then :
16032  withval=$with_sys_root; SYSROOT=$with_sys_root
16033
16034fi
16035
16036
16037
16038# Check whether --with-sysroot was given.
16039if test "${with_sysroot+set}" = set; then :
16040  withval=$with_sysroot; SYSROOT=$with_sysroot
16041
16042fi
16043
16044
16045
16046# Check whether --with-tools-dir was given.
16047if test "${with_tools_dir+set}" = set; then :
16048  withval=$with_tools_dir;
16049  if test "x$with_tools_dir" != x; then
16050    if test "x$TOOLCHAIN_PATH" = x; then
16051      TOOLCHAIN_PATH="$with_tools_dir"
16052    else
16053      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16054    fi
16055  fi
16056
16057
16058fi
16059
16060
16061
16062# Check whether --with-toolchain-path was given.
16063if test "${with_toolchain_path+set}" = set; then :
16064  withval=$with_toolchain_path;
16065  if test "x$with_toolchain_path" != x; then
16066    if test "x$TOOLCHAIN_PATH" = x; then
16067      TOOLCHAIN_PATH="$with_toolchain_path"
16068    else
16069      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16070    fi
16071  fi
16072
16073
16074fi
16075
16076
16077
16078# Check whether --with-extra-path was given.
16079if test "${with_extra_path+set}" = set; then :
16080  withval=$with_extra_path;
16081  if test "x$with_extra_path" != x; then
16082    if test "x$EXTRA_PATH" = x; then
16083      EXTRA_PATH="$with_extra_path"
16084    else
16085      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16086    fi
16087  fi
16088
16089
16090fi
16091
16092
16093  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16094    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16095    # If not, detect if Xcode is installed by running xcodebuild -version
16096    # if no Xcode installed, xcodebuild exits with 1
16097    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16098    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16099      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16100      # fall back on the stub binary in /usr/bin/xcodebuild
16101      # Extract the first word of "xcodebuild", so it can be a program name with args.
16102set dummy xcodebuild; ac_word=$2
16103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16104$as_echo_n "checking for $ac_word... " >&6; }
16105if ${ac_cv_path_XCODEBUILD+:} false; then :
16106  $as_echo_n "(cached) " >&6
16107else
16108  case $XCODEBUILD in
16109  [\\/]* | ?:[\\/]*)
16110  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16111  ;;
16112  *)
16113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16114for as_dir in $TOOLCHAIN_PATH
16115do
16116  IFS=$as_save_IFS
16117  test -z "$as_dir" && as_dir=.
16118    for ac_exec_ext in '' $ac_executable_extensions; do
16119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16120    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16122    break 2
16123  fi
16124done
16125  done
16126IFS=$as_save_IFS
16127
16128  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16129  ;;
16130esac
16131fi
16132XCODEBUILD=$ac_cv_path_XCODEBUILD
16133if test -n "$XCODEBUILD"; then
16134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16135$as_echo "$XCODEBUILD" >&6; }
16136else
16137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16138$as_echo "no" >&6; }
16139fi
16140
16141
16142    else
16143      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16144      # when only the command line tools are installed there are no SDKs, so headers
16145      # are copied into the system frameworks
16146      XCODEBUILD=
16147
16148    fi
16149
16150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16151$as_echo_n "checking for sdk name... " >&6; }
16152
16153# Check whether --with-sdk-name was given.
16154if test "${with_sdk_name+set}" = set; then :
16155  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16156
16157fi
16158
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16160$as_echo "$SDKNAME" >&6; }
16161
16162    # if toolchain path is specified then don't rely on system headers, they may not compile
16163    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16164    test -z "$TOOLCHAIN_PATH" && \
16165      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16166
16167    if test -z "$SYSROOT"; then
16168      if test -n "$XCODEBUILD"; then
16169        # if we don't have system headers, use default SDK name (last resort)
16170        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16171          SDKNAME=${SDKNAME:-macosx}
16172        fi
16173
16174        if test -n "$SDKNAME"; then
16175          # Call xcodebuild to determine SYSROOT
16176          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16177        fi
16178      else
16179        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16180          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
16181        fi
16182      fi
16183    else
16184      # warn user if --with-sdk-name was also set
16185      if test -n "$with_sdk_name"; then
16186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16187$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16188      fi
16189    fi
16190
16191    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16192      # If no system framework headers, then SYSROOT must be set, or we won't build
16193      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
16194    fi
16195
16196    # Perform a basic sanity test
16197    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16198      if test -z "$SYSROOT"; then
16199        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
16200      else
16201        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16202      fi
16203    fi
16204
16205    # set SDKROOT too, Xcode tools will pick it up
16206    SDKROOT=$SYSROOT
16207
16208  fi
16209
16210  # Prepend the extra path to the global path
16211
16212  if test "x$EXTRA_PATH" != x; then
16213    if test "x$PATH" = x; then
16214      PATH="$EXTRA_PATH"
16215    else
16216      PATH="$EXTRA_PATH:$PATH"
16217    fi
16218  fi
16219
16220
16221  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16222    # Add extra search paths on solaris for utilities like ar and as etc...
16223    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16224  fi
16225
16226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16227$as_echo_n "checking for sysroot... " >&6; }
16228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16229$as_echo "$SYSROOT" >&6; }
16230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16231$as_echo_n "checking for toolchain path... " >&6; }
16232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16233$as_echo "$TOOLCHAIN_PATH" >&6; }
16234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16235$as_echo_n "checking for extra path... " >&6; }
16236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16237$as_echo "$EXTRA_PATH" >&6; }
16238
16239
16240# To properly create a configuration name, we need to have the OpenJDK target
16241# and options (variants and debug level) parsed.
16242
16243
16244
16245# Check whether --with-conf-name was given.
16246if test "${with_conf_name+set}" = set; then :
16247  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16248fi
16249
16250
16251  # Test from where we are running configure, in or outside of src root.
16252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16253$as_echo_n "checking where to store configuration... " >&6; }
16254  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16255      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16256      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16257    # We are running configure from the src root.
16258    # Create a default ./build/target-variant-debuglevel output root.
16259    if test "x${CONF_NAME}" = x; then
16260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16261$as_echo "in default location" >&6; }
16262      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16263    else
16264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16265$as_echo "in build directory with custom name" >&6; }
16266    fi
16267    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16268    $MKDIR -p "$OUTPUT_ROOT"
16269    if test ! -d "$OUTPUT_ROOT"; then
16270      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16271    fi
16272  else
16273    # We are running configure from outside of the src dir.
16274    # Then use the current directory as output dir!
16275    # If configuration is situated in normal build directory, just use the build
16276    # directory name as configuration name, otherwise use the complete path.
16277    if test "x${CONF_NAME}" = x; then
16278      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16279    fi
16280    OUTPUT_ROOT="$CURDIR"
16281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16282$as_echo "in current directory" >&6; }
16283
16284    # WARNING: This might be a bad thing to do. You need to be sure you want to
16285    # have a configuration in this directory. Do some sanity checks!
16286
16287    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16288      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16289      # other files
16290      files_present=`$LS $OUTPUT_ROOT`
16291      # Configure has already touched config.log and confdefs.h in the current dir when this check
16292      # is performed.
16293      filtered_files=`$ECHO "$files_present" \
16294          | $SED -e 's/config.log//g' \
16295              -e 's/configure.log//g' \
16296              -e 's/confdefs.h//g' \
16297              -e 's/ //g' \
16298          | $TR -d '\n'`
16299      if test "x$filtered_files" != x; then
16300        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16301$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16302        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16303$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16304        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16305$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16306        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16307$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16308        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16309$as_echo "$as_me: seriously mess up just about everything." >&6;}
16310        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16311$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16312        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16313$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16314        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16315      fi
16316    fi
16317  fi
16318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16319$as_echo_n "checking what configuration name to use... " >&6; }
16320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16321$as_echo "$CONF_NAME" >&6; }
16322
16323
16324  # Only process if variable expands to non-empty
16325
16326  if test "x$OUTPUT_ROOT" != x; then
16327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16328
16329  # Input might be given as Windows format, start by converting to
16330  # unix format.
16331  path="$OUTPUT_ROOT"
16332  new_path=`$CYGPATH -u "$path"`
16333
16334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16337  # "foo.exe" is OK but "foo" is an error.
16338  #
16339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16340  # It is also a way to make sure we got the proper file name for the real test later on.
16341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16342  if test "x$test_shortpath" = x; then
16343    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16344$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16345    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16346  fi
16347
16348  # Call helper function which possibly converts this using DOS-style short mode.
16349  # If so, the updated path is stored in $new_path.
16350
16351  input_path="$new_path"
16352  # Check if we need to convert this using DOS-style short mode. If the path
16353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16354  # take no chances and rewrite it.
16355  # Note: m4 eats our [], so we need to use [ and ] instead.
16356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16357  if test "x$has_forbidden_chars" != x; then
16358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16362      # Going to short mode and back again did indeed matter. Since short mode is
16363      # case insensitive, let's make it lowercase to improve readability.
16364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16365      # Now convert it back to Unix-style (cygpath)
16366      input_path=`$CYGPATH -u "$shortmode_path"`
16367      new_path="$input_path"
16368    fi
16369  fi
16370
16371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16372  if test "x$test_cygdrive_prefix" = x; then
16373    # As a simple fix, exclude /usr/bin since it's not a real path.
16374    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16376      # a path prefixed by /cygdrive for fixpath to work.
16377      new_path="$CYGWIN_ROOT_PATH$input_path"
16378    fi
16379  fi
16380
16381
16382  if test "x$path" != "x$new_path"; then
16383    OUTPUT_ROOT="$new_path"
16384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16385$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16386  fi
16387
16388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16389
16390  path="$OUTPUT_ROOT"
16391  has_colon=`$ECHO $path | $GREP ^.:`
16392  new_path="$path"
16393  if test "x$has_colon" = x; then
16394    # Not in mixed or Windows style, start by that.
16395    new_path=`cmd //c echo $path`
16396  fi
16397
16398
16399  input_path="$new_path"
16400  # Check if we need to convert this using DOS-style short mode. If the path
16401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16402  # take no chances and rewrite it.
16403  # Note: m4 eats our [], so we need to use [ and ] instead.
16404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16405  if test "x$has_forbidden_chars" != x; then
16406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16408  fi
16409
16410
16411  windows_path="$new_path"
16412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16413    unix_path=`$CYGPATH -u "$windows_path"`
16414    new_path="$unix_path"
16415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16417    new_path="$unix_path"
16418  fi
16419
16420  if test "x$path" != "x$new_path"; then
16421    OUTPUT_ROOT="$new_path"
16422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16423$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16424  fi
16425
16426  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16427  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16428
16429    else
16430      # We're on a unix platform. Hooray! :)
16431      path="$OUTPUT_ROOT"
16432      has_space=`$ECHO "$path" | $GREP " "`
16433      if test "x$has_space" != x; then
16434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16435$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16436        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16437      fi
16438
16439      # Use eval to expand a potential ~
16440      eval path="$path"
16441      if test ! -f "$path" && test ! -d "$path"; then
16442        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16443      fi
16444
16445      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16446    fi
16447  fi
16448
16449
16450  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16451  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16452
16453  SPEC=$OUTPUT_ROOT/spec.gmk
16454
16455  CONF_NAME=$CONF_NAME
16456
16457  OUTPUT_ROOT=$OUTPUT_ROOT
16458
16459
16460
16461  # The spec.gmk file contains all variables for the make system.
16462  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16463
16464  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16465  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16466
16467  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16468  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16469
16470  # The compare.sh is used to compare the build output to other builds.
16471  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16472
16473  # The generated Makefile knows where the spec.gmk is and where the source is.
16474  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16475  # which will look for generated configurations
16476  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16477
16478
16479
16480# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16481
16482  for ac_prog in apt-get yum port pkgutil pkgadd
16483do
16484  # Extract the first word of "$ac_prog", so it can be a program name with args.
16485set dummy $ac_prog; ac_word=$2
16486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16487$as_echo_n "checking for $ac_word... " >&6; }
16488if ${ac_cv_prog_PKGHANDLER+:} false; then :
16489  $as_echo_n "(cached) " >&6
16490else
16491  if test -n "$PKGHANDLER"; then
16492  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16493else
16494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16495for as_dir in $PATH
16496do
16497  IFS=$as_save_IFS
16498  test -z "$as_dir" && as_dir=.
16499    for ac_exec_ext in '' $ac_executable_extensions; do
16500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16501    ac_cv_prog_PKGHANDLER="$ac_prog"
16502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16503    break 2
16504  fi
16505done
16506  done
16507IFS=$as_save_IFS
16508
16509fi
16510fi
16511PKGHANDLER=$ac_cv_prog_PKGHANDLER
16512if test -n "$PKGHANDLER"; then
16513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16514$as_echo "$PKGHANDLER" >&6; }
16515else
16516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16517$as_echo "no" >&6; }
16518fi
16519
16520
16521  test -n "$PKGHANDLER" && break
16522done
16523
16524
16525
16526# Setup tools that requires more complex handling, or that is not needed by the configure script.
16527
16528
16529
16530  # Publish this variable in the help.
16531
16532
16533  if [ -z "${MAKE+x}" ]; then
16534    # The variable is not set by user, try to locate tool using the code snippet
16535
16536    # Try our hardest to locate a correct version of GNU make
16537    for ac_prog in gmake
16538do
16539  # Extract the first word of "$ac_prog", so it can be a program name with args.
16540set dummy $ac_prog; ac_word=$2
16541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16542$as_echo_n "checking for $ac_word... " >&6; }
16543if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16544  $as_echo_n "(cached) " >&6
16545else
16546  case $CHECK_GMAKE in
16547  [\\/]* | ?:[\\/]*)
16548  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16549  ;;
16550  *)
16551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16552for as_dir in $PATH
16553do
16554  IFS=$as_save_IFS
16555  test -z "$as_dir" && as_dir=.
16556    for ac_exec_ext in '' $ac_executable_extensions; do
16557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16558    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16560    break 2
16561  fi
16562done
16563  done
16564IFS=$as_save_IFS
16565
16566  ;;
16567esac
16568fi
16569CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16570if test -n "$CHECK_GMAKE"; then
16571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16572$as_echo "$CHECK_GMAKE" >&6; }
16573else
16574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16575$as_echo "no" >&6; }
16576fi
16577
16578
16579  test -n "$CHECK_GMAKE" && break
16580done
16581
16582
16583  MAKE_CANDIDATE=""$CHECK_GMAKE""
16584  DESCRIPTION="gmake in PATH"
16585
16586  # On Cygwin, we require a newer version of make than on other platforms
16587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16588    MAKE_VERSION_EXPR="-e 4\."
16589    MAKE_REQUIRED_VERSION="4.0"
16590   else
16591    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16592    MAKE_REQUIRED_VERSION="3.81"
16593  fi
16594
16595  if test "x$MAKE_CANDIDATE" != x; then
16596    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16597$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16598    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16599    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16600    if test "x$IS_GNU_MAKE" = x; then
16601      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16602$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16603    else
16604      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16605      if test "x$IS_MODERN_MAKE" = x; then
16606        { $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
16607$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;}
16608      else
16609        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16610          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16611            MAKE_EXPECTED_ENV='cygwin'
16612          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16613            MAKE_EXPECTED_ENV='msys'
16614          else
16615            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16616          fi
16617          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16618          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16619        else
16620          # Not relevant for non-Windows
16621          IS_MAKE_CORRECT_ENV=true
16622        fi
16623        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16624          { $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
16625$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;}
16626        else
16627          FOUND_MAKE=$MAKE_CANDIDATE
16628
16629  # Only process if variable expands to non-empty
16630
16631  if test "x$FOUND_MAKE" != x; then
16632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16633
16634  # First separate the path from the arguments. This will split at the first
16635  # space.
16636  complete="$FOUND_MAKE"
16637  path="${complete%% *}"
16638  tmp="$complete EOL"
16639  arguments="${tmp#* }"
16640
16641  # Input might be given as Windows format, start by converting to
16642  # unix format.
16643  new_path=`$CYGPATH -u "$path"`
16644
16645  # Now try to locate executable using which
16646  new_path=`$WHICH "$new_path" 2> /dev/null`
16647  # bat and cmd files are not always considered executable in cygwin causing which
16648  # to not find them
16649  if test "x$new_path" = x \
16650      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16651      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16652    new_path=`$CYGPATH -u "$path"`
16653  fi
16654  if test "x$new_path" = x; then
16655    # Oops. Which didn't find the executable.
16656    # The splitting of arguments from the executable at a space might have been incorrect,
16657    # since paths with space are more likely in Windows. Give it another try with the whole
16658    # argument.
16659    path="$complete"
16660    arguments="EOL"
16661    new_path=`$CYGPATH -u "$path"`
16662    new_path=`$WHICH "$new_path" 2> /dev/null`
16663    # bat and cmd files are not always considered executable in cygwin causing which
16664    # to not find them
16665    if test "x$new_path" = x \
16666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16668      new_path=`$CYGPATH -u "$path"`
16669    fi
16670    if test "x$new_path" = x; then
16671      # It's still not found. Now this is an unrecoverable error.
16672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16673$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16674      has_space=`$ECHO "$complete" | $GREP " "`
16675      if test "x$has_space" != x; then
16676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16678      fi
16679      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16680    fi
16681  fi
16682
16683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16686  # "foo.exe" is OK but "foo" is an error.
16687  #
16688  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16689  # It is also a way to make sure we got the proper file name for the real test later on.
16690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16691  if test "x$test_shortpath" = x; then
16692    # Short path failed, file does not exist as specified.
16693    # Try adding .exe or .cmd
16694    if test -f "${new_path}.exe"; then
16695      input_to_shortpath="${new_path}.exe"
16696    elif test -f "${new_path}.cmd"; then
16697      input_to_shortpath="${new_path}.cmd"
16698    else
16699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16700$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16704    fi
16705  else
16706    input_to_shortpath="$new_path"
16707  fi
16708
16709  # Call helper function which possibly converts this using DOS-style short mode.
16710  # If so, the updated path is stored in $new_path.
16711  new_path="$input_to_shortpath"
16712
16713  input_path="$input_to_shortpath"
16714  # Check if we need to convert this using DOS-style short mode. If the path
16715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16716  # take no chances and rewrite it.
16717  # Note: m4 eats our [], so we need to use [ and ] instead.
16718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16719  if test "x$has_forbidden_chars" != x; then
16720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16724      # Going to short mode and back again did indeed matter. Since short mode is
16725      # case insensitive, let's make it lowercase to improve readability.
16726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16727      # Now convert it back to Unix-style (cygpath)
16728      input_path=`$CYGPATH -u "$shortmode_path"`
16729      new_path="$input_path"
16730    fi
16731  fi
16732
16733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16734  if test "x$test_cygdrive_prefix" = x; then
16735    # As a simple fix, exclude /usr/bin since it's not a real path.
16736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16738      # a path prefixed by /cygdrive for fixpath to work.
16739      new_path="$CYGWIN_ROOT_PATH$input_path"
16740    fi
16741  fi
16742
16743  # remove trailing .exe if any
16744  new_path="${new_path/%.exe/}"
16745
16746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16747
16748  # First separate the path from the arguments. This will split at the first
16749  # space.
16750  complete="$FOUND_MAKE"
16751  path="${complete%% *}"
16752  tmp="$complete EOL"
16753  arguments="${tmp#* }"
16754
16755  # Input might be given as Windows format, start by converting to
16756  # unix format.
16757  new_path="$path"
16758
16759  windows_path="$new_path"
16760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16761    unix_path=`$CYGPATH -u "$windows_path"`
16762    new_path="$unix_path"
16763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16765    new_path="$unix_path"
16766  fi
16767
16768
16769  # Now try to locate executable using which
16770  new_path=`$WHICH "$new_path" 2> /dev/null`
16771
16772  if test "x$new_path" = x; then
16773    # Oops. Which didn't find the executable.
16774    # The splitting of arguments from the executable at a space might have been incorrect,
16775    # since paths with space are more likely in Windows. Give it another try with the whole
16776    # argument.
16777    path="$complete"
16778    arguments="EOL"
16779    new_path="$path"
16780
16781  windows_path="$new_path"
16782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783    unix_path=`$CYGPATH -u "$windows_path"`
16784    new_path="$unix_path"
16785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16787    new_path="$unix_path"
16788  fi
16789
16790
16791    new_path=`$WHICH "$new_path" 2> /dev/null`
16792    # bat and cmd files are not always considered executable in MSYS causing which
16793    # to not find them
16794    if test "x$new_path" = x \
16795        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16796        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16797      new_path="$path"
16798
16799  windows_path="$new_path"
16800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16801    unix_path=`$CYGPATH -u "$windows_path"`
16802    new_path="$unix_path"
16803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16805    new_path="$unix_path"
16806  fi
16807
16808    fi
16809
16810    if test "x$new_path" = x; then
16811      # It's still not found. Now this is an unrecoverable error.
16812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16813$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16814      has_space=`$ECHO "$complete" | $GREP " "`
16815      if test "x$has_space" != x; then
16816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16818      fi
16819      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16820    fi
16821  fi
16822
16823  # Now new_path has a complete unix path to the binary
16824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16825    # Keep paths in /bin as-is, but remove trailing .exe if any
16826    new_path="${new_path/%.exe/}"
16827    # Do not save /bin paths to all_fixpath_prefixes!
16828  else
16829    # Not in mixed or Windows style, start by that.
16830    new_path=`cmd //c echo $new_path`
16831
16832  input_path="$new_path"
16833  # Check if we need to convert this using DOS-style short mode. If the path
16834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16835  # take no chances and rewrite it.
16836  # Note: m4 eats our [], so we need to use [ and ] instead.
16837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16838  if test "x$has_forbidden_chars" != x; then
16839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16841  fi
16842
16843    # Output is in $new_path
16844
16845  windows_path="$new_path"
16846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16847    unix_path=`$CYGPATH -u "$windows_path"`
16848    new_path="$unix_path"
16849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16851    new_path="$unix_path"
16852  fi
16853
16854    # remove trailing .exe if any
16855    new_path="${new_path/%.exe/}"
16856
16857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16859  fi
16860
16861    else
16862      # We're on a unix platform. Hooray! :)
16863      # First separate the path from the arguments. This will split at the first
16864      # space.
16865      complete="$FOUND_MAKE"
16866      path="${complete%% *}"
16867      tmp="$complete EOL"
16868      arguments="${tmp#* }"
16869
16870      # Cannot rely on the command "which" here since it doesn't always work.
16871      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16872      if test -z "$is_absolute_path"; then
16873        # Path to executable is not absolute. Find it.
16874        IFS_save="$IFS"
16875        IFS=:
16876        for p in $PATH; do
16877          if test -f "$p/$path" && test -x "$p/$path"; then
16878            new_path="$p/$path"
16879            break
16880          fi
16881        done
16882        IFS="$IFS_save"
16883      else
16884        # This is an absolute path, we can use it without further modifications.
16885        new_path="$path"
16886      fi
16887
16888      if test "x$new_path" = x; then
16889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16890$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16891        has_space=`$ECHO "$complete" | $GREP " "`
16892        if test "x$has_space" != x; then
16893          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16894$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16895        fi
16896        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16897      fi
16898    fi
16899
16900    # Now join together the path and the arguments once again
16901    if test "x$arguments" != xEOL; then
16902      new_complete="$new_path ${arguments% *}"
16903    else
16904      new_complete="$new_path"
16905    fi
16906
16907    if test "x$complete" != "x$new_complete"; then
16908      FOUND_MAKE="$new_complete"
16909      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16910$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16911    fi
16912  fi
16913
16914        fi
16915      fi
16916    fi
16917  fi
16918
16919
16920    if test "x$FOUND_MAKE" = x; then
16921      for ac_prog in make
16922do
16923  # Extract the first word of "$ac_prog", so it can be a program name with args.
16924set dummy $ac_prog; ac_word=$2
16925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16926$as_echo_n "checking for $ac_word... " >&6; }
16927if ${ac_cv_path_CHECK_MAKE+:} false; then :
16928  $as_echo_n "(cached) " >&6
16929else
16930  case $CHECK_MAKE in
16931  [\\/]* | ?:[\\/]*)
16932  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16933  ;;
16934  *)
16935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16936for as_dir in $PATH
16937do
16938  IFS=$as_save_IFS
16939  test -z "$as_dir" && as_dir=.
16940    for ac_exec_ext in '' $ac_executable_extensions; do
16941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16942    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16944    break 2
16945  fi
16946done
16947  done
16948IFS=$as_save_IFS
16949
16950  ;;
16951esac
16952fi
16953CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16954if test -n "$CHECK_MAKE"; then
16955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16956$as_echo "$CHECK_MAKE" >&6; }
16957else
16958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16959$as_echo "no" >&6; }
16960fi
16961
16962
16963  test -n "$CHECK_MAKE" && break
16964done
16965
16966
16967  MAKE_CANDIDATE=""$CHECK_MAKE""
16968  DESCRIPTION="make in PATH"
16969
16970  # On Cygwin, we require a newer version of make than on other platforms
16971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16972    MAKE_VERSION_EXPR="-e 4\."
16973    MAKE_REQUIRED_VERSION="4.0"
16974   else
16975    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16976    MAKE_REQUIRED_VERSION="3.81"
16977  fi
16978
16979  if test "x$MAKE_CANDIDATE" != x; then
16980    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16981$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16982    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16983    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16984    if test "x$IS_GNU_MAKE" = x; then
16985      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16986$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16987    else
16988      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16989      if test "x$IS_MODERN_MAKE" = x; then
16990        { $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
16991$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;}
16992      else
16993        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16994          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16995            MAKE_EXPECTED_ENV='cygwin'
16996          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16997            MAKE_EXPECTED_ENV='msys'
16998          else
16999            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17000          fi
17001          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17002          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17003        else
17004          # Not relevant for non-Windows
17005          IS_MAKE_CORRECT_ENV=true
17006        fi
17007        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17008          { $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
17009$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;}
17010        else
17011          FOUND_MAKE=$MAKE_CANDIDATE
17012
17013  # Only process if variable expands to non-empty
17014
17015  if test "x$FOUND_MAKE" != x; then
17016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17017
17018  # First separate the path from the arguments. This will split at the first
17019  # space.
17020  complete="$FOUND_MAKE"
17021  path="${complete%% *}"
17022  tmp="$complete EOL"
17023  arguments="${tmp#* }"
17024
17025  # Input might be given as Windows format, start by converting to
17026  # unix format.
17027  new_path=`$CYGPATH -u "$path"`
17028
17029  # Now try to locate executable using which
17030  new_path=`$WHICH "$new_path" 2> /dev/null`
17031  # bat and cmd files are not always considered executable in cygwin causing which
17032  # to not find them
17033  if test "x$new_path" = x \
17034      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17035      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17036    new_path=`$CYGPATH -u "$path"`
17037  fi
17038  if test "x$new_path" = x; then
17039    # Oops. Which didn't find the executable.
17040    # The splitting of arguments from the executable at a space might have been incorrect,
17041    # since paths with space are more likely in Windows. Give it another try with the whole
17042    # argument.
17043    path="$complete"
17044    arguments="EOL"
17045    new_path=`$CYGPATH -u "$path"`
17046    new_path=`$WHICH "$new_path" 2> /dev/null`
17047    # bat and cmd files are not always considered executable in cygwin causing which
17048    # to not find them
17049    if test "x$new_path" = x \
17050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17052      new_path=`$CYGPATH -u "$path"`
17053    fi
17054    if test "x$new_path" = x; then
17055      # It's still not found. Now this is an unrecoverable error.
17056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17057$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17058      has_space=`$ECHO "$complete" | $GREP " "`
17059      if test "x$has_space" != x; then
17060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17062      fi
17063      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17064    fi
17065  fi
17066
17067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17070  # "foo.exe" is OK but "foo" is an error.
17071  #
17072  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17073  # It is also a way to make sure we got the proper file name for the real test later on.
17074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17075  if test "x$test_shortpath" = x; then
17076    # Short path failed, file does not exist as specified.
17077    # Try adding .exe or .cmd
17078    if test -f "${new_path}.exe"; then
17079      input_to_shortpath="${new_path}.exe"
17080    elif test -f "${new_path}.cmd"; then
17081      input_to_shortpath="${new_path}.cmd"
17082    else
17083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17084$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17087      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17088    fi
17089  else
17090    input_to_shortpath="$new_path"
17091  fi
17092
17093  # Call helper function which possibly converts this using DOS-style short mode.
17094  # If so, the updated path is stored in $new_path.
17095  new_path="$input_to_shortpath"
17096
17097  input_path="$input_to_shortpath"
17098  # Check if we need to convert this using DOS-style short mode. If the path
17099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17100  # take no chances and rewrite it.
17101  # Note: m4 eats our [], so we need to use [ and ] instead.
17102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17103  if test "x$has_forbidden_chars" != x; then
17104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17108      # Going to short mode and back again did indeed matter. Since short mode is
17109      # case insensitive, let's make it lowercase to improve readability.
17110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17111      # Now convert it back to Unix-style (cygpath)
17112      input_path=`$CYGPATH -u "$shortmode_path"`
17113      new_path="$input_path"
17114    fi
17115  fi
17116
17117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17118  if test "x$test_cygdrive_prefix" = x; then
17119    # As a simple fix, exclude /usr/bin since it's not a real path.
17120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17122      # a path prefixed by /cygdrive for fixpath to work.
17123      new_path="$CYGWIN_ROOT_PATH$input_path"
17124    fi
17125  fi
17126
17127  # remove trailing .exe if any
17128  new_path="${new_path/%.exe/}"
17129
17130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17131
17132  # First separate the path from the arguments. This will split at the first
17133  # space.
17134  complete="$FOUND_MAKE"
17135  path="${complete%% *}"
17136  tmp="$complete EOL"
17137  arguments="${tmp#* }"
17138
17139  # Input might be given as Windows format, start by converting to
17140  # unix format.
17141  new_path="$path"
17142
17143  windows_path="$new_path"
17144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17145    unix_path=`$CYGPATH -u "$windows_path"`
17146    new_path="$unix_path"
17147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17149    new_path="$unix_path"
17150  fi
17151
17152
17153  # Now try to locate executable using which
17154  new_path=`$WHICH "$new_path" 2> /dev/null`
17155
17156  if test "x$new_path" = x; then
17157    # Oops. Which didn't find the executable.
17158    # The splitting of arguments from the executable at a space might have been incorrect,
17159    # since paths with space are more likely in Windows. Give it another try with the whole
17160    # argument.
17161    path="$complete"
17162    arguments="EOL"
17163    new_path="$path"
17164
17165  windows_path="$new_path"
17166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17167    unix_path=`$CYGPATH -u "$windows_path"`
17168    new_path="$unix_path"
17169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17171    new_path="$unix_path"
17172  fi
17173
17174
17175    new_path=`$WHICH "$new_path" 2> /dev/null`
17176    # bat and cmd files are not always considered executable in MSYS causing which
17177    # to not find them
17178    if test "x$new_path" = x \
17179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17181      new_path="$path"
17182
17183  windows_path="$new_path"
17184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17185    unix_path=`$CYGPATH -u "$windows_path"`
17186    new_path="$unix_path"
17187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17189    new_path="$unix_path"
17190  fi
17191
17192    fi
17193
17194    if test "x$new_path" = x; then
17195      # It's still not found. Now this is an unrecoverable error.
17196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17197$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17198      has_space=`$ECHO "$complete" | $GREP " "`
17199      if test "x$has_space" != x; then
17200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17202      fi
17203      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17204    fi
17205  fi
17206
17207  # Now new_path has a complete unix path to the binary
17208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17209    # Keep paths in /bin as-is, but remove trailing .exe if any
17210    new_path="${new_path/%.exe/}"
17211    # Do not save /bin paths to all_fixpath_prefixes!
17212  else
17213    # Not in mixed or Windows style, start by that.
17214    new_path=`cmd //c echo $new_path`
17215
17216  input_path="$new_path"
17217  # Check if we need to convert this using DOS-style short mode. If the path
17218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17219  # take no chances and rewrite it.
17220  # Note: m4 eats our [], so we need to use [ and ] instead.
17221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17222  if test "x$has_forbidden_chars" != x; then
17223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17225  fi
17226
17227    # Output is in $new_path
17228
17229  windows_path="$new_path"
17230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17231    unix_path=`$CYGPATH -u "$windows_path"`
17232    new_path="$unix_path"
17233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17235    new_path="$unix_path"
17236  fi
17237
17238    # remove trailing .exe if any
17239    new_path="${new_path/%.exe/}"
17240
17241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17243  fi
17244
17245    else
17246      # We're on a unix platform. Hooray! :)
17247      # First separate the path from the arguments. This will split at the first
17248      # space.
17249      complete="$FOUND_MAKE"
17250      path="${complete%% *}"
17251      tmp="$complete EOL"
17252      arguments="${tmp#* }"
17253
17254      # Cannot rely on the command "which" here since it doesn't always work.
17255      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17256      if test -z "$is_absolute_path"; then
17257        # Path to executable is not absolute. Find it.
17258        IFS_save="$IFS"
17259        IFS=:
17260        for p in $PATH; do
17261          if test -f "$p/$path" && test -x "$p/$path"; then
17262            new_path="$p/$path"
17263            break
17264          fi
17265        done
17266        IFS="$IFS_save"
17267      else
17268        # This is an absolute path, we can use it without further modifications.
17269        new_path="$path"
17270      fi
17271
17272      if test "x$new_path" = x; then
17273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17275        has_space=`$ECHO "$complete" | $GREP " "`
17276        if test "x$has_space" != x; then
17277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17279        fi
17280        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17281      fi
17282    fi
17283
17284    # Now join together the path and the arguments once again
17285    if test "x$arguments" != xEOL; then
17286      new_complete="$new_path ${arguments% *}"
17287    else
17288      new_complete="$new_path"
17289    fi
17290
17291    if test "x$complete" != "x$new_complete"; then
17292      FOUND_MAKE="$new_complete"
17293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17294$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17295    fi
17296  fi
17297
17298        fi
17299      fi
17300    fi
17301  fi
17302
17303    fi
17304
17305    if test "x$FOUND_MAKE" = x; then
17306      if test "x$TOOLCHAIN_PATH" != x; then
17307        # We have a toolchain path, check that as well before giving up.
17308        OLD_PATH=$PATH
17309        PATH=$TOOLCHAIN_PATH:$PATH
17310        for ac_prog in gmake
17311do
17312  # Extract the first word of "$ac_prog", so it can be a program name with args.
17313set dummy $ac_prog; ac_word=$2
17314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17315$as_echo_n "checking for $ac_word... " >&6; }
17316if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17317  $as_echo_n "(cached) " >&6
17318else
17319  case $CHECK_TOOLSDIR_GMAKE in
17320  [\\/]* | ?:[\\/]*)
17321  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17322  ;;
17323  *)
17324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17325for as_dir in $PATH
17326do
17327  IFS=$as_save_IFS
17328  test -z "$as_dir" && as_dir=.
17329    for ac_exec_ext in '' $ac_executable_extensions; do
17330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17331    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17333    break 2
17334  fi
17335done
17336  done
17337IFS=$as_save_IFS
17338
17339  ;;
17340esac
17341fi
17342CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17343if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17345$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17346else
17347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348$as_echo "no" >&6; }
17349fi
17350
17351
17352  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17353done
17354
17355
17356  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17357  DESCRIPTION="gmake in tools-dir"
17358
17359  # On Cygwin, we require a newer version of make than on other platforms
17360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17361    MAKE_VERSION_EXPR="-e 4\."
17362    MAKE_REQUIRED_VERSION="4.0"
17363   else
17364    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17365    MAKE_REQUIRED_VERSION="3.81"
17366  fi
17367
17368  if test "x$MAKE_CANDIDATE" != x; then
17369    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17370$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17371    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17372    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17373    if test "x$IS_GNU_MAKE" = x; then
17374      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17375$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17376    else
17377      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17378      if test "x$IS_MODERN_MAKE" = x; then
17379        { $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
17380$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;}
17381      else
17382        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17383          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17384            MAKE_EXPECTED_ENV='cygwin'
17385          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17386            MAKE_EXPECTED_ENV='msys'
17387          else
17388            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17389          fi
17390          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17391          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17392        else
17393          # Not relevant for non-Windows
17394          IS_MAKE_CORRECT_ENV=true
17395        fi
17396        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17397          { $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
17398$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;}
17399        else
17400          FOUND_MAKE=$MAKE_CANDIDATE
17401
17402  # Only process if variable expands to non-empty
17403
17404  if test "x$FOUND_MAKE" != x; then
17405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17406
17407  # First separate the path from the arguments. This will split at the first
17408  # space.
17409  complete="$FOUND_MAKE"
17410  path="${complete%% *}"
17411  tmp="$complete EOL"
17412  arguments="${tmp#* }"
17413
17414  # Input might be given as Windows format, start by converting to
17415  # unix format.
17416  new_path=`$CYGPATH -u "$path"`
17417
17418  # Now try to locate executable using which
17419  new_path=`$WHICH "$new_path" 2> /dev/null`
17420  # bat and cmd files are not always considered executable in cygwin causing which
17421  # to not find them
17422  if test "x$new_path" = x \
17423      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17424      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17425    new_path=`$CYGPATH -u "$path"`
17426  fi
17427  if test "x$new_path" = x; then
17428    # Oops. Which didn't find the executable.
17429    # The splitting of arguments from the executable at a space might have been incorrect,
17430    # since paths with space are more likely in Windows. Give it another try with the whole
17431    # argument.
17432    path="$complete"
17433    arguments="EOL"
17434    new_path=`$CYGPATH -u "$path"`
17435    new_path=`$WHICH "$new_path" 2> /dev/null`
17436    # bat and cmd files are not always considered executable in cygwin causing which
17437    # to not find them
17438    if test "x$new_path" = x \
17439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17441      new_path=`$CYGPATH -u "$path"`
17442    fi
17443    if test "x$new_path" = x; then
17444      # It's still not found. Now this is an unrecoverable error.
17445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17447      has_space=`$ECHO "$complete" | $GREP " "`
17448      if test "x$has_space" != x; then
17449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17451      fi
17452      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17453    fi
17454  fi
17455
17456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17459  # "foo.exe" is OK but "foo" is an error.
17460  #
17461  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17462  # It is also a way to make sure we got the proper file name for the real test later on.
17463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17464  if test "x$test_shortpath" = x; then
17465    # Short path failed, file does not exist as specified.
17466    # Try adding .exe or .cmd
17467    if test -f "${new_path}.exe"; then
17468      input_to_shortpath="${new_path}.exe"
17469    elif test -f "${new_path}.cmd"; then
17470      input_to_shortpath="${new_path}.cmd"
17471    else
17472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17473$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17477    fi
17478  else
17479    input_to_shortpath="$new_path"
17480  fi
17481
17482  # Call helper function which possibly converts this using DOS-style short mode.
17483  # If so, the updated path is stored in $new_path.
17484  new_path="$input_to_shortpath"
17485
17486  input_path="$input_to_shortpath"
17487  # Check if we need to convert this using DOS-style short mode. If the path
17488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17489  # take no chances and rewrite it.
17490  # Note: m4 eats our [], so we need to use [ and ] instead.
17491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17492  if test "x$has_forbidden_chars" != x; then
17493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17497      # Going to short mode and back again did indeed matter. Since short mode is
17498      # case insensitive, let's make it lowercase to improve readability.
17499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17500      # Now convert it back to Unix-style (cygpath)
17501      input_path=`$CYGPATH -u "$shortmode_path"`
17502      new_path="$input_path"
17503    fi
17504  fi
17505
17506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17507  if test "x$test_cygdrive_prefix" = x; then
17508    # As a simple fix, exclude /usr/bin since it's not a real path.
17509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17511      # a path prefixed by /cygdrive for fixpath to work.
17512      new_path="$CYGWIN_ROOT_PATH$input_path"
17513    fi
17514  fi
17515
17516  # remove trailing .exe if any
17517  new_path="${new_path/%.exe/}"
17518
17519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17520
17521  # First separate the path from the arguments. This will split at the first
17522  # space.
17523  complete="$FOUND_MAKE"
17524  path="${complete%% *}"
17525  tmp="$complete EOL"
17526  arguments="${tmp#* }"
17527
17528  # Input might be given as Windows format, start by converting to
17529  # unix format.
17530  new_path="$path"
17531
17532  windows_path="$new_path"
17533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17534    unix_path=`$CYGPATH -u "$windows_path"`
17535    new_path="$unix_path"
17536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17538    new_path="$unix_path"
17539  fi
17540
17541
17542  # Now try to locate executable using which
17543  new_path=`$WHICH "$new_path" 2> /dev/null`
17544
17545  if test "x$new_path" = x; then
17546    # Oops. Which didn't find the executable.
17547    # The splitting of arguments from the executable at a space might have been incorrect,
17548    # since paths with space are more likely in Windows. Give it another try with the whole
17549    # argument.
17550    path="$complete"
17551    arguments="EOL"
17552    new_path="$path"
17553
17554  windows_path="$new_path"
17555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17556    unix_path=`$CYGPATH -u "$windows_path"`
17557    new_path="$unix_path"
17558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17560    new_path="$unix_path"
17561  fi
17562
17563
17564    new_path=`$WHICH "$new_path" 2> /dev/null`
17565    # bat and cmd files are not always considered executable in MSYS causing which
17566    # to not find them
17567    if test "x$new_path" = x \
17568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17570      new_path="$path"
17571
17572  windows_path="$new_path"
17573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17574    unix_path=`$CYGPATH -u "$windows_path"`
17575    new_path="$unix_path"
17576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17578    new_path="$unix_path"
17579  fi
17580
17581    fi
17582
17583    if test "x$new_path" = x; then
17584      # It's still not found. Now this is an unrecoverable error.
17585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17586$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17587      has_space=`$ECHO "$complete" | $GREP " "`
17588      if test "x$has_space" != x; then
17589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17591      fi
17592      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17593    fi
17594  fi
17595
17596  # Now new_path has a complete unix path to the binary
17597  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17598    # Keep paths in /bin as-is, but remove trailing .exe if any
17599    new_path="${new_path/%.exe/}"
17600    # Do not save /bin paths to all_fixpath_prefixes!
17601  else
17602    # Not in mixed or Windows style, start by that.
17603    new_path=`cmd //c echo $new_path`
17604
17605  input_path="$new_path"
17606  # Check if we need to convert this using DOS-style short mode. If the path
17607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17608  # take no chances and rewrite it.
17609  # Note: m4 eats our [], so we need to use [ and ] instead.
17610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17611  if test "x$has_forbidden_chars" != x; then
17612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17614  fi
17615
17616    # Output is in $new_path
17617
17618  windows_path="$new_path"
17619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17620    unix_path=`$CYGPATH -u "$windows_path"`
17621    new_path="$unix_path"
17622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17624    new_path="$unix_path"
17625  fi
17626
17627    # remove trailing .exe if any
17628    new_path="${new_path/%.exe/}"
17629
17630    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17631    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17632  fi
17633
17634    else
17635      # We're on a unix platform. Hooray! :)
17636      # First separate the path from the arguments. This will split at the first
17637      # space.
17638      complete="$FOUND_MAKE"
17639      path="${complete%% *}"
17640      tmp="$complete EOL"
17641      arguments="${tmp#* }"
17642
17643      # Cannot rely on the command "which" here since it doesn't always work.
17644      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17645      if test -z "$is_absolute_path"; then
17646        # Path to executable is not absolute. Find it.
17647        IFS_save="$IFS"
17648        IFS=:
17649        for p in $PATH; do
17650          if test -f "$p/$path" && test -x "$p/$path"; then
17651            new_path="$p/$path"
17652            break
17653          fi
17654        done
17655        IFS="$IFS_save"
17656      else
17657        # This is an absolute path, we can use it without further modifications.
17658        new_path="$path"
17659      fi
17660
17661      if test "x$new_path" = x; then
17662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17663$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17664        has_space=`$ECHO "$complete" | $GREP " "`
17665        if test "x$has_space" != x; then
17666          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17668        fi
17669        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17670      fi
17671    fi
17672
17673    # Now join together the path and the arguments once again
17674    if test "x$arguments" != xEOL; then
17675      new_complete="$new_path ${arguments% *}"
17676    else
17677      new_complete="$new_path"
17678    fi
17679
17680    if test "x$complete" != "x$new_complete"; then
17681      FOUND_MAKE="$new_complete"
17682      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17683$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17684    fi
17685  fi
17686
17687        fi
17688      fi
17689    fi
17690  fi
17691
17692        if test "x$FOUND_MAKE" = x; then
17693          for ac_prog in make
17694do
17695  # Extract the first word of "$ac_prog", so it can be a program name with args.
17696set dummy $ac_prog; ac_word=$2
17697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17698$as_echo_n "checking for $ac_word... " >&6; }
17699if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17700  $as_echo_n "(cached) " >&6
17701else
17702  case $CHECK_TOOLSDIR_MAKE in
17703  [\\/]* | ?:[\\/]*)
17704  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17705  ;;
17706  *)
17707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17708for as_dir in $PATH
17709do
17710  IFS=$as_save_IFS
17711  test -z "$as_dir" && as_dir=.
17712    for ac_exec_ext in '' $ac_executable_extensions; do
17713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17714    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17716    break 2
17717  fi
17718done
17719  done
17720IFS=$as_save_IFS
17721
17722  ;;
17723esac
17724fi
17725CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17726if test -n "$CHECK_TOOLSDIR_MAKE"; then
17727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17728$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17729else
17730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17731$as_echo "no" >&6; }
17732fi
17733
17734
17735  test -n "$CHECK_TOOLSDIR_MAKE" && break
17736done
17737
17738
17739  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17740  DESCRIPTION="make in tools-dir"
17741
17742  # On Cygwin, we require a newer version of make than on other platforms
17743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17744    MAKE_VERSION_EXPR="-e 4\."
17745    MAKE_REQUIRED_VERSION="4.0"
17746   else
17747    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17748    MAKE_REQUIRED_VERSION="3.81"
17749  fi
17750
17751  if test "x$MAKE_CANDIDATE" != x; then
17752    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17753$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17754    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17755    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17756    if test "x$IS_GNU_MAKE" = x; then
17757      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17758$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17759    else
17760      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17761      if test "x$IS_MODERN_MAKE" = x; then
17762        { $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
17763$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;}
17764      else
17765        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17766          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17767            MAKE_EXPECTED_ENV='cygwin'
17768          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17769            MAKE_EXPECTED_ENV='msys'
17770          else
17771            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17772          fi
17773          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17774          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17775        else
17776          # Not relevant for non-Windows
17777          IS_MAKE_CORRECT_ENV=true
17778        fi
17779        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17780          { $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
17781$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;}
17782        else
17783          FOUND_MAKE=$MAKE_CANDIDATE
17784
17785  # Only process if variable expands to non-empty
17786
17787  if test "x$FOUND_MAKE" != x; then
17788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17789
17790  # First separate the path from the arguments. This will split at the first
17791  # space.
17792  complete="$FOUND_MAKE"
17793  path="${complete%% *}"
17794  tmp="$complete EOL"
17795  arguments="${tmp#* }"
17796
17797  # Input might be given as Windows format, start by converting to
17798  # unix format.
17799  new_path=`$CYGPATH -u "$path"`
17800
17801  # Now try to locate executable using which
17802  new_path=`$WHICH "$new_path" 2> /dev/null`
17803  # bat and cmd files are not always considered executable in cygwin causing which
17804  # to not find them
17805  if test "x$new_path" = x \
17806      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17807      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17808    new_path=`$CYGPATH -u "$path"`
17809  fi
17810  if test "x$new_path" = x; then
17811    # Oops. Which didn't find the executable.
17812    # The splitting of arguments from the executable at a space might have been incorrect,
17813    # since paths with space are more likely in Windows. Give it another try with the whole
17814    # argument.
17815    path="$complete"
17816    arguments="EOL"
17817    new_path=`$CYGPATH -u "$path"`
17818    new_path=`$WHICH "$new_path" 2> /dev/null`
17819    # bat and cmd files are not always considered executable in cygwin causing which
17820    # to not find them
17821    if test "x$new_path" = x \
17822        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17823        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17824      new_path=`$CYGPATH -u "$path"`
17825    fi
17826    if test "x$new_path" = x; then
17827      # It's still not found. Now this is an unrecoverable error.
17828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17829$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17830      has_space=`$ECHO "$complete" | $GREP " "`
17831      if test "x$has_space" != x; then
17832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17834      fi
17835      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17836    fi
17837  fi
17838
17839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17842  # "foo.exe" is OK but "foo" is an error.
17843  #
17844  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17845  # It is also a way to make sure we got the proper file name for the real test later on.
17846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17847  if test "x$test_shortpath" = x; then
17848    # Short path failed, file does not exist as specified.
17849    # Try adding .exe or .cmd
17850    if test -f "${new_path}.exe"; then
17851      input_to_shortpath="${new_path}.exe"
17852    elif test -f "${new_path}.cmd"; then
17853      input_to_shortpath="${new_path}.cmd"
17854    else
17855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17859      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17860    fi
17861  else
17862    input_to_shortpath="$new_path"
17863  fi
17864
17865  # Call helper function which possibly converts this using DOS-style short mode.
17866  # If so, the updated path is stored in $new_path.
17867  new_path="$input_to_shortpath"
17868
17869  input_path="$input_to_shortpath"
17870  # Check if we need to convert this using DOS-style short mode. If the path
17871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17872  # take no chances and rewrite it.
17873  # Note: m4 eats our [], so we need to use [ and ] instead.
17874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17875  if test "x$has_forbidden_chars" != x; then
17876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17880      # Going to short mode and back again did indeed matter. Since short mode is
17881      # case insensitive, let's make it lowercase to improve readability.
17882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17883      # Now convert it back to Unix-style (cygpath)
17884      input_path=`$CYGPATH -u "$shortmode_path"`
17885      new_path="$input_path"
17886    fi
17887  fi
17888
17889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17890  if test "x$test_cygdrive_prefix" = x; then
17891    # As a simple fix, exclude /usr/bin since it's not a real path.
17892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17894      # a path prefixed by /cygdrive for fixpath to work.
17895      new_path="$CYGWIN_ROOT_PATH$input_path"
17896    fi
17897  fi
17898
17899  # remove trailing .exe if any
17900  new_path="${new_path/%.exe/}"
17901
17902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17903
17904  # First separate the path from the arguments. This will split at the first
17905  # space.
17906  complete="$FOUND_MAKE"
17907  path="${complete%% *}"
17908  tmp="$complete EOL"
17909  arguments="${tmp#* }"
17910
17911  # Input might be given as Windows format, start by converting to
17912  # unix format.
17913  new_path="$path"
17914
17915  windows_path="$new_path"
17916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17917    unix_path=`$CYGPATH -u "$windows_path"`
17918    new_path="$unix_path"
17919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17921    new_path="$unix_path"
17922  fi
17923
17924
17925  # Now try to locate executable using which
17926  new_path=`$WHICH "$new_path" 2> /dev/null`
17927
17928  if test "x$new_path" = x; then
17929    # Oops. Which didn't find the executable.
17930    # The splitting of arguments from the executable at a space might have been incorrect,
17931    # since paths with space are more likely in Windows. Give it another try with the whole
17932    # argument.
17933    path="$complete"
17934    arguments="EOL"
17935    new_path="$path"
17936
17937  windows_path="$new_path"
17938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17939    unix_path=`$CYGPATH -u "$windows_path"`
17940    new_path="$unix_path"
17941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17943    new_path="$unix_path"
17944  fi
17945
17946
17947    new_path=`$WHICH "$new_path" 2> /dev/null`
17948    # bat and cmd files are not always considered executable in MSYS causing which
17949    # to not find them
17950    if test "x$new_path" = x \
17951        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17952        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17953      new_path="$path"
17954
17955  windows_path="$new_path"
17956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17957    unix_path=`$CYGPATH -u "$windows_path"`
17958    new_path="$unix_path"
17959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17961    new_path="$unix_path"
17962  fi
17963
17964    fi
17965
17966    if test "x$new_path" = x; then
17967      # It's still not found. Now this is an unrecoverable error.
17968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17969$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17970      has_space=`$ECHO "$complete" | $GREP " "`
17971      if test "x$has_space" != x; then
17972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17974      fi
17975      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17976    fi
17977  fi
17978
17979  # Now new_path has a complete unix path to the binary
17980  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17981    # Keep paths in /bin as-is, but remove trailing .exe if any
17982    new_path="${new_path/%.exe/}"
17983    # Do not save /bin paths to all_fixpath_prefixes!
17984  else
17985    # Not in mixed or Windows style, start by that.
17986    new_path=`cmd //c echo $new_path`
17987
17988  input_path="$new_path"
17989  # Check if we need to convert this using DOS-style short mode. If the path
17990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17991  # take no chances and rewrite it.
17992  # Note: m4 eats our [], so we need to use [ and ] instead.
17993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17994  if test "x$has_forbidden_chars" != x; then
17995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17997  fi
17998
17999    # Output is in $new_path
18000
18001  windows_path="$new_path"
18002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18003    unix_path=`$CYGPATH -u "$windows_path"`
18004    new_path="$unix_path"
18005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18007    new_path="$unix_path"
18008  fi
18009
18010    # remove trailing .exe if any
18011    new_path="${new_path/%.exe/}"
18012
18013    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18014    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18015  fi
18016
18017    else
18018      # We're on a unix platform. Hooray! :)
18019      # First separate the path from the arguments. This will split at the first
18020      # space.
18021      complete="$FOUND_MAKE"
18022      path="${complete%% *}"
18023      tmp="$complete EOL"
18024      arguments="${tmp#* }"
18025
18026      # Cannot rely on the command "which" here since it doesn't always work.
18027      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18028      if test -z "$is_absolute_path"; then
18029        # Path to executable is not absolute. Find it.
18030        IFS_save="$IFS"
18031        IFS=:
18032        for p in $PATH; do
18033          if test -f "$p/$path" && test -x "$p/$path"; then
18034            new_path="$p/$path"
18035            break
18036          fi
18037        done
18038        IFS="$IFS_save"
18039      else
18040        # This is an absolute path, we can use it without further modifications.
18041        new_path="$path"
18042      fi
18043
18044      if test "x$new_path" = x; then
18045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18046$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18047        has_space=`$ECHO "$complete" | $GREP " "`
18048        if test "x$has_space" != x; then
18049          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18050$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18051        fi
18052        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18053      fi
18054    fi
18055
18056    # Now join together the path and the arguments once again
18057    if test "x$arguments" != xEOL; then
18058      new_complete="$new_path ${arguments% *}"
18059    else
18060      new_complete="$new_path"
18061    fi
18062
18063    if test "x$complete" != "x$new_complete"; then
18064      FOUND_MAKE="$new_complete"
18065      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18066$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18067    fi
18068  fi
18069
18070        fi
18071      fi
18072    fi
18073  fi
18074
18075        fi
18076        PATH=$OLD_PATH
18077      fi
18078    fi
18079
18080    if test "x$FOUND_MAKE" = x; then
18081      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
18082    fi
18083
18084  else
18085    # The variable is set, but is it from the command line or the environment?
18086
18087    # Try to remove the string !MAKE! from our list.
18088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18090      # If it failed, the variable was not from the command line. Ignore it,
18091      # but warn the user (except for BASH, which is always set by the calling BASH).
18092      if test "xMAKE" != xBASH; then
18093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18094$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18095      fi
18096      # Try to locate tool using the code snippet
18097
18098    # Try our hardest to locate a correct version of GNU make
18099    for ac_prog in gmake
18100do
18101  # Extract the first word of "$ac_prog", so it can be a program name with args.
18102set dummy $ac_prog; ac_word=$2
18103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18104$as_echo_n "checking for $ac_word... " >&6; }
18105if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18106  $as_echo_n "(cached) " >&6
18107else
18108  case $CHECK_GMAKE in
18109  [\\/]* | ?:[\\/]*)
18110  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18111  ;;
18112  *)
18113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18114for as_dir in $PATH
18115do
18116  IFS=$as_save_IFS
18117  test -z "$as_dir" && as_dir=.
18118    for ac_exec_ext in '' $ac_executable_extensions; do
18119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18120    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18122    break 2
18123  fi
18124done
18125  done
18126IFS=$as_save_IFS
18127
18128  ;;
18129esac
18130fi
18131CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18132if test -n "$CHECK_GMAKE"; then
18133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18134$as_echo "$CHECK_GMAKE" >&6; }
18135else
18136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18137$as_echo "no" >&6; }
18138fi
18139
18140
18141  test -n "$CHECK_GMAKE" && break
18142done
18143
18144
18145  MAKE_CANDIDATE=""$CHECK_GMAKE""
18146  DESCRIPTION="gmake in PATH"
18147
18148  # On Cygwin, we require a newer version of make than on other platforms
18149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18150    MAKE_VERSION_EXPR="-e 4\."
18151    MAKE_REQUIRED_VERSION="4.0"
18152   else
18153    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18154    MAKE_REQUIRED_VERSION="3.81"
18155  fi
18156
18157  if test "x$MAKE_CANDIDATE" != x; then
18158    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18159$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18160    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18161    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18162    if test "x$IS_GNU_MAKE" = x; then
18163      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18164$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18165    else
18166      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18167      if test "x$IS_MODERN_MAKE" = x; then
18168        { $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
18169$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;}
18170      else
18171        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18172          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18173            MAKE_EXPECTED_ENV='cygwin'
18174          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18175            MAKE_EXPECTED_ENV='msys'
18176          else
18177            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18178          fi
18179          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18180          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18181        else
18182          # Not relevant for non-Windows
18183          IS_MAKE_CORRECT_ENV=true
18184        fi
18185        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18186          { $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
18187$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;}
18188        else
18189          FOUND_MAKE=$MAKE_CANDIDATE
18190
18191  # Only process if variable expands to non-empty
18192
18193  if test "x$FOUND_MAKE" != x; then
18194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18195
18196  # First separate the path from the arguments. This will split at the first
18197  # space.
18198  complete="$FOUND_MAKE"
18199  path="${complete%% *}"
18200  tmp="$complete EOL"
18201  arguments="${tmp#* }"
18202
18203  # Input might be given as Windows format, start by converting to
18204  # unix format.
18205  new_path=`$CYGPATH -u "$path"`
18206
18207  # Now try to locate executable using which
18208  new_path=`$WHICH "$new_path" 2> /dev/null`
18209  # bat and cmd files are not always considered executable in cygwin causing which
18210  # to not find them
18211  if test "x$new_path" = x \
18212      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18213      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18214    new_path=`$CYGPATH -u "$path"`
18215  fi
18216  if test "x$new_path" = x; then
18217    # Oops. Which didn't find the executable.
18218    # The splitting of arguments from the executable at a space might have been incorrect,
18219    # since paths with space are more likely in Windows. Give it another try with the whole
18220    # argument.
18221    path="$complete"
18222    arguments="EOL"
18223    new_path=`$CYGPATH -u "$path"`
18224    new_path=`$WHICH "$new_path" 2> /dev/null`
18225    # bat and cmd files are not always considered executable in cygwin causing which
18226    # to not find them
18227    if test "x$new_path" = x \
18228        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18229        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18230      new_path=`$CYGPATH -u "$path"`
18231    fi
18232    if test "x$new_path" = x; then
18233      # It's still not found. Now this is an unrecoverable error.
18234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18235$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18236      has_space=`$ECHO "$complete" | $GREP " "`
18237      if test "x$has_space" != x; then
18238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18240      fi
18241      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18242    fi
18243  fi
18244
18245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18248  # "foo.exe" is OK but "foo" is an error.
18249  #
18250  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18251  # It is also a way to make sure we got the proper file name for the real test later on.
18252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18253  if test "x$test_shortpath" = x; then
18254    # Short path failed, file does not exist as specified.
18255    # Try adding .exe or .cmd
18256    if test -f "${new_path}.exe"; then
18257      input_to_shortpath="${new_path}.exe"
18258    elif test -f "${new_path}.cmd"; then
18259      input_to_shortpath="${new_path}.cmd"
18260    else
18261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18262$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18263      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18264$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18265      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18266    fi
18267  else
18268    input_to_shortpath="$new_path"
18269  fi
18270
18271  # Call helper function which possibly converts this using DOS-style short mode.
18272  # If so, the updated path is stored in $new_path.
18273  new_path="$input_to_shortpath"
18274
18275  input_path="$input_to_shortpath"
18276  # Check if we need to convert this using DOS-style short mode. If the path
18277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18278  # take no chances and rewrite it.
18279  # Note: m4 eats our [], so we need to use [ and ] instead.
18280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18281  if test "x$has_forbidden_chars" != x; then
18282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18286      # Going to short mode and back again did indeed matter. Since short mode is
18287      # case insensitive, let's make it lowercase to improve readability.
18288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18289      # Now convert it back to Unix-style (cygpath)
18290      input_path=`$CYGPATH -u "$shortmode_path"`
18291      new_path="$input_path"
18292    fi
18293  fi
18294
18295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18296  if test "x$test_cygdrive_prefix" = x; then
18297    # As a simple fix, exclude /usr/bin since it's not a real path.
18298    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18300      # a path prefixed by /cygdrive for fixpath to work.
18301      new_path="$CYGWIN_ROOT_PATH$input_path"
18302    fi
18303  fi
18304
18305  # remove trailing .exe if any
18306  new_path="${new_path/%.exe/}"
18307
18308    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18309
18310  # First separate the path from the arguments. This will split at the first
18311  # space.
18312  complete="$FOUND_MAKE"
18313  path="${complete%% *}"
18314  tmp="$complete EOL"
18315  arguments="${tmp#* }"
18316
18317  # Input might be given as Windows format, start by converting to
18318  # unix format.
18319  new_path="$path"
18320
18321  windows_path="$new_path"
18322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18323    unix_path=`$CYGPATH -u "$windows_path"`
18324    new_path="$unix_path"
18325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18327    new_path="$unix_path"
18328  fi
18329
18330
18331  # Now try to locate executable using which
18332  new_path=`$WHICH "$new_path" 2> /dev/null`
18333
18334  if test "x$new_path" = x; then
18335    # Oops. Which didn't find the executable.
18336    # The splitting of arguments from the executable at a space might have been incorrect,
18337    # since paths with space are more likely in Windows. Give it another try with the whole
18338    # argument.
18339    path="$complete"
18340    arguments="EOL"
18341    new_path="$path"
18342
18343  windows_path="$new_path"
18344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18345    unix_path=`$CYGPATH -u "$windows_path"`
18346    new_path="$unix_path"
18347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18349    new_path="$unix_path"
18350  fi
18351
18352
18353    new_path=`$WHICH "$new_path" 2> /dev/null`
18354    # bat and cmd files are not always considered executable in MSYS causing which
18355    # to not find them
18356    if test "x$new_path" = x \
18357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18359      new_path="$path"
18360
18361  windows_path="$new_path"
18362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18363    unix_path=`$CYGPATH -u "$windows_path"`
18364    new_path="$unix_path"
18365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18367    new_path="$unix_path"
18368  fi
18369
18370    fi
18371
18372    if test "x$new_path" = x; then
18373      # It's still not found. Now this is an unrecoverable error.
18374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18375$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18376      has_space=`$ECHO "$complete" | $GREP " "`
18377      if test "x$has_space" != x; then
18378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18380      fi
18381      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18382    fi
18383  fi
18384
18385  # Now new_path has a complete unix path to the binary
18386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18387    # Keep paths in /bin as-is, but remove trailing .exe if any
18388    new_path="${new_path/%.exe/}"
18389    # Do not save /bin paths to all_fixpath_prefixes!
18390  else
18391    # Not in mixed or Windows style, start by that.
18392    new_path=`cmd //c echo $new_path`
18393
18394  input_path="$new_path"
18395  # Check if we need to convert this using DOS-style short mode. If the path
18396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18397  # take no chances and rewrite it.
18398  # Note: m4 eats our [], so we need to use [ and ] instead.
18399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18400  if test "x$has_forbidden_chars" != x; then
18401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18403  fi
18404
18405    # Output is in $new_path
18406
18407  windows_path="$new_path"
18408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18409    unix_path=`$CYGPATH -u "$windows_path"`
18410    new_path="$unix_path"
18411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18413    new_path="$unix_path"
18414  fi
18415
18416    # remove trailing .exe if any
18417    new_path="${new_path/%.exe/}"
18418
18419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18421  fi
18422
18423    else
18424      # We're on a unix platform. Hooray! :)
18425      # First separate the path from the arguments. This will split at the first
18426      # space.
18427      complete="$FOUND_MAKE"
18428      path="${complete%% *}"
18429      tmp="$complete EOL"
18430      arguments="${tmp#* }"
18431
18432      # Cannot rely on the command "which" here since it doesn't always work.
18433      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18434      if test -z "$is_absolute_path"; then
18435        # Path to executable is not absolute. Find it.
18436        IFS_save="$IFS"
18437        IFS=:
18438        for p in $PATH; do
18439          if test -f "$p/$path" && test -x "$p/$path"; then
18440            new_path="$p/$path"
18441            break
18442          fi
18443        done
18444        IFS="$IFS_save"
18445      else
18446        # This is an absolute path, we can use it without further modifications.
18447        new_path="$path"
18448      fi
18449
18450      if test "x$new_path" = x; then
18451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18452$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18453        has_space=`$ECHO "$complete" | $GREP " "`
18454        if test "x$has_space" != x; then
18455          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18457        fi
18458        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18459      fi
18460    fi
18461
18462    # Now join together the path and the arguments once again
18463    if test "x$arguments" != xEOL; then
18464      new_complete="$new_path ${arguments% *}"
18465    else
18466      new_complete="$new_path"
18467    fi
18468
18469    if test "x$complete" != "x$new_complete"; then
18470      FOUND_MAKE="$new_complete"
18471      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18472$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18473    fi
18474  fi
18475
18476        fi
18477      fi
18478    fi
18479  fi
18480
18481
18482    if test "x$FOUND_MAKE" = x; then
18483      for ac_prog in make
18484do
18485  # Extract the first word of "$ac_prog", so it can be a program name with args.
18486set dummy $ac_prog; ac_word=$2
18487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18488$as_echo_n "checking for $ac_word... " >&6; }
18489if ${ac_cv_path_CHECK_MAKE+:} false; then :
18490  $as_echo_n "(cached) " >&6
18491else
18492  case $CHECK_MAKE in
18493  [\\/]* | ?:[\\/]*)
18494  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18495  ;;
18496  *)
18497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18498for as_dir in $PATH
18499do
18500  IFS=$as_save_IFS
18501  test -z "$as_dir" && as_dir=.
18502    for ac_exec_ext in '' $ac_executable_extensions; do
18503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18504    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18506    break 2
18507  fi
18508done
18509  done
18510IFS=$as_save_IFS
18511
18512  ;;
18513esac
18514fi
18515CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18516if test -n "$CHECK_MAKE"; then
18517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18518$as_echo "$CHECK_MAKE" >&6; }
18519else
18520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18521$as_echo "no" >&6; }
18522fi
18523
18524
18525  test -n "$CHECK_MAKE" && break
18526done
18527
18528
18529  MAKE_CANDIDATE=""$CHECK_MAKE""
18530  DESCRIPTION="make in PATH"
18531
18532  # On Cygwin, we require a newer version of make than on other platforms
18533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18534    MAKE_VERSION_EXPR="-e 4\."
18535    MAKE_REQUIRED_VERSION="4.0"
18536   else
18537    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18538    MAKE_REQUIRED_VERSION="3.81"
18539  fi
18540
18541  if test "x$MAKE_CANDIDATE" != x; then
18542    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18543$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18544    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18545    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18546    if test "x$IS_GNU_MAKE" = x; then
18547      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18548$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18549    else
18550      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18551      if test "x$IS_MODERN_MAKE" = x; then
18552        { $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
18553$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;}
18554      else
18555        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18556          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18557            MAKE_EXPECTED_ENV='cygwin'
18558          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18559            MAKE_EXPECTED_ENV='msys'
18560          else
18561            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18562          fi
18563          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18564          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18565        else
18566          # Not relevant for non-Windows
18567          IS_MAKE_CORRECT_ENV=true
18568        fi
18569        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18570          { $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
18571$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;}
18572        else
18573          FOUND_MAKE=$MAKE_CANDIDATE
18574
18575  # Only process if variable expands to non-empty
18576
18577  if test "x$FOUND_MAKE" != x; then
18578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18579
18580  # First separate the path from the arguments. This will split at the first
18581  # space.
18582  complete="$FOUND_MAKE"
18583  path="${complete%% *}"
18584  tmp="$complete EOL"
18585  arguments="${tmp#* }"
18586
18587  # Input might be given as Windows format, start by converting to
18588  # unix format.
18589  new_path=`$CYGPATH -u "$path"`
18590
18591  # Now try to locate executable using which
18592  new_path=`$WHICH "$new_path" 2> /dev/null`
18593  # bat and cmd files are not always considered executable in cygwin causing which
18594  # to not find them
18595  if test "x$new_path" = x \
18596      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18597      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18598    new_path=`$CYGPATH -u "$path"`
18599  fi
18600  if test "x$new_path" = x; then
18601    # Oops. Which didn't find the executable.
18602    # The splitting of arguments from the executable at a space might have been incorrect,
18603    # since paths with space are more likely in Windows. Give it another try with the whole
18604    # argument.
18605    path="$complete"
18606    arguments="EOL"
18607    new_path=`$CYGPATH -u "$path"`
18608    new_path=`$WHICH "$new_path" 2> /dev/null`
18609    # bat and cmd files are not always considered executable in cygwin causing which
18610    # to not find them
18611    if test "x$new_path" = x \
18612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18614      new_path=`$CYGPATH -u "$path"`
18615    fi
18616    if test "x$new_path" = x; then
18617      # It's still not found. Now this is an unrecoverable error.
18618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18619$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18620      has_space=`$ECHO "$complete" | $GREP " "`
18621      if test "x$has_space" != x; then
18622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18624      fi
18625      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18626    fi
18627  fi
18628
18629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18632  # "foo.exe" is OK but "foo" is an error.
18633  #
18634  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18635  # It is also a way to make sure we got the proper file name for the real test later on.
18636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18637  if test "x$test_shortpath" = x; then
18638    # Short path failed, file does not exist as specified.
18639    # Try adding .exe or .cmd
18640    if test -f "${new_path}.exe"; then
18641      input_to_shortpath="${new_path}.exe"
18642    elif test -f "${new_path}.cmd"; then
18643      input_to_shortpath="${new_path}.cmd"
18644    else
18645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18646$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18647      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18648$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18649      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18650    fi
18651  else
18652    input_to_shortpath="$new_path"
18653  fi
18654
18655  # Call helper function which possibly converts this using DOS-style short mode.
18656  # If so, the updated path is stored in $new_path.
18657  new_path="$input_to_shortpath"
18658
18659  input_path="$input_to_shortpath"
18660  # Check if we need to convert this using DOS-style short mode. If the path
18661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18662  # take no chances and rewrite it.
18663  # Note: m4 eats our [], so we need to use [ and ] instead.
18664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18665  if test "x$has_forbidden_chars" != x; then
18666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18670      # Going to short mode and back again did indeed matter. Since short mode is
18671      # case insensitive, let's make it lowercase to improve readability.
18672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18673      # Now convert it back to Unix-style (cygpath)
18674      input_path=`$CYGPATH -u "$shortmode_path"`
18675      new_path="$input_path"
18676    fi
18677  fi
18678
18679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18680  if test "x$test_cygdrive_prefix" = x; then
18681    # As a simple fix, exclude /usr/bin since it's not a real path.
18682    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18684      # a path prefixed by /cygdrive for fixpath to work.
18685      new_path="$CYGWIN_ROOT_PATH$input_path"
18686    fi
18687  fi
18688
18689  # remove trailing .exe if any
18690  new_path="${new_path/%.exe/}"
18691
18692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18693
18694  # First separate the path from the arguments. This will split at the first
18695  # space.
18696  complete="$FOUND_MAKE"
18697  path="${complete%% *}"
18698  tmp="$complete EOL"
18699  arguments="${tmp#* }"
18700
18701  # Input might be given as Windows format, start by converting to
18702  # unix format.
18703  new_path="$path"
18704
18705  windows_path="$new_path"
18706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18707    unix_path=`$CYGPATH -u "$windows_path"`
18708    new_path="$unix_path"
18709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18711    new_path="$unix_path"
18712  fi
18713
18714
18715  # Now try to locate executable using which
18716  new_path=`$WHICH "$new_path" 2> /dev/null`
18717
18718  if test "x$new_path" = x; then
18719    # Oops. Which didn't find the executable.
18720    # The splitting of arguments from the executable at a space might have been incorrect,
18721    # since paths with space are more likely in Windows. Give it another try with the whole
18722    # argument.
18723    path="$complete"
18724    arguments="EOL"
18725    new_path="$path"
18726
18727  windows_path="$new_path"
18728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18729    unix_path=`$CYGPATH -u "$windows_path"`
18730    new_path="$unix_path"
18731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18733    new_path="$unix_path"
18734  fi
18735
18736
18737    new_path=`$WHICH "$new_path" 2> /dev/null`
18738    # bat and cmd files are not always considered executable in MSYS causing which
18739    # to not find them
18740    if test "x$new_path" = x \
18741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18743      new_path="$path"
18744
18745  windows_path="$new_path"
18746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18747    unix_path=`$CYGPATH -u "$windows_path"`
18748    new_path="$unix_path"
18749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18751    new_path="$unix_path"
18752  fi
18753
18754    fi
18755
18756    if test "x$new_path" = x; then
18757      # It's still not found. Now this is an unrecoverable error.
18758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18759$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18760      has_space=`$ECHO "$complete" | $GREP " "`
18761      if test "x$has_space" != x; then
18762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18764      fi
18765      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18766    fi
18767  fi
18768
18769  # Now new_path has a complete unix path to the binary
18770  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18771    # Keep paths in /bin as-is, but remove trailing .exe if any
18772    new_path="${new_path/%.exe/}"
18773    # Do not save /bin paths to all_fixpath_prefixes!
18774  else
18775    # Not in mixed or Windows style, start by that.
18776    new_path=`cmd //c echo $new_path`
18777
18778  input_path="$new_path"
18779  # Check if we need to convert this using DOS-style short mode. If the path
18780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18781  # take no chances and rewrite it.
18782  # Note: m4 eats our [], so we need to use [ and ] instead.
18783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18784  if test "x$has_forbidden_chars" != x; then
18785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18787  fi
18788
18789    # Output is in $new_path
18790
18791  windows_path="$new_path"
18792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18793    unix_path=`$CYGPATH -u "$windows_path"`
18794    new_path="$unix_path"
18795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18797    new_path="$unix_path"
18798  fi
18799
18800    # remove trailing .exe if any
18801    new_path="${new_path/%.exe/}"
18802
18803    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18804    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18805  fi
18806
18807    else
18808      # We're on a unix platform. Hooray! :)
18809      # First separate the path from the arguments. This will split at the first
18810      # space.
18811      complete="$FOUND_MAKE"
18812      path="${complete%% *}"
18813      tmp="$complete EOL"
18814      arguments="${tmp#* }"
18815
18816      # Cannot rely on the command "which" here since it doesn't always work.
18817      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18818      if test -z "$is_absolute_path"; then
18819        # Path to executable is not absolute. Find it.
18820        IFS_save="$IFS"
18821        IFS=:
18822        for p in $PATH; do
18823          if test -f "$p/$path" && test -x "$p/$path"; then
18824            new_path="$p/$path"
18825            break
18826          fi
18827        done
18828        IFS="$IFS_save"
18829      else
18830        # This is an absolute path, we can use it without further modifications.
18831        new_path="$path"
18832      fi
18833
18834      if test "x$new_path" = x; then
18835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18836$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18837        has_space=`$ECHO "$complete" | $GREP " "`
18838        if test "x$has_space" != x; then
18839          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18840$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18841        fi
18842        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18843      fi
18844    fi
18845
18846    # Now join together the path and the arguments once again
18847    if test "x$arguments" != xEOL; then
18848      new_complete="$new_path ${arguments% *}"
18849    else
18850      new_complete="$new_path"
18851    fi
18852
18853    if test "x$complete" != "x$new_complete"; then
18854      FOUND_MAKE="$new_complete"
18855      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18856$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18857    fi
18858  fi
18859
18860        fi
18861      fi
18862    fi
18863  fi
18864
18865    fi
18866
18867    if test "x$FOUND_MAKE" = x; then
18868      if test "x$TOOLCHAIN_PATH" != x; then
18869        # We have a toolchain path, check that as well before giving up.
18870        OLD_PATH=$PATH
18871        PATH=$TOOLCHAIN_PATH:$PATH
18872        for ac_prog in gmake
18873do
18874  # Extract the first word of "$ac_prog", so it can be a program name with args.
18875set dummy $ac_prog; ac_word=$2
18876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18877$as_echo_n "checking for $ac_word... " >&6; }
18878if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18879  $as_echo_n "(cached) " >&6
18880else
18881  case $CHECK_TOOLSDIR_GMAKE in
18882  [\\/]* | ?:[\\/]*)
18883  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18884  ;;
18885  *)
18886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18887for as_dir in $PATH
18888do
18889  IFS=$as_save_IFS
18890  test -z "$as_dir" && as_dir=.
18891    for ac_exec_ext in '' $ac_executable_extensions; do
18892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18893    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18895    break 2
18896  fi
18897done
18898  done
18899IFS=$as_save_IFS
18900
18901  ;;
18902esac
18903fi
18904CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18905if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18907$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18908else
18909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18910$as_echo "no" >&6; }
18911fi
18912
18913
18914  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18915done
18916
18917
18918  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18919  DESCRIPTION="gmake in tools-dir"
18920
18921  # On Cygwin, we require a newer version of make than on other platforms
18922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18923    MAKE_VERSION_EXPR="-e 4\."
18924    MAKE_REQUIRED_VERSION="4.0"
18925   else
18926    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18927    MAKE_REQUIRED_VERSION="3.81"
18928  fi
18929
18930  if test "x$MAKE_CANDIDATE" != x; then
18931    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18932$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18933    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18934    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18935    if test "x$IS_GNU_MAKE" = x; then
18936      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18937$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18938    else
18939      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18940      if test "x$IS_MODERN_MAKE" = x; then
18941        { $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
18942$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;}
18943      else
18944        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18945          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18946            MAKE_EXPECTED_ENV='cygwin'
18947          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18948            MAKE_EXPECTED_ENV='msys'
18949          else
18950            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18951          fi
18952          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18953          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18954        else
18955          # Not relevant for non-Windows
18956          IS_MAKE_CORRECT_ENV=true
18957        fi
18958        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18959          { $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
18960$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;}
18961        else
18962          FOUND_MAKE=$MAKE_CANDIDATE
18963
18964  # Only process if variable expands to non-empty
18965
18966  if test "x$FOUND_MAKE" != x; then
18967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18968
18969  # First separate the path from the arguments. This will split at the first
18970  # space.
18971  complete="$FOUND_MAKE"
18972  path="${complete%% *}"
18973  tmp="$complete EOL"
18974  arguments="${tmp#* }"
18975
18976  # Input might be given as Windows format, start by converting to
18977  # unix format.
18978  new_path=`$CYGPATH -u "$path"`
18979
18980  # Now try to locate executable using which
18981  new_path=`$WHICH "$new_path" 2> /dev/null`
18982  # bat and cmd files are not always considered executable in cygwin causing which
18983  # to not find them
18984  if test "x$new_path" = x \
18985      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18986      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18987    new_path=`$CYGPATH -u "$path"`
18988  fi
18989  if test "x$new_path" = x; then
18990    # Oops. Which didn't find the executable.
18991    # The splitting of arguments from the executable at a space might have been incorrect,
18992    # since paths with space are more likely in Windows. Give it another try with the whole
18993    # argument.
18994    path="$complete"
18995    arguments="EOL"
18996    new_path=`$CYGPATH -u "$path"`
18997    new_path=`$WHICH "$new_path" 2> /dev/null`
18998    # bat and cmd files are not always considered executable in cygwin causing which
18999    # to not find them
19000    if test "x$new_path" = x \
19001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19003      new_path=`$CYGPATH -u "$path"`
19004    fi
19005    if test "x$new_path" = x; then
19006      # It's still not found. Now this is an unrecoverable error.
19007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19008$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19009      has_space=`$ECHO "$complete" | $GREP " "`
19010      if test "x$has_space" != x; then
19011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19013      fi
19014      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19015    fi
19016  fi
19017
19018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19021  # "foo.exe" is OK but "foo" is an error.
19022  #
19023  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19024  # It is also a way to make sure we got the proper file name for the real test later on.
19025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19026  if test "x$test_shortpath" = x; then
19027    # Short path failed, file does not exist as specified.
19028    # Try adding .exe or .cmd
19029    if test -f "${new_path}.exe"; then
19030      input_to_shortpath="${new_path}.exe"
19031    elif test -f "${new_path}.cmd"; then
19032      input_to_shortpath="${new_path}.cmd"
19033    else
19034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19035$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19038      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19039    fi
19040  else
19041    input_to_shortpath="$new_path"
19042  fi
19043
19044  # Call helper function which possibly converts this using DOS-style short mode.
19045  # If so, the updated path is stored in $new_path.
19046  new_path="$input_to_shortpath"
19047
19048  input_path="$input_to_shortpath"
19049  # Check if we need to convert this using DOS-style short mode. If the path
19050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19051  # take no chances and rewrite it.
19052  # Note: m4 eats our [], so we need to use [ and ] instead.
19053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19054  if test "x$has_forbidden_chars" != x; then
19055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19059      # Going to short mode and back again did indeed matter. Since short mode is
19060      # case insensitive, let's make it lowercase to improve readability.
19061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19062      # Now convert it back to Unix-style (cygpath)
19063      input_path=`$CYGPATH -u "$shortmode_path"`
19064      new_path="$input_path"
19065    fi
19066  fi
19067
19068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19069  if test "x$test_cygdrive_prefix" = x; then
19070    # As a simple fix, exclude /usr/bin since it's not a real path.
19071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19073      # a path prefixed by /cygdrive for fixpath to work.
19074      new_path="$CYGWIN_ROOT_PATH$input_path"
19075    fi
19076  fi
19077
19078  # remove trailing .exe if any
19079  new_path="${new_path/%.exe/}"
19080
19081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19082
19083  # First separate the path from the arguments. This will split at the first
19084  # space.
19085  complete="$FOUND_MAKE"
19086  path="${complete%% *}"
19087  tmp="$complete EOL"
19088  arguments="${tmp#* }"
19089
19090  # Input might be given as Windows format, start by converting to
19091  # unix format.
19092  new_path="$path"
19093
19094  windows_path="$new_path"
19095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19096    unix_path=`$CYGPATH -u "$windows_path"`
19097    new_path="$unix_path"
19098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19100    new_path="$unix_path"
19101  fi
19102
19103
19104  # Now try to locate executable using which
19105  new_path=`$WHICH "$new_path" 2> /dev/null`
19106
19107  if test "x$new_path" = x; then
19108    # Oops. Which didn't find the executable.
19109    # The splitting of arguments from the executable at a space might have been incorrect,
19110    # since paths with space are more likely in Windows. Give it another try with the whole
19111    # argument.
19112    path="$complete"
19113    arguments="EOL"
19114    new_path="$path"
19115
19116  windows_path="$new_path"
19117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19118    unix_path=`$CYGPATH -u "$windows_path"`
19119    new_path="$unix_path"
19120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19122    new_path="$unix_path"
19123  fi
19124
19125
19126    new_path=`$WHICH "$new_path" 2> /dev/null`
19127    # bat and cmd files are not always considered executable in MSYS causing which
19128    # to not find them
19129    if test "x$new_path" = x \
19130        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19131        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19132      new_path="$path"
19133
19134  windows_path="$new_path"
19135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19136    unix_path=`$CYGPATH -u "$windows_path"`
19137    new_path="$unix_path"
19138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19140    new_path="$unix_path"
19141  fi
19142
19143    fi
19144
19145    if test "x$new_path" = x; then
19146      # It's still not found. Now this is an unrecoverable error.
19147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19148$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19149      has_space=`$ECHO "$complete" | $GREP " "`
19150      if test "x$has_space" != x; then
19151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19153      fi
19154      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19155    fi
19156  fi
19157
19158  # Now new_path has a complete unix path to the binary
19159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19160    # Keep paths in /bin as-is, but remove trailing .exe if any
19161    new_path="${new_path/%.exe/}"
19162    # Do not save /bin paths to all_fixpath_prefixes!
19163  else
19164    # Not in mixed or Windows style, start by that.
19165    new_path=`cmd //c echo $new_path`
19166
19167  input_path="$new_path"
19168  # Check if we need to convert this using DOS-style short mode. If the path
19169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19170  # take no chances and rewrite it.
19171  # Note: m4 eats our [], so we need to use [ and ] instead.
19172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19173  if test "x$has_forbidden_chars" != x; then
19174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19176  fi
19177
19178    # Output is in $new_path
19179
19180  windows_path="$new_path"
19181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19182    unix_path=`$CYGPATH -u "$windows_path"`
19183    new_path="$unix_path"
19184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19186    new_path="$unix_path"
19187  fi
19188
19189    # remove trailing .exe if any
19190    new_path="${new_path/%.exe/}"
19191
19192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19194  fi
19195
19196    else
19197      # We're on a unix platform. Hooray! :)
19198      # First separate the path from the arguments. This will split at the first
19199      # space.
19200      complete="$FOUND_MAKE"
19201      path="${complete%% *}"
19202      tmp="$complete EOL"
19203      arguments="${tmp#* }"
19204
19205      # Cannot rely on the command "which" here since it doesn't always work.
19206      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19207      if test -z "$is_absolute_path"; then
19208        # Path to executable is not absolute. Find it.
19209        IFS_save="$IFS"
19210        IFS=:
19211        for p in $PATH; do
19212          if test -f "$p/$path" && test -x "$p/$path"; then
19213            new_path="$p/$path"
19214            break
19215          fi
19216        done
19217        IFS="$IFS_save"
19218      else
19219        # This is an absolute path, we can use it without further modifications.
19220        new_path="$path"
19221      fi
19222
19223      if test "x$new_path" = x; then
19224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19225$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19226        has_space=`$ECHO "$complete" | $GREP " "`
19227        if test "x$has_space" != x; then
19228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19230        fi
19231        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19232      fi
19233    fi
19234
19235    # Now join together the path and the arguments once again
19236    if test "x$arguments" != xEOL; then
19237      new_complete="$new_path ${arguments% *}"
19238    else
19239      new_complete="$new_path"
19240    fi
19241
19242    if test "x$complete" != "x$new_complete"; then
19243      FOUND_MAKE="$new_complete"
19244      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19245$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19246    fi
19247  fi
19248
19249        fi
19250      fi
19251    fi
19252  fi
19253
19254        if test "x$FOUND_MAKE" = x; then
19255          for ac_prog in make
19256do
19257  # Extract the first word of "$ac_prog", so it can be a program name with args.
19258set dummy $ac_prog; ac_word=$2
19259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19260$as_echo_n "checking for $ac_word... " >&6; }
19261if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19262  $as_echo_n "(cached) " >&6
19263else
19264  case $CHECK_TOOLSDIR_MAKE in
19265  [\\/]* | ?:[\\/]*)
19266  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19267  ;;
19268  *)
19269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19270for as_dir in $PATH
19271do
19272  IFS=$as_save_IFS
19273  test -z "$as_dir" && as_dir=.
19274    for ac_exec_ext in '' $ac_executable_extensions; do
19275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19276    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19278    break 2
19279  fi
19280done
19281  done
19282IFS=$as_save_IFS
19283
19284  ;;
19285esac
19286fi
19287CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19288if test -n "$CHECK_TOOLSDIR_MAKE"; then
19289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19290$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19291else
19292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19293$as_echo "no" >&6; }
19294fi
19295
19296
19297  test -n "$CHECK_TOOLSDIR_MAKE" && break
19298done
19299
19300
19301  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19302  DESCRIPTION="make in tools-dir"
19303
19304  # On Cygwin, we require a newer version of make than on other platforms
19305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19306    MAKE_VERSION_EXPR="-e 4\."
19307    MAKE_REQUIRED_VERSION="4.0"
19308   else
19309    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19310    MAKE_REQUIRED_VERSION="3.81"
19311  fi
19312
19313  if test "x$MAKE_CANDIDATE" != x; then
19314    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19315$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19316    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19317    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19318    if test "x$IS_GNU_MAKE" = x; then
19319      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19320$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19321    else
19322      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19323      if test "x$IS_MODERN_MAKE" = x; then
19324        { $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
19325$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;}
19326      else
19327        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19328          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19329            MAKE_EXPECTED_ENV='cygwin'
19330          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19331            MAKE_EXPECTED_ENV='msys'
19332          else
19333            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19334          fi
19335          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19336          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19337        else
19338          # Not relevant for non-Windows
19339          IS_MAKE_CORRECT_ENV=true
19340        fi
19341        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19342          { $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
19343$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;}
19344        else
19345          FOUND_MAKE=$MAKE_CANDIDATE
19346
19347  # Only process if variable expands to non-empty
19348
19349  if test "x$FOUND_MAKE" != x; then
19350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19351
19352  # First separate the path from the arguments. This will split at the first
19353  # space.
19354  complete="$FOUND_MAKE"
19355  path="${complete%% *}"
19356  tmp="$complete EOL"
19357  arguments="${tmp#* }"
19358
19359  # Input might be given as Windows format, start by converting to
19360  # unix format.
19361  new_path=`$CYGPATH -u "$path"`
19362
19363  # Now try to locate executable using which
19364  new_path=`$WHICH "$new_path" 2> /dev/null`
19365  # bat and cmd files are not always considered executable in cygwin causing which
19366  # to not find them
19367  if test "x$new_path" = x \
19368      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19369      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19370    new_path=`$CYGPATH -u "$path"`
19371  fi
19372  if test "x$new_path" = x; then
19373    # Oops. Which didn't find the executable.
19374    # The splitting of arguments from the executable at a space might have been incorrect,
19375    # since paths with space are more likely in Windows. Give it another try with the whole
19376    # argument.
19377    path="$complete"
19378    arguments="EOL"
19379    new_path=`$CYGPATH -u "$path"`
19380    new_path=`$WHICH "$new_path" 2> /dev/null`
19381    # bat and cmd files are not always considered executable in cygwin causing which
19382    # to not find them
19383    if test "x$new_path" = x \
19384        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19385        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19386      new_path=`$CYGPATH -u "$path"`
19387    fi
19388    if test "x$new_path" = x; then
19389      # It's still not found. Now this is an unrecoverable error.
19390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19391$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19392      has_space=`$ECHO "$complete" | $GREP " "`
19393      if test "x$has_space" != x; then
19394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19396      fi
19397      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19398    fi
19399  fi
19400
19401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19404  # "foo.exe" is OK but "foo" is an error.
19405  #
19406  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19407  # It is also a way to make sure we got the proper file name for the real test later on.
19408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19409  if test "x$test_shortpath" = x; then
19410    # Short path failed, file does not exist as specified.
19411    # Try adding .exe or .cmd
19412    if test -f "${new_path}.exe"; then
19413      input_to_shortpath="${new_path}.exe"
19414    elif test -f "${new_path}.cmd"; then
19415      input_to_shortpath="${new_path}.cmd"
19416    else
19417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19418$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19419      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19420$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19421      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19422    fi
19423  else
19424    input_to_shortpath="$new_path"
19425  fi
19426
19427  # Call helper function which possibly converts this using DOS-style short mode.
19428  # If so, the updated path is stored in $new_path.
19429  new_path="$input_to_shortpath"
19430
19431  input_path="$input_to_shortpath"
19432  # Check if we need to convert this using DOS-style short mode. If the path
19433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19434  # take no chances and rewrite it.
19435  # Note: m4 eats our [], so we need to use [ and ] instead.
19436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19437  if test "x$has_forbidden_chars" != x; then
19438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19442      # Going to short mode and back again did indeed matter. Since short mode is
19443      # case insensitive, let's make it lowercase to improve readability.
19444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19445      # Now convert it back to Unix-style (cygpath)
19446      input_path=`$CYGPATH -u "$shortmode_path"`
19447      new_path="$input_path"
19448    fi
19449  fi
19450
19451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19452  if test "x$test_cygdrive_prefix" = x; then
19453    # As a simple fix, exclude /usr/bin since it's not a real path.
19454    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19456      # a path prefixed by /cygdrive for fixpath to work.
19457      new_path="$CYGWIN_ROOT_PATH$input_path"
19458    fi
19459  fi
19460
19461  # remove trailing .exe if any
19462  new_path="${new_path/%.exe/}"
19463
19464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19465
19466  # First separate the path from the arguments. This will split at the first
19467  # space.
19468  complete="$FOUND_MAKE"
19469  path="${complete%% *}"
19470  tmp="$complete EOL"
19471  arguments="${tmp#* }"
19472
19473  # Input might be given as Windows format, start by converting to
19474  # unix format.
19475  new_path="$path"
19476
19477  windows_path="$new_path"
19478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19479    unix_path=`$CYGPATH -u "$windows_path"`
19480    new_path="$unix_path"
19481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19483    new_path="$unix_path"
19484  fi
19485
19486
19487  # Now try to locate executable using which
19488  new_path=`$WHICH "$new_path" 2> /dev/null`
19489
19490  if test "x$new_path" = x; then
19491    # Oops. Which didn't find the executable.
19492    # The splitting of arguments from the executable at a space might have been incorrect,
19493    # since paths with space are more likely in Windows. Give it another try with the whole
19494    # argument.
19495    path="$complete"
19496    arguments="EOL"
19497    new_path="$path"
19498
19499  windows_path="$new_path"
19500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19501    unix_path=`$CYGPATH -u "$windows_path"`
19502    new_path="$unix_path"
19503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19505    new_path="$unix_path"
19506  fi
19507
19508
19509    new_path=`$WHICH "$new_path" 2> /dev/null`
19510    # bat and cmd files are not always considered executable in MSYS causing which
19511    # to not find them
19512    if test "x$new_path" = x \
19513        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19514        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19515      new_path="$path"
19516
19517  windows_path="$new_path"
19518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19519    unix_path=`$CYGPATH -u "$windows_path"`
19520    new_path="$unix_path"
19521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19523    new_path="$unix_path"
19524  fi
19525
19526    fi
19527
19528    if test "x$new_path" = x; then
19529      # It's still not found. Now this is an unrecoverable error.
19530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19531$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19532      has_space=`$ECHO "$complete" | $GREP " "`
19533      if test "x$has_space" != x; then
19534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19536      fi
19537      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19538    fi
19539  fi
19540
19541  # Now new_path has a complete unix path to the binary
19542  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19543    # Keep paths in /bin as-is, but remove trailing .exe if any
19544    new_path="${new_path/%.exe/}"
19545    # Do not save /bin paths to all_fixpath_prefixes!
19546  else
19547    # Not in mixed or Windows style, start by that.
19548    new_path=`cmd //c echo $new_path`
19549
19550  input_path="$new_path"
19551  # Check if we need to convert this using DOS-style short mode. If the path
19552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19553  # take no chances and rewrite it.
19554  # Note: m4 eats our [], so we need to use [ and ] instead.
19555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19556  if test "x$has_forbidden_chars" != x; then
19557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19559  fi
19560
19561    # Output is in $new_path
19562
19563  windows_path="$new_path"
19564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19565    unix_path=`$CYGPATH -u "$windows_path"`
19566    new_path="$unix_path"
19567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19569    new_path="$unix_path"
19570  fi
19571
19572    # remove trailing .exe if any
19573    new_path="${new_path/%.exe/}"
19574
19575    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19576    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19577  fi
19578
19579    else
19580      # We're on a unix platform. Hooray! :)
19581      # First separate the path from the arguments. This will split at the first
19582      # space.
19583      complete="$FOUND_MAKE"
19584      path="${complete%% *}"
19585      tmp="$complete EOL"
19586      arguments="${tmp#* }"
19587
19588      # Cannot rely on the command "which" here since it doesn't always work.
19589      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19590      if test -z "$is_absolute_path"; then
19591        # Path to executable is not absolute. Find it.
19592        IFS_save="$IFS"
19593        IFS=:
19594        for p in $PATH; do
19595          if test -f "$p/$path" && test -x "$p/$path"; then
19596            new_path="$p/$path"
19597            break
19598          fi
19599        done
19600        IFS="$IFS_save"
19601      else
19602        # This is an absolute path, we can use it without further modifications.
19603        new_path="$path"
19604      fi
19605
19606      if test "x$new_path" = x; then
19607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19608$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19609        has_space=`$ECHO "$complete" | $GREP " "`
19610        if test "x$has_space" != x; then
19611          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19612$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19613        fi
19614        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19615      fi
19616    fi
19617
19618    # Now join together the path and the arguments once again
19619    if test "x$arguments" != xEOL; then
19620      new_complete="$new_path ${arguments% *}"
19621    else
19622      new_complete="$new_path"
19623    fi
19624
19625    if test "x$complete" != "x$new_complete"; then
19626      FOUND_MAKE="$new_complete"
19627      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19628$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19629    fi
19630  fi
19631
19632        fi
19633      fi
19634    fi
19635  fi
19636
19637        fi
19638        PATH=$OLD_PATH
19639      fi
19640    fi
19641
19642    if test "x$FOUND_MAKE" = x; then
19643      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
19644    fi
19645
19646    else
19647      # If it succeeded, then it was overridden by the user. We will use it
19648      # for the tool.
19649
19650      # First remove it from the list of overridden variables, so we can test
19651      # for unknown variables in the end.
19652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19653
19654      # Check if we try to supply an empty value
19655      if test "x$MAKE" = x; then
19656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19657$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19659$as_echo_n "checking for MAKE... " >&6; }
19660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19661$as_echo "disabled" >&6; }
19662      else
19663        # Check if the provided tool contains a complete path.
19664        tool_specified="$MAKE"
19665        tool_basename="${tool_specified##*/}"
19666        if test "x$tool_basename" = "x$tool_specified"; then
19667          # A command without a complete path is provided, search $PATH.
19668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19669$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19670          # Extract the first word of "$tool_basename", so it can be a program name with args.
19671set dummy $tool_basename; ac_word=$2
19672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19673$as_echo_n "checking for $ac_word... " >&6; }
19674if ${ac_cv_path_MAKE+:} false; then :
19675  $as_echo_n "(cached) " >&6
19676else
19677  case $MAKE in
19678  [\\/]* | ?:[\\/]*)
19679  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19680  ;;
19681  *)
19682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19683for as_dir in $PATH
19684do
19685  IFS=$as_save_IFS
19686  test -z "$as_dir" && as_dir=.
19687    for ac_exec_ext in '' $ac_executable_extensions; do
19688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19689    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19691    break 2
19692  fi
19693done
19694  done
19695IFS=$as_save_IFS
19696
19697  ;;
19698esac
19699fi
19700MAKE=$ac_cv_path_MAKE
19701if test -n "$MAKE"; then
19702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19703$as_echo "$MAKE" >&6; }
19704else
19705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19706$as_echo "no" >&6; }
19707fi
19708
19709
19710          if test "x$MAKE" = x; then
19711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19712          fi
19713        else
19714          # Otherwise we believe it is a complete path. Use it as it is.
19715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19716$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19718$as_echo_n "checking for MAKE... " >&6; }
19719          if test ! -x "$tool_specified"; then
19720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19721$as_echo "not found" >&6; }
19722            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19723          fi
19724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19725$as_echo "$tool_specified" >&6; }
19726        fi
19727      fi
19728    fi
19729
19730    # If MAKE was set by user, verify the version
19731
19732  MAKE_CANDIDATE=""$MAKE""
19733  DESCRIPTION="user supplied MAKE=$MAKE"
19734
19735  # On Cygwin, we require a newer version of make than on other platforms
19736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19737    MAKE_VERSION_EXPR="-e 4\."
19738    MAKE_REQUIRED_VERSION="4.0"
19739   else
19740    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19741    MAKE_REQUIRED_VERSION="3.81"
19742  fi
19743
19744  if test "x$MAKE_CANDIDATE" != x; then
19745    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19746$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19747    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19748    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19749    if test "x$IS_GNU_MAKE" = x; then
19750      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19751$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19752    else
19753      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19754      if test "x$IS_MODERN_MAKE" = x; then
19755        { $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
19756$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;}
19757      else
19758        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19759          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19760            MAKE_EXPECTED_ENV='cygwin'
19761          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19762            MAKE_EXPECTED_ENV='msys'
19763          else
19764            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19765          fi
19766          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19767          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19768        else
19769          # Not relevant for non-Windows
19770          IS_MAKE_CORRECT_ENV=true
19771        fi
19772        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19773          { $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
19774$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;}
19775        else
19776          FOUND_MAKE=$MAKE_CANDIDATE
19777
19778  # Only process if variable expands to non-empty
19779
19780  if test "x$FOUND_MAKE" != x; then
19781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19782
19783  # First separate the path from the arguments. This will split at the first
19784  # space.
19785  complete="$FOUND_MAKE"
19786  path="${complete%% *}"
19787  tmp="$complete EOL"
19788  arguments="${tmp#* }"
19789
19790  # Input might be given as Windows format, start by converting to
19791  # unix format.
19792  new_path=`$CYGPATH -u "$path"`
19793
19794  # Now try to locate executable using which
19795  new_path=`$WHICH "$new_path" 2> /dev/null`
19796  # bat and cmd files are not always considered executable in cygwin causing which
19797  # to not find them
19798  if test "x$new_path" = x \
19799      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19800      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19801    new_path=`$CYGPATH -u "$path"`
19802  fi
19803  if test "x$new_path" = x; then
19804    # Oops. Which didn't find the executable.
19805    # The splitting of arguments from the executable at a space might have been incorrect,
19806    # since paths with space are more likely in Windows. Give it another try with the whole
19807    # argument.
19808    path="$complete"
19809    arguments="EOL"
19810    new_path=`$CYGPATH -u "$path"`
19811    new_path=`$WHICH "$new_path" 2> /dev/null`
19812    # bat and cmd files are not always considered executable in cygwin causing which
19813    # to not find them
19814    if test "x$new_path" = x \
19815        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19816        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19817      new_path=`$CYGPATH -u "$path"`
19818    fi
19819    if test "x$new_path" = x; then
19820      # It's still not found. Now this is an unrecoverable error.
19821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19822$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19823      has_space=`$ECHO "$complete" | $GREP " "`
19824      if test "x$has_space" != x; then
19825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19827      fi
19828      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19829    fi
19830  fi
19831
19832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19835  # "foo.exe" is OK but "foo" is an error.
19836  #
19837  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19838  # It is also a way to make sure we got the proper file name for the real test later on.
19839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19840  if test "x$test_shortpath" = x; then
19841    # Short path failed, file does not exist as specified.
19842    # Try adding .exe or .cmd
19843    if test -f "${new_path}.exe"; then
19844      input_to_shortpath="${new_path}.exe"
19845    elif test -f "${new_path}.cmd"; then
19846      input_to_shortpath="${new_path}.cmd"
19847    else
19848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19849$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19850      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19851$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19852      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19853    fi
19854  else
19855    input_to_shortpath="$new_path"
19856  fi
19857
19858  # Call helper function which possibly converts this using DOS-style short mode.
19859  # If so, the updated path is stored in $new_path.
19860  new_path="$input_to_shortpath"
19861
19862  input_path="$input_to_shortpath"
19863  # Check if we need to convert this using DOS-style short mode. If the path
19864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19865  # take no chances and rewrite it.
19866  # Note: m4 eats our [], so we need to use [ and ] instead.
19867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19868  if test "x$has_forbidden_chars" != x; then
19869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19873      # Going to short mode and back again did indeed matter. Since short mode is
19874      # case insensitive, let's make it lowercase to improve readability.
19875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19876      # Now convert it back to Unix-style (cygpath)
19877      input_path=`$CYGPATH -u "$shortmode_path"`
19878      new_path="$input_path"
19879    fi
19880  fi
19881
19882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19883  if test "x$test_cygdrive_prefix" = x; then
19884    # As a simple fix, exclude /usr/bin since it's not a real path.
19885    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19887      # a path prefixed by /cygdrive for fixpath to work.
19888      new_path="$CYGWIN_ROOT_PATH$input_path"
19889    fi
19890  fi
19891
19892  # remove trailing .exe if any
19893  new_path="${new_path/%.exe/}"
19894
19895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19896
19897  # First separate the path from the arguments. This will split at the first
19898  # space.
19899  complete="$FOUND_MAKE"
19900  path="${complete%% *}"
19901  tmp="$complete EOL"
19902  arguments="${tmp#* }"
19903
19904  # Input might be given as Windows format, start by converting to
19905  # unix format.
19906  new_path="$path"
19907
19908  windows_path="$new_path"
19909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19910    unix_path=`$CYGPATH -u "$windows_path"`
19911    new_path="$unix_path"
19912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19914    new_path="$unix_path"
19915  fi
19916
19917
19918  # Now try to locate executable using which
19919  new_path=`$WHICH "$new_path" 2> /dev/null`
19920
19921  if test "x$new_path" = x; then
19922    # Oops. Which didn't find the executable.
19923    # The splitting of arguments from the executable at a space might have been incorrect,
19924    # since paths with space are more likely in Windows. Give it another try with the whole
19925    # argument.
19926    path="$complete"
19927    arguments="EOL"
19928    new_path="$path"
19929
19930  windows_path="$new_path"
19931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19932    unix_path=`$CYGPATH -u "$windows_path"`
19933    new_path="$unix_path"
19934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19936    new_path="$unix_path"
19937  fi
19938
19939
19940    new_path=`$WHICH "$new_path" 2> /dev/null`
19941    # bat and cmd files are not always considered executable in MSYS causing which
19942    # to not find them
19943    if test "x$new_path" = x \
19944        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19945        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19946      new_path="$path"
19947
19948  windows_path="$new_path"
19949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19950    unix_path=`$CYGPATH -u "$windows_path"`
19951    new_path="$unix_path"
19952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19954    new_path="$unix_path"
19955  fi
19956
19957    fi
19958
19959    if test "x$new_path" = x; then
19960      # It's still not found. Now this is an unrecoverable error.
19961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19962$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19963      has_space=`$ECHO "$complete" | $GREP " "`
19964      if test "x$has_space" != x; then
19965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19967      fi
19968      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19969    fi
19970  fi
19971
19972  # Now new_path has a complete unix path to the binary
19973  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19974    # Keep paths in /bin as-is, but remove trailing .exe if any
19975    new_path="${new_path/%.exe/}"
19976    # Do not save /bin paths to all_fixpath_prefixes!
19977  else
19978    # Not in mixed or Windows style, start by that.
19979    new_path=`cmd //c echo $new_path`
19980
19981  input_path="$new_path"
19982  # Check if we need to convert this using DOS-style short mode. If the path
19983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19984  # take no chances and rewrite it.
19985  # Note: m4 eats our [], so we need to use [ and ] instead.
19986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19987  if test "x$has_forbidden_chars" != x; then
19988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19990  fi
19991
19992    # Output is in $new_path
19993
19994  windows_path="$new_path"
19995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19996    unix_path=`$CYGPATH -u "$windows_path"`
19997    new_path="$unix_path"
19998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20000    new_path="$unix_path"
20001  fi
20002
20003    # remove trailing .exe if any
20004    new_path="${new_path/%.exe/}"
20005
20006    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20007    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20008  fi
20009
20010    else
20011      # We're on a unix platform. Hooray! :)
20012      # First separate the path from the arguments. This will split at the first
20013      # space.
20014      complete="$FOUND_MAKE"
20015      path="${complete%% *}"
20016      tmp="$complete EOL"
20017      arguments="${tmp#* }"
20018
20019      # Cannot rely on the command "which" here since it doesn't always work.
20020      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20021      if test -z "$is_absolute_path"; then
20022        # Path to executable is not absolute. Find it.
20023        IFS_save="$IFS"
20024        IFS=:
20025        for p in $PATH; do
20026          if test -f "$p/$path" && test -x "$p/$path"; then
20027            new_path="$p/$path"
20028            break
20029          fi
20030        done
20031        IFS="$IFS_save"
20032      else
20033        # This is an absolute path, we can use it without further modifications.
20034        new_path="$path"
20035      fi
20036
20037      if test "x$new_path" = x; then
20038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20040        has_space=`$ECHO "$complete" | $GREP " "`
20041        if test "x$has_space" != x; then
20042          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20043$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20044        fi
20045        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20046      fi
20047    fi
20048
20049    # Now join together the path and the arguments once again
20050    if test "x$arguments" != xEOL; then
20051      new_complete="$new_path ${arguments% *}"
20052    else
20053      new_complete="$new_path"
20054    fi
20055
20056    if test "x$complete" != "x$new_complete"; then
20057      FOUND_MAKE="$new_complete"
20058      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20059$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20060    fi
20061  fi
20062
20063        fi
20064      fi
20065    fi
20066  fi
20067
20068    if test "x$FOUND_MAKE" = x; then
20069      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20070    fi
20071
20072  fi
20073
20074
20075  MAKE=$FOUND_MAKE
20076
20077  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20078$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20079
20080
20081  # Check if make supports the output sync option and if so, setup using it.
20082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20083$as_echo_n "checking if make --output-sync is supported... " >&6; }
20084  if $MAKE --version -O > /dev/null 2>&1; then
20085    OUTPUT_SYNC_SUPPORTED=true
20086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20087$as_echo "yes" >&6; }
20088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20089$as_echo_n "checking for output-sync value... " >&6; }
20090
20091# Check whether --with-output-sync was given.
20092if test "${with_output_sync+set}" = set; then :
20093  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20094fi
20095
20096    if test "x$OUTPUT_SYNC" = "x"; then
20097      OUTPUT_SYNC=none
20098    fi
20099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20100$as_echo "$OUTPUT_SYNC" >&6; }
20101    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20102      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20103    fi
20104  else
20105    OUTPUT_SYNC_SUPPORTED=false
20106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20107$as_echo "no" >&6; }
20108  fi
20109
20110
20111
20112
20113
20114
20115  # Test if find supports -delete
20116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20117$as_echo_n "checking if find supports -delete... " >&6; }
20118  FIND_DELETE="-delete"
20119
20120  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20121
20122  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20123
20124  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20125  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20126    # No, it does not.
20127    rm $DELETEDIR/TestIfFindSupportsDelete
20128    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20129      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20130      FIND_DELETE="-print | xargs rm"
20131    else
20132      FIND_DELETE="-exec rm \{\} \+"
20133    fi
20134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20135$as_echo "no" >&6; }
20136  else
20137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20138$as_echo "yes" >&6; }
20139  fi
20140  rmdir $DELETEDIR
20141
20142
20143
20144  # These tools might not be installed by default,
20145  # need hint on how to install them.
20146
20147
20148
20149  # Publish this variable in the help.
20150
20151
20152  if [ -z "${UNZIP+x}" ]; then
20153    # The variable is not set by user, try to locate tool using the code snippet
20154    for ac_prog in unzip
20155do
20156  # Extract the first word of "$ac_prog", so it can be a program name with args.
20157set dummy $ac_prog; ac_word=$2
20158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20159$as_echo_n "checking for $ac_word... " >&6; }
20160if ${ac_cv_path_UNZIP+:} false; then :
20161  $as_echo_n "(cached) " >&6
20162else
20163  case $UNZIP in
20164  [\\/]* | ?:[\\/]*)
20165  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20166  ;;
20167  *)
20168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20169for as_dir in $PATH
20170do
20171  IFS=$as_save_IFS
20172  test -z "$as_dir" && as_dir=.
20173    for ac_exec_ext in '' $ac_executable_extensions; do
20174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20175    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20177    break 2
20178  fi
20179done
20180  done
20181IFS=$as_save_IFS
20182
20183  ;;
20184esac
20185fi
20186UNZIP=$ac_cv_path_UNZIP
20187if test -n "$UNZIP"; then
20188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20189$as_echo "$UNZIP" >&6; }
20190else
20191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20192$as_echo "no" >&6; }
20193fi
20194
20195
20196  test -n "$UNZIP" && break
20197done
20198
20199  else
20200    # The variable is set, but is it from the command line or the environment?
20201
20202    # Try to remove the string !UNZIP! from our list.
20203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20205      # If it failed, the variable was not from the command line. Ignore it,
20206      # but warn the user (except for BASH, which is always set by the calling BASH).
20207      if test "xUNZIP" != xBASH; then
20208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20209$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20210      fi
20211      # Try to locate tool using the code snippet
20212      for ac_prog in unzip
20213do
20214  # Extract the first word of "$ac_prog", so it can be a program name with args.
20215set dummy $ac_prog; ac_word=$2
20216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20217$as_echo_n "checking for $ac_word... " >&6; }
20218if ${ac_cv_path_UNZIP+:} false; then :
20219  $as_echo_n "(cached) " >&6
20220else
20221  case $UNZIP in
20222  [\\/]* | ?:[\\/]*)
20223  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20224  ;;
20225  *)
20226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20227for as_dir in $PATH
20228do
20229  IFS=$as_save_IFS
20230  test -z "$as_dir" && as_dir=.
20231    for ac_exec_ext in '' $ac_executable_extensions; do
20232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20233    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20235    break 2
20236  fi
20237done
20238  done
20239IFS=$as_save_IFS
20240
20241  ;;
20242esac
20243fi
20244UNZIP=$ac_cv_path_UNZIP
20245if test -n "$UNZIP"; then
20246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20247$as_echo "$UNZIP" >&6; }
20248else
20249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20250$as_echo "no" >&6; }
20251fi
20252
20253
20254  test -n "$UNZIP" && break
20255done
20256
20257    else
20258      # If it succeeded, then it was overridden by the user. We will use it
20259      # for the tool.
20260
20261      # First remove it from the list of overridden variables, so we can test
20262      # for unknown variables in the end.
20263      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20264
20265      # Check if we try to supply an empty value
20266      if test "x$UNZIP" = x; then
20267        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20268$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20270$as_echo_n "checking for UNZIP... " >&6; }
20271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20272$as_echo "disabled" >&6; }
20273      else
20274        # Check if the provided tool contains a complete path.
20275        tool_specified="$UNZIP"
20276        tool_basename="${tool_specified##*/}"
20277        if test "x$tool_basename" = "x$tool_specified"; then
20278          # A command without a complete path is provided, search $PATH.
20279          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20280$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20281          # Extract the first word of "$tool_basename", so it can be a program name with args.
20282set dummy $tool_basename; ac_word=$2
20283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20284$as_echo_n "checking for $ac_word... " >&6; }
20285if ${ac_cv_path_UNZIP+:} false; then :
20286  $as_echo_n "(cached) " >&6
20287else
20288  case $UNZIP in
20289  [\\/]* | ?:[\\/]*)
20290  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20291  ;;
20292  *)
20293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20294for as_dir in $PATH
20295do
20296  IFS=$as_save_IFS
20297  test -z "$as_dir" && as_dir=.
20298    for ac_exec_ext in '' $ac_executable_extensions; do
20299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20300    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20302    break 2
20303  fi
20304done
20305  done
20306IFS=$as_save_IFS
20307
20308  ;;
20309esac
20310fi
20311UNZIP=$ac_cv_path_UNZIP
20312if test -n "$UNZIP"; then
20313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20314$as_echo "$UNZIP" >&6; }
20315else
20316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20317$as_echo "no" >&6; }
20318fi
20319
20320
20321          if test "x$UNZIP" = x; then
20322            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20323          fi
20324        else
20325          # Otherwise we believe it is a complete path. Use it as it is.
20326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20327$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20328          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20329$as_echo_n "checking for UNZIP... " >&6; }
20330          if test ! -x "$tool_specified"; then
20331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20332$as_echo "not found" >&6; }
20333            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20334          fi
20335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20336$as_echo "$tool_specified" >&6; }
20337        fi
20338      fi
20339    fi
20340
20341  fi
20342
20343
20344
20345  if test "x$UNZIP" = x; then
20346    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20347  fi
20348
20349
20350
20351
20352
20353  # Publish this variable in the help.
20354
20355
20356  if [ -z "${ZIP+x}" ]; then
20357    # The variable is not set by user, try to locate tool using the code snippet
20358    for ac_prog in zip
20359do
20360  # Extract the first word of "$ac_prog", so it can be a program name with args.
20361set dummy $ac_prog; ac_word=$2
20362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20363$as_echo_n "checking for $ac_word... " >&6; }
20364if ${ac_cv_path_ZIP+:} false; then :
20365  $as_echo_n "(cached) " >&6
20366else
20367  case $ZIP in
20368  [\\/]* | ?:[\\/]*)
20369  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20370  ;;
20371  *)
20372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20373for as_dir in $PATH
20374do
20375  IFS=$as_save_IFS
20376  test -z "$as_dir" && as_dir=.
20377    for ac_exec_ext in '' $ac_executable_extensions; do
20378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20379    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20381    break 2
20382  fi
20383done
20384  done
20385IFS=$as_save_IFS
20386
20387  ;;
20388esac
20389fi
20390ZIP=$ac_cv_path_ZIP
20391if test -n "$ZIP"; then
20392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20393$as_echo "$ZIP" >&6; }
20394else
20395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20396$as_echo "no" >&6; }
20397fi
20398
20399
20400  test -n "$ZIP" && break
20401done
20402
20403  else
20404    # The variable is set, but is it from the command line or the environment?
20405
20406    # Try to remove the string !ZIP! from our list.
20407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20409      # If it failed, the variable was not from the command line. Ignore it,
20410      # but warn the user (except for BASH, which is always set by the calling BASH).
20411      if test "xZIP" != xBASH; then
20412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20413$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20414      fi
20415      # Try to locate tool using the code snippet
20416      for ac_prog in zip
20417do
20418  # Extract the first word of "$ac_prog", so it can be a program name with args.
20419set dummy $ac_prog; ac_word=$2
20420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20421$as_echo_n "checking for $ac_word... " >&6; }
20422if ${ac_cv_path_ZIP+:} false; then :
20423  $as_echo_n "(cached) " >&6
20424else
20425  case $ZIP in
20426  [\\/]* | ?:[\\/]*)
20427  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20428  ;;
20429  *)
20430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20431for as_dir in $PATH
20432do
20433  IFS=$as_save_IFS
20434  test -z "$as_dir" && as_dir=.
20435    for ac_exec_ext in '' $ac_executable_extensions; do
20436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20437    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20439    break 2
20440  fi
20441done
20442  done
20443IFS=$as_save_IFS
20444
20445  ;;
20446esac
20447fi
20448ZIP=$ac_cv_path_ZIP
20449if test -n "$ZIP"; then
20450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20451$as_echo "$ZIP" >&6; }
20452else
20453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20454$as_echo "no" >&6; }
20455fi
20456
20457
20458  test -n "$ZIP" && break
20459done
20460
20461    else
20462      # If it succeeded, then it was overridden by the user. We will use it
20463      # for the tool.
20464
20465      # First remove it from the list of overridden variables, so we can test
20466      # for unknown variables in the end.
20467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20468
20469      # Check if we try to supply an empty value
20470      if test "x$ZIP" = x; then
20471        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20472$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20474$as_echo_n "checking for ZIP... " >&6; }
20475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20476$as_echo "disabled" >&6; }
20477      else
20478        # Check if the provided tool contains a complete path.
20479        tool_specified="$ZIP"
20480        tool_basename="${tool_specified##*/}"
20481        if test "x$tool_basename" = "x$tool_specified"; then
20482          # A command without a complete path is provided, search $PATH.
20483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20484$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20485          # Extract the first word of "$tool_basename", so it can be a program name with args.
20486set dummy $tool_basename; ac_word=$2
20487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20488$as_echo_n "checking for $ac_word... " >&6; }
20489if ${ac_cv_path_ZIP+:} false; then :
20490  $as_echo_n "(cached) " >&6
20491else
20492  case $ZIP in
20493  [\\/]* | ?:[\\/]*)
20494  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20495  ;;
20496  *)
20497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20498for as_dir in $PATH
20499do
20500  IFS=$as_save_IFS
20501  test -z "$as_dir" && as_dir=.
20502    for ac_exec_ext in '' $ac_executable_extensions; do
20503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20504    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20506    break 2
20507  fi
20508done
20509  done
20510IFS=$as_save_IFS
20511
20512  ;;
20513esac
20514fi
20515ZIP=$ac_cv_path_ZIP
20516if test -n "$ZIP"; then
20517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20518$as_echo "$ZIP" >&6; }
20519else
20520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20521$as_echo "no" >&6; }
20522fi
20523
20524
20525          if test "x$ZIP" = x; then
20526            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20527          fi
20528        else
20529          # Otherwise we believe it is a complete path. Use it as it is.
20530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20531$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20532          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20533$as_echo_n "checking for ZIP... " >&6; }
20534          if test ! -x "$tool_specified"; then
20535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20536$as_echo "not found" >&6; }
20537            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20538          fi
20539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20540$as_echo "$tool_specified" >&6; }
20541        fi
20542      fi
20543    fi
20544
20545  fi
20546
20547
20548
20549  if test "x$ZIP" = x; then
20550    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20551  fi
20552
20553
20554
20555  # Non-required basic tools
20556
20557
20558
20559  # Publish this variable in the help.
20560
20561
20562  if [ -z "${LDD+x}" ]; then
20563    # The variable is not set by user, try to locate tool using the code snippet
20564    for ac_prog in ldd
20565do
20566  # Extract the first word of "$ac_prog", so it can be a program name with args.
20567set dummy $ac_prog; ac_word=$2
20568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20569$as_echo_n "checking for $ac_word... " >&6; }
20570if ${ac_cv_path_LDD+:} false; then :
20571  $as_echo_n "(cached) " >&6
20572else
20573  case $LDD in
20574  [\\/]* | ?:[\\/]*)
20575  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20576  ;;
20577  *)
20578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20579for as_dir in $PATH
20580do
20581  IFS=$as_save_IFS
20582  test -z "$as_dir" && as_dir=.
20583    for ac_exec_ext in '' $ac_executable_extensions; do
20584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20585    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20587    break 2
20588  fi
20589done
20590  done
20591IFS=$as_save_IFS
20592
20593  ;;
20594esac
20595fi
20596LDD=$ac_cv_path_LDD
20597if test -n "$LDD"; then
20598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20599$as_echo "$LDD" >&6; }
20600else
20601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20602$as_echo "no" >&6; }
20603fi
20604
20605
20606  test -n "$LDD" && break
20607done
20608
20609  else
20610    # The variable is set, but is it from the command line or the environment?
20611
20612    # Try to remove the string !LDD! from our list.
20613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20615      # If it failed, the variable was not from the command line. Ignore it,
20616      # but warn the user (except for BASH, which is always set by the calling BASH).
20617      if test "xLDD" != xBASH; then
20618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20619$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20620      fi
20621      # Try to locate tool using the code snippet
20622      for ac_prog in ldd
20623do
20624  # Extract the first word of "$ac_prog", so it can be a program name with args.
20625set dummy $ac_prog; ac_word=$2
20626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20627$as_echo_n "checking for $ac_word... " >&6; }
20628if ${ac_cv_path_LDD+:} false; then :
20629  $as_echo_n "(cached) " >&6
20630else
20631  case $LDD in
20632  [\\/]* | ?:[\\/]*)
20633  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20634  ;;
20635  *)
20636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20637for as_dir in $PATH
20638do
20639  IFS=$as_save_IFS
20640  test -z "$as_dir" && as_dir=.
20641    for ac_exec_ext in '' $ac_executable_extensions; do
20642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20643    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20645    break 2
20646  fi
20647done
20648  done
20649IFS=$as_save_IFS
20650
20651  ;;
20652esac
20653fi
20654LDD=$ac_cv_path_LDD
20655if test -n "$LDD"; then
20656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20657$as_echo "$LDD" >&6; }
20658else
20659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20660$as_echo "no" >&6; }
20661fi
20662
20663
20664  test -n "$LDD" && break
20665done
20666
20667    else
20668      # If it succeeded, then it was overridden by the user. We will use it
20669      # for the tool.
20670
20671      # First remove it from the list of overridden variables, so we can test
20672      # for unknown variables in the end.
20673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20674
20675      # Check if we try to supply an empty value
20676      if test "x$LDD" = x; then
20677        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20678$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20680$as_echo_n "checking for LDD... " >&6; }
20681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20682$as_echo "disabled" >&6; }
20683      else
20684        # Check if the provided tool contains a complete path.
20685        tool_specified="$LDD"
20686        tool_basename="${tool_specified##*/}"
20687        if test "x$tool_basename" = "x$tool_specified"; then
20688          # A command without a complete path is provided, search $PATH.
20689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20690$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20691          # Extract the first word of "$tool_basename", so it can be a program name with args.
20692set dummy $tool_basename; ac_word=$2
20693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20694$as_echo_n "checking for $ac_word... " >&6; }
20695if ${ac_cv_path_LDD+:} false; then :
20696  $as_echo_n "(cached) " >&6
20697else
20698  case $LDD in
20699  [\\/]* | ?:[\\/]*)
20700  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20701  ;;
20702  *)
20703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20704for as_dir in $PATH
20705do
20706  IFS=$as_save_IFS
20707  test -z "$as_dir" && as_dir=.
20708    for ac_exec_ext in '' $ac_executable_extensions; do
20709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20710    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20712    break 2
20713  fi
20714done
20715  done
20716IFS=$as_save_IFS
20717
20718  ;;
20719esac
20720fi
20721LDD=$ac_cv_path_LDD
20722if test -n "$LDD"; then
20723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20724$as_echo "$LDD" >&6; }
20725else
20726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20727$as_echo "no" >&6; }
20728fi
20729
20730
20731          if test "x$LDD" = x; then
20732            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20733          fi
20734        else
20735          # Otherwise we believe it is a complete path. Use it as it is.
20736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20737$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20738          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20739$as_echo_n "checking for LDD... " >&6; }
20740          if test ! -x "$tool_specified"; then
20741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20742$as_echo "not found" >&6; }
20743            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20744          fi
20745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20746$as_echo "$tool_specified" >&6; }
20747        fi
20748      fi
20749    fi
20750
20751  fi
20752
20753
20754  if test "x$LDD" = "x"; then
20755    # List shared lib dependencies is used for
20756    # debug output and checking for forbidden dependencies.
20757    # We can build without it.
20758    LDD="true"
20759  fi
20760
20761
20762  # Publish this variable in the help.
20763
20764
20765  if [ -z "${OTOOL+x}" ]; then
20766    # The variable is not set by user, try to locate tool using the code snippet
20767    for ac_prog in otool
20768do
20769  # Extract the first word of "$ac_prog", so it can be a program name with args.
20770set dummy $ac_prog; ac_word=$2
20771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20772$as_echo_n "checking for $ac_word... " >&6; }
20773if ${ac_cv_path_OTOOL+:} false; then :
20774  $as_echo_n "(cached) " >&6
20775else
20776  case $OTOOL in
20777  [\\/]* | ?:[\\/]*)
20778  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20779  ;;
20780  *)
20781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20782for as_dir in $PATH
20783do
20784  IFS=$as_save_IFS
20785  test -z "$as_dir" && as_dir=.
20786    for ac_exec_ext in '' $ac_executable_extensions; do
20787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20788    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20790    break 2
20791  fi
20792done
20793  done
20794IFS=$as_save_IFS
20795
20796  ;;
20797esac
20798fi
20799OTOOL=$ac_cv_path_OTOOL
20800if test -n "$OTOOL"; then
20801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20802$as_echo "$OTOOL" >&6; }
20803else
20804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20805$as_echo "no" >&6; }
20806fi
20807
20808
20809  test -n "$OTOOL" && break
20810done
20811
20812  else
20813    # The variable is set, but is it from the command line or the environment?
20814
20815    # Try to remove the string !OTOOL! from our list.
20816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20818      # If it failed, the variable was not from the command line. Ignore it,
20819      # but warn the user (except for BASH, which is always set by the calling BASH).
20820      if test "xOTOOL" != xBASH; then
20821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20822$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20823      fi
20824      # Try to locate tool using the code snippet
20825      for ac_prog in otool
20826do
20827  # Extract the first word of "$ac_prog", so it can be a program name with args.
20828set dummy $ac_prog; ac_word=$2
20829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20830$as_echo_n "checking for $ac_word... " >&6; }
20831if ${ac_cv_path_OTOOL+:} false; then :
20832  $as_echo_n "(cached) " >&6
20833else
20834  case $OTOOL in
20835  [\\/]* | ?:[\\/]*)
20836  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20837  ;;
20838  *)
20839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20840for as_dir in $PATH
20841do
20842  IFS=$as_save_IFS
20843  test -z "$as_dir" && as_dir=.
20844    for ac_exec_ext in '' $ac_executable_extensions; do
20845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20846    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20848    break 2
20849  fi
20850done
20851  done
20852IFS=$as_save_IFS
20853
20854  ;;
20855esac
20856fi
20857OTOOL=$ac_cv_path_OTOOL
20858if test -n "$OTOOL"; then
20859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20860$as_echo "$OTOOL" >&6; }
20861else
20862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20863$as_echo "no" >&6; }
20864fi
20865
20866
20867  test -n "$OTOOL" && break
20868done
20869
20870    else
20871      # If it succeeded, then it was overridden by the user. We will use it
20872      # for the tool.
20873
20874      # First remove it from the list of overridden variables, so we can test
20875      # for unknown variables in the end.
20876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20877
20878      # Check if we try to supply an empty value
20879      if test "x$OTOOL" = x; then
20880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20881$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20883$as_echo_n "checking for OTOOL... " >&6; }
20884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20885$as_echo "disabled" >&6; }
20886      else
20887        # Check if the provided tool contains a complete path.
20888        tool_specified="$OTOOL"
20889        tool_basename="${tool_specified##*/}"
20890        if test "x$tool_basename" = "x$tool_specified"; then
20891          # A command without a complete path is provided, search $PATH.
20892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20893$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20894          # Extract the first word of "$tool_basename", so it can be a program name with args.
20895set dummy $tool_basename; ac_word=$2
20896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20897$as_echo_n "checking for $ac_word... " >&6; }
20898if ${ac_cv_path_OTOOL+:} false; then :
20899  $as_echo_n "(cached) " >&6
20900else
20901  case $OTOOL in
20902  [\\/]* | ?:[\\/]*)
20903  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20904  ;;
20905  *)
20906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20907for as_dir in $PATH
20908do
20909  IFS=$as_save_IFS
20910  test -z "$as_dir" && as_dir=.
20911    for ac_exec_ext in '' $ac_executable_extensions; do
20912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20913    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20915    break 2
20916  fi
20917done
20918  done
20919IFS=$as_save_IFS
20920
20921  ;;
20922esac
20923fi
20924OTOOL=$ac_cv_path_OTOOL
20925if test -n "$OTOOL"; then
20926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20927$as_echo "$OTOOL" >&6; }
20928else
20929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20930$as_echo "no" >&6; }
20931fi
20932
20933
20934          if test "x$OTOOL" = x; then
20935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20936          fi
20937        else
20938          # Otherwise we believe it is a complete path. Use it as it is.
20939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
20940$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20942$as_echo_n "checking for OTOOL... " >&6; }
20943          if test ! -x "$tool_specified"; then
20944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20945$as_echo "not found" >&6; }
20946            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
20947          fi
20948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20949$as_echo "$tool_specified" >&6; }
20950        fi
20951      fi
20952    fi
20953
20954  fi
20955
20956
20957  if test "x$OTOOL" = "x"; then
20958    OTOOL="true"
20959  fi
20960
20961
20962  # Publish this variable in the help.
20963
20964
20965  if [ -z "${READELF+x}" ]; then
20966    # The variable is not set by user, try to locate tool using the code snippet
20967    for ac_prog in greadelf readelf
20968do
20969  # Extract the first word of "$ac_prog", so it can be a program name with args.
20970set dummy $ac_prog; ac_word=$2
20971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20972$as_echo_n "checking for $ac_word... " >&6; }
20973if ${ac_cv_path_READELF+:} false; then :
20974  $as_echo_n "(cached) " >&6
20975else
20976  case $READELF in
20977  [\\/]* | ?:[\\/]*)
20978  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
20979  ;;
20980  *)
20981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20982for as_dir in $PATH
20983do
20984  IFS=$as_save_IFS
20985  test -z "$as_dir" && as_dir=.
20986    for ac_exec_ext in '' $ac_executable_extensions; do
20987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20988    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
20989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20990    break 2
20991  fi
20992done
20993  done
20994IFS=$as_save_IFS
20995
20996  ;;
20997esac
20998fi
20999READELF=$ac_cv_path_READELF
21000if test -n "$READELF"; then
21001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21002$as_echo "$READELF" >&6; }
21003else
21004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21005$as_echo "no" >&6; }
21006fi
21007
21008
21009  test -n "$READELF" && break
21010done
21011
21012  else
21013    # The variable is set, but is it from the command line or the environment?
21014
21015    # Try to remove the string !READELF! from our list.
21016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21018      # If it failed, the variable was not from the command line. Ignore it,
21019      # but warn the user (except for BASH, which is always set by the calling BASH).
21020      if test "xREADELF" != xBASH; then
21021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21022$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21023      fi
21024      # Try to locate tool using the code snippet
21025      for ac_prog in greadelf readelf
21026do
21027  # Extract the first word of "$ac_prog", so it can be a program name with args.
21028set dummy $ac_prog; ac_word=$2
21029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21030$as_echo_n "checking for $ac_word... " >&6; }
21031if ${ac_cv_path_READELF+:} false; then :
21032  $as_echo_n "(cached) " >&6
21033else
21034  case $READELF in
21035  [\\/]* | ?:[\\/]*)
21036  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21037  ;;
21038  *)
21039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21040for as_dir in $PATH
21041do
21042  IFS=$as_save_IFS
21043  test -z "$as_dir" && as_dir=.
21044    for ac_exec_ext in '' $ac_executable_extensions; do
21045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21046    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21048    break 2
21049  fi
21050done
21051  done
21052IFS=$as_save_IFS
21053
21054  ;;
21055esac
21056fi
21057READELF=$ac_cv_path_READELF
21058if test -n "$READELF"; then
21059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21060$as_echo "$READELF" >&6; }
21061else
21062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21063$as_echo "no" >&6; }
21064fi
21065
21066
21067  test -n "$READELF" && break
21068done
21069
21070    else
21071      # If it succeeded, then it was overridden by the user. We will use it
21072      # for the tool.
21073
21074      # First remove it from the list of overridden variables, so we can test
21075      # for unknown variables in the end.
21076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21077
21078      # Check if we try to supply an empty value
21079      if test "x$READELF" = x; then
21080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21081$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21083$as_echo_n "checking for READELF... " >&6; }
21084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21085$as_echo "disabled" >&6; }
21086      else
21087        # Check if the provided tool contains a complete path.
21088        tool_specified="$READELF"
21089        tool_basename="${tool_specified##*/}"
21090        if test "x$tool_basename" = "x$tool_specified"; then
21091          # A command without a complete path is provided, search $PATH.
21092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21093$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21094          # Extract the first word of "$tool_basename", so it can be a program name with args.
21095set dummy $tool_basename; ac_word=$2
21096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21097$as_echo_n "checking for $ac_word... " >&6; }
21098if ${ac_cv_path_READELF+:} false; then :
21099  $as_echo_n "(cached) " >&6
21100else
21101  case $READELF in
21102  [\\/]* | ?:[\\/]*)
21103  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21104  ;;
21105  *)
21106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21107for as_dir in $PATH
21108do
21109  IFS=$as_save_IFS
21110  test -z "$as_dir" && as_dir=.
21111    for ac_exec_ext in '' $ac_executable_extensions; do
21112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21113    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21115    break 2
21116  fi
21117done
21118  done
21119IFS=$as_save_IFS
21120
21121  ;;
21122esac
21123fi
21124READELF=$ac_cv_path_READELF
21125if test -n "$READELF"; then
21126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21127$as_echo "$READELF" >&6; }
21128else
21129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21130$as_echo "no" >&6; }
21131fi
21132
21133
21134          if test "x$READELF" = x; then
21135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21136          fi
21137        else
21138          # Otherwise we believe it is a complete path. Use it as it is.
21139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21140$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21142$as_echo_n "checking for READELF... " >&6; }
21143          if test ! -x "$tool_specified"; then
21144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21145$as_echo "not found" >&6; }
21146            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21147          fi
21148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21149$as_echo "$tool_specified" >&6; }
21150        fi
21151      fi
21152    fi
21153
21154  fi
21155
21156
21157
21158
21159  # Publish this variable in the help.
21160
21161
21162  if [ -z "${HG+x}" ]; then
21163    # The variable is not set by user, try to locate tool using the code snippet
21164    for ac_prog in hg
21165do
21166  # Extract the first word of "$ac_prog", so it can be a program name with args.
21167set dummy $ac_prog; ac_word=$2
21168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21169$as_echo_n "checking for $ac_word... " >&6; }
21170if ${ac_cv_path_HG+:} false; then :
21171  $as_echo_n "(cached) " >&6
21172else
21173  case $HG in
21174  [\\/]* | ?:[\\/]*)
21175  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21176  ;;
21177  *)
21178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21179for as_dir in $PATH
21180do
21181  IFS=$as_save_IFS
21182  test -z "$as_dir" && as_dir=.
21183    for ac_exec_ext in '' $ac_executable_extensions; do
21184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21185    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21187    break 2
21188  fi
21189done
21190  done
21191IFS=$as_save_IFS
21192
21193  ;;
21194esac
21195fi
21196HG=$ac_cv_path_HG
21197if test -n "$HG"; then
21198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21199$as_echo "$HG" >&6; }
21200else
21201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21202$as_echo "no" >&6; }
21203fi
21204
21205
21206  test -n "$HG" && break
21207done
21208
21209  else
21210    # The variable is set, but is it from the command line or the environment?
21211
21212    # Try to remove the string !HG! from our list.
21213    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21214    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21215      # If it failed, the variable was not from the command line. Ignore it,
21216      # but warn the user (except for BASH, which is always set by the calling BASH).
21217      if test "xHG" != xBASH; then
21218        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21219$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21220      fi
21221      # Try to locate tool using the code snippet
21222      for ac_prog in hg
21223do
21224  # Extract the first word of "$ac_prog", so it can be a program name with args.
21225set dummy $ac_prog; ac_word=$2
21226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21227$as_echo_n "checking for $ac_word... " >&6; }
21228if ${ac_cv_path_HG+:} false; then :
21229  $as_echo_n "(cached) " >&6
21230else
21231  case $HG in
21232  [\\/]* | ?:[\\/]*)
21233  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21234  ;;
21235  *)
21236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21237for as_dir in $PATH
21238do
21239  IFS=$as_save_IFS
21240  test -z "$as_dir" && as_dir=.
21241    for ac_exec_ext in '' $ac_executable_extensions; do
21242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21243    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21245    break 2
21246  fi
21247done
21248  done
21249IFS=$as_save_IFS
21250
21251  ;;
21252esac
21253fi
21254HG=$ac_cv_path_HG
21255if test -n "$HG"; then
21256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21257$as_echo "$HG" >&6; }
21258else
21259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21260$as_echo "no" >&6; }
21261fi
21262
21263
21264  test -n "$HG" && break
21265done
21266
21267    else
21268      # If it succeeded, then it was overridden by the user. We will use it
21269      # for the tool.
21270
21271      # First remove it from the list of overridden variables, so we can test
21272      # for unknown variables in the end.
21273      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21274
21275      # Check if we try to supply an empty value
21276      if test "x$HG" = x; then
21277        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21278$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21279        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21280$as_echo_n "checking for HG... " >&6; }
21281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21282$as_echo "disabled" >&6; }
21283      else
21284        # Check if the provided tool contains a complete path.
21285        tool_specified="$HG"
21286        tool_basename="${tool_specified##*/}"
21287        if test "x$tool_basename" = "x$tool_specified"; then
21288          # A command without a complete path is provided, search $PATH.
21289          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21290$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21291          # Extract the first word of "$tool_basename", so it can be a program name with args.
21292set dummy $tool_basename; ac_word=$2
21293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21294$as_echo_n "checking for $ac_word... " >&6; }
21295if ${ac_cv_path_HG+:} false; then :
21296  $as_echo_n "(cached) " >&6
21297else
21298  case $HG in
21299  [\\/]* | ?:[\\/]*)
21300  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21301  ;;
21302  *)
21303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21304for as_dir in $PATH
21305do
21306  IFS=$as_save_IFS
21307  test -z "$as_dir" && as_dir=.
21308    for ac_exec_ext in '' $ac_executable_extensions; do
21309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21310    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21312    break 2
21313  fi
21314done
21315  done
21316IFS=$as_save_IFS
21317
21318  ;;
21319esac
21320fi
21321HG=$ac_cv_path_HG
21322if test -n "$HG"; then
21323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21324$as_echo "$HG" >&6; }
21325else
21326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21327$as_echo "no" >&6; }
21328fi
21329
21330
21331          if test "x$HG" = x; then
21332            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21333          fi
21334        else
21335          # Otherwise we believe it is a complete path. Use it as it is.
21336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21337$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21338          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21339$as_echo_n "checking for HG... " >&6; }
21340          if test ! -x "$tool_specified"; then
21341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21342$as_echo "not found" >&6; }
21343            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21344          fi
21345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21346$as_echo "$tool_specified" >&6; }
21347        fi
21348      fi
21349    fi
21350
21351  fi
21352
21353
21354
21355
21356  # Publish this variable in the help.
21357
21358
21359  if [ -z "${STAT+x}" ]; then
21360    # The variable is not set by user, try to locate tool using the code snippet
21361    for ac_prog in stat
21362do
21363  # Extract the first word of "$ac_prog", so it can be a program name with args.
21364set dummy $ac_prog; ac_word=$2
21365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21366$as_echo_n "checking for $ac_word... " >&6; }
21367if ${ac_cv_path_STAT+:} false; then :
21368  $as_echo_n "(cached) " >&6
21369else
21370  case $STAT in
21371  [\\/]* | ?:[\\/]*)
21372  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21373  ;;
21374  *)
21375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21376for as_dir in $PATH
21377do
21378  IFS=$as_save_IFS
21379  test -z "$as_dir" && as_dir=.
21380    for ac_exec_ext in '' $ac_executable_extensions; do
21381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21382    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21384    break 2
21385  fi
21386done
21387  done
21388IFS=$as_save_IFS
21389
21390  ;;
21391esac
21392fi
21393STAT=$ac_cv_path_STAT
21394if test -n "$STAT"; then
21395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21396$as_echo "$STAT" >&6; }
21397else
21398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21399$as_echo "no" >&6; }
21400fi
21401
21402
21403  test -n "$STAT" && break
21404done
21405
21406  else
21407    # The variable is set, but is it from the command line or the environment?
21408
21409    # Try to remove the string !STAT! from our list.
21410    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21411    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21412      # If it failed, the variable was not from the command line. Ignore it,
21413      # but warn the user (except for BASH, which is always set by the calling BASH).
21414      if test "xSTAT" != xBASH; then
21415        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21416$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21417      fi
21418      # Try to locate tool using the code snippet
21419      for ac_prog in stat
21420do
21421  # Extract the first word of "$ac_prog", so it can be a program name with args.
21422set dummy $ac_prog; ac_word=$2
21423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21424$as_echo_n "checking for $ac_word... " >&6; }
21425if ${ac_cv_path_STAT+:} false; then :
21426  $as_echo_n "(cached) " >&6
21427else
21428  case $STAT in
21429  [\\/]* | ?:[\\/]*)
21430  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21431  ;;
21432  *)
21433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21434for as_dir in $PATH
21435do
21436  IFS=$as_save_IFS
21437  test -z "$as_dir" && as_dir=.
21438    for ac_exec_ext in '' $ac_executable_extensions; do
21439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21440    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21442    break 2
21443  fi
21444done
21445  done
21446IFS=$as_save_IFS
21447
21448  ;;
21449esac
21450fi
21451STAT=$ac_cv_path_STAT
21452if test -n "$STAT"; then
21453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21454$as_echo "$STAT" >&6; }
21455else
21456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21457$as_echo "no" >&6; }
21458fi
21459
21460
21461  test -n "$STAT" && break
21462done
21463
21464    else
21465      # If it succeeded, then it was overridden by the user. We will use it
21466      # for the tool.
21467
21468      # First remove it from the list of overridden variables, so we can test
21469      # for unknown variables in the end.
21470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21471
21472      # Check if we try to supply an empty value
21473      if test "x$STAT" = x; then
21474        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21475$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21477$as_echo_n "checking for STAT... " >&6; }
21478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21479$as_echo "disabled" >&6; }
21480      else
21481        # Check if the provided tool contains a complete path.
21482        tool_specified="$STAT"
21483        tool_basename="${tool_specified##*/}"
21484        if test "x$tool_basename" = "x$tool_specified"; then
21485          # A command without a complete path is provided, search $PATH.
21486          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21487$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21488          # Extract the first word of "$tool_basename", so it can be a program name with args.
21489set dummy $tool_basename; ac_word=$2
21490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21491$as_echo_n "checking for $ac_word... " >&6; }
21492if ${ac_cv_path_STAT+:} false; then :
21493  $as_echo_n "(cached) " >&6
21494else
21495  case $STAT in
21496  [\\/]* | ?:[\\/]*)
21497  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21498  ;;
21499  *)
21500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21501for as_dir in $PATH
21502do
21503  IFS=$as_save_IFS
21504  test -z "$as_dir" && as_dir=.
21505    for ac_exec_ext in '' $ac_executable_extensions; do
21506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21507    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21509    break 2
21510  fi
21511done
21512  done
21513IFS=$as_save_IFS
21514
21515  ;;
21516esac
21517fi
21518STAT=$ac_cv_path_STAT
21519if test -n "$STAT"; then
21520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21521$as_echo "$STAT" >&6; }
21522else
21523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21524$as_echo "no" >&6; }
21525fi
21526
21527
21528          if test "x$STAT" = x; then
21529            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21530          fi
21531        else
21532          # Otherwise we believe it is a complete path. Use it as it is.
21533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21534$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21535          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21536$as_echo_n "checking for STAT... " >&6; }
21537          if test ! -x "$tool_specified"; then
21538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21539$as_echo "not found" >&6; }
21540            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21541          fi
21542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21543$as_echo "$tool_specified" >&6; }
21544        fi
21545      fi
21546    fi
21547
21548  fi
21549
21550
21551
21552
21553  # Publish this variable in the help.
21554
21555
21556  if [ -z "${TIME+x}" ]; then
21557    # The variable is not set by user, try to locate tool using the code snippet
21558    for ac_prog in time
21559do
21560  # Extract the first word of "$ac_prog", so it can be a program name with args.
21561set dummy $ac_prog; ac_word=$2
21562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21563$as_echo_n "checking for $ac_word... " >&6; }
21564if ${ac_cv_path_TIME+:} false; then :
21565  $as_echo_n "(cached) " >&6
21566else
21567  case $TIME in
21568  [\\/]* | ?:[\\/]*)
21569  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21570  ;;
21571  *)
21572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21573for as_dir in $PATH
21574do
21575  IFS=$as_save_IFS
21576  test -z "$as_dir" && as_dir=.
21577    for ac_exec_ext in '' $ac_executable_extensions; do
21578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21579    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21581    break 2
21582  fi
21583done
21584  done
21585IFS=$as_save_IFS
21586
21587  ;;
21588esac
21589fi
21590TIME=$ac_cv_path_TIME
21591if test -n "$TIME"; then
21592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21593$as_echo "$TIME" >&6; }
21594else
21595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21596$as_echo "no" >&6; }
21597fi
21598
21599
21600  test -n "$TIME" && break
21601done
21602
21603  else
21604    # The variable is set, but is it from the command line or the environment?
21605
21606    # Try to remove the string !TIME! from our list.
21607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21609      # If it failed, the variable was not from the command line. Ignore it,
21610      # but warn the user (except for BASH, which is always set by the calling BASH).
21611      if test "xTIME" != xBASH; then
21612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21613$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21614      fi
21615      # Try to locate tool using the code snippet
21616      for ac_prog in time
21617do
21618  # Extract the first word of "$ac_prog", so it can be a program name with args.
21619set dummy $ac_prog; ac_word=$2
21620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21621$as_echo_n "checking for $ac_word... " >&6; }
21622if ${ac_cv_path_TIME+:} false; then :
21623  $as_echo_n "(cached) " >&6
21624else
21625  case $TIME in
21626  [\\/]* | ?:[\\/]*)
21627  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21628  ;;
21629  *)
21630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21631for as_dir in $PATH
21632do
21633  IFS=$as_save_IFS
21634  test -z "$as_dir" && as_dir=.
21635    for ac_exec_ext in '' $ac_executable_extensions; do
21636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21637    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21639    break 2
21640  fi
21641done
21642  done
21643IFS=$as_save_IFS
21644
21645  ;;
21646esac
21647fi
21648TIME=$ac_cv_path_TIME
21649if test -n "$TIME"; then
21650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21651$as_echo "$TIME" >&6; }
21652else
21653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21654$as_echo "no" >&6; }
21655fi
21656
21657
21658  test -n "$TIME" && break
21659done
21660
21661    else
21662      # If it succeeded, then it was overridden by the user. We will use it
21663      # for the tool.
21664
21665      # First remove it from the list of overridden variables, so we can test
21666      # for unknown variables in the end.
21667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21668
21669      # Check if we try to supply an empty value
21670      if test "x$TIME" = x; then
21671        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21672$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21674$as_echo_n "checking for TIME... " >&6; }
21675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21676$as_echo "disabled" >&6; }
21677      else
21678        # Check if the provided tool contains a complete path.
21679        tool_specified="$TIME"
21680        tool_basename="${tool_specified##*/}"
21681        if test "x$tool_basename" = "x$tool_specified"; then
21682          # A command without a complete path is provided, search $PATH.
21683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21684$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21685          # Extract the first word of "$tool_basename", so it can be a program name with args.
21686set dummy $tool_basename; ac_word=$2
21687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21688$as_echo_n "checking for $ac_word... " >&6; }
21689if ${ac_cv_path_TIME+:} false; then :
21690  $as_echo_n "(cached) " >&6
21691else
21692  case $TIME in
21693  [\\/]* | ?:[\\/]*)
21694  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21695  ;;
21696  *)
21697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21698for as_dir in $PATH
21699do
21700  IFS=$as_save_IFS
21701  test -z "$as_dir" && as_dir=.
21702    for ac_exec_ext in '' $ac_executable_extensions; do
21703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21704    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21706    break 2
21707  fi
21708done
21709  done
21710IFS=$as_save_IFS
21711
21712  ;;
21713esac
21714fi
21715TIME=$ac_cv_path_TIME
21716if test -n "$TIME"; then
21717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21718$as_echo "$TIME" >&6; }
21719else
21720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21721$as_echo "no" >&6; }
21722fi
21723
21724
21725          if test "x$TIME" = x; then
21726            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21727          fi
21728        else
21729          # Otherwise we believe it is a complete path. Use it as it is.
21730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21731$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21732          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21733$as_echo_n "checking for TIME... " >&6; }
21734          if test ! -x "$tool_specified"; then
21735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21736$as_echo "not found" >&6; }
21737            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21738          fi
21739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21740$as_echo "$tool_specified" >&6; }
21741        fi
21742      fi
21743    fi
21744
21745  fi
21746
21747
21748
21749
21750  # Publish this variable in the help.
21751
21752
21753  if [ -z "${PATCH+x}" ]; then
21754    # The variable is not set by user, try to locate tool using the code snippet
21755    for ac_prog in gpatch patch
21756do
21757  # Extract the first word of "$ac_prog", so it can be a program name with args.
21758set dummy $ac_prog; ac_word=$2
21759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21760$as_echo_n "checking for $ac_word... " >&6; }
21761if ${ac_cv_path_PATCH+:} false; then :
21762  $as_echo_n "(cached) " >&6
21763else
21764  case $PATCH in
21765  [\\/]* | ?:[\\/]*)
21766  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21767  ;;
21768  *)
21769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21770for as_dir in $PATH
21771do
21772  IFS=$as_save_IFS
21773  test -z "$as_dir" && as_dir=.
21774    for ac_exec_ext in '' $ac_executable_extensions; do
21775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21776    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21778    break 2
21779  fi
21780done
21781  done
21782IFS=$as_save_IFS
21783
21784  ;;
21785esac
21786fi
21787PATCH=$ac_cv_path_PATCH
21788if test -n "$PATCH"; then
21789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21790$as_echo "$PATCH" >&6; }
21791else
21792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21793$as_echo "no" >&6; }
21794fi
21795
21796
21797  test -n "$PATCH" && break
21798done
21799
21800  else
21801    # The variable is set, but is it from the command line or the environment?
21802
21803    # Try to remove the string !PATCH! from our list.
21804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21806      # If it failed, the variable was not from the command line. Ignore it,
21807      # but warn the user (except for BASH, which is always set by the calling BASH).
21808      if test "xPATCH" != xBASH; then
21809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21810$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21811      fi
21812      # Try to locate tool using the code snippet
21813      for ac_prog in gpatch patch
21814do
21815  # Extract the first word of "$ac_prog", so it can be a program name with args.
21816set dummy $ac_prog; ac_word=$2
21817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21818$as_echo_n "checking for $ac_word... " >&6; }
21819if ${ac_cv_path_PATCH+:} false; then :
21820  $as_echo_n "(cached) " >&6
21821else
21822  case $PATCH in
21823  [\\/]* | ?:[\\/]*)
21824  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21825  ;;
21826  *)
21827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21828for as_dir in $PATH
21829do
21830  IFS=$as_save_IFS
21831  test -z "$as_dir" && as_dir=.
21832    for ac_exec_ext in '' $ac_executable_extensions; do
21833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21834    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21836    break 2
21837  fi
21838done
21839  done
21840IFS=$as_save_IFS
21841
21842  ;;
21843esac
21844fi
21845PATCH=$ac_cv_path_PATCH
21846if test -n "$PATCH"; then
21847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21848$as_echo "$PATCH" >&6; }
21849else
21850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21851$as_echo "no" >&6; }
21852fi
21853
21854
21855  test -n "$PATCH" && break
21856done
21857
21858    else
21859      # If it succeeded, then it was overridden by the user. We will use it
21860      # for the tool.
21861
21862      # First remove it from the list of overridden variables, so we can test
21863      # for unknown variables in the end.
21864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21865
21866      # Check if we try to supply an empty value
21867      if test "x$PATCH" = x; then
21868        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21869$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21870        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21871$as_echo_n "checking for PATCH... " >&6; }
21872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21873$as_echo "disabled" >&6; }
21874      else
21875        # Check if the provided tool contains a complete path.
21876        tool_specified="$PATCH"
21877        tool_basename="${tool_specified##*/}"
21878        if test "x$tool_basename" = "x$tool_specified"; then
21879          # A command without a complete path is provided, search $PATH.
21880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21881$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21882          # Extract the first word of "$tool_basename", so it can be a program name with args.
21883set dummy $tool_basename; ac_word=$2
21884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21885$as_echo_n "checking for $ac_word... " >&6; }
21886if ${ac_cv_path_PATCH+:} false; then :
21887  $as_echo_n "(cached) " >&6
21888else
21889  case $PATCH in
21890  [\\/]* | ?:[\\/]*)
21891  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21892  ;;
21893  *)
21894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21895for as_dir in $PATH
21896do
21897  IFS=$as_save_IFS
21898  test -z "$as_dir" && as_dir=.
21899    for ac_exec_ext in '' $ac_executable_extensions; do
21900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21901    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21903    break 2
21904  fi
21905done
21906  done
21907IFS=$as_save_IFS
21908
21909  ;;
21910esac
21911fi
21912PATCH=$ac_cv_path_PATCH
21913if test -n "$PATCH"; then
21914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21915$as_echo "$PATCH" >&6; }
21916else
21917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21918$as_echo "no" >&6; }
21919fi
21920
21921
21922          if test "x$PATCH" = x; then
21923            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21924          fi
21925        else
21926          # Otherwise we believe it is a complete path. Use it as it is.
21927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21928$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21929          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21930$as_echo_n "checking for PATCH... " >&6; }
21931          if test ! -x "$tool_specified"; then
21932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21933$as_echo "not found" >&6; }
21934            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21935          fi
21936          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21937$as_echo "$tool_specified" >&6; }
21938        fi
21939      fi
21940    fi
21941
21942  fi
21943
21944
21945  # Check if it's GNU time
21946  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
21947  if test "x$IS_GNU_TIME" != x; then
21948    IS_GNU_TIME=yes
21949  else
21950    IS_GNU_TIME=no
21951  fi
21952
21953
21954  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
21955
21956
21957
21958  # Publish this variable in the help.
21959
21960
21961  if [ -z "${DSYMUTIL+x}" ]; then
21962    # The variable is not set by user, try to locate tool using the code snippet
21963    for ac_prog in dsymutil
21964do
21965  # Extract the first word of "$ac_prog", so it can be a program name with args.
21966set dummy $ac_prog; ac_word=$2
21967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21968$as_echo_n "checking for $ac_word... " >&6; }
21969if ${ac_cv_path_DSYMUTIL+:} false; then :
21970  $as_echo_n "(cached) " >&6
21971else
21972  case $DSYMUTIL in
21973  [\\/]* | ?:[\\/]*)
21974  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
21975  ;;
21976  *)
21977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21978for as_dir in $PATH
21979do
21980  IFS=$as_save_IFS
21981  test -z "$as_dir" && as_dir=.
21982    for ac_exec_ext in '' $ac_executable_extensions; do
21983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21984    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
21985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21986    break 2
21987  fi
21988done
21989  done
21990IFS=$as_save_IFS
21991
21992  ;;
21993esac
21994fi
21995DSYMUTIL=$ac_cv_path_DSYMUTIL
21996if test -n "$DSYMUTIL"; then
21997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
21998$as_echo "$DSYMUTIL" >&6; }
21999else
22000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22001$as_echo "no" >&6; }
22002fi
22003
22004
22005  test -n "$DSYMUTIL" && break
22006done
22007
22008  else
22009    # The variable is set, but is it from the command line or the environment?
22010
22011    # Try to remove the string !DSYMUTIL! from our list.
22012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22014      # If it failed, the variable was not from the command line. Ignore it,
22015      # but warn the user (except for BASH, which is always set by the calling BASH).
22016      if test "xDSYMUTIL" != xBASH; then
22017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22018$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22019      fi
22020      # Try to locate tool using the code snippet
22021      for ac_prog in dsymutil
22022do
22023  # Extract the first word of "$ac_prog", so it can be a program name with args.
22024set dummy $ac_prog; ac_word=$2
22025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22026$as_echo_n "checking for $ac_word... " >&6; }
22027if ${ac_cv_path_DSYMUTIL+:} false; then :
22028  $as_echo_n "(cached) " >&6
22029else
22030  case $DSYMUTIL in
22031  [\\/]* | ?:[\\/]*)
22032  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22033  ;;
22034  *)
22035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22036for as_dir in $PATH
22037do
22038  IFS=$as_save_IFS
22039  test -z "$as_dir" && as_dir=.
22040    for ac_exec_ext in '' $ac_executable_extensions; do
22041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22042    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22044    break 2
22045  fi
22046done
22047  done
22048IFS=$as_save_IFS
22049
22050  ;;
22051esac
22052fi
22053DSYMUTIL=$ac_cv_path_DSYMUTIL
22054if test -n "$DSYMUTIL"; then
22055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22056$as_echo "$DSYMUTIL" >&6; }
22057else
22058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22059$as_echo "no" >&6; }
22060fi
22061
22062
22063  test -n "$DSYMUTIL" && break
22064done
22065
22066    else
22067      # If it succeeded, then it was overridden by the user. We will use it
22068      # for the tool.
22069
22070      # First remove it from the list of overridden variables, so we can test
22071      # for unknown variables in the end.
22072      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22073
22074      # Check if we try to supply an empty value
22075      if test "x$DSYMUTIL" = x; then
22076        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22077$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22079$as_echo_n "checking for DSYMUTIL... " >&6; }
22080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22081$as_echo "disabled" >&6; }
22082      else
22083        # Check if the provided tool contains a complete path.
22084        tool_specified="$DSYMUTIL"
22085        tool_basename="${tool_specified##*/}"
22086        if test "x$tool_basename" = "x$tool_specified"; then
22087          # A command without a complete path is provided, search $PATH.
22088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22089$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22090          # Extract the first word of "$tool_basename", so it can be a program name with args.
22091set dummy $tool_basename; ac_word=$2
22092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22093$as_echo_n "checking for $ac_word... " >&6; }
22094if ${ac_cv_path_DSYMUTIL+:} false; then :
22095  $as_echo_n "(cached) " >&6
22096else
22097  case $DSYMUTIL in
22098  [\\/]* | ?:[\\/]*)
22099  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22100  ;;
22101  *)
22102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22103for as_dir in $PATH
22104do
22105  IFS=$as_save_IFS
22106  test -z "$as_dir" && as_dir=.
22107    for ac_exec_ext in '' $ac_executable_extensions; do
22108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22109    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22111    break 2
22112  fi
22113done
22114  done
22115IFS=$as_save_IFS
22116
22117  ;;
22118esac
22119fi
22120DSYMUTIL=$ac_cv_path_DSYMUTIL
22121if test -n "$DSYMUTIL"; then
22122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22123$as_echo "$DSYMUTIL" >&6; }
22124else
22125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22126$as_echo "no" >&6; }
22127fi
22128
22129
22130          if test "x$DSYMUTIL" = x; then
22131            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22132          fi
22133        else
22134          # Otherwise we believe it is a complete path. Use it as it is.
22135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22136$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22137          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22138$as_echo_n "checking for DSYMUTIL... " >&6; }
22139          if test ! -x "$tool_specified"; then
22140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22141$as_echo "not found" >&6; }
22142            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22143          fi
22144          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22145$as_echo "$tool_specified" >&6; }
22146        fi
22147      fi
22148    fi
22149
22150  fi
22151
22152
22153
22154  if test "x$DSYMUTIL" = x; then
22155    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22156  fi
22157
22158
22159
22160
22161
22162  # Publish this variable in the help.
22163
22164
22165  if [ -z "${XATTR+x}" ]; then
22166    # The variable is not set by user, try to locate tool using the code snippet
22167    for ac_prog in xattr
22168do
22169  # Extract the first word of "$ac_prog", so it can be a program name with args.
22170set dummy $ac_prog; ac_word=$2
22171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22172$as_echo_n "checking for $ac_word... " >&6; }
22173if ${ac_cv_path_XATTR+:} false; then :
22174  $as_echo_n "(cached) " >&6
22175else
22176  case $XATTR in
22177  [\\/]* | ?:[\\/]*)
22178  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22179  ;;
22180  *)
22181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22182for as_dir in $PATH
22183do
22184  IFS=$as_save_IFS
22185  test -z "$as_dir" && as_dir=.
22186    for ac_exec_ext in '' $ac_executable_extensions; do
22187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22188    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22190    break 2
22191  fi
22192done
22193  done
22194IFS=$as_save_IFS
22195
22196  ;;
22197esac
22198fi
22199XATTR=$ac_cv_path_XATTR
22200if test -n "$XATTR"; then
22201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22202$as_echo "$XATTR" >&6; }
22203else
22204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22205$as_echo "no" >&6; }
22206fi
22207
22208
22209  test -n "$XATTR" && break
22210done
22211
22212  else
22213    # The variable is set, but is it from the command line or the environment?
22214
22215    # Try to remove the string !XATTR! from our list.
22216    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22217    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22218      # If it failed, the variable was not from the command line. Ignore it,
22219      # but warn the user (except for BASH, which is always set by the calling BASH).
22220      if test "xXATTR" != xBASH; then
22221        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22222$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22223      fi
22224      # Try to locate tool using the code snippet
22225      for ac_prog in xattr
22226do
22227  # Extract the first word of "$ac_prog", so it can be a program name with args.
22228set dummy $ac_prog; ac_word=$2
22229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22230$as_echo_n "checking for $ac_word... " >&6; }
22231if ${ac_cv_path_XATTR+:} false; then :
22232  $as_echo_n "(cached) " >&6
22233else
22234  case $XATTR in
22235  [\\/]* | ?:[\\/]*)
22236  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22237  ;;
22238  *)
22239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22240for as_dir in $PATH
22241do
22242  IFS=$as_save_IFS
22243  test -z "$as_dir" && as_dir=.
22244    for ac_exec_ext in '' $ac_executable_extensions; do
22245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22246    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22248    break 2
22249  fi
22250done
22251  done
22252IFS=$as_save_IFS
22253
22254  ;;
22255esac
22256fi
22257XATTR=$ac_cv_path_XATTR
22258if test -n "$XATTR"; then
22259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22260$as_echo "$XATTR" >&6; }
22261else
22262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22263$as_echo "no" >&6; }
22264fi
22265
22266
22267  test -n "$XATTR" && break
22268done
22269
22270    else
22271      # If it succeeded, then it was overridden by the user. We will use it
22272      # for the tool.
22273
22274      # First remove it from the list of overridden variables, so we can test
22275      # for unknown variables in the end.
22276      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22277
22278      # Check if we try to supply an empty value
22279      if test "x$XATTR" = x; then
22280        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22281$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22283$as_echo_n "checking for XATTR... " >&6; }
22284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22285$as_echo "disabled" >&6; }
22286      else
22287        # Check if the provided tool contains a complete path.
22288        tool_specified="$XATTR"
22289        tool_basename="${tool_specified##*/}"
22290        if test "x$tool_basename" = "x$tool_specified"; then
22291          # A command without a complete path is provided, search $PATH.
22292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22293$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22294          # Extract the first word of "$tool_basename", so it can be a program name with args.
22295set dummy $tool_basename; ac_word=$2
22296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22297$as_echo_n "checking for $ac_word... " >&6; }
22298if ${ac_cv_path_XATTR+:} false; then :
22299  $as_echo_n "(cached) " >&6
22300else
22301  case $XATTR in
22302  [\\/]* | ?:[\\/]*)
22303  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22304  ;;
22305  *)
22306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22307for as_dir in $PATH
22308do
22309  IFS=$as_save_IFS
22310  test -z "$as_dir" && as_dir=.
22311    for ac_exec_ext in '' $ac_executable_extensions; do
22312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22313    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22315    break 2
22316  fi
22317done
22318  done
22319IFS=$as_save_IFS
22320
22321  ;;
22322esac
22323fi
22324XATTR=$ac_cv_path_XATTR
22325if test -n "$XATTR"; then
22326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22327$as_echo "$XATTR" >&6; }
22328else
22329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22330$as_echo "no" >&6; }
22331fi
22332
22333
22334          if test "x$XATTR" = x; then
22335            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22336          fi
22337        else
22338          # Otherwise we believe it is a complete path. Use it as it is.
22339          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22340$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22341          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22342$as_echo_n "checking for XATTR... " >&6; }
22343          if test ! -x "$tool_specified"; then
22344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22345$as_echo "not found" >&6; }
22346            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22347          fi
22348          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22349$as_echo "$tool_specified" >&6; }
22350        fi
22351      fi
22352    fi
22353
22354  fi
22355
22356
22357
22358  if test "x$XATTR" = x; then
22359    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22360  fi
22361
22362
22363
22364
22365  # Publish this variable in the help.
22366
22367
22368  if [ -z "${CODESIGN+x}" ]; then
22369    # The variable is not set by user, try to locate tool using the code snippet
22370    for ac_prog in codesign
22371do
22372  # Extract the first word of "$ac_prog", so it can be a program name with args.
22373set dummy $ac_prog; ac_word=$2
22374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22375$as_echo_n "checking for $ac_word... " >&6; }
22376if ${ac_cv_path_CODESIGN+:} false; then :
22377  $as_echo_n "(cached) " >&6
22378else
22379  case $CODESIGN in
22380  [\\/]* | ?:[\\/]*)
22381  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22382  ;;
22383  *)
22384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22385for as_dir in $PATH
22386do
22387  IFS=$as_save_IFS
22388  test -z "$as_dir" && as_dir=.
22389    for ac_exec_ext in '' $ac_executable_extensions; do
22390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22391    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22393    break 2
22394  fi
22395done
22396  done
22397IFS=$as_save_IFS
22398
22399  ;;
22400esac
22401fi
22402CODESIGN=$ac_cv_path_CODESIGN
22403if test -n "$CODESIGN"; then
22404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22405$as_echo "$CODESIGN" >&6; }
22406else
22407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22408$as_echo "no" >&6; }
22409fi
22410
22411
22412  test -n "$CODESIGN" && break
22413done
22414
22415  else
22416    # The variable is set, but is it from the command line or the environment?
22417
22418    # Try to remove the string !CODESIGN! from our list.
22419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22421      # If it failed, the variable was not from the command line. Ignore it,
22422      # but warn the user (except for BASH, which is always set by the calling BASH).
22423      if test "xCODESIGN" != xBASH; then
22424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22425$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22426      fi
22427      # Try to locate tool using the code snippet
22428      for ac_prog in codesign
22429do
22430  # Extract the first word of "$ac_prog", so it can be a program name with args.
22431set dummy $ac_prog; ac_word=$2
22432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22433$as_echo_n "checking for $ac_word... " >&6; }
22434if ${ac_cv_path_CODESIGN+:} false; then :
22435  $as_echo_n "(cached) " >&6
22436else
22437  case $CODESIGN in
22438  [\\/]* | ?:[\\/]*)
22439  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22440  ;;
22441  *)
22442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22443for as_dir in $PATH
22444do
22445  IFS=$as_save_IFS
22446  test -z "$as_dir" && as_dir=.
22447    for ac_exec_ext in '' $ac_executable_extensions; do
22448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22449    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22451    break 2
22452  fi
22453done
22454  done
22455IFS=$as_save_IFS
22456
22457  ;;
22458esac
22459fi
22460CODESIGN=$ac_cv_path_CODESIGN
22461if test -n "$CODESIGN"; then
22462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22463$as_echo "$CODESIGN" >&6; }
22464else
22465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22466$as_echo "no" >&6; }
22467fi
22468
22469
22470  test -n "$CODESIGN" && break
22471done
22472
22473    else
22474      # If it succeeded, then it was overridden by the user. We will use it
22475      # for the tool.
22476
22477      # First remove it from the list of overridden variables, so we can test
22478      # for unknown variables in the end.
22479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22480
22481      # Check if we try to supply an empty value
22482      if test "x$CODESIGN" = x; then
22483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22484$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22486$as_echo_n "checking for CODESIGN... " >&6; }
22487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22488$as_echo "disabled" >&6; }
22489      else
22490        # Check if the provided tool contains a complete path.
22491        tool_specified="$CODESIGN"
22492        tool_basename="${tool_specified##*/}"
22493        if test "x$tool_basename" = "x$tool_specified"; then
22494          # A command without a complete path is provided, search $PATH.
22495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22496$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22497          # Extract the first word of "$tool_basename", so it can be a program name with args.
22498set dummy $tool_basename; ac_word=$2
22499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22500$as_echo_n "checking for $ac_word... " >&6; }
22501if ${ac_cv_path_CODESIGN+:} false; then :
22502  $as_echo_n "(cached) " >&6
22503else
22504  case $CODESIGN in
22505  [\\/]* | ?:[\\/]*)
22506  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22507  ;;
22508  *)
22509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22510for as_dir in $PATH
22511do
22512  IFS=$as_save_IFS
22513  test -z "$as_dir" && as_dir=.
22514    for ac_exec_ext in '' $ac_executable_extensions; do
22515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22516    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22518    break 2
22519  fi
22520done
22521  done
22522IFS=$as_save_IFS
22523
22524  ;;
22525esac
22526fi
22527CODESIGN=$ac_cv_path_CODESIGN
22528if test -n "$CODESIGN"; then
22529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22530$as_echo "$CODESIGN" >&6; }
22531else
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22533$as_echo "no" >&6; }
22534fi
22535
22536
22537          if test "x$CODESIGN" = x; then
22538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22539          fi
22540        else
22541          # Otherwise we believe it is a complete path. Use it as it is.
22542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22543$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22545$as_echo_n "checking for CODESIGN... " >&6; }
22546          if test ! -x "$tool_specified"; then
22547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22548$as_echo "not found" >&6; }
22549            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22550          fi
22551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22552$as_echo "$tool_specified" >&6; }
22553        fi
22554      fi
22555    fi
22556
22557  fi
22558
22559
22560    if test "x$CODESIGN" != "x"; then
22561      # Verify that the openjdk_codesign certificate is present
22562      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22563$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22564      rm -f codesign-testfile
22565      touch codesign-testfile
22566      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22567      rm -f codesign-testfile
22568      if test "x$CODESIGN" = x; then
22569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22570$as_echo "no" >&6; }
22571      else
22572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22573$as_echo "yes" >&6; }
22574      fi
22575    fi
22576
22577
22578
22579  # Publish this variable in the help.
22580
22581
22582  if [ -z "${SETFILE+x}" ]; then
22583    # The variable is not set by user, try to locate tool using the code snippet
22584    for ac_prog in SetFile
22585do
22586  # Extract the first word of "$ac_prog", so it can be a program name with args.
22587set dummy $ac_prog; ac_word=$2
22588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22589$as_echo_n "checking for $ac_word... " >&6; }
22590if ${ac_cv_path_SETFILE+:} false; then :
22591  $as_echo_n "(cached) " >&6
22592else
22593  case $SETFILE in
22594  [\\/]* | ?:[\\/]*)
22595  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22596  ;;
22597  *)
22598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22599for as_dir in $PATH
22600do
22601  IFS=$as_save_IFS
22602  test -z "$as_dir" && as_dir=.
22603    for ac_exec_ext in '' $ac_executable_extensions; do
22604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22605    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22607    break 2
22608  fi
22609done
22610  done
22611IFS=$as_save_IFS
22612
22613  ;;
22614esac
22615fi
22616SETFILE=$ac_cv_path_SETFILE
22617if test -n "$SETFILE"; then
22618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22619$as_echo "$SETFILE" >&6; }
22620else
22621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22622$as_echo "no" >&6; }
22623fi
22624
22625
22626  test -n "$SETFILE" && break
22627done
22628
22629  else
22630    # The variable is set, but is it from the command line or the environment?
22631
22632    # Try to remove the string !SETFILE! from our list.
22633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22635      # If it failed, the variable was not from the command line. Ignore it,
22636      # but warn the user (except for BASH, which is always set by the calling BASH).
22637      if test "xSETFILE" != xBASH; then
22638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22639$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22640      fi
22641      # Try to locate tool using the code snippet
22642      for ac_prog in SetFile
22643do
22644  # Extract the first word of "$ac_prog", so it can be a program name with args.
22645set dummy $ac_prog; ac_word=$2
22646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22647$as_echo_n "checking for $ac_word... " >&6; }
22648if ${ac_cv_path_SETFILE+:} false; then :
22649  $as_echo_n "(cached) " >&6
22650else
22651  case $SETFILE in
22652  [\\/]* | ?:[\\/]*)
22653  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22654  ;;
22655  *)
22656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22657for as_dir in $PATH
22658do
22659  IFS=$as_save_IFS
22660  test -z "$as_dir" && as_dir=.
22661    for ac_exec_ext in '' $ac_executable_extensions; do
22662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22663    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22665    break 2
22666  fi
22667done
22668  done
22669IFS=$as_save_IFS
22670
22671  ;;
22672esac
22673fi
22674SETFILE=$ac_cv_path_SETFILE
22675if test -n "$SETFILE"; then
22676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22677$as_echo "$SETFILE" >&6; }
22678else
22679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22680$as_echo "no" >&6; }
22681fi
22682
22683
22684  test -n "$SETFILE" && break
22685done
22686
22687    else
22688      # If it succeeded, then it was overridden by the user. We will use it
22689      # for the tool.
22690
22691      # First remove it from the list of overridden variables, so we can test
22692      # for unknown variables in the end.
22693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22694
22695      # Check if we try to supply an empty value
22696      if test "x$SETFILE" = x; then
22697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22698$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22700$as_echo_n "checking for SETFILE... " >&6; }
22701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22702$as_echo "disabled" >&6; }
22703      else
22704        # Check if the provided tool contains a complete path.
22705        tool_specified="$SETFILE"
22706        tool_basename="${tool_specified##*/}"
22707        if test "x$tool_basename" = "x$tool_specified"; then
22708          # A command without a complete path is provided, search $PATH.
22709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22710$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22711          # Extract the first word of "$tool_basename", so it can be a program name with args.
22712set dummy $tool_basename; ac_word=$2
22713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22714$as_echo_n "checking for $ac_word... " >&6; }
22715if ${ac_cv_path_SETFILE+:} false; then :
22716  $as_echo_n "(cached) " >&6
22717else
22718  case $SETFILE in
22719  [\\/]* | ?:[\\/]*)
22720  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22721  ;;
22722  *)
22723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22724for as_dir in $PATH
22725do
22726  IFS=$as_save_IFS
22727  test -z "$as_dir" && as_dir=.
22728    for ac_exec_ext in '' $ac_executable_extensions; do
22729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22730    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22732    break 2
22733  fi
22734done
22735  done
22736IFS=$as_save_IFS
22737
22738  ;;
22739esac
22740fi
22741SETFILE=$ac_cv_path_SETFILE
22742if test -n "$SETFILE"; then
22743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22744$as_echo "$SETFILE" >&6; }
22745else
22746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22747$as_echo "no" >&6; }
22748fi
22749
22750
22751          if test "x$SETFILE" = x; then
22752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22753          fi
22754        else
22755          # Otherwise we believe it is a complete path. Use it as it is.
22756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22757$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22759$as_echo_n "checking for SETFILE... " >&6; }
22760          if test ! -x "$tool_specified"; then
22761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22762$as_echo "not found" >&6; }
22763            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22764          fi
22765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22766$as_echo "$tool_specified" >&6; }
22767        fi
22768      fi
22769    fi
22770
22771  fi
22772
22773
22774
22775  if test "x$SETFILE" = x; then
22776    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22777  fi
22778
22779
22780  fi
22781
22782
22783  # Test if bash supports pipefail.
22784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22785$as_echo_n "checking if bash supports pipefail... " >&6; }
22786  if ${BASH} -c 'set -o pipefail'; then
22787    BASH_ARGS="$BASH_ARGS -o pipefail"
22788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22789$as_echo "yes" >&6; }
22790  else
22791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22792$as_echo "no" >&6; }
22793  fi
22794
22795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22796$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22797  if ${BASH} -e -c 'true'; then
22798    BASH_ARGS="$BASH_ARGS -e"
22799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22800$as_echo "yes" >&6; }
22801  else
22802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22803$as_echo "no" >&6; }
22804  fi
22805
22806
22807
22808
22809# Check if pkg-config is available.
22810
22811
22812if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22813	if test -n "$ac_tool_prefix"; then
22814  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22815set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22817$as_echo_n "checking for $ac_word... " >&6; }
22818if ${ac_cv_path_PKG_CONFIG+:} false; then :
22819  $as_echo_n "(cached) " >&6
22820else
22821  case $PKG_CONFIG in
22822  [\\/]* | ?:[\\/]*)
22823  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22824  ;;
22825  *)
22826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22827for as_dir in $PATH
22828do
22829  IFS=$as_save_IFS
22830  test -z "$as_dir" && as_dir=.
22831    for ac_exec_ext in '' $ac_executable_extensions; do
22832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22833    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22835    break 2
22836  fi
22837done
22838  done
22839IFS=$as_save_IFS
22840
22841  ;;
22842esac
22843fi
22844PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22845if test -n "$PKG_CONFIG"; then
22846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22847$as_echo "$PKG_CONFIG" >&6; }
22848else
22849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22850$as_echo "no" >&6; }
22851fi
22852
22853
22854fi
22855if test -z "$ac_cv_path_PKG_CONFIG"; then
22856  ac_pt_PKG_CONFIG=$PKG_CONFIG
22857  # Extract the first word of "pkg-config", so it can be a program name with args.
22858set dummy pkg-config; ac_word=$2
22859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22860$as_echo_n "checking for $ac_word... " >&6; }
22861if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22862  $as_echo_n "(cached) " >&6
22863else
22864  case $ac_pt_PKG_CONFIG in
22865  [\\/]* | ?:[\\/]*)
22866  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22867  ;;
22868  *)
22869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22870for as_dir in $PATH
22871do
22872  IFS=$as_save_IFS
22873  test -z "$as_dir" && as_dir=.
22874    for ac_exec_ext in '' $ac_executable_extensions; do
22875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22876    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22878    break 2
22879  fi
22880done
22881  done
22882IFS=$as_save_IFS
22883
22884  ;;
22885esac
22886fi
22887ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22888if test -n "$ac_pt_PKG_CONFIG"; then
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22890$as_echo "$ac_pt_PKG_CONFIG" >&6; }
22891else
22892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22893$as_echo "no" >&6; }
22894fi
22895
22896  if test "x$ac_pt_PKG_CONFIG" = x; then
22897    PKG_CONFIG=""
22898  else
22899    case $cross_compiling:$ac_tool_warned in
22900yes:)
22901{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22902$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22903ac_tool_warned=yes ;;
22904esac
22905    PKG_CONFIG=$ac_pt_PKG_CONFIG
22906  fi
22907else
22908  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22909fi
22910
22911fi
22912if test -n "$PKG_CONFIG"; then
22913	_pkg_min_version=0.9.0
22914	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22915$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22916	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22917		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22918$as_echo "yes" >&6; }
22919	else
22920		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22921$as_echo "no" >&6; }
22922		PKG_CONFIG=""
22923	fi
22924
22925fi
22926
22927# After basic tools have been setup, we can check build os specific details.
22928
22929  ###############################################################################
22930
22931  # Note that this is the build platform OS version!
22932
22933  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22934  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22935  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22936  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22937
22938
22939
22940
22941
22942###############################################################################
22943#
22944# Determine OpenJDK variants, options and version numbers.
22945#
22946###############################################################################
22947
22948# We need build & target for this.
22949
22950
22951  ###############################################################################
22952  #
22953  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
22954  # We always build headless support.
22955  #
22956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
22957$as_echo_n "checking headful support... " >&6; }
22958  # Check whether --enable-headful was given.
22959if test "${enable_headful+set}" = set; then :
22960  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
22961else
22962  SUPPORT_HEADFUL=yes
22963fi
22964
22965
22966  SUPPORT_HEADLESS=yes
22967  BUILD_HEADLESS="BUILD_HEADLESS:=true"
22968
22969  if test "x$SUPPORT_HEADFUL" = xyes; then
22970    # We are building both headful and headless.
22971    headful_msg="include support for both headful and headless"
22972  fi
22973
22974  if test "x$SUPPORT_HEADFUL" = xno; then
22975    # Thus we are building headless only.
22976    BUILD_HEADLESS="BUILD_HEADLESS:=true"
22977    headful_msg="headless only"
22978  fi
22979
22980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
22981$as_echo "$headful_msg" >&6; }
22982
22983
22984
22985
22986
22987  # Control wether Hotspot runs Queens test after build.
22988  # Check whether --enable-hotspot-test-in-build was given.
22989if test "${enable_hotspot_test_in_build+set}" = set; then :
22990  enableval=$enable_hotspot_test_in_build;
22991else
22992  enable_hotspot_test_in_build=no
22993fi
22994
22995  if test "x$enable_hotspot_test_in_build" = "xyes"; then
22996    TEST_IN_BUILD=true
22997  else
22998    TEST_IN_BUILD=false
22999  fi
23000
23001
23002  ###############################################################################
23003  #
23004  # Choose cacerts source file
23005  #
23006
23007# Check whether --with-cacerts-file was given.
23008if test "${with_cacerts_file+set}" = set; then :
23009  withval=$with_cacerts_file;
23010fi
23011
23012  if test "x$with_cacerts_file" != x; then
23013    CACERTS_FILE=$with_cacerts_file
23014  fi
23015
23016
23017  ###############################################################################
23018  #
23019  # Enable or disable unlimited crypto
23020  #
23021  # Check whether --enable-unlimited-crypto was given.
23022if test "${enable_unlimited_crypto+set}" = set; then :
23023  enableval=$enable_unlimited_crypto;
23024else
23025  enable_unlimited_crypto=no
23026fi
23027
23028  if test "x$enable_unlimited_crypto" = "xyes"; then
23029    UNLIMITED_CRYPTO=true
23030  else
23031    UNLIMITED_CRYPTO=false
23032  fi
23033
23034
23035  ###############################################################################
23036  #
23037  # Enable or disable the elliptic curve crypto implementation
23038  #
23039
23040
23041  ###############################################################################
23042  #
23043  # Compress jars
23044  #
23045  COMPRESS_JARS=false
23046
23047
23048
23049
23050  # Source the version numbers
23051  . $AUTOCONF_DIR/version-numbers
23052
23053  # Get the settings from parameters
23054
23055# Check whether --with-milestone was given.
23056if test "${with_milestone+set}" = set; then :
23057  withval=$with_milestone;
23058fi
23059
23060  if test "x$with_milestone" = xyes; then
23061    as_fn_error $? "Milestone must have a value" "$LINENO" 5
23062  elif test "x$with_milestone" != x; then
23063    MILESTONE="$with_milestone"
23064  fi
23065  if test "x$MILESTONE" = x; then
23066    MILESTONE=internal
23067  fi
23068
23069
23070# Check whether --with-update-version was given.
23071if test "${with_update_version+set}" = set; then :
23072  withval=$with_update_version;
23073fi
23074
23075  if test "x$with_update_version" = xyes; then
23076    as_fn_error $? "Update version must have a value" "$LINENO" 5
23077  elif test "x$with_update_version" != x; then
23078    JDK_UPDATE_VERSION="$with_update_version"
23079    # On macosx 10.7, it's not possible to set --with-update-version=0X due
23080    # to a bug in expr (which reduces it to just X). To work around this, we
23081    # always add a 0 to one digit update versions.
23082    if test "${#JDK_UPDATE_VERSION}" = "1"; then
23083      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23084    fi
23085  fi
23086
23087
23088# Check whether --with-user-release-suffix was given.
23089if test "${with_user_release_suffix+set}" = set; then :
23090  withval=$with_user_release_suffix;
23091fi
23092
23093  if test "x$with_user_release_suffix" = xyes; then
23094    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23095  elif test "x$with_user_release_suffix" != x; then
23096    USER_RELEASE_SUFFIX="$with_user_release_suffix"
23097  fi
23098
23099
23100# Check whether --with-build-number was given.
23101if test "${with_build_number+set}" = set; then :
23102  withval=$with_build_number;
23103fi
23104
23105  if test "x$with_build_number" = xyes; then
23106    as_fn_error $? "Build number must have a value" "$LINENO" 5
23107  elif test "x$with_build_number" != x; then
23108    JDK_BUILD_NUMBER="$with_build_number"
23109  fi
23110  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23111  if test "x$JDK_BUILD_NUMBER" = x; then
23112    JDK_BUILD_NUMBER=b00
23113    if test "x$USER_RELEASE_SUFFIX" = x; then
23114      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23115      # Avoid [:alnum:] since it depends on the locale.
23116      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23117      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23118    fi
23119  fi
23120
23121  # Now set the JDK version, milestone, build number etc.
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138# Check whether --with-copyright-year was given.
23139if test "${with_copyright_year+set}" = set; then :
23140  withval=$with_copyright_year;
23141fi
23142
23143  if test "x$with_copyright_year" = xyes; then
23144    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23145  elif test "x$with_copyright_year" != x; then
23146    COPYRIGHT_YEAR="$with_copyright_year"
23147  else
23148    COPYRIGHT_YEAR=`date +'%Y'`
23149  fi
23150
23151
23152  if test "x$JDK_UPDATE_VERSION" != x; then
23153    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23154  else
23155    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23156  fi
23157
23158
23159  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23160
23161
23162
23163###############################################################################
23164#
23165# Setup BootJDK, used to bootstrap the build.
23166#
23167###############################################################################
23168
23169
23170  BOOT_JDK_FOUND=no
23171
23172# Check whether --with-boot-jdk was given.
23173if test "${with_boot_jdk+set}" = set; then :
23174  withval=$with_boot_jdk;
23175fi
23176
23177
23178  # We look for the Boot JDK through various means, going from more certain to
23179  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23180  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23181  # must check if this is indeed valid; otherwise we'll continue looking.
23182
23183  # Test: Is bootjdk explicitely set by command line arguments?
23184
23185  if test "x$BOOT_JDK_FOUND" = xno; then
23186    # Now execute the test
23187
23188  if test "x$with_boot_jdk" != x; then
23189    BOOT_JDK=$with_boot_jdk
23190    BOOT_JDK_FOUND=maybe
23191    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23192$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23193  fi
23194
23195
23196    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23197    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23198      # Do we have a bin/java?
23199      if test ! -x "$BOOT_JDK/bin/java"; then
23200        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23202        BOOT_JDK_FOUND=no
23203      else
23204        # Do we have a bin/javac?
23205        if test ! -x "$BOOT_JDK/bin/javac"; then
23206          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23208          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23209$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23210          BOOT_JDK_FOUND=no
23211        else
23212          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23213          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23214
23215          # Extra M4 quote needed to protect [] in grep expression.
23216          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23217          if test "x$FOUND_CORRECT_VERSION" = x; then
23218            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23220            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23221$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23222            BOOT_JDK_FOUND=no
23223          else
23224            # We're done! :-)
23225            BOOT_JDK_FOUND=yes
23226
23227  # Only process if variable expands to non-empty
23228
23229  if test "x$BOOT_JDK" != x; then
23230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23231
23232  # Input might be given as Windows format, start by converting to
23233  # unix format.
23234  path="$BOOT_JDK"
23235  new_path=`$CYGPATH -u "$path"`
23236
23237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23240  # "foo.exe" is OK but "foo" is an error.
23241  #
23242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23243  # It is also a way to make sure we got the proper file name for the real test later on.
23244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23245  if test "x$test_shortpath" = x; then
23246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23248    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23249  fi
23250
23251  # Call helper function which possibly converts this using DOS-style short mode.
23252  # If so, the updated path is stored in $new_path.
23253
23254  input_path="$new_path"
23255  # Check if we need to convert this using DOS-style short mode. If the path
23256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23257  # take no chances and rewrite it.
23258  # Note: m4 eats our [], so we need to use [ and ] instead.
23259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23260  if test "x$has_forbidden_chars" != x; then
23261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23265      # Going to short mode and back again did indeed matter. Since short mode is
23266      # case insensitive, let's make it lowercase to improve readability.
23267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23268      # Now convert it back to Unix-style (cygpath)
23269      input_path=`$CYGPATH -u "$shortmode_path"`
23270      new_path="$input_path"
23271    fi
23272  fi
23273
23274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23275  if test "x$test_cygdrive_prefix" = x; then
23276    # As a simple fix, exclude /usr/bin since it's not a real path.
23277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23279      # a path prefixed by /cygdrive for fixpath to work.
23280      new_path="$CYGWIN_ROOT_PATH$input_path"
23281    fi
23282  fi
23283
23284
23285  if test "x$path" != "x$new_path"; then
23286    BOOT_JDK="$new_path"
23287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23289  fi
23290
23291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23292
23293  path="$BOOT_JDK"
23294  has_colon=`$ECHO $path | $GREP ^.:`
23295  new_path="$path"
23296  if test "x$has_colon" = x; then
23297    # Not in mixed or Windows style, start by that.
23298    new_path=`cmd //c echo $path`
23299  fi
23300
23301
23302  input_path="$new_path"
23303  # Check if we need to convert this using DOS-style short mode. If the path
23304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23305  # take no chances and rewrite it.
23306  # Note: m4 eats our [], so we need to use [ and ] instead.
23307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23308  if test "x$has_forbidden_chars" != x; then
23309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23311  fi
23312
23313
23314  windows_path="$new_path"
23315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23316    unix_path=`$CYGPATH -u "$windows_path"`
23317    new_path="$unix_path"
23318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23320    new_path="$unix_path"
23321  fi
23322
23323  if test "x$path" != "x$new_path"; then
23324    BOOT_JDK="$new_path"
23325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23327  fi
23328
23329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23331
23332    else
23333      # We're on a unix platform. Hooray! :)
23334      path="$BOOT_JDK"
23335      has_space=`$ECHO "$path" | $GREP " "`
23336      if test "x$has_space" != x; then
23337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23340      fi
23341
23342      # Use eval to expand a potential ~
23343      eval path="$path"
23344      if test ! -f "$path" && test ! -d "$path"; then
23345        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23346      fi
23347
23348      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23349    fi
23350  fi
23351
23352            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23353$as_echo_n "checking for Boot JDK... " >&6; }
23354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23355$as_echo "$BOOT_JDK" >&6; }
23356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23357$as_echo_n "checking Boot JDK version... " >&6; }
23358            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23360$as_echo "$BOOT_JDK_VERSION" >&6; }
23361          fi # end check jdk version
23362        fi # end check javac
23363      fi # end check java
23364    fi # end check boot jdk found
23365  fi
23366
23367  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23368    # Having specified an argument which is incorrect will produce an instant failure;
23369    # we should not go on looking
23370    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23371  fi
23372
23373  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23374
23375  if test "x$BOOT_JDK_FOUND" = xno; then
23376    # Now execute the test
23377
23378  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23379    # First check at user selected default
23380
23381  if test "x$BOOT_JDK_FOUND" = xno; then
23382    # Now execute the test
23383
23384  if test -x /usr/libexec/java_home; then
23385    BOOT_JDK=`/usr/libexec/java_home `
23386    BOOT_JDK_FOUND=maybe
23387    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23388$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23389  fi
23390
23391
23392    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23393    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23394      # Do we have a bin/java?
23395      if test ! -x "$BOOT_JDK/bin/java"; then
23396        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23398        BOOT_JDK_FOUND=no
23399      else
23400        # Do we have a bin/javac?
23401        if test ! -x "$BOOT_JDK/bin/javac"; then
23402          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23404          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23405$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23406          BOOT_JDK_FOUND=no
23407        else
23408          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23409          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23410
23411          # Extra M4 quote needed to protect [] in grep expression.
23412          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23413          if test "x$FOUND_CORRECT_VERSION" = x; then
23414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23416            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23417$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23418            BOOT_JDK_FOUND=no
23419          else
23420            # We're done! :-)
23421            BOOT_JDK_FOUND=yes
23422
23423  # Only process if variable expands to non-empty
23424
23425  if test "x$BOOT_JDK" != x; then
23426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23427
23428  # Input might be given as Windows format, start by converting to
23429  # unix format.
23430  path="$BOOT_JDK"
23431  new_path=`$CYGPATH -u "$path"`
23432
23433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23436  # "foo.exe" is OK but "foo" is an error.
23437  #
23438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23439  # It is also a way to make sure we got the proper file name for the real test later on.
23440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23441  if test "x$test_shortpath" = x; then
23442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23444    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23445  fi
23446
23447  # Call helper function which possibly converts this using DOS-style short mode.
23448  # If so, the updated path is stored in $new_path.
23449
23450  input_path="$new_path"
23451  # Check if we need to convert this using DOS-style short mode. If the path
23452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23453  # take no chances and rewrite it.
23454  # Note: m4 eats our [], so we need to use [ and ] instead.
23455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23456  if test "x$has_forbidden_chars" != x; then
23457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23461      # Going to short mode and back again did indeed matter. Since short mode is
23462      # case insensitive, let's make it lowercase to improve readability.
23463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23464      # Now convert it back to Unix-style (cygpath)
23465      input_path=`$CYGPATH -u "$shortmode_path"`
23466      new_path="$input_path"
23467    fi
23468  fi
23469
23470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23471  if test "x$test_cygdrive_prefix" = x; then
23472    # As a simple fix, exclude /usr/bin since it's not a real path.
23473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23475      # a path prefixed by /cygdrive for fixpath to work.
23476      new_path="$CYGWIN_ROOT_PATH$input_path"
23477    fi
23478  fi
23479
23480
23481  if test "x$path" != "x$new_path"; then
23482    BOOT_JDK="$new_path"
23483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23485  fi
23486
23487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23488
23489  path="$BOOT_JDK"
23490  has_colon=`$ECHO $path | $GREP ^.:`
23491  new_path="$path"
23492  if test "x$has_colon" = x; then
23493    # Not in mixed or Windows style, start by that.
23494    new_path=`cmd //c echo $path`
23495  fi
23496
23497
23498  input_path="$new_path"
23499  # Check if we need to convert this using DOS-style short mode. If the path
23500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23501  # take no chances and rewrite it.
23502  # Note: m4 eats our [], so we need to use [ and ] instead.
23503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23504  if test "x$has_forbidden_chars" != x; then
23505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23507  fi
23508
23509
23510  windows_path="$new_path"
23511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23512    unix_path=`$CYGPATH -u "$windows_path"`
23513    new_path="$unix_path"
23514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23516    new_path="$unix_path"
23517  fi
23518
23519  if test "x$path" != "x$new_path"; then
23520    BOOT_JDK="$new_path"
23521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23523  fi
23524
23525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23527
23528    else
23529      # We're on a unix platform. Hooray! :)
23530      path="$BOOT_JDK"
23531      has_space=`$ECHO "$path" | $GREP " "`
23532      if test "x$has_space" != x; then
23533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23536      fi
23537
23538      # Use eval to expand a potential ~
23539      eval path="$path"
23540      if test ! -f "$path" && test ! -d "$path"; then
23541        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23542      fi
23543
23544      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23545    fi
23546  fi
23547
23548            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23549$as_echo_n "checking for Boot JDK... " >&6; }
23550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23551$as_echo "$BOOT_JDK" >&6; }
23552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23553$as_echo_n "checking Boot JDK version... " >&6; }
23554            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23556$as_echo "$BOOT_JDK_VERSION" >&6; }
23557          fi # end check jdk version
23558        fi # end check javac
23559      fi # end check java
23560    fi # end check boot jdk found
23561  fi
23562
23563    # If that did not work out (e.g. too old), try explicit versions instead
23564
23565  if test "x$BOOT_JDK_FOUND" = xno; then
23566    # Now execute the test
23567
23568  if test -x /usr/libexec/java_home; then
23569    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23570    BOOT_JDK_FOUND=maybe
23571    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23572$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23573  fi
23574
23575
23576    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23577    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23578      # Do we have a bin/java?
23579      if test ! -x "$BOOT_JDK/bin/java"; then
23580        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23582        BOOT_JDK_FOUND=no
23583      else
23584        # Do we have a bin/javac?
23585        if test ! -x "$BOOT_JDK/bin/javac"; then
23586          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23588          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23589$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23590          BOOT_JDK_FOUND=no
23591        else
23592          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23593          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23594
23595          # Extra M4 quote needed to protect [] in grep expression.
23596          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23597          if test "x$FOUND_CORRECT_VERSION" = x; then
23598            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23600            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23601$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23602            BOOT_JDK_FOUND=no
23603          else
23604            # We're done! :-)
23605            BOOT_JDK_FOUND=yes
23606
23607  # Only process if variable expands to non-empty
23608
23609  if test "x$BOOT_JDK" != x; then
23610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23611
23612  # Input might be given as Windows format, start by converting to
23613  # unix format.
23614  path="$BOOT_JDK"
23615  new_path=`$CYGPATH -u "$path"`
23616
23617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23620  # "foo.exe" is OK but "foo" is an error.
23621  #
23622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23623  # It is also a way to make sure we got the proper file name for the real test later on.
23624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23625  if test "x$test_shortpath" = x; then
23626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23627$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23628    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23629  fi
23630
23631  # Call helper function which possibly converts this using DOS-style short mode.
23632  # If so, the updated path is stored in $new_path.
23633
23634  input_path="$new_path"
23635  # Check if we need to convert this using DOS-style short mode. If the path
23636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23637  # take no chances and rewrite it.
23638  # Note: m4 eats our [], so we need to use [ and ] instead.
23639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23640  if test "x$has_forbidden_chars" != x; then
23641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23645      # Going to short mode and back again did indeed matter. Since short mode is
23646      # case insensitive, let's make it lowercase to improve readability.
23647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23648      # Now convert it back to Unix-style (cygpath)
23649      input_path=`$CYGPATH -u "$shortmode_path"`
23650      new_path="$input_path"
23651    fi
23652  fi
23653
23654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23655  if test "x$test_cygdrive_prefix" = x; then
23656    # As a simple fix, exclude /usr/bin since it's not a real path.
23657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23659      # a path prefixed by /cygdrive for fixpath to work.
23660      new_path="$CYGWIN_ROOT_PATH$input_path"
23661    fi
23662  fi
23663
23664
23665  if test "x$path" != "x$new_path"; then
23666    BOOT_JDK="$new_path"
23667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23669  fi
23670
23671    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23672
23673  path="$BOOT_JDK"
23674  has_colon=`$ECHO $path | $GREP ^.:`
23675  new_path="$path"
23676  if test "x$has_colon" = x; then
23677    # Not in mixed or Windows style, start by that.
23678    new_path=`cmd //c echo $path`
23679  fi
23680
23681
23682  input_path="$new_path"
23683  # Check if we need to convert this using DOS-style short mode. If the path
23684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23685  # take no chances and rewrite it.
23686  # Note: m4 eats our [], so we need to use [ and ] instead.
23687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23688  if test "x$has_forbidden_chars" != x; then
23689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23691  fi
23692
23693
23694  windows_path="$new_path"
23695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23696    unix_path=`$CYGPATH -u "$windows_path"`
23697    new_path="$unix_path"
23698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23700    new_path="$unix_path"
23701  fi
23702
23703  if test "x$path" != "x$new_path"; then
23704    BOOT_JDK="$new_path"
23705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23706$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23707  fi
23708
23709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23711
23712    else
23713      # We're on a unix platform. Hooray! :)
23714      path="$BOOT_JDK"
23715      has_space=`$ECHO "$path" | $GREP " "`
23716      if test "x$has_space" != x; then
23717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23718$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23719        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23720      fi
23721
23722      # Use eval to expand a potential ~
23723      eval path="$path"
23724      if test ! -f "$path" && test ! -d "$path"; then
23725        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23726      fi
23727
23728      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23729    fi
23730  fi
23731
23732            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23733$as_echo_n "checking for Boot JDK... " >&6; }
23734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23735$as_echo "$BOOT_JDK" >&6; }
23736            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23737$as_echo_n "checking Boot JDK version... " >&6; }
23738            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23740$as_echo "$BOOT_JDK_VERSION" >&6; }
23741          fi # end check jdk version
23742        fi # end check javac
23743      fi # end check java
23744    fi # end check boot jdk found
23745  fi
23746
23747
23748  if test "x$BOOT_JDK_FOUND" = xno; then
23749    # Now execute the test
23750
23751  if test -x /usr/libexec/java_home; then
23752    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23753    BOOT_JDK_FOUND=maybe
23754    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23755$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23756  fi
23757
23758
23759    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23760    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23761      # Do we have a bin/java?
23762      if test ! -x "$BOOT_JDK/bin/java"; then
23763        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23765        BOOT_JDK_FOUND=no
23766      else
23767        # Do we have a bin/javac?
23768        if test ! -x "$BOOT_JDK/bin/javac"; then
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23771          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23772$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23773          BOOT_JDK_FOUND=no
23774        else
23775          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23776          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23777
23778          # Extra M4 quote needed to protect [] in grep expression.
23779          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23780          if test "x$FOUND_CORRECT_VERSION" = x; then
23781            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23783            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23784$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23785            BOOT_JDK_FOUND=no
23786          else
23787            # We're done! :-)
23788            BOOT_JDK_FOUND=yes
23789
23790  # Only process if variable expands to non-empty
23791
23792  if test "x$BOOT_JDK" != x; then
23793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23794
23795  # Input might be given as Windows format, start by converting to
23796  # unix format.
23797  path="$BOOT_JDK"
23798  new_path=`$CYGPATH -u "$path"`
23799
23800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23803  # "foo.exe" is OK but "foo" is an error.
23804  #
23805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23806  # It is also a way to make sure we got the proper file name for the real test later on.
23807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23808  if test "x$test_shortpath" = x; then
23809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23810$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23811    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23812  fi
23813
23814  # Call helper function which possibly converts this using DOS-style short mode.
23815  # If so, the updated path is stored in $new_path.
23816
23817  input_path="$new_path"
23818  # Check if we need to convert this using DOS-style short mode. If the path
23819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23820  # take no chances and rewrite it.
23821  # Note: m4 eats our [], so we need to use [ and ] instead.
23822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23823  if test "x$has_forbidden_chars" != x; then
23824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23828      # Going to short mode and back again did indeed matter. Since short mode is
23829      # case insensitive, let's make it lowercase to improve readability.
23830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23831      # Now convert it back to Unix-style (cygpath)
23832      input_path=`$CYGPATH -u "$shortmode_path"`
23833      new_path="$input_path"
23834    fi
23835  fi
23836
23837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23838  if test "x$test_cygdrive_prefix" = x; then
23839    # As a simple fix, exclude /usr/bin since it's not a real path.
23840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23842      # a path prefixed by /cygdrive for fixpath to work.
23843      new_path="$CYGWIN_ROOT_PATH$input_path"
23844    fi
23845  fi
23846
23847
23848  if test "x$path" != "x$new_path"; then
23849    BOOT_JDK="$new_path"
23850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23851$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23852  fi
23853
23854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23855
23856  path="$BOOT_JDK"
23857  has_colon=`$ECHO $path | $GREP ^.:`
23858  new_path="$path"
23859  if test "x$has_colon" = x; then
23860    # Not in mixed or Windows style, start by that.
23861    new_path=`cmd //c echo $path`
23862  fi
23863
23864
23865  input_path="$new_path"
23866  # Check if we need to convert this using DOS-style short mode. If the path
23867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23868  # take no chances and rewrite it.
23869  # Note: m4 eats our [], so we need to use [ and ] instead.
23870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23871  if test "x$has_forbidden_chars" != x; then
23872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23874  fi
23875
23876
23877  windows_path="$new_path"
23878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23879    unix_path=`$CYGPATH -u "$windows_path"`
23880    new_path="$unix_path"
23881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23883    new_path="$unix_path"
23884  fi
23885
23886  if test "x$path" != "x$new_path"; then
23887    BOOT_JDK="$new_path"
23888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23890  fi
23891
23892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23894
23895    else
23896      # We're on a unix platform. Hooray! :)
23897      path="$BOOT_JDK"
23898      has_space=`$ECHO "$path" | $GREP " "`
23899      if test "x$has_space" != x; then
23900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23902        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23903      fi
23904
23905      # Use eval to expand a potential ~
23906      eval path="$path"
23907      if test ! -f "$path" && test ! -d "$path"; then
23908        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23909      fi
23910
23911      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23912    fi
23913  fi
23914
23915            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23916$as_echo_n "checking for Boot JDK... " >&6; }
23917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23918$as_echo "$BOOT_JDK" >&6; }
23919            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23920$as_echo_n "checking Boot JDK version... " >&6; }
23921            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23923$as_echo "$BOOT_JDK_VERSION" >&6; }
23924          fi # end check jdk version
23925        fi # end check javac
23926      fi # end check java
23927    fi # end check boot jdk found
23928  fi
23929
23930
23931  if test "x$BOOT_JDK_FOUND" = xno; then
23932    # Now execute the test
23933
23934  if test -x /usr/libexec/java_home; then
23935    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23936    BOOT_JDK_FOUND=maybe
23937    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23938$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23939  fi
23940
23941
23942    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23943    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23944      # Do we have a bin/java?
23945      if test ! -x "$BOOT_JDK/bin/java"; then
23946        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23948        BOOT_JDK_FOUND=no
23949      else
23950        # Do we have a bin/javac?
23951        if test ! -x "$BOOT_JDK/bin/javac"; then
23952          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23954          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23955$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23956          BOOT_JDK_FOUND=no
23957        else
23958          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23959          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23960
23961          # Extra M4 quote needed to protect [] in grep expression.
23962          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23963          if test "x$FOUND_CORRECT_VERSION" = x; then
23964            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23966            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23967$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23968            BOOT_JDK_FOUND=no
23969          else
23970            # We're done! :-)
23971            BOOT_JDK_FOUND=yes
23972
23973  # Only process if variable expands to non-empty
23974
23975  if test "x$BOOT_JDK" != x; then
23976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23977
23978  # Input might be given as Windows format, start by converting to
23979  # unix format.
23980  path="$BOOT_JDK"
23981  new_path=`$CYGPATH -u "$path"`
23982
23983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23986  # "foo.exe" is OK but "foo" is an error.
23987  #
23988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23989  # It is also a way to make sure we got the proper file name for the real test later on.
23990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23991  if test "x$test_shortpath" = x; then
23992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23993$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23994    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23995  fi
23996
23997  # Call helper function which possibly converts this using DOS-style short mode.
23998  # If so, the updated path is stored in $new_path.
23999
24000  input_path="$new_path"
24001  # Check if we need to convert this using DOS-style short mode. If the path
24002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24003  # take no chances and rewrite it.
24004  # Note: m4 eats our [], so we need to use [ and ] instead.
24005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24006  if test "x$has_forbidden_chars" != x; then
24007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24011      # Going to short mode and back again did indeed matter. Since short mode is
24012      # case insensitive, let's make it lowercase to improve readability.
24013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24014      # Now convert it back to Unix-style (cygpath)
24015      input_path=`$CYGPATH -u "$shortmode_path"`
24016      new_path="$input_path"
24017    fi
24018  fi
24019
24020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24021  if test "x$test_cygdrive_prefix" = x; then
24022    # As a simple fix, exclude /usr/bin since it's not a real path.
24023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24025      # a path prefixed by /cygdrive for fixpath to work.
24026      new_path="$CYGWIN_ROOT_PATH$input_path"
24027    fi
24028  fi
24029
24030
24031  if test "x$path" != "x$new_path"; then
24032    BOOT_JDK="$new_path"
24033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24035  fi
24036
24037    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24038
24039  path="$BOOT_JDK"
24040  has_colon=`$ECHO $path | $GREP ^.:`
24041  new_path="$path"
24042  if test "x$has_colon" = x; then
24043    # Not in mixed or Windows style, start by that.
24044    new_path=`cmd //c echo $path`
24045  fi
24046
24047
24048  input_path="$new_path"
24049  # Check if we need to convert this using DOS-style short mode. If the path
24050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24051  # take no chances and rewrite it.
24052  # Note: m4 eats our [], so we need to use [ and ] instead.
24053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24054  if test "x$has_forbidden_chars" != x; then
24055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24057  fi
24058
24059
24060  windows_path="$new_path"
24061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24062    unix_path=`$CYGPATH -u "$windows_path"`
24063    new_path="$unix_path"
24064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24066    new_path="$unix_path"
24067  fi
24068
24069  if test "x$path" != "x$new_path"; then
24070    BOOT_JDK="$new_path"
24071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24073  fi
24074
24075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24077
24078    else
24079      # We're on a unix platform. Hooray! :)
24080      path="$BOOT_JDK"
24081      has_space=`$ECHO "$path" | $GREP " "`
24082      if test "x$has_space" != x; then
24083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24085        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24086      fi
24087
24088      # Use eval to expand a potential ~
24089      eval path="$path"
24090      if test ! -f "$path" && test ! -d "$path"; then
24091        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24092      fi
24093
24094      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24095    fi
24096  fi
24097
24098            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24099$as_echo_n "checking for Boot JDK... " >&6; }
24100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24101$as_echo "$BOOT_JDK" >&6; }
24102            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24103$as_echo_n "checking Boot JDK version... " >&6; }
24104            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24106$as_echo "$BOOT_JDK_VERSION" >&6; }
24107          fi # end check jdk version
24108        fi # end check javac
24109      fi # end check java
24110    fi # end check boot jdk found
24111  fi
24112
24113  fi
24114
24115
24116    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24117    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24118      # Do we have a bin/java?
24119      if test ! -x "$BOOT_JDK/bin/java"; then
24120        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24122        BOOT_JDK_FOUND=no
24123      else
24124        # Do we have a bin/javac?
24125        if test ! -x "$BOOT_JDK/bin/javac"; then
24126          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24128          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24129$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24130          BOOT_JDK_FOUND=no
24131        else
24132          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24133          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24134
24135          # Extra M4 quote needed to protect [] in grep expression.
24136          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24137          if test "x$FOUND_CORRECT_VERSION" = x; then
24138            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24140            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24141$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24142            BOOT_JDK_FOUND=no
24143          else
24144            # We're done! :-)
24145            BOOT_JDK_FOUND=yes
24146
24147  # Only process if variable expands to non-empty
24148
24149  if test "x$BOOT_JDK" != x; then
24150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24151
24152  # Input might be given as Windows format, start by converting to
24153  # unix format.
24154  path="$BOOT_JDK"
24155  new_path=`$CYGPATH -u "$path"`
24156
24157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24160  # "foo.exe" is OK but "foo" is an error.
24161  #
24162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24163  # It is also a way to make sure we got the proper file name for the real test later on.
24164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24165  if test "x$test_shortpath" = x; then
24166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24167$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24168    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24169  fi
24170
24171  # Call helper function which possibly converts this using DOS-style short mode.
24172  # If so, the updated path is stored in $new_path.
24173
24174  input_path="$new_path"
24175  # Check if we need to convert this using DOS-style short mode. If the path
24176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24177  # take no chances and rewrite it.
24178  # Note: m4 eats our [], so we need to use [ and ] instead.
24179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24180  if test "x$has_forbidden_chars" != x; then
24181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24185      # Going to short mode and back again did indeed matter. Since short mode is
24186      # case insensitive, let's make it lowercase to improve readability.
24187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24188      # Now convert it back to Unix-style (cygpath)
24189      input_path=`$CYGPATH -u "$shortmode_path"`
24190      new_path="$input_path"
24191    fi
24192  fi
24193
24194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24195  if test "x$test_cygdrive_prefix" = x; then
24196    # As a simple fix, exclude /usr/bin since it's not a real path.
24197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24199      # a path prefixed by /cygdrive for fixpath to work.
24200      new_path="$CYGWIN_ROOT_PATH$input_path"
24201    fi
24202  fi
24203
24204
24205  if test "x$path" != "x$new_path"; then
24206    BOOT_JDK="$new_path"
24207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24208$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24209  fi
24210
24211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24212
24213  path="$BOOT_JDK"
24214  has_colon=`$ECHO $path | $GREP ^.:`
24215  new_path="$path"
24216  if test "x$has_colon" = x; then
24217    # Not in mixed or Windows style, start by that.
24218    new_path=`cmd //c echo $path`
24219  fi
24220
24221
24222  input_path="$new_path"
24223  # Check if we need to convert this using DOS-style short mode. If the path
24224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24225  # take no chances and rewrite it.
24226  # Note: m4 eats our [], so we need to use [ and ] instead.
24227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24228  if test "x$has_forbidden_chars" != x; then
24229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24231  fi
24232
24233
24234  windows_path="$new_path"
24235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24236    unix_path=`$CYGPATH -u "$windows_path"`
24237    new_path="$unix_path"
24238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24240    new_path="$unix_path"
24241  fi
24242
24243  if test "x$path" != "x$new_path"; then
24244    BOOT_JDK="$new_path"
24245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24247  fi
24248
24249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24251
24252    else
24253      # We're on a unix platform. Hooray! :)
24254      path="$BOOT_JDK"
24255      has_space=`$ECHO "$path" | $GREP " "`
24256      if test "x$has_space" != x; then
24257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24260      fi
24261
24262      # Use eval to expand a potential ~
24263      eval path="$path"
24264      if test ! -f "$path" && test ! -d "$path"; then
24265        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24266      fi
24267
24268      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24269    fi
24270  fi
24271
24272            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24273$as_echo_n "checking for Boot JDK... " >&6; }
24274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24275$as_echo "$BOOT_JDK" >&6; }
24276            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24277$as_echo_n "checking Boot JDK version... " >&6; }
24278            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24280$as_echo "$BOOT_JDK_VERSION" >&6; }
24281          fi # end check jdk version
24282        fi # end check javac
24283      fi # end check java
24284    fi # end check boot jdk found
24285  fi
24286
24287
24288  # Test: Is $JAVA_HOME set?
24289
24290  if test "x$BOOT_JDK_FOUND" = xno; then
24291    # Now execute the test
24292
24293  if test "x$JAVA_HOME" != x; then
24294    JAVA_HOME_PROCESSED="$JAVA_HOME"
24295
24296  # Only process if variable expands to non-empty
24297
24298  if test "x$JAVA_HOME_PROCESSED" != x; then
24299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24300
24301  # Input might be given as Windows format, start by converting to
24302  # unix format.
24303  path="$JAVA_HOME_PROCESSED"
24304  new_path=`$CYGPATH -u "$path"`
24305
24306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24309  # "foo.exe" is OK but "foo" is an error.
24310  #
24311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24312  # It is also a way to make sure we got the proper file name for the real test later on.
24313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24314  if test "x$test_shortpath" = x; then
24315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24316$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24317    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24318  fi
24319
24320  # Call helper function which possibly converts this using DOS-style short mode.
24321  # If so, the updated path is stored in $new_path.
24322
24323  input_path="$new_path"
24324  # Check if we need to convert this using DOS-style short mode. If the path
24325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24326  # take no chances and rewrite it.
24327  # Note: m4 eats our [], so we need to use [ and ] instead.
24328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24329  if test "x$has_forbidden_chars" != x; then
24330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24334      # Going to short mode and back again did indeed matter. Since short mode is
24335      # case insensitive, let's make it lowercase to improve readability.
24336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24337      # Now convert it back to Unix-style (cygpath)
24338      input_path=`$CYGPATH -u "$shortmode_path"`
24339      new_path="$input_path"
24340    fi
24341  fi
24342
24343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24344  if test "x$test_cygdrive_prefix" = x; then
24345    # As a simple fix, exclude /usr/bin since it's not a real path.
24346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24348      # a path prefixed by /cygdrive for fixpath to work.
24349      new_path="$CYGWIN_ROOT_PATH$input_path"
24350    fi
24351  fi
24352
24353
24354  if test "x$path" != "x$new_path"; then
24355    JAVA_HOME_PROCESSED="$new_path"
24356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24357$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24358  fi
24359
24360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24361
24362  path="$JAVA_HOME_PROCESSED"
24363  has_colon=`$ECHO $path | $GREP ^.:`
24364  new_path="$path"
24365  if test "x$has_colon" = x; then
24366    # Not in mixed or Windows style, start by that.
24367    new_path=`cmd //c echo $path`
24368  fi
24369
24370
24371  input_path="$new_path"
24372  # Check if we need to convert this using DOS-style short mode. If the path
24373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24374  # take no chances and rewrite it.
24375  # Note: m4 eats our [], so we need to use [ and ] instead.
24376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24377  if test "x$has_forbidden_chars" != x; then
24378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24380  fi
24381
24382
24383  windows_path="$new_path"
24384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24385    unix_path=`$CYGPATH -u "$windows_path"`
24386    new_path="$unix_path"
24387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24389    new_path="$unix_path"
24390  fi
24391
24392  if test "x$path" != "x$new_path"; then
24393    JAVA_HOME_PROCESSED="$new_path"
24394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24395$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24396  fi
24397
24398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24400
24401    else
24402      # We're on a unix platform. Hooray! :)
24403      path="$JAVA_HOME_PROCESSED"
24404      has_space=`$ECHO "$path" | $GREP " "`
24405      if test "x$has_space" != x; then
24406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24407$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24409      fi
24410
24411      # Use eval to expand a potential ~
24412      eval path="$path"
24413      if test ! -f "$path" && test ! -d "$path"; then
24414        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24415      fi
24416
24417      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24418    fi
24419  fi
24420
24421    if test ! -d "$JAVA_HOME_PROCESSED"; then
24422      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24423$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24424    else
24425      # Aha, the user has set a JAVA_HOME
24426      # let us use that as the Boot JDK.
24427      BOOT_JDK="$JAVA_HOME_PROCESSED"
24428      BOOT_JDK_FOUND=maybe
24429      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24430$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24431    fi
24432  fi
24433
24434
24435    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24436    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24437      # Do we have a bin/java?
24438      if test ! -x "$BOOT_JDK/bin/java"; then
24439        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24441        BOOT_JDK_FOUND=no
24442      else
24443        # Do we have a bin/javac?
24444        if test ! -x "$BOOT_JDK/bin/javac"; then
24445          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24447          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24448$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24449          BOOT_JDK_FOUND=no
24450        else
24451          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24452          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24453
24454          # Extra M4 quote needed to protect [] in grep expression.
24455          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24456          if test "x$FOUND_CORRECT_VERSION" = x; then
24457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24459            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24460$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24461            BOOT_JDK_FOUND=no
24462          else
24463            # We're done! :-)
24464            BOOT_JDK_FOUND=yes
24465
24466  # Only process if variable expands to non-empty
24467
24468  if test "x$BOOT_JDK" != x; then
24469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24470
24471  # Input might be given as Windows format, start by converting to
24472  # unix format.
24473  path="$BOOT_JDK"
24474  new_path=`$CYGPATH -u "$path"`
24475
24476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24479  # "foo.exe" is OK but "foo" is an error.
24480  #
24481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24482  # It is also a way to make sure we got the proper file name for the real test later on.
24483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24484  if test "x$test_shortpath" = x; then
24485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24488  fi
24489
24490  # Call helper function which possibly converts this using DOS-style short mode.
24491  # If so, the updated path is stored in $new_path.
24492
24493  input_path="$new_path"
24494  # Check if we need to convert this using DOS-style short mode. If the path
24495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24496  # take no chances and rewrite it.
24497  # Note: m4 eats our [], so we need to use [ and ] instead.
24498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24499  if test "x$has_forbidden_chars" != x; then
24500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24504      # Going to short mode and back again did indeed matter. Since short mode is
24505      # case insensitive, let's make it lowercase to improve readability.
24506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24507      # Now convert it back to Unix-style (cygpath)
24508      input_path=`$CYGPATH -u "$shortmode_path"`
24509      new_path="$input_path"
24510    fi
24511  fi
24512
24513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24514  if test "x$test_cygdrive_prefix" = x; then
24515    # As a simple fix, exclude /usr/bin since it's not a real path.
24516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24518      # a path prefixed by /cygdrive for fixpath to work.
24519      new_path="$CYGWIN_ROOT_PATH$input_path"
24520    fi
24521  fi
24522
24523
24524  if test "x$path" != "x$new_path"; then
24525    BOOT_JDK="$new_path"
24526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24528  fi
24529
24530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24531
24532  path="$BOOT_JDK"
24533  has_colon=`$ECHO $path | $GREP ^.:`
24534  new_path="$path"
24535  if test "x$has_colon" = x; then
24536    # Not in mixed or Windows style, start by that.
24537    new_path=`cmd //c echo $path`
24538  fi
24539
24540
24541  input_path="$new_path"
24542  # Check if we need to convert this using DOS-style short mode. If the path
24543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24544  # take no chances and rewrite it.
24545  # Note: m4 eats our [], so we need to use [ and ] instead.
24546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24547  if test "x$has_forbidden_chars" != x; then
24548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24550  fi
24551
24552
24553  windows_path="$new_path"
24554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24555    unix_path=`$CYGPATH -u "$windows_path"`
24556    new_path="$unix_path"
24557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24559    new_path="$unix_path"
24560  fi
24561
24562  if test "x$path" != "x$new_path"; then
24563    BOOT_JDK="$new_path"
24564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24566  fi
24567
24568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24570
24571    else
24572      # We're on a unix platform. Hooray! :)
24573      path="$BOOT_JDK"
24574      has_space=`$ECHO "$path" | $GREP " "`
24575      if test "x$has_space" != x; then
24576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24579      fi
24580
24581      # Use eval to expand a potential ~
24582      eval path="$path"
24583      if test ! -f "$path" && test ! -d "$path"; then
24584        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24585      fi
24586
24587      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24588    fi
24589  fi
24590
24591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24592$as_echo_n "checking for Boot JDK... " >&6; }
24593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24594$as_echo "$BOOT_JDK" >&6; }
24595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24596$as_echo_n "checking Boot JDK version... " >&6; }
24597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24599$as_echo "$BOOT_JDK_VERSION" >&6; }
24600          fi # end check jdk version
24601        fi # end check javac
24602      fi # end check java
24603    fi # end check boot jdk found
24604  fi
24605
24606
24607  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24608
24609  if test "x$BOOT_JDK_FOUND" = xno; then
24610    # Now execute the test
24611
24612  # Extract the first word of "javac", so it can be a program name with args.
24613set dummy javac; ac_word=$2
24614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24615$as_echo_n "checking for $ac_word... " >&6; }
24616if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24617  $as_echo_n "(cached) " >&6
24618else
24619  case $JAVAC_CHECK in
24620  [\\/]* | ?:[\\/]*)
24621  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24622  ;;
24623  *)
24624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24625for as_dir in $PATH
24626do
24627  IFS=$as_save_IFS
24628  test -z "$as_dir" && as_dir=.
24629    for ac_exec_ext in '' $ac_executable_extensions; do
24630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24631    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24633    break 2
24634  fi
24635done
24636  done
24637IFS=$as_save_IFS
24638
24639  ;;
24640esac
24641fi
24642JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24643if test -n "$JAVAC_CHECK"; then
24644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24645$as_echo "$JAVAC_CHECK" >&6; }
24646else
24647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24648$as_echo "no" >&6; }
24649fi
24650
24651
24652  # Extract the first word of "java", so it can be a program name with args.
24653set dummy java; ac_word=$2
24654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24655$as_echo_n "checking for $ac_word... " >&6; }
24656if ${ac_cv_path_JAVA_CHECK+:} false; then :
24657  $as_echo_n "(cached) " >&6
24658else
24659  case $JAVA_CHECK in
24660  [\\/]* | ?:[\\/]*)
24661  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24662  ;;
24663  *)
24664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24665for as_dir in $PATH
24666do
24667  IFS=$as_save_IFS
24668  test -z "$as_dir" && as_dir=.
24669    for ac_exec_ext in '' $ac_executable_extensions; do
24670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24671    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24673    break 2
24674  fi
24675done
24676  done
24677IFS=$as_save_IFS
24678
24679  ;;
24680esac
24681fi
24682JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24683if test -n "$JAVA_CHECK"; then
24684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24685$as_echo "$JAVA_CHECK" >&6; }
24686else
24687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24688$as_echo "no" >&6; }
24689fi
24690
24691
24692  BINARY="$JAVAC_CHECK"
24693  if test "x$JAVAC_CHECK" = x; then
24694    BINARY="$JAVA_CHECK"
24695  fi
24696  if test "x$BINARY" != x; then
24697    # So there is a java(c) binary, it might be part of a JDK.
24698    # Lets find the JDK/JRE directory by following symbolic links.
24699    # Linux/GNU systems often have links from /usr/bin/java to
24700    # /etc/alternatives/java to the real JDK binary.
24701
24702  if test "x$OPENJDK_BUILD_OS" != xwindows; then
24703    # Follow a chain of symbolic links. Use readlink
24704    # where it exists, else fall back to horribly
24705    # complicated shell code.
24706    if test "x$READLINK_TESTED" != yes; then
24707      # On MacOSX there is a readlink tool with a different
24708      # purpose than the GNU readlink tool. Check the found readlink.
24709      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24710      if test "x$ISGNU" = x; then
24711        # A readlink that we do not know how to use.
24712        # Are there other non-GNU readlinks out there?
24713        READLINK_TESTED=yes
24714        READLINK=
24715      fi
24716    fi
24717
24718    if test "x$READLINK" != x; then
24719      BINARY=`$READLINK -f $BINARY`
24720    else
24721      # Save the current directory for restoring afterwards
24722      STARTDIR=$PWD
24723      COUNTER=0
24724      sym_link_dir=`$DIRNAME $BINARY`
24725      sym_link_file=`$BASENAME $BINARY`
24726      cd $sym_link_dir
24727      # Use -P flag to resolve symlinks in directories.
24728      cd `$THEPWDCMD -P`
24729      sym_link_dir=`$THEPWDCMD -P`
24730      # Resolve file symlinks
24731      while test $COUNTER -lt 20; do
24732        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24733        if test "x$ISLINK" == x; then
24734          # This is not a symbolic link! We are done!
24735          break
24736        fi
24737        # Again resolve directory symlinks since the target of the just found
24738        # link could be in a different directory
24739        cd `$DIRNAME $ISLINK`
24740        sym_link_dir=`$THEPWDCMD -P`
24741        sym_link_file=`$BASENAME $ISLINK`
24742        let COUNTER=COUNTER+1
24743      done
24744      cd $STARTDIR
24745      BINARY=$sym_link_dir/$sym_link_file
24746    fi
24747  fi
24748
24749    BOOT_JDK=`dirname "$BINARY"`
24750    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24751    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24752      # Looks like we found ourselves an JDK
24753      BOOT_JDK_FOUND=maybe
24754      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24755$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24756    fi
24757  fi
24758
24759
24760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24762      # Do we have a bin/java?
24763      if test ! -x "$BOOT_JDK/bin/java"; then
24764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24766        BOOT_JDK_FOUND=no
24767      else
24768        # Do we have a bin/javac?
24769        if test ! -x "$BOOT_JDK/bin/javac"; then
24770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24774          BOOT_JDK_FOUND=no
24775        else
24776          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24777          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24778
24779          # Extra M4 quote needed to protect [] in grep expression.
24780          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24781          if test "x$FOUND_CORRECT_VERSION" = x; then
24782            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24784            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24785$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24786            BOOT_JDK_FOUND=no
24787          else
24788            # We're done! :-)
24789            BOOT_JDK_FOUND=yes
24790
24791  # Only process if variable expands to non-empty
24792
24793  if test "x$BOOT_JDK" != x; then
24794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24795
24796  # Input might be given as Windows format, start by converting to
24797  # unix format.
24798  path="$BOOT_JDK"
24799  new_path=`$CYGPATH -u "$path"`
24800
24801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24804  # "foo.exe" is OK but "foo" is an error.
24805  #
24806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24807  # It is also a way to make sure we got the proper file name for the real test later on.
24808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24809  if test "x$test_shortpath" = x; then
24810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24812    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24813  fi
24814
24815  # Call helper function which possibly converts this using DOS-style short mode.
24816  # If so, the updated path is stored in $new_path.
24817
24818  input_path="$new_path"
24819  # Check if we need to convert this using DOS-style short mode. If the path
24820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24821  # take no chances and rewrite it.
24822  # Note: m4 eats our [], so we need to use [ and ] instead.
24823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24824  if test "x$has_forbidden_chars" != x; then
24825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24829      # Going to short mode and back again did indeed matter. Since short mode is
24830      # case insensitive, let's make it lowercase to improve readability.
24831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24832      # Now convert it back to Unix-style (cygpath)
24833      input_path=`$CYGPATH -u "$shortmode_path"`
24834      new_path="$input_path"
24835    fi
24836  fi
24837
24838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24839  if test "x$test_cygdrive_prefix" = x; then
24840    # As a simple fix, exclude /usr/bin since it's not a real path.
24841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24843      # a path prefixed by /cygdrive for fixpath to work.
24844      new_path="$CYGWIN_ROOT_PATH$input_path"
24845    fi
24846  fi
24847
24848
24849  if test "x$path" != "x$new_path"; then
24850    BOOT_JDK="$new_path"
24851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24853  fi
24854
24855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24856
24857  path="$BOOT_JDK"
24858  has_colon=`$ECHO $path | $GREP ^.:`
24859  new_path="$path"
24860  if test "x$has_colon" = x; then
24861    # Not in mixed or Windows style, start by that.
24862    new_path=`cmd //c echo $path`
24863  fi
24864
24865
24866  input_path="$new_path"
24867  # Check if we need to convert this using DOS-style short mode. If the path
24868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24869  # take no chances and rewrite it.
24870  # Note: m4 eats our [], so we need to use [ and ] instead.
24871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24872  if test "x$has_forbidden_chars" != x; then
24873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24875  fi
24876
24877
24878  windows_path="$new_path"
24879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24880    unix_path=`$CYGPATH -u "$windows_path"`
24881    new_path="$unix_path"
24882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24884    new_path="$unix_path"
24885  fi
24886
24887  if test "x$path" != "x$new_path"; then
24888    BOOT_JDK="$new_path"
24889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24891  fi
24892
24893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24895
24896    else
24897      # We're on a unix platform. Hooray! :)
24898      path="$BOOT_JDK"
24899      has_space=`$ECHO "$path" | $GREP " "`
24900      if test "x$has_space" != x; then
24901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24902$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24904      fi
24905
24906      # Use eval to expand a potential ~
24907      eval path="$path"
24908      if test ! -f "$path" && test ! -d "$path"; then
24909        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24910      fi
24911
24912      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24913    fi
24914  fi
24915
24916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24917$as_echo_n "checking for Boot JDK... " >&6; }
24918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24919$as_echo "$BOOT_JDK" >&6; }
24920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24921$as_echo_n "checking Boot JDK version... " >&6; }
24922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24924$as_echo "$BOOT_JDK_VERSION" >&6; }
24925          fi # end check jdk version
24926        fi # end check javac
24927      fi # end check java
24928    fi # end check boot jdk found
24929  fi
24930
24931
24932  # Test: Is there a JDK installed in default, well-known locations?
24933
24934  if test "x$BOOT_JDK_FOUND" = xno; then
24935    # Now execute the test
24936
24937  if test "x$OPENJDK_TARGET_OS" = xwindows; then
24938
24939  if test "x$BOOT_JDK_FOUND" = xno; then
24940    # Now execute the test
24941
24942  if test "x$ProgramW6432" != x; then
24943    VIRTUAL_DIR="$ProgramW6432/Java"
24944
24945  windows_path="$VIRTUAL_DIR"
24946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24947    unix_path=`$CYGPATH -u "$windows_path"`
24948    VIRTUAL_DIR="$unix_path"
24949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24951    VIRTUAL_DIR="$unix_path"
24952  fi
24953
24954
24955  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24956  BOOT_JDK_SUFFIX=""
24957  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24958  if test "x$ALL_JDKS_FOUND" != x; then
24959    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24960
24961  if test "x$BOOT_JDK_FOUND" = xno; then
24962    # Now execute the test
24963
24964        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24965        if test -d "$BOOT_JDK"; then
24966          BOOT_JDK_FOUND=maybe
24967          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24968$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24969        fi
24970
24971
24972    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24973    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24974      # Do we have a bin/java?
24975      if test ! -x "$BOOT_JDK/bin/java"; then
24976        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24978        BOOT_JDK_FOUND=no
24979      else
24980        # Do we have a bin/javac?
24981        if test ! -x "$BOOT_JDK/bin/javac"; then
24982          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24984          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24985$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24986          BOOT_JDK_FOUND=no
24987        else
24988          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24989          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24990
24991          # Extra M4 quote needed to protect [] in grep expression.
24992          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24993          if test "x$FOUND_CORRECT_VERSION" = x; then
24994            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24996            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24997$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24998            BOOT_JDK_FOUND=no
24999          else
25000            # We're done! :-)
25001            BOOT_JDK_FOUND=yes
25002
25003  # Only process if variable expands to non-empty
25004
25005  if test "x$BOOT_JDK" != x; then
25006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25007
25008  # Input might be given as Windows format, start by converting to
25009  # unix format.
25010  path="$BOOT_JDK"
25011  new_path=`$CYGPATH -u "$path"`
25012
25013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25016  # "foo.exe" is OK but "foo" is an error.
25017  #
25018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25019  # It is also a way to make sure we got the proper file name for the real test later on.
25020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25021  if test "x$test_shortpath" = x; then
25022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25024    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25025  fi
25026
25027  # Call helper function which possibly converts this using DOS-style short mode.
25028  # If so, the updated path is stored in $new_path.
25029
25030  input_path="$new_path"
25031  # Check if we need to convert this using DOS-style short mode. If the path
25032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25033  # take no chances and rewrite it.
25034  # Note: m4 eats our [], so we need to use [ and ] instead.
25035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25036  if test "x$has_forbidden_chars" != x; then
25037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25041      # Going to short mode and back again did indeed matter. Since short mode is
25042      # case insensitive, let's make it lowercase to improve readability.
25043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25044      # Now convert it back to Unix-style (cygpath)
25045      input_path=`$CYGPATH -u "$shortmode_path"`
25046      new_path="$input_path"
25047    fi
25048  fi
25049
25050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25051  if test "x$test_cygdrive_prefix" = x; then
25052    # As a simple fix, exclude /usr/bin since it's not a real path.
25053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25055      # a path prefixed by /cygdrive for fixpath to work.
25056      new_path="$CYGWIN_ROOT_PATH$input_path"
25057    fi
25058  fi
25059
25060
25061  if test "x$path" != "x$new_path"; then
25062    BOOT_JDK="$new_path"
25063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25064$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25065  fi
25066
25067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25068
25069  path="$BOOT_JDK"
25070  has_colon=`$ECHO $path | $GREP ^.:`
25071  new_path="$path"
25072  if test "x$has_colon" = x; then
25073    # Not in mixed or Windows style, start by that.
25074    new_path=`cmd //c echo $path`
25075  fi
25076
25077
25078  input_path="$new_path"
25079  # Check if we need to convert this using DOS-style short mode. If the path
25080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25081  # take no chances and rewrite it.
25082  # Note: m4 eats our [], so we need to use [ and ] instead.
25083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25084  if test "x$has_forbidden_chars" != x; then
25085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25087  fi
25088
25089
25090  windows_path="$new_path"
25091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25092    unix_path=`$CYGPATH -u "$windows_path"`
25093    new_path="$unix_path"
25094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25096    new_path="$unix_path"
25097  fi
25098
25099  if test "x$path" != "x$new_path"; then
25100    BOOT_JDK="$new_path"
25101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25103  fi
25104
25105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25107
25108    else
25109      # We're on a unix platform. Hooray! :)
25110      path="$BOOT_JDK"
25111      has_space=`$ECHO "$path" | $GREP " "`
25112      if test "x$has_space" != x; then
25113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25114$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25116      fi
25117
25118      # Use eval to expand a potential ~
25119      eval path="$path"
25120      if test ! -f "$path" && test ! -d "$path"; then
25121        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25122      fi
25123
25124      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25125    fi
25126  fi
25127
25128            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25129$as_echo_n "checking for Boot JDK... " >&6; }
25130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25131$as_echo "$BOOT_JDK" >&6; }
25132            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25133$as_echo_n "checking Boot JDK version... " >&6; }
25134            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25136$as_echo "$BOOT_JDK_VERSION" >&6; }
25137          fi # end check jdk version
25138        fi # end check javac
25139      fi # end check java
25140    fi # end check boot jdk found
25141  fi
25142
25143    done
25144  fi
25145
25146  fi
25147
25148
25149    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25150    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25151      # Do we have a bin/java?
25152      if test ! -x "$BOOT_JDK/bin/java"; then
25153        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25155        BOOT_JDK_FOUND=no
25156      else
25157        # Do we have a bin/javac?
25158        if test ! -x "$BOOT_JDK/bin/javac"; then
25159          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25161          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25162$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25163          BOOT_JDK_FOUND=no
25164        else
25165          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25166          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25167
25168          # Extra M4 quote needed to protect [] in grep expression.
25169          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25170          if test "x$FOUND_CORRECT_VERSION" = x; then
25171            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25173            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25174$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25175            BOOT_JDK_FOUND=no
25176          else
25177            # We're done! :-)
25178            BOOT_JDK_FOUND=yes
25179
25180  # Only process if variable expands to non-empty
25181
25182  if test "x$BOOT_JDK" != x; then
25183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25184
25185  # Input might be given as Windows format, start by converting to
25186  # unix format.
25187  path="$BOOT_JDK"
25188  new_path=`$CYGPATH -u "$path"`
25189
25190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25193  # "foo.exe" is OK but "foo" is an error.
25194  #
25195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25196  # It is also a way to make sure we got the proper file name for the real test later on.
25197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25198  if test "x$test_shortpath" = x; then
25199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25200$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25201    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25202  fi
25203
25204  # Call helper function which possibly converts this using DOS-style short mode.
25205  # If so, the updated path is stored in $new_path.
25206
25207  input_path="$new_path"
25208  # Check if we need to convert this using DOS-style short mode. If the path
25209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25210  # take no chances and rewrite it.
25211  # Note: m4 eats our [], so we need to use [ and ] instead.
25212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25213  if test "x$has_forbidden_chars" != x; then
25214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25218      # Going to short mode and back again did indeed matter. Since short mode is
25219      # case insensitive, let's make it lowercase to improve readability.
25220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25221      # Now convert it back to Unix-style (cygpath)
25222      input_path=`$CYGPATH -u "$shortmode_path"`
25223      new_path="$input_path"
25224    fi
25225  fi
25226
25227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25228  if test "x$test_cygdrive_prefix" = x; then
25229    # As a simple fix, exclude /usr/bin since it's not a real path.
25230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25232      # a path prefixed by /cygdrive for fixpath to work.
25233      new_path="$CYGWIN_ROOT_PATH$input_path"
25234    fi
25235  fi
25236
25237
25238  if test "x$path" != "x$new_path"; then
25239    BOOT_JDK="$new_path"
25240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25241$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25242  fi
25243
25244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25245
25246  path="$BOOT_JDK"
25247  has_colon=`$ECHO $path | $GREP ^.:`
25248  new_path="$path"
25249  if test "x$has_colon" = x; then
25250    # Not in mixed or Windows style, start by that.
25251    new_path=`cmd //c echo $path`
25252  fi
25253
25254
25255  input_path="$new_path"
25256  # Check if we need to convert this using DOS-style short mode. If the path
25257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25258  # take no chances and rewrite it.
25259  # Note: m4 eats our [], so we need to use [ and ] instead.
25260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25261  if test "x$has_forbidden_chars" != x; then
25262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25264  fi
25265
25266
25267  windows_path="$new_path"
25268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25269    unix_path=`$CYGPATH -u "$windows_path"`
25270    new_path="$unix_path"
25271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25273    new_path="$unix_path"
25274  fi
25275
25276  if test "x$path" != "x$new_path"; then
25277    BOOT_JDK="$new_path"
25278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25280  fi
25281
25282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25284
25285    else
25286      # We're on a unix platform. Hooray! :)
25287      path="$BOOT_JDK"
25288      has_space=`$ECHO "$path" | $GREP " "`
25289      if test "x$has_space" != x; then
25290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25291$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25292        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25293      fi
25294
25295      # Use eval to expand a potential ~
25296      eval path="$path"
25297      if test ! -f "$path" && test ! -d "$path"; then
25298        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25299      fi
25300
25301      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25302    fi
25303  fi
25304
25305            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25306$as_echo_n "checking for Boot JDK... " >&6; }
25307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25308$as_echo "$BOOT_JDK" >&6; }
25309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25310$as_echo_n "checking Boot JDK version... " >&6; }
25311            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25313$as_echo "$BOOT_JDK_VERSION" >&6; }
25314          fi # end check jdk version
25315        fi # end check javac
25316      fi # end check java
25317    fi # end check boot jdk found
25318  fi
25319
25320
25321  if test "x$BOOT_JDK_FOUND" = xno; then
25322    # Now execute the test
25323
25324  if test "x$PROGRAMW6432" != x; then
25325    VIRTUAL_DIR="$PROGRAMW6432/Java"
25326
25327  windows_path="$VIRTUAL_DIR"
25328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25329    unix_path=`$CYGPATH -u "$windows_path"`
25330    VIRTUAL_DIR="$unix_path"
25331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25333    VIRTUAL_DIR="$unix_path"
25334  fi
25335
25336
25337  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25338  BOOT_JDK_SUFFIX=""
25339  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25340  if test "x$ALL_JDKS_FOUND" != x; then
25341    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25342
25343  if test "x$BOOT_JDK_FOUND" = xno; then
25344    # Now execute the test
25345
25346        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25347        if test -d "$BOOT_JDK"; then
25348          BOOT_JDK_FOUND=maybe
25349          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25350$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25351        fi
25352
25353
25354    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25355    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25356      # Do we have a bin/java?
25357      if test ! -x "$BOOT_JDK/bin/java"; then
25358        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25360        BOOT_JDK_FOUND=no
25361      else
25362        # Do we have a bin/javac?
25363        if test ! -x "$BOOT_JDK/bin/javac"; then
25364          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25366          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25367$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25368          BOOT_JDK_FOUND=no
25369        else
25370          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25371          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25372
25373          # Extra M4 quote needed to protect [] in grep expression.
25374          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25375          if test "x$FOUND_CORRECT_VERSION" = x; then
25376            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25378            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25379$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25380            BOOT_JDK_FOUND=no
25381          else
25382            # We're done! :-)
25383            BOOT_JDK_FOUND=yes
25384
25385  # Only process if variable expands to non-empty
25386
25387  if test "x$BOOT_JDK" != x; then
25388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25389
25390  # Input might be given as Windows format, start by converting to
25391  # unix format.
25392  path="$BOOT_JDK"
25393  new_path=`$CYGPATH -u "$path"`
25394
25395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25398  # "foo.exe" is OK but "foo" is an error.
25399  #
25400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25401  # It is also a way to make sure we got the proper file name for the real test later on.
25402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25403  if test "x$test_shortpath" = x; then
25404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25407  fi
25408
25409  # Call helper function which possibly converts this using DOS-style short mode.
25410  # If so, the updated path is stored in $new_path.
25411
25412  input_path="$new_path"
25413  # Check if we need to convert this using DOS-style short mode. If the path
25414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25415  # take no chances and rewrite it.
25416  # Note: m4 eats our [], so we need to use [ and ] instead.
25417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25418  if test "x$has_forbidden_chars" != x; then
25419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25423      # Going to short mode and back again did indeed matter. Since short mode is
25424      # case insensitive, let's make it lowercase to improve readability.
25425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25426      # Now convert it back to Unix-style (cygpath)
25427      input_path=`$CYGPATH -u "$shortmode_path"`
25428      new_path="$input_path"
25429    fi
25430  fi
25431
25432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25433  if test "x$test_cygdrive_prefix" = x; then
25434    # As a simple fix, exclude /usr/bin since it's not a real path.
25435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25437      # a path prefixed by /cygdrive for fixpath to work.
25438      new_path="$CYGWIN_ROOT_PATH$input_path"
25439    fi
25440  fi
25441
25442
25443  if test "x$path" != "x$new_path"; then
25444    BOOT_JDK="$new_path"
25445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25447  fi
25448
25449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25450
25451  path="$BOOT_JDK"
25452  has_colon=`$ECHO $path | $GREP ^.:`
25453  new_path="$path"
25454  if test "x$has_colon" = x; then
25455    # Not in mixed or Windows style, start by that.
25456    new_path=`cmd //c echo $path`
25457  fi
25458
25459
25460  input_path="$new_path"
25461  # Check if we need to convert this using DOS-style short mode. If the path
25462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25463  # take no chances and rewrite it.
25464  # Note: m4 eats our [], so we need to use [ and ] instead.
25465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25466  if test "x$has_forbidden_chars" != x; then
25467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25469  fi
25470
25471
25472  windows_path="$new_path"
25473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25474    unix_path=`$CYGPATH -u "$windows_path"`
25475    new_path="$unix_path"
25476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25478    new_path="$unix_path"
25479  fi
25480
25481  if test "x$path" != "x$new_path"; then
25482    BOOT_JDK="$new_path"
25483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25485  fi
25486
25487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25489
25490    else
25491      # We're on a unix platform. Hooray! :)
25492      path="$BOOT_JDK"
25493      has_space=`$ECHO "$path" | $GREP " "`
25494      if test "x$has_space" != x; then
25495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25496$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25498      fi
25499
25500      # Use eval to expand a potential ~
25501      eval path="$path"
25502      if test ! -f "$path" && test ! -d "$path"; then
25503        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25504      fi
25505
25506      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25507    fi
25508  fi
25509
25510            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25511$as_echo_n "checking for Boot JDK... " >&6; }
25512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25513$as_echo "$BOOT_JDK" >&6; }
25514            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25515$as_echo_n "checking Boot JDK version... " >&6; }
25516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25518$as_echo "$BOOT_JDK_VERSION" >&6; }
25519          fi # end check jdk version
25520        fi # end check javac
25521      fi # end check java
25522    fi # end check boot jdk found
25523  fi
25524
25525    done
25526  fi
25527
25528  fi
25529
25530
25531    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25532    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25533      # Do we have a bin/java?
25534      if test ! -x "$BOOT_JDK/bin/java"; then
25535        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25537        BOOT_JDK_FOUND=no
25538      else
25539        # Do we have a bin/javac?
25540        if test ! -x "$BOOT_JDK/bin/javac"; then
25541          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25543          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25544$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25545          BOOT_JDK_FOUND=no
25546        else
25547          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25548          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25549
25550          # Extra M4 quote needed to protect [] in grep expression.
25551          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25552          if test "x$FOUND_CORRECT_VERSION" = x; then
25553            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25555            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25556$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25557            BOOT_JDK_FOUND=no
25558          else
25559            # We're done! :-)
25560            BOOT_JDK_FOUND=yes
25561
25562  # Only process if variable expands to non-empty
25563
25564  if test "x$BOOT_JDK" != x; then
25565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25566
25567  # Input might be given as Windows format, start by converting to
25568  # unix format.
25569  path="$BOOT_JDK"
25570  new_path=`$CYGPATH -u "$path"`
25571
25572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25575  # "foo.exe" is OK but "foo" is an error.
25576  #
25577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25578  # It is also a way to make sure we got the proper file name for the real test later on.
25579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25580  if test "x$test_shortpath" = x; then
25581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25583    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25584  fi
25585
25586  # Call helper function which possibly converts this using DOS-style short mode.
25587  # If so, the updated path is stored in $new_path.
25588
25589  input_path="$new_path"
25590  # Check if we need to convert this using DOS-style short mode. If the path
25591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25592  # take no chances and rewrite it.
25593  # Note: m4 eats our [], so we need to use [ and ] instead.
25594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25595  if test "x$has_forbidden_chars" != x; then
25596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25600      # Going to short mode and back again did indeed matter. Since short mode is
25601      # case insensitive, let's make it lowercase to improve readability.
25602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25603      # Now convert it back to Unix-style (cygpath)
25604      input_path=`$CYGPATH -u "$shortmode_path"`
25605      new_path="$input_path"
25606    fi
25607  fi
25608
25609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25610  if test "x$test_cygdrive_prefix" = x; then
25611    # As a simple fix, exclude /usr/bin since it's not a real path.
25612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25614      # a path prefixed by /cygdrive for fixpath to work.
25615      new_path="$CYGWIN_ROOT_PATH$input_path"
25616    fi
25617  fi
25618
25619
25620  if test "x$path" != "x$new_path"; then
25621    BOOT_JDK="$new_path"
25622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25624  fi
25625
25626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25627
25628  path="$BOOT_JDK"
25629  has_colon=`$ECHO $path | $GREP ^.:`
25630  new_path="$path"
25631  if test "x$has_colon" = x; then
25632    # Not in mixed or Windows style, start by that.
25633    new_path=`cmd //c echo $path`
25634  fi
25635
25636
25637  input_path="$new_path"
25638  # Check if we need to convert this using DOS-style short mode. If the path
25639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25640  # take no chances and rewrite it.
25641  # Note: m4 eats our [], so we need to use [ and ] instead.
25642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25643  if test "x$has_forbidden_chars" != x; then
25644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25646  fi
25647
25648
25649  windows_path="$new_path"
25650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25651    unix_path=`$CYGPATH -u "$windows_path"`
25652    new_path="$unix_path"
25653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25655    new_path="$unix_path"
25656  fi
25657
25658  if test "x$path" != "x$new_path"; then
25659    BOOT_JDK="$new_path"
25660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25662  fi
25663
25664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25666
25667    else
25668      # We're on a unix platform. Hooray! :)
25669      path="$BOOT_JDK"
25670      has_space=`$ECHO "$path" | $GREP " "`
25671      if test "x$has_space" != x; then
25672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25674        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25675      fi
25676
25677      # Use eval to expand a potential ~
25678      eval path="$path"
25679      if test ! -f "$path" && test ! -d "$path"; then
25680        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25681      fi
25682
25683      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25684    fi
25685  fi
25686
25687            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25688$as_echo_n "checking for Boot JDK... " >&6; }
25689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25690$as_echo "$BOOT_JDK" >&6; }
25691            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25692$as_echo_n "checking Boot JDK version... " >&6; }
25693            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25695$as_echo "$BOOT_JDK_VERSION" >&6; }
25696          fi # end check jdk version
25697        fi # end check javac
25698      fi # end check java
25699    fi # end check boot jdk found
25700  fi
25701
25702
25703  if test "x$BOOT_JDK_FOUND" = xno; then
25704    # Now execute the test
25705
25706  if test "x$PROGRAMFILES" != x; then
25707    VIRTUAL_DIR="$PROGRAMFILES/Java"
25708
25709  windows_path="$VIRTUAL_DIR"
25710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25711    unix_path=`$CYGPATH -u "$windows_path"`
25712    VIRTUAL_DIR="$unix_path"
25713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25715    VIRTUAL_DIR="$unix_path"
25716  fi
25717
25718
25719  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25720  BOOT_JDK_SUFFIX=""
25721  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25722  if test "x$ALL_JDKS_FOUND" != x; then
25723    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25724
25725  if test "x$BOOT_JDK_FOUND" = xno; then
25726    # Now execute the test
25727
25728        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25729        if test -d "$BOOT_JDK"; then
25730          BOOT_JDK_FOUND=maybe
25731          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25732$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25733        fi
25734
25735
25736    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25737    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25738      # Do we have a bin/java?
25739      if test ! -x "$BOOT_JDK/bin/java"; then
25740        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25742        BOOT_JDK_FOUND=no
25743      else
25744        # Do we have a bin/javac?
25745        if test ! -x "$BOOT_JDK/bin/javac"; then
25746          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25748          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25749$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25750          BOOT_JDK_FOUND=no
25751        else
25752          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25753          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25754
25755          # Extra M4 quote needed to protect [] in grep expression.
25756          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25757          if test "x$FOUND_CORRECT_VERSION" = x; then
25758            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25760            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25761$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25762            BOOT_JDK_FOUND=no
25763          else
25764            # We're done! :-)
25765            BOOT_JDK_FOUND=yes
25766
25767  # Only process if variable expands to non-empty
25768
25769  if test "x$BOOT_JDK" != x; then
25770    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25771
25772  # Input might be given as Windows format, start by converting to
25773  # unix format.
25774  path="$BOOT_JDK"
25775  new_path=`$CYGPATH -u "$path"`
25776
25777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25780  # "foo.exe" is OK but "foo" is an error.
25781  #
25782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25783  # It is also a way to make sure we got the proper file name for the real test later on.
25784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25785  if test "x$test_shortpath" = x; then
25786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25788    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25789  fi
25790
25791  # Call helper function which possibly converts this using DOS-style short mode.
25792  # If so, the updated path is stored in $new_path.
25793
25794  input_path="$new_path"
25795  # Check if we need to convert this using DOS-style short mode. If the path
25796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25797  # take no chances and rewrite it.
25798  # Note: m4 eats our [], so we need to use [ and ] instead.
25799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25800  if test "x$has_forbidden_chars" != x; then
25801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25805      # Going to short mode and back again did indeed matter. Since short mode is
25806      # case insensitive, let's make it lowercase to improve readability.
25807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25808      # Now convert it back to Unix-style (cygpath)
25809      input_path=`$CYGPATH -u "$shortmode_path"`
25810      new_path="$input_path"
25811    fi
25812  fi
25813
25814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25815  if test "x$test_cygdrive_prefix" = x; then
25816    # As a simple fix, exclude /usr/bin since it's not a real path.
25817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25819      # a path prefixed by /cygdrive for fixpath to work.
25820      new_path="$CYGWIN_ROOT_PATH$input_path"
25821    fi
25822  fi
25823
25824
25825  if test "x$path" != "x$new_path"; then
25826    BOOT_JDK="$new_path"
25827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25828$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25829  fi
25830
25831    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25832
25833  path="$BOOT_JDK"
25834  has_colon=`$ECHO $path | $GREP ^.:`
25835  new_path="$path"
25836  if test "x$has_colon" = x; then
25837    # Not in mixed or Windows style, start by that.
25838    new_path=`cmd //c echo $path`
25839  fi
25840
25841
25842  input_path="$new_path"
25843  # Check if we need to convert this using DOS-style short mode. If the path
25844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25845  # take no chances and rewrite it.
25846  # Note: m4 eats our [], so we need to use [ and ] instead.
25847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25848  if test "x$has_forbidden_chars" != x; then
25849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25851  fi
25852
25853
25854  windows_path="$new_path"
25855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25856    unix_path=`$CYGPATH -u "$windows_path"`
25857    new_path="$unix_path"
25858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25860    new_path="$unix_path"
25861  fi
25862
25863  if test "x$path" != "x$new_path"; then
25864    BOOT_JDK="$new_path"
25865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25867  fi
25868
25869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25871
25872    else
25873      # We're on a unix platform. Hooray! :)
25874      path="$BOOT_JDK"
25875      has_space=`$ECHO "$path" | $GREP " "`
25876      if test "x$has_space" != x; then
25877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25879        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25880      fi
25881
25882      # Use eval to expand a potential ~
25883      eval path="$path"
25884      if test ! -f "$path" && test ! -d "$path"; then
25885        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25886      fi
25887
25888      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25889    fi
25890  fi
25891
25892            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25893$as_echo_n "checking for Boot JDK... " >&6; }
25894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25895$as_echo "$BOOT_JDK" >&6; }
25896            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25897$as_echo_n "checking Boot JDK version... " >&6; }
25898            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25900$as_echo "$BOOT_JDK_VERSION" >&6; }
25901          fi # end check jdk version
25902        fi # end check javac
25903      fi # end check java
25904    fi # end check boot jdk found
25905  fi
25906
25907    done
25908  fi
25909
25910  fi
25911
25912
25913    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25914    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25915      # Do we have a bin/java?
25916      if test ! -x "$BOOT_JDK/bin/java"; then
25917        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25919        BOOT_JDK_FOUND=no
25920      else
25921        # Do we have a bin/javac?
25922        if test ! -x "$BOOT_JDK/bin/javac"; then
25923          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25925          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25926$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25927          BOOT_JDK_FOUND=no
25928        else
25929          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25930          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25931
25932          # Extra M4 quote needed to protect [] in grep expression.
25933          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25934          if test "x$FOUND_CORRECT_VERSION" = x; then
25935            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25937            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25938$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25939            BOOT_JDK_FOUND=no
25940          else
25941            # We're done! :-)
25942            BOOT_JDK_FOUND=yes
25943
25944  # Only process if variable expands to non-empty
25945
25946  if test "x$BOOT_JDK" != x; then
25947    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25948
25949  # Input might be given as Windows format, start by converting to
25950  # unix format.
25951  path="$BOOT_JDK"
25952  new_path=`$CYGPATH -u "$path"`
25953
25954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25957  # "foo.exe" is OK but "foo" is an error.
25958  #
25959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25960  # It is also a way to make sure we got the proper file name for the real test later on.
25961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25962  if test "x$test_shortpath" = x; then
25963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25964$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25965    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25966  fi
25967
25968  # Call helper function which possibly converts this using DOS-style short mode.
25969  # If so, the updated path is stored in $new_path.
25970
25971  input_path="$new_path"
25972  # Check if we need to convert this using DOS-style short mode. If the path
25973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25974  # take no chances and rewrite it.
25975  # Note: m4 eats our [], so we need to use [ and ] instead.
25976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25977  if test "x$has_forbidden_chars" != x; then
25978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25982      # Going to short mode and back again did indeed matter. Since short mode is
25983      # case insensitive, let's make it lowercase to improve readability.
25984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25985      # Now convert it back to Unix-style (cygpath)
25986      input_path=`$CYGPATH -u "$shortmode_path"`
25987      new_path="$input_path"
25988    fi
25989  fi
25990
25991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25992  if test "x$test_cygdrive_prefix" = x; then
25993    # As a simple fix, exclude /usr/bin since it's not a real path.
25994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25996      # a path prefixed by /cygdrive for fixpath to work.
25997      new_path="$CYGWIN_ROOT_PATH$input_path"
25998    fi
25999  fi
26000
26001
26002  if test "x$path" != "x$new_path"; then
26003    BOOT_JDK="$new_path"
26004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26006  fi
26007
26008    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26009
26010  path="$BOOT_JDK"
26011  has_colon=`$ECHO $path | $GREP ^.:`
26012  new_path="$path"
26013  if test "x$has_colon" = x; then
26014    # Not in mixed or Windows style, start by that.
26015    new_path=`cmd //c echo $path`
26016  fi
26017
26018
26019  input_path="$new_path"
26020  # Check if we need to convert this using DOS-style short mode. If the path
26021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26022  # take no chances and rewrite it.
26023  # Note: m4 eats our [], so we need to use [ and ] instead.
26024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26025  if test "x$has_forbidden_chars" != x; then
26026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26028  fi
26029
26030
26031  windows_path="$new_path"
26032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26033    unix_path=`$CYGPATH -u "$windows_path"`
26034    new_path="$unix_path"
26035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26037    new_path="$unix_path"
26038  fi
26039
26040  if test "x$path" != "x$new_path"; then
26041    BOOT_JDK="$new_path"
26042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26043$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26044  fi
26045
26046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26048
26049    else
26050      # We're on a unix platform. Hooray! :)
26051      path="$BOOT_JDK"
26052      has_space=`$ECHO "$path" | $GREP " "`
26053      if test "x$has_space" != x; then
26054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26055$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26056        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26057      fi
26058
26059      # Use eval to expand a potential ~
26060      eval path="$path"
26061      if test ! -f "$path" && test ! -d "$path"; then
26062        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26063      fi
26064
26065      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26066    fi
26067  fi
26068
26069            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26070$as_echo_n "checking for Boot JDK... " >&6; }
26071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26072$as_echo "$BOOT_JDK" >&6; }
26073            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26074$as_echo_n "checking Boot JDK version... " >&6; }
26075            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26077$as_echo "$BOOT_JDK_VERSION" >&6; }
26078          fi # end check jdk version
26079        fi # end check javac
26080      fi # end check java
26081    fi # end check boot jdk found
26082  fi
26083
26084
26085  if test "x$BOOT_JDK_FOUND" = xno; then
26086    # Now execute the test
26087
26088  if test "x$ProgramFiles" != x; then
26089    VIRTUAL_DIR="$ProgramFiles/Java"
26090
26091  windows_path="$VIRTUAL_DIR"
26092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26093    unix_path=`$CYGPATH -u "$windows_path"`
26094    VIRTUAL_DIR="$unix_path"
26095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26097    VIRTUAL_DIR="$unix_path"
26098  fi
26099
26100
26101  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26102  BOOT_JDK_SUFFIX=""
26103  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26104  if test "x$ALL_JDKS_FOUND" != x; then
26105    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26106
26107  if test "x$BOOT_JDK_FOUND" = xno; then
26108    # Now execute the test
26109
26110        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26111        if test -d "$BOOT_JDK"; then
26112          BOOT_JDK_FOUND=maybe
26113          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26114$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26115        fi
26116
26117
26118    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26119    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26120      # Do we have a bin/java?
26121      if test ! -x "$BOOT_JDK/bin/java"; then
26122        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26124        BOOT_JDK_FOUND=no
26125      else
26126        # Do we have a bin/javac?
26127        if test ! -x "$BOOT_JDK/bin/javac"; then
26128          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26130          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26131$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26132          BOOT_JDK_FOUND=no
26133        else
26134          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26135          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26136
26137          # Extra M4 quote needed to protect [] in grep expression.
26138          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26139          if test "x$FOUND_CORRECT_VERSION" = x; then
26140            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26142            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26143$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26144            BOOT_JDK_FOUND=no
26145          else
26146            # We're done! :-)
26147            BOOT_JDK_FOUND=yes
26148
26149  # Only process if variable expands to non-empty
26150
26151  if test "x$BOOT_JDK" != x; then
26152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26153
26154  # Input might be given as Windows format, start by converting to
26155  # unix format.
26156  path="$BOOT_JDK"
26157  new_path=`$CYGPATH -u "$path"`
26158
26159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26162  # "foo.exe" is OK but "foo" is an error.
26163  #
26164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26165  # It is also a way to make sure we got the proper file name for the real test later on.
26166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26167  if test "x$test_shortpath" = x; then
26168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26170    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26171  fi
26172
26173  # Call helper function which possibly converts this using DOS-style short mode.
26174  # If so, the updated path is stored in $new_path.
26175
26176  input_path="$new_path"
26177  # Check if we need to convert this using DOS-style short mode. If the path
26178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26179  # take no chances and rewrite it.
26180  # Note: m4 eats our [], so we need to use [ and ] instead.
26181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26182  if test "x$has_forbidden_chars" != x; then
26183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26187      # Going to short mode and back again did indeed matter. Since short mode is
26188      # case insensitive, let's make it lowercase to improve readability.
26189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26190      # Now convert it back to Unix-style (cygpath)
26191      input_path=`$CYGPATH -u "$shortmode_path"`
26192      new_path="$input_path"
26193    fi
26194  fi
26195
26196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26197  if test "x$test_cygdrive_prefix" = x; then
26198    # As a simple fix, exclude /usr/bin since it's not a real path.
26199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26201      # a path prefixed by /cygdrive for fixpath to work.
26202      new_path="$CYGWIN_ROOT_PATH$input_path"
26203    fi
26204  fi
26205
26206
26207  if test "x$path" != "x$new_path"; then
26208    BOOT_JDK="$new_path"
26209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26211  fi
26212
26213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26214
26215  path="$BOOT_JDK"
26216  has_colon=`$ECHO $path | $GREP ^.:`
26217  new_path="$path"
26218  if test "x$has_colon" = x; then
26219    # Not in mixed or Windows style, start by that.
26220    new_path=`cmd //c echo $path`
26221  fi
26222
26223
26224  input_path="$new_path"
26225  # Check if we need to convert this using DOS-style short mode. If the path
26226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26227  # take no chances and rewrite it.
26228  # Note: m4 eats our [], so we need to use [ and ] instead.
26229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26230  if test "x$has_forbidden_chars" != x; then
26231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26233  fi
26234
26235
26236  windows_path="$new_path"
26237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26238    unix_path=`$CYGPATH -u "$windows_path"`
26239    new_path="$unix_path"
26240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26242    new_path="$unix_path"
26243  fi
26244
26245  if test "x$path" != "x$new_path"; then
26246    BOOT_JDK="$new_path"
26247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26249  fi
26250
26251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26253
26254    else
26255      # We're on a unix platform. Hooray! :)
26256      path="$BOOT_JDK"
26257      has_space=`$ECHO "$path" | $GREP " "`
26258      if test "x$has_space" != x; then
26259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26260$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26262      fi
26263
26264      # Use eval to expand a potential ~
26265      eval path="$path"
26266      if test ! -f "$path" && test ! -d "$path"; then
26267        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26268      fi
26269
26270      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26271    fi
26272  fi
26273
26274            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26275$as_echo_n "checking for Boot JDK... " >&6; }
26276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26277$as_echo "$BOOT_JDK" >&6; }
26278            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26279$as_echo_n "checking Boot JDK version... " >&6; }
26280            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26282$as_echo "$BOOT_JDK_VERSION" >&6; }
26283          fi # end check jdk version
26284        fi # end check javac
26285      fi # end check java
26286    fi # end check boot jdk found
26287  fi
26288
26289    done
26290  fi
26291
26292  fi
26293
26294
26295    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26296    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26297      # Do we have a bin/java?
26298      if test ! -x "$BOOT_JDK/bin/java"; then
26299        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26301        BOOT_JDK_FOUND=no
26302      else
26303        # Do we have a bin/javac?
26304        if test ! -x "$BOOT_JDK/bin/javac"; then
26305          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26307          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26308$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26309          BOOT_JDK_FOUND=no
26310        else
26311          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26312          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26313
26314          # Extra M4 quote needed to protect [] in grep expression.
26315          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26316          if test "x$FOUND_CORRECT_VERSION" = x; then
26317            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26319            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26320$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26321            BOOT_JDK_FOUND=no
26322          else
26323            # We're done! :-)
26324            BOOT_JDK_FOUND=yes
26325
26326  # Only process if variable expands to non-empty
26327
26328  if test "x$BOOT_JDK" != x; then
26329    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26330
26331  # Input might be given as Windows format, start by converting to
26332  # unix format.
26333  path="$BOOT_JDK"
26334  new_path=`$CYGPATH -u "$path"`
26335
26336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26339  # "foo.exe" is OK but "foo" is an error.
26340  #
26341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26342  # It is also a way to make sure we got the proper file name for the real test later on.
26343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26344  if test "x$test_shortpath" = x; then
26345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26346$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26347    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26348  fi
26349
26350  # Call helper function which possibly converts this using DOS-style short mode.
26351  # If so, the updated path is stored in $new_path.
26352
26353  input_path="$new_path"
26354  # Check if we need to convert this using DOS-style short mode. If the path
26355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26356  # take no chances and rewrite it.
26357  # Note: m4 eats our [], so we need to use [ and ] instead.
26358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26359  if test "x$has_forbidden_chars" != x; then
26360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26364      # Going to short mode and back again did indeed matter. Since short mode is
26365      # case insensitive, let's make it lowercase to improve readability.
26366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26367      # Now convert it back to Unix-style (cygpath)
26368      input_path=`$CYGPATH -u "$shortmode_path"`
26369      new_path="$input_path"
26370    fi
26371  fi
26372
26373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26374  if test "x$test_cygdrive_prefix" = x; then
26375    # As a simple fix, exclude /usr/bin since it's not a real path.
26376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26378      # a path prefixed by /cygdrive for fixpath to work.
26379      new_path="$CYGWIN_ROOT_PATH$input_path"
26380    fi
26381  fi
26382
26383
26384  if test "x$path" != "x$new_path"; then
26385    BOOT_JDK="$new_path"
26386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26387$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26388  fi
26389
26390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26391
26392  path="$BOOT_JDK"
26393  has_colon=`$ECHO $path | $GREP ^.:`
26394  new_path="$path"
26395  if test "x$has_colon" = x; then
26396    # Not in mixed or Windows style, start by that.
26397    new_path=`cmd //c echo $path`
26398  fi
26399
26400
26401  input_path="$new_path"
26402  # Check if we need to convert this using DOS-style short mode. If the path
26403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26404  # take no chances and rewrite it.
26405  # Note: m4 eats our [], so we need to use [ and ] instead.
26406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26407  if test "x$has_forbidden_chars" != x; then
26408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26410  fi
26411
26412
26413  windows_path="$new_path"
26414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26415    unix_path=`$CYGPATH -u "$windows_path"`
26416    new_path="$unix_path"
26417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26419    new_path="$unix_path"
26420  fi
26421
26422  if test "x$path" != "x$new_path"; then
26423    BOOT_JDK="$new_path"
26424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26426  fi
26427
26428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26430
26431    else
26432      # We're on a unix platform. Hooray! :)
26433      path="$BOOT_JDK"
26434      has_space=`$ECHO "$path" | $GREP " "`
26435      if test "x$has_space" != x; then
26436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26438        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26439      fi
26440
26441      # Use eval to expand a potential ~
26442      eval path="$path"
26443      if test ! -f "$path" && test ! -d "$path"; then
26444        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26445      fi
26446
26447      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26448    fi
26449  fi
26450
26451            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26452$as_echo_n "checking for Boot JDK... " >&6; }
26453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26454$as_echo "$BOOT_JDK" >&6; }
26455            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26456$as_echo_n "checking Boot JDK version... " >&6; }
26457            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26459$as_echo "$BOOT_JDK_VERSION" >&6; }
26460          fi # end check jdk version
26461        fi # end check javac
26462      fi # end check java
26463    fi # end check boot jdk found
26464  fi
26465
26466
26467  if test "x$BOOT_JDK_FOUND" = xno; then
26468    # Now execute the test
26469
26470  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26471  BOOT_JDK_SUFFIX=""
26472  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26473  if test "x$ALL_JDKS_FOUND" != x; then
26474    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26475
26476  if test "x$BOOT_JDK_FOUND" = xno; then
26477    # Now execute the test
26478
26479        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26480        if test -d "$BOOT_JDK"; then
26481          BOOT_JDK_FOUND=maybe
26482          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26483$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26484        fi
26485
26486
26487    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26488    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26489      # Do we have a bin/java?
26490      if test ! -x "$BOOT_JDK/bin/java"; then
26491        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26493        BOOT_JDK_FOUND=no
26494      else
26495        # Do we have a bin/javac?
26496        if test ! -x "$BOOT_JDK/bin/javac"; then
26497          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26499          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26500$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26501          BOOT_JDK_FOUND=no
26502        else
26503          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26504          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26505
26506          # Extra M4 quote needed to protect [] in grep expression.
26507          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26508          if test "x$FOUND_CORRECT_VERSION" = x; then
26509            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26511            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26512$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26513            BOOT_JDK_FOUND=no
26514          else
26515            # We're done! :-)
26516            BOOT_JDK_FOUND=yes
26517
26518  # Only process if variable expands to non-empty
26519
26520  if test "x$BOOT_JDK" != x; then
26521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26522
26523  # Input might be given as Windows format, start by converting to
26524  # unix format.
26525  path="$BOOT_JDK"
26526  new_path=`$CYGPATH -u "$path"`
26527
26528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26531  # "foo.exe" is OK but "foo" is an error.
26532  #
26533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26534  # It is also a way to make sure we got the proper file name for the real test later on.
26535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26536  if test "x$test_shortpath" = x; then
26537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26539    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26540  fi
26541
26542  # Call helper function which possibly converts this using DOS-style short mode.
26543  # If so, the updated path is stored in $new_path.
26544
26545  input_path="$new_path"
26546  # Check if we need to convert this using DOS-style short mode. If the path
26547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26548  # take no chances and rewrite it.
26549  # Note: m4 eats our [], so we need to use [ and ] instead.
26550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26551  if test "x$has_forbidden_chars" != x; then
26552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26556      # Going to short mode and back again did indeed matter. Since short mode is
26557      # case insensitive, let's make it lowercase to improve readability.
26558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26559      # Now convert it back to Unix-style (cygpath)
26560      input_path=`$CYGPATH -u "$shortmode_path"`
26561      new_path="$input_path"
26562    fi
26563  fi
26564
26565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26566  if test "x$test_cygdrive_prefix" = x; then
26567    # As a simple fix, exclude /usr/bin since it's not a real path.
26568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26570      # a path prefixed by /cygdrive for fixpath to work.
26571      new_path="$CYGWIN_ROOT_PATH$input_path"
26572    fi
26573  fi
26574
26575
26576  if test "x$path" != "x$new_path"; then
26577    BOOT_JDK="$new_path"
26578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26580  fi
26581
26582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26583
26584  path="$BOOT_JDK"
26585  has_colon=`$ECHO $path | $GREP ^.:`
26586  new_path="$path"
26587  if test "x$has_colon" = x; then
26588    # Not in mixed or Windows style, start by that.
26589    new_path=`cmd //c echo $path`
26590  fi
26591
26592
26593  input_path="$new_path"
26594  # Check if we need to convert this using DOS-style short mode. If the path
26595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26596  # take no chances and rewrite it.
26597  # Note: m4 eats our [], so we need to use [ and ] instead.
26598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26599  if test "x$has_forbidden_chars" != x; then
26600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26602  fi
26603
26604
26605  windows_path="$new_path"
26606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26607    unix_path=`$CYGPATH -u "$windows_path"`
26608    new_path="$unix_path"
26609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26611    new_path="$unix_path"
26612  fi
26613
26614  if test "x$path" != "x$new_path"; then
26615    BOOT_JDK="$new_path"
26616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26618  fi
26619
26620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26622
26623    else
26624      # We're on a unix platform. Hooray! :)
26625      path="$BOOT_JDK"
26626      has_space=`$ECHO "$path" | $GREP " "`
26627      if test "x$has_space" != x; then
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26629$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26631      fi
26632
26633      # Use eval to expand a potential ~
26634      eval path="$path"
26635      if test ! -f "$path" && test ! -d "$path"; then
26636        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26637      fi
26638
26639      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26640    fi
26641  fi
26642
26643            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26644$as_echo_n "checking for Boot JDK... " >&6; }
26645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26646$as_echo "$BOOT_JDK" >&6; }
26647            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26648$as_echo_n "checking Boot JDK version... " >&6; }
26649            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26651$as_echo "$BOOT_JDK_VERSION" >&6; }
26652          fi # end check jdk version
26653        fi # end check javac
26654      fi # end check java
26655    fi # end check boot jdk found
26656  fi
26657
26658    done
26659  fi
26660
26661
26662    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26663    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26664      # Do we have a bin/java?
26665      if test ! -x "$BOOT_JDK/bin/java"; then
26666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26668        BOOT_JDK_FOUND=no
26669      else
26670        # Do we have a bin/javac?
26671        if test ! -x "$BOOT_JDK/bin/javac"; then
26672          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26674          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26675$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26676          BOOT_JDK_FOUND=no
26677        else
26678          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26679          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26680
26681          # Extra M4 quote needed to protect [] in grep expression.
26682          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26683          if test "x$FOUND_CORRECT_VERSION" = x; then
26684            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26686            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26687$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26688            BOOT_JDK_FOUND=no
26689          else
26690            # We're done! :-)
26691            BOOT_JDK_FOUND=yes
26692
26693  # Only process if variable expands to non-empty
26694
26695  if test "x$BOOT_JDK" != x; then
26696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26697
26698  # Input might be given as Windows format, start by converting to
26699  # unix format.
26700  path="$BOOT_JDK"
26701  new_path=`$CYGPATH -u "$path"`
26702
26703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26706  # "foo.exe" is OK but "foo" is an error.
26707  #
26708  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26709  # It is also a way to make sure we got the proper file name for the real test later on.
26710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26711  if test "x$test_shortpath" = x; then
26712    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26713$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26714    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26715  fi
26716
26717  # Call helper function which possibly converts this using DOS-style short mode.
26718  # If so, the updated path is stored in $new_path.
26719
26720  input_path="$new_path"
26721  # Check if we need to convert this using DOS-style short mode. If the path
26722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26723  # take no chances and rewrite it.
26724  # Note: m4 eats our [], so we need to use [ and ] instead.
26725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26726  if test "x$has_forbidden_chars" != x; then
26727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26731      # Going to short mode and back again did indeed matter. Since short mode is
26732      # case insensitive, let's make it lowercase to improve readability.
26733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26734      # Now convert it back to Unix-style (cygpath)
26735      input_path=`$CYGPATH -u "$shortmode_path"`
26736      new_path="$input_path"
26737    fi
26738  fi
26739
26740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26741  if test "x$test_cygdrive_prefix" = x; then
26742    # As a simple fix, exclude /usr/bin since it's not a real path.
26743    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26745      # a path prefixed by /cygdrive for fixpath to work.
26746      new_path="$CYGWIN_ROOT_PATH$input_path"
26747    fi
26748  fi
26749
26750
26751  if test "x$path" != "x$new_path"; then
26752    BOOT_JDK="$new_path"
26753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26754$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26755  fi
26756
26757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26758
26759  path="$BOOT_JDK"
26760  has_colon=`$ECHO $path | $GREP ^.:`
26761  new_path="$path"
26762  if test "x$has_colon" = x; then
26763    # Not in mixed or Windows style, start by that.
26764    new_path=`cmd //c echo $path`
26765  fi
26766
26767
26768  input_path="$new_path"
26769  # Check if we need to convert this using DOS-style short mode. If the path
26770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26771  # take no chances and rewrite it.
26772  # Note: m4 eats our [], so we need to use [ and ] instead.
26773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26774  if test "x$has_forbidden_chars" != x; then
26775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26777  fi
26778
26779
26780  windows_path="$new_path"
26781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26782    unix_path=`$CYGPATH -u "$windows_path"`
26783    new_path="$unix_path"
26784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26786    new_path="$unix_path"
26787  fi
26788
26789  if test "x$path" != "x$new_path"; then
26790    BOOT_JDK="$new_path"
26791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26793  fi
26794
26795  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26796  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26797
26798    else
26799      # We're on a unix platform. Hooray! :)
26800      path="$BOOT_JDK"
26801      has_space=`$ECHO "$path" | $GREP " "`
26802      if test "x$has_space" != x; then
26803        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26804$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26805        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26806      fi
26807
26808      # Use eval to expand a potential ~
26809      eval path="$path"
26810      if test ! -f "$path" && test ! -d "$path"; then
26811        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26812      fi
26813
26814      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26815    fi
26816  fi
26817
26818            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26819$as_echo_n "checking for Boot JDK... " >&6; }
26820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26821$as_echo "$BOOT_JDK" >&6; }
26822            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26823$as_echo_n "checking Boot JDK version... " >&6; }
26824            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26826$as_echo "$BOOT_JDK_VERSION" >&6; }
26827          fi # end check jdk version
26828        fi # end check javac
26829      fi # end check java
26830    fi # end check boot jdk found
26831  fi
26832
26833  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26834
26835  if test "x$BOOT_JDK_FOUND" = xno; then
26836    # Now execute the test
26837
26838  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26839  BOOT_JDK_SUFFIX="/Contents/Home"
26840  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26841  if test "x$ALL_JDKS_FOUND" != x; then
26842    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26843
26844  if test "x$BOOT_JDK_FOUND" = xno; then
26845    # Now execute the test
26846
26847        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26848        if test -d "$BOOT_JDK"; then
26849          BOOT_JDK_FOUND=maybe
26850          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26851$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26852        fi
26853
26854
26855    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26856    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26857      # Do we have a bin/java?
26858      if test ! -x "$BOOT_JDK/bin/java"; then
26859        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26861        BOOT_JDK_FOUND=no
26862      else
26863        # Do we have a bin/javac?
26864        if test ! -x "$BOOT_JDK/bin/javac"; then
26865          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26867          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26868$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26869          BOOT_JDK_FOUND=no
26870        else
26871          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26872          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26873
26874          # Extra M4 quote needed to protect [] in grep expression.
26875          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26876          if test "x$FOUND_CORRECT_VERSION" = x; then
26877            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26879            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26880$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26881            BOOT_JDK_FOUND=no
26882          else
26883            # We're done! :-)
26884            BOOT_JDK_FOUND=yes
26885
26886  # Only process if variable expands to non-empty
26887
26888  if test "x$BOOT_JDK" != x; then
26889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26890
26891  # Input might be given as Windows format, start by converting to
26892  # unix format.
26893  path="$BOOT_JDK"
26894  new_path=`$CYGPATH -u "$path"`
26895
26896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26899  # "foo.exe" is OK but "foo" is an error.
26900  #
26901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26902  # It is also a way to make sure we got the proper file name for the real test later on.
26903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26904  if test "x$test_shortpath" = x; then
26905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26907    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26908  fi
26909
26910  # Call helper function which possibly converts this using DOS-style short mode.
26911  # If so, the updated path is stored in $new_path.
26912
26913  input_path="$new_path"
26914  # Check if we need to convert this using DOS-style short mode. If the path
26915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26916  # take no chances and rewrite it.
26917  # Note: m4 eats our [], so we need to use [ and ] instead.
26918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26919  if test "x$has_forbidden_chars" != x; then
26920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26924      # Going to short mode and back again did indeed matter. Since short mode is
26925      # case insensitive, let's make it lowercase to improve readability.
26926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26927      # Now convert it back to Unix-style (cygpath)
26928      input_path=`$CYGPATH -u "$shortmode_path"`
26929      new_path="$input_path"
26930    fi
26931  fi
26932
26933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26934  if test "x$test_cygdrive_prefix" = x; then
26935    # As a simple fix, exclude /usr/bin since it's not a real path.
26936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26938      # a path prefixed by /cygdrive for fixpath to work.
26939      new_path="$CYGWIN_ROOT_PATH$input_path"
26940    fi
26941  fi
26942
26943
26944  if test "x$path" != "x$new_path"; then
26945    BOOT_JDK="$new_path"
26946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26948  fi
26949
26950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26951
26952  path="$BOOT_JDK"
26953  has_colon=`$ECHO $path | $GREP ^.:`
26954  new_path="$path"
26955  if test "x$has_colon" = x; then
26956    # Not in mixed or Windows style, start by that.
26957    new_path=`cmd //c echo $path`
26958  fi
26959
26960
26961  input_path="$new_path"
26962  # Check if we need to convert this using DOS-style short mode. If the path
26963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26964  # take no chances and rewrite it.
26965  # Note: m4 eats our [], so we need to use [ and ] instead.
26966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26967  if test "x$has_forbidden_chars" != x; then
26968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26970  fi
26971
26972
26973  windows_path="$new_path"
26974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26975    unix_path=`$CYGPATH -u "$windows_path"`
26976    new_path="$unix_path"
26977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26979    new_path="$unix_path"
26980  fi
26981
26982  if test "x$path" != "x$new_path"; then
26983    BOOT_JDK="$new_path"
26984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26986  fi
26987
26988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26990
26991    else
26992      # We're on a unix platform. Hooray! :)
26993      path="$BOOT_JDK"
26994      has_space=`$ECHO "$path" | $GREP " "`
26995      if test "x$has_space" != x; then
26996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26998        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26999      fi
27000
27001      # Use eval to expand a potential ~
27002      eval path="$path"
27003      if test ! -f "$path" && test ! -d "$path"; then
27004        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27005      fi
27006
27007      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27008    fi
27009  fi
27010
27011            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27012$as_echo_n "checking for Boot JDK... " >&6; }
27013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27014$as_echo "$BOOT_JDK" >&6; }
27015            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27016$as_echo_n "checking Boot JDK version... " >&6; }
27017            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27018            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27019$as_echo "$BOOT_JDK_VERSION" >&6; }
27020          fi # end check jdk version
27021        fi # end check javac
27022      fi # end check java
27023    fi # end check boot jdk found
27024  fi
27025
27026    done
27027  fi
27028
27029
27030    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27031    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27032      # Do we have a bin/java?
27033      if test ! -x "$BOOT_JDK/bin/java"; then
27034        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27036        BOOT_JDK_FOUND=no
27037      else
27038        # Do we have a bin/javac?
27039        if test ! -x "$BOOT_JDK/bin/javac"; then
27040          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27042          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27043$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27044          BOOT_JDK_FOUND=no
27045        else
27046          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27047          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27048
27049          # Extra M4 quote needed to protect [] in grep expression.
27050          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27051          if test "x$FOUND_CORRECT_VERSION" = x; then
27052            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27054            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27055$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27056            BOOT_JDK_FOUND=no
27057          else
27058            # We're done! :-)
27059            BOOT_JDK_FOUND=yes
27060
27061  # Only process if variable expands to non-empty
27062
27063  if test "x$BOOT_JDK" != x; then
27064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27065
27066  # Input might be given as Windows format, start by converting to
27067  # unix format.
27068  path="$BOOT_JDK"
27069  new_path=`$CYGPATH -u "$path"`
27070
27071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27074  # "foo.exe" is OK but "foo" is an error.
27075  #
27076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27077  # It is also a way to make sure we got the proper file name for the real test later on.
27078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27079  if test "x$test_shortpath" = x; then
27080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27082    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27083  fi
27084
27085  # Call helper function which possibly converts this using DOS-style short mode.
27086  # If so, the updated path is stored in $new_path.
27087
27088  input_path="$new_path"
27089  # Check if we need to convert this using DOS-style short mode. If the path
27090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27091  # take no chances and rewrite it.
27092  # Note: m4 eats our [], so we need to use [ and ] instead.
27093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27094  if test "x$has_forbidden_chars" != x; then
27095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27099      # Going to short mode and back again did indeed matter. Since short mode is
27100      # case insensitive, let's make it lowercase to improve readability.
27101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27102      # Now convert it back to Unix-style (cygpath)
27103      input_path=`$CYGPATH -u "$shortmode_path"`
27104      new_path="$input_path"
27105    fi
27106  fi
27107
27108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27109  if test "x$test_cygdrive_prefix" = x; then
27110    # As a simple fix, exclude /usr/bin since it's not a real path.
27111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27113      # a path prefixed by /cygdrive for fixpath to work.
27114      new_path="$CYGWIN_ROOT_PATH$input_path"
27115    fi
27116  fi
27117
27118
27119  if test "x$path" != "x$new_path"; then
27120    BOOT_JDK="$new_path"
27121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27123  fi
27124
27125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27126
27127  path="$BOOT_JDK"
27128  has_colon=`$ECHO $path | $GREP ^.:`
27129  new_path="$path"
27130  if test "x$has_colon" = x; then
27131    # Not in mixed or Windows style, start by that.
27132    new_path=`cmd //c echo $path`
27133  fi
27134
27135
27136  input_path="$new_path"
27137  # Check if we need to convert this using DOS-style short mode. If the path
27138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27139  # take no chances and rewrite it.
27140  # Note: m4 eats our [], so we need to use [ and ] instead.
27141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27142  if test "x$has_forbidden_chars" != x; then
27143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27145  fi
27146
27147
27148  windows_path="$new_path"
27149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27150    unix_path=`$CYGPATH -u "$windows_path"`
27151    new_path="$unix_path"
27152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27154    new_path="$unix_path"
27155  fi
27156
27157  if test "x$path" != "x$new_path"; then
27158    BOOT_JDK="$new_path"
27159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27161  fi
27162
27163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27165
27166    else
27167      # We're on a unix platform. Hooray! :)
27168      path="$BOOT_JDK"
27169      has_space=`$ECHO "$path" | $GREP " "`
27170      if test "x$has_space" != x; then
27171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27174      fi
27175
27176      # Use eval to expand a potential ~
27177      eval path="$path"
27178      if test ! -f "$path" && test ! -d "$path"; then
27179        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27180      fi
27181
27182      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27183    fi
27184  fi
27185
27186            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27187$as_echo_n "checking for Boot JDK... " >&6; }
27188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27189$as_echo "$BOOT_JDK" >&6; }
27190            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27191$as_echo_n "checking Boot JDK version... " >&6; }
27192            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27193            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27194$as_echo "$BOOT_JDK_VERSION" >&6; }
27195          fi # end check jdk version
27196        fi # end check javac
27197      fi # end check java
27198    fi # end check boot jdk found
27199  fi
27200
27201
27202  if test "x$BOOT_JDK_FOUND" = xno; then
27203    # Now execute the test
27204
27205  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27206  BOOT_JDK_SUFFIX="/Contents/Home"
27207  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27208  if test "x$ALL_JDKS_FOUND" != x; then
27209    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27210
27211  if test "x$BOOT_JDK_FOUND" = xno; then
27212    # Now execute the test
27213
27214        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27215        if test -d "$BOOT_JDK"; then
27216          BOOT_JDK_FOUND=maybe
27217          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27218$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27219        fi
27220
27221
27222    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27223    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27224      # Do we have a bin/java?
27225      if test ! -x "$BOOT_JDK/bin/java"; then
27226        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27227$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27228        BOOT_JDK_FOUND=no
27229      else
27230        # Do we have a bin/javac?
27231        if test ! -x "$BOOT_JDK/bin/javac"; then
27232          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27234          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27235$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27236          BOOT_JDK_FOUND=no
27237        else
27238          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27239          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27240
27241          # Extra M4 quote needed to protect [] in grep expression.
27242          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27243          if test "x$FOUND_CORRECT_VERSION" = x; then
27244            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27246            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27247$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27248            BOOT_JDK_FOUND=no
27249          else
27250            # We're done! :-)
27251            BOOT_JDK_FOUND=yes
27252
27253  # Only process if variable expands to non-empty
27254
27255  if test "x$BOOT_JDK" != x; then
27256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27257
27258  # Input might be given as Windows format, start by converting to
27259  # unix format.
27260  path="$BOOT_JDK"
27261  new_path=`$CYGPATH -u "$path"`
27262
27263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27266  # "foo.exe" is OK but "foo" is an error.
27267  #
27268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27269  # It is also a way to make sure we got the proper file name for the real test later on.
27270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27271  if test "x$test_shortpath" = x; then
27272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27275  fi
27276
27277  # Call helper function which possibly converts this using DOS-style short mode.
27278  # If so, the updated path is stored in $new_path.
27279
27280  input_path="$new_path"
27281  # Check if we need to convert this using DOS-style short mode. If the path
27282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27283  # take no chances and rewrite it.
27284  # Note: m4 eats our [], so we need to use [ and ] instead.
27285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27286  if test "x$has_forbidden_chars" != x; then
27287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27291      # Going to short mode and back again did indeed matter. Since short mode is
27292      # case insensitive, let's make it lowercase to improve readability.
27293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27294      # Now convert it back to Unix-style (cygpath)
27295      input_path=`$CYGPATH -u "$shortmode_path"`
27296      new_path="$input_path"
27297    fi
27298  fi
27299
27300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27301  if test "x$test_cygdrive_prefix" = x; then
27302    # As a simple fix, exclude /usr/bin since it's not a real path.
27303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27305      # a path prefixed by /cygdrive for fixpath to work.
27306      new_path="$CYGWIN_ROOT_PATH$input_path"
27307    fi
27308  fi
27309
27310
27311  if test "x$path" != "x$new_path"; then
27312    BOOT_JDK="$new_path"
27313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27315  fi
27316
27317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27318
27319  path="$BOOT_JDK"
27320  has_colon=`$ECHO $path | $GREP ^.:`
27321  new_path="$path"
27322  if test "x$has_colon" = x; then
27323    # Not in mixed or Windows style, start by that.
27324    new_path=`cmd //c echo $path`
27325  fi
27326
27327
27328  input_path="$new_path"
27329  # Check if we need to convert this using DOS-style short mode. If the path
27330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27331  # take no chances and rewrite it.
27332  # Note: m4 eats our [], so we need to use [ and ] instead.
27333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27334  if test "x$has_forbidden_chars" != x; then
27335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27337  fi
27338
27339
27340  windows_path="$new_path"
27341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27342    unix_path=`$CYGPATH -u "$windows_path"`
27343    new_path="$unix_path"
27344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27346    new_path="$unix_path"
27347  fi
27348
27349  if test "x$path" != "x$new_path"; then
27350    BOOT_JDK="$new_path"
27351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27353  fi
27354
27355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27357
27358    else
27359      # We're on a unix platform. Hooray! :)
27360      path="$BOOT_JDK"
27361      has_space=`$ECHO "$path" | $GREP " "`
27362      if test "x$has_space" != x; then
27363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27365        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27366      fi
27367
27368      # Use eval to expand a potential ~
27369      eval path="$path"
27370      if test ! -f "$path" && test ! -d "$path"; then
27371        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27372      fi
27373
27374      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27375    fi
27376  fi
27377
27378            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27379$as_echo_n "checking for Boot JDK... " >&6; }
27380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27381$as_echo "$BOOT_JDK" >&6; }
27382            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27383$as_echo_n "checking Boot JDK version... " >&6; }
27384            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27386$as_echo "$BOOT_JDK_VERSION" >&6; }
27387          fi # end check jdk version
27388        fi # end check javac
27389      fi # end check java
27390    fi # end check boot jdk found
27391  fi
27392
27393    done
27394  fi
27395
27396
27397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27399      # Do we have a bin/java?
27400      if test ! -x "$BOOT_JDK/bin/java"; then
27401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27403        BOOT_JDK_FOUND=no
27404      else
27405        # Do we have a bin/javac?
27406        if test ! -x "$BOOT_JDK/bin/javac"; then
27407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27411          BOOT_JDK_FOUND=no
27412        else
27413          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27414          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27415
27416          # Extra M4 quote needed to protect [] in grep expression.
27417          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27418          if test "x$FOUND_CORRECT_VERSION" = x; then
27419            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27421            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27422$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27423            BOOT_JDK_FOUND=no
27424          else
27425            # We're done! :-)
27426            BOOT_JDK_FOUND=yes
27427
27428  # Only process if variable expands to non-empty
27429
27430  if test "x$BOOT_JDK" != x; then
27431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27432
27433  # Input might be given as Windows format, start by converting to
27434  # unix format.
27435  path="$BOOT_JDK"
27436  new_path=`$CYGPATH -u "$path"`
27437
27438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27441  # "foo.exe" is OK but "foo" is an error.
27442  #
27443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27444  # It is also a way to make sure we got the proper file name for the real test later on.
27445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27446  if test "x$test_shortpath" = x; then
27447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27450  fi
27451
27452  # Call helper function which possibly converts this using DOS-style short mode.
27453  # If so, the updated path is stored in $new_path.
27454
27455  input_path="$new_path"
27456  # Check if we need to convert this using DOS-style short mode. If the path
27457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27458  # take no chances and rewrite it.
27459  # Note: m4 eats our [], so we need to use [ and ] instead.
27460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27461  if test "x$has_forbidden_chars" != x; then
27462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27466      # Going to short mode and back again did indeed matter. Since short mode is
27467      # case insensitive, let's make it lowercase to improve readability.
27468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27469      # Now convert it back to Unix-style (cygpath)
27470      input_path=`$CYGPATH -u "$shortmode_path"`
27471      new_path="$input_path"
27472    fi
27473  fi
27474
27475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27476  if test "x$test_cygdrive_prefix" = x; then
27477    # As a simple fix, exclude /usr/bin since it's not a real path.
27478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27480      # a path prefixed by /cygdrive for fixpath to work.
27481      new_path="$CYGWIN_ROOT_PATH$input_path"
27482    fi
27483  fi
27484
27485
27486  if test "x$path" != "x$new_path"; then
27487    BOOT_JDK="$new_path"
27488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27490  fi
27491
27492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27493
27494  path="$BOOT_JDK"
27495  has_colon=`$ECHO $path | $GREP ^.:`
27496  new_path="$path"
27497  if test "x$has_colon" = x; then
27498    # Not in mixed or Windows style, start by that.
27499    new_path=`cmd //c echo $path`
27500  fi
27501
27502
27503  input_path="$new_path"
27504  # Check if we need to convert this using DOS-style short mode. If the path
27505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27506  # take no chances and rewrite it.
27507  # Note: m4 eats our [], so we need to use [ and ] instead.
27508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27509  if test "x$has_forbidden_chars" != x; then
27510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27512  fi
27513
27514
27515  windows_path="$new_path"
27516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27517    unix_path=`$CYGPATH -u "$windows_path"`
27518    new_path="$unix_path"
27519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27521    new_path="$unix_path"
27522  fi
27523
27524  if test "x$path" != "x$new_path"; then
27525    BOOT_JDK="$new_path"
27526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27528  fi
27529
27530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27532
27533    else
27534      # We're on a unix platform. Hooray! :)
27535      path="$BOOT_JDK"
27536      has_space=`$ECHO "$path" | $GREP " "`
27537      if test "x$has_space" != x; then
27538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27541      fi
27542
27543      # Use eval to expand a potential ~
27544      eval path="$path"
27545      if test ! -f "$path" && test ! -d "$path"; then
27546        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27547      fi
27548
27549      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27550    fi
27551  fi
27552
27553            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27554$as_echo_n "checking for Boot JDK... " >&6; }
27555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27556$as_echo "$BOOT_JDK" >&6; }
27557            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27558$as_echo_n "checking Boot JDK version... " >&6; }
27559            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27561$as_echo "$BOOT_JDK_VERSION" >&6; }
27562          fi # end check jdk version
27563        fi # end check javac
27564      fi # end check java
27565    fi # end check boot jdk found
27566  fi
27567
27568  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27569
27570  if test "x$BOOT_JDK_FOUND" = xno; then
27571    # Now execute the test
27572
27573  BOOT_JDK_PREFIX="/usr/lib/jvm"
27574  BOOT_JDK_SUFFIX=""
27575  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27576  if test "x$ALL_JDKS_FOUND" != x; then
27577    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27578
27579  if test "x$BOOT_JDK_FOUND" = xno; then
27580    # Now execute the test
27581
27582        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27583        if test -d "$BOOT_JDK"; then
27584          BOOT_JDK_FOUND=maybe
27585          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27586$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27587        fi
27588
27589
27590    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27591    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27592      # Do we have a bin/java?
27593      if test ! -x "$BOOT_JDK/bin/java"; then
27594        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27596        BOOT_JDK_FOUND=no
27597      else
27598        # Do we have a bin/javac?
27599        if test ! -x "$BOOT_JDK/bin/javac"; then
27600          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27602          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27603$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27604          BOOT_JDK_FOUND=no
27605        else
27606          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27607          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27608
27609          # Extra M4 quote needed to protect [] in grep expression.
27610          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27611          if test "x$FOUND_CORRECT_VERSION" = x; then
27612            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27614            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27615$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27616            BOOT_JDK_FOUND=no
27617          else
27618            # We're done! :-)
27619            BOOT_JDK_FOUND=yes
27620
27621  # Only process if variable expands to non-empty
27622
27623  if test "x$BOOT_JDK" != x; then
27624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27625
27626  # Input might be given as Windows format, start by converting to
27627  # unix format.
27628  path="$BOOT_JDK"
27629  new_path=`$CYGPATH -u "$path"`
27630
27631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27634  # "foo.exe" is OK but "foo" is an error.
27635  #
27636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27637  # It is also a way to make sure we got the proper file name for the real test later on.
27638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27639  if test "x$test_shortpath" = x; then
27640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27642    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27643  fi
27644
27645  # Call helper function which possibly converts this using DOS-style short mode.
27646  # If so, the updated path is stored in $new_path.
27647
27648  input_path="$new_path"
27649  # Check if we need to convert this using DOS-style short mode. If the path
27650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27651  # take no chances and rewrite it.
27652  # Note: m4 eats our [], so we need to use [ and ] instead.
27653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27654  if test "x$has_forbidden_chars" != x; then
27655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27659      # Going to short mode and back again did indeed matter. Since short mode is
27660      # case insensitive, let's make it lowercase to improve readability.
27661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27662      # Now convert it back to Unix-style (cygpath)
27663      input_path=`$CYGPATH -u "$shortmode_path"`
27664      new_path="$input_path"
27665    fi
27666  fi
27667
27668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27669  if test "x$test_cygdrive_prefix" = x; then
27670    # As a simple fix, exclude /usr/bin since it's not a real path.
27671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27673      # a path prefixed by /cygdrive for fixpath to work.
27674      new_path="$CYGWIN_ROOT_PATH$input_path"
27675    fi
27676  fi
27677
27678
27679  if test "x$path" != "x$new_path"; then
27680    BOOT_JDK="$new_path"
27681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27683  fi
27684
27685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27686
27687  path="$BOOT_JDK"
27688  has_colon=`$ECHO $path | $GREP ^.:`
27689  new_path="$path"
27690  if test "x$has_colon" = x; then
27691    # Not in mixed or Windows style, start by that.
27692    new_path=`cmd //c echo $path`
27693  fi
27694
27695
27696  input_path="$new_path"
27697  # Check if we need to convert this using DOS-style short mode. If the path
27698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27699  # take no chances and rewrite it.
27700  # Note: m4 eats our [], so we need to use [ and ] instead.
27701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27702  if test "x$has_forbidden_chars" != x; then
27703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27705  fi
27706
27707
27708  windows_path="$new_path"
27709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27710    unix_path=`$CYGPATH -u "$windows_path"`
27711    new_path="$unix_path"
27712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27714    new_path="$unix_path"
27715  fi
27716
27717  if test "x$path" != "x$new_path"; then
27718    BOOT_JDK="$new_path"
27719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27721  fi
27722
27723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27725
27726    else
27727      # We're on a unix platform. Hooray! :)
27728      path="$BOOT_JDK"
27729      has_space=`$ECHO "$path" | $GREP " "`
27730      if test "x$has_space" != x; then
27731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27733        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27734      fi
27735
27736      # Use eval to expand a potential ~
27737      eval path="$path"
27738      if test ! -f "$path" && test ! -d "$path"; then
27739        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27740      fi
27741
27742      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27743    fi
27744  fi
27745
27746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27747$as_echo_n "checking for Boot JDK... " >&6; }
27748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27749$as_echo "$BOOT_JDK" >&6; }
27750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27751$as_echo_n "checking Boot JDK version... " >&6; }
27752            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27754$as_echo "$BOOT_JDK_VERSION" >&6; }
27755          fi # end check jdk version
27756        fi # end check javac
27757      fi # end check java
27758    fi # end check boot jdk found
27759  fi
27760
27761    done
27762  fi
27763
27764
27765    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27766    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27767      # Do we have a bin/java?
27768      if test ! -x "$BOOT_JDK/bin/java"; then
27769        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27771        BOOT_JDK_FOUND=no
27772      else
27773        # Do we have a bin/javac?
27774        if test ! -x "$BOOT_JDK/bin/javac"; then
27775          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27777          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27778$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27779          BOOT_JDK_FOUND=no
27780        else
27781          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27782          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27783
27784          # Extra M4 quote needed to protect [] in grep expression.
27785          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27786          if test "x$FOUND_CORRECT_VERSION" = x; then
27787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27789            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27790$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27791            BOOT_JDK_FOUND=no
27792          else
27793            # We're done! :-)
27794            BOOT_JDK_FOUND=yes
27795
27796  # Only process if variable expands to non-empty
27797
27798  if test "x$BOOT_JDK" != x; then
27799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27800
27801  # Input might be given as Windows format, start by converting to
27802  # unix format.
27803  path="$BOOT_JDK"
27804  new_path=`$CYGPATH -u "$path"`
27805
27806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27809  # "foo.exe" is OK but "foo" is an error.
27810  #
27811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27812  # It is also a way to make sure we got the proper file name for the real test later on.
27813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27814  if test "x$test_shortpath" = x; then
27815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27817    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27818  fi
27819
27820  # Call helper function which possibly converts this using DOS-style short mode.
27821  # If so, the updated path is stored in $new_path.
27822
27823  input_path="$new_path"
27824  # Check if we need to convert this using DOS-style short mode. If the path
27825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27826  # take no chances and rewrite it.
27827  # Note: m4 eats our [], so we need to use [ and ] instead.
27828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27829  if test "x$has_forbidden_chars" != x; then
27830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27834      # Going to short mode and back again did indeed matter. Since short mode is
27835      # case insensitive, let's make it lowercase to improve readability.
27836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27837      # Now convert it back to Unix-style (cygpath)
27838      input_path=`$CYGPATH -u "$shortmode_path"`
27839      new_path="$input_path"
27840    fi
27841  fi
27842
27843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27844  if test "x$test_cygdrive_prefix" = x; then
27845    # As a simple fix, exclude /usr/bin since it's not a real path.
27846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27848      # a path prefixed by /cygdrive for fixpath to work.
27849      new_path="$CYGWIN_ROOT_PATH$input_path"
27850    fi
27851  fi
27852
27853
27854  if test "x$path" != "x$new_path"; then
27855    BOOT_JDK="$new_path"
27856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27858  fi
27859
27860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27861
27862  path="$BOOT_JDK"
27863  has_colon=`$ECHO $path | $GREP ^.:`
27864  new_path="$path"
27865  if test "x$has_colon" = x; then
27866    # Not in mixed or Windows style, start by that.
27867    new_path=`cmd //c echo $path`
27868  fi
27869
27870
27871  input_path="$new_path"
27872  # Check if we need to convert this using DOS-style short mode. If the path
27873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27874  # take no chances and rewrite it.
27875  # Note: m4 eats our [], so we need to use [ and ] instead.
27876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27877  if test "x$has_forbidden_chars" != x; then
27878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27880  fi
27881
27882
27883  windows_path="$new_path"
27884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27885    unix_path=`$CYGPATH -u "$windows_path"`
27886    new_path="$unix_path"
27887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27889    new_path="$unix_path"
27890  fi
27891
27892  if test "x$path" != "x$new_path"; then
27893    BOOT_JDK="$new_path"
27894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27896  fi
27897
27898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27900
27901    else
27902      # We're on a unix platform. Hooray! :)
27903      path="$BOOT_JDK"
27904      has_space=`$ECHO "$path" | $GREP " "`
27905      if test "x$has_space" != x; then
27906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27909      fi
27910
27911      # Use eval to expand a potential ~
27912      eval path="$path"
27913      if test ! -f "$path" && test ! -d "$path"; then
27914        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27915      fi
27916
27917      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27918    fi
27919  fi
27920
27921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27922$as_echo_n "checking for Boot JDK... " >&6; }
27923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27924$as_echo "$BOOT_JDK" >&6; }
27925            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27926$as_echo_n "checking Boot JDK version... " >&6; }
27927            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27929$as_echo "$BOOT_JDK_VERSION" >&6; }
27930          fi # end check jdk version
27931        fi # end check javac
27932      fi # end check java
27933    fi # end check boot jdk found
27934  fi
27935
27936  fi
27937
27938
27939    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27940    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27941      # Do we have a bin/java?
27942      if test ! -x "$BOOT_JDK/bin/java"; then
27943        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27945        BOOT_JDK_FOUND=no
27946      else
27947        # Do we have a bin/javac?
27948        if test ! -x "$BOOT_JDK/bin/javac"; then
27949          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27951          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27952$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27953          BOOT_JDK_FOUND=no
27954        else
27955          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27956          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27957
27958          # Extra M4 quote needed to protect [] in grep expression.
27959          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27960          if test "x$FOUND_CORRECT_VERSION" = x; then
27961            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27963            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27964$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27965            BOOT_JDK_FOUND=no
27966          else
27967            # We're done! :-)
27968            BOOT_JDK_FOUND=yes
27969
27970  # Only process if variable expands to non-empty
27971
27972  if test "x$BOOT_JDK" != x; then
27973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27974
27975  # Input might be given as Windows format, start by converting to
27976  # unix format.
27977  path="$BOOT_JDK"
27978  new_path=`$CYGPATH -u "$path"`
27979
27980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27983  # "foo.exe" is OK but "foo" is an error.
27984  #
27985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27986  # It is also a way to make sure we got the proper file name for the real test later on.
27987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27988  if test "x$test_shortpath" = x; then
27989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27991    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27992  fi
27993
27994  # Call helper function which possibly converts this using DOS-style short mode.
27995  # If so, the updated path is stored in $new_path.
27996
27997  input_path="$new_path"
27998  # Check if we need to convert this using DOS-style short mode. If the path
27999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28000  # take no chances and rewrite it.
28001  # Note: m4 eats our [], so we need to use [ and ] instead.
28002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28003  if test "x$has_forbidden_chars" != x; then
28004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28008      # Going to short mode and back again did indeed matter. Since short mode is
28009      # case insensitive, let's make it lowercase to improve readability.
28010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28011      # Now convert it back to Unix-style (cygpath)
28012      input_path=`$CYGPATH -u "$shortmode_path"`
28013      new_path="$input_path"
28014    fi
28015  fi
28016
28017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28018  if test "x$test_cygdrive_prefix" = x; then
28019    # As a simple fix, exclude /usr/bin since it's not a real path.
28020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28022      # a path prefixed by /cygdrive for fixpath to work.
28023      new_path="$CYGWIN_ROOT_PATH$input_path"
28024    fi
28025  fi
28026
28027
28028  if test "x$path" != "x$new_path"; then
28029    BOOT_JDK="$new_path"
28030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28032  fi
28033
28034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28035
28036  path="$BOOT_JDK"
28037  has_colon=`$ECHO $path | $GREP ^.:`
28038  new_path="$path"
28039  if test "x$has_colon" = x; then
28040    # Not in mixed or Windows style, start by that.
28041    new_path=`cmd //c echo $path`
28042  fi
28043
28044
28045  input_path="$new_path"
28046  # Check if we need to convert this using DOS-style short mode. If the path
28047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28048  # take no chances and rewrite it.
28049  # Note: m4 eats our [], so we need to use [ and ] instead.
28050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28051  if test "x$has_forbidden_chars" != x; then
28052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28054  fi
28055
28056
28057  windows_path="$new_path"
28058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28059    unix_path=`$CYGPATH -u "$windows_path"`
28060    new_path="$unix_path"
28061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28063    new_path="$unix_path"
28064  fi
28065
28066  if test "x$path" != "x$new_path"; then
28067    BOOT_JDK="$new_path"
28068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28070  fi
28071
28072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28074
28075    else
28076      # We're on a unix platform. Hooray! :)
28077      path="$BOOT_JDK"
28078      has_space=`$ECHO "$path" | $GREP " "`
28079      if test "x$has_space" != x; then
28080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28082        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28083      fi
28084
28085      # Use eval to expand a potential ~
28086      eval path="$path"
28087      if test ! -f "$path" && test ! -d "$path"; then
28088        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28089      fi
28090
28091      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28092    fi
28093  fi
28094
28095            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28096$as_echo_n "checking for Boot JDK... " >&6; }
28097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28098$as_echo "$BOOT_JDK" >&6; }
28099            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28100$as_echo_n "checking Boot JDK version... " >&6; }
28101            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28102            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28103$as_echo "$BOOT_JDK_VERSION" >&6; }
28104          fi # end check jdk version
28105        fi # end check javac
28106      fi # end check java
28107    fi # end check boot jdk found
28108  fi
28109
28110
28111  # If we haven't found anything yet, we've truly lost. Give up.
28112  if test "x$BOOT_JDK_FOUND" = xno; then
28113
28114  # Print a helpful message on how to acquire the necessary build dependency.
28115  # openjdk is the help tag: freetype, cups, alsa etc
28116  MISSING_DEPENDENCY=openjdk
28117
28118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28119    cygwin_help $MISSING_DEPENDENCY
28120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28121    msys_help $MISSING_DEPENDENCY
28122  else
28123    PKGHANDLER_COMMAND=
28124
28125    case $PKGHANDLER in
28126      apt-get)
28127        apt_help     $MISSING_DEPENDENCY ;;
28128      yum)
28129        yum_help     $MISSING_DEPENDENCY ;;
28130      port)
28131        port_help    $MISSING_DEPENDENCY ;;
28132      pkgutil)
28133        pkgutil_help $MISSING_DEPENDENCY ;;
28134      pkgadd)
28135        pkgadd_help  $MISSING_DEPENDENCY ;;
28136    esac
28137
28138    if test "x$PKGHANDLER_COMMAND" != x; then
28139      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28140    fi
28141  fi
28142
28143    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28144$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28145    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28146$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28147    as_fn_error $? "Cannot continue" "$LINENO" 5
28148  fi
28149
28150
28151
28152  # Setup tools from the Boot JDK.
28153
28154  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28155
28156  # Publish this variable in the help.
28157
28158
28159  if [ -z "${JAVA+x}" ]; then
28160    # The variable is not set by user, try to locate tool using the code snippet
28161
28162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28163$as_echo_n "checking for java in Boot JDK... " >&6; }
28164      JAVA=$BOOT_JDK/bin/java
28165      if test ! -x $JAVA; then
28166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28167$as_echo "not found" >&6; }
28168        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28169$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28170        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28171      fi
28172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28173$as_echo "ok" >&6; }
28174
28175
28176  else
28177    # The variable is set, but is it from the command line or the environment?
28178
28179    # Try to remove the string !JAVA! from our list.
28180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28182      # If it failed, the variable was not from the command line. Ignore it,
28183      # but warn the user (except for BASH, which is always set by the calling BASH).
28184      if test "xJAVA" != xBASH; then
28185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28186$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28187      fi
28188      # Try to locate tool using the code snippet
28189
28190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28191$as_echo_n "checking for java in Boot JDK... " >&6; }
28192      JAVA=$BOOT_JDK/bin/java
28193      if test ! -x $JAVA; then
28194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28195$as_echo "not found" >&6; }
28196        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28197$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28198        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28199      fi
28200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28201$as_echo "ok" >&6; }
28202
28203
28204    else
28205      # If it succeeded, then it was overridden by the user. We will use it
28206      # for the tool.
28207
28208      # First remove it from the list of overridden variables, so we can test
28209      # for unknown variables in the end.
28210      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28211
28212      # Check if we try to supply an empty value
28213      if test "x$JAVA" = x; then
28214        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28215$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28217$as_echo_n "checking for JAVA... " >&6; }
28218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28219$as_echo "disabled" >&6; }
28220      else
28221        # Check if the provided tool contains a complete path.
28222        tool_specified="$JAVA"
28223        tool_basename="${tool_specified##*/}"
28224        if test "x$tool_basename" = "x$tool_specified"; then
28225          # A command without a complete path is provided, search $PATH.
28226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28227$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28228          # Extract the first word of "$tool_basename", so it can be a program name with args.
28229set dummy $tool_basename; ac_word=$2
28230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28231$as_echo_n "checking for $ac_word... " >&6; }
28232if ${ac_cv_path_JAVA+:} false; then :
28233  $as_echo_n "(cached) " >&6
28234else
28235  case $JAVA in
28236  [\\/]* | ?:[\\/]*)
28237  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28238  ;;
28239  *)
28240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28241for as_dir in $PATH
28242do
28243  IFS=$as_save_IFS
28244  test -z "$as_dir" && as_dir=.
28245    for ac_exec_ext in '' $ac_executable_extensions; do
28246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28247    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28249    break 2
28250  fi
28251done
28252  done
28253IFS=$as_save_IFS
28254
28255  ;;
28256esac
28257fi
28258JAVA=$ac_cv_path_JAVA
28259if test -n "$JAVA"; then
28260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28261$as_echo "$JAVA" >&6; }
28262else
28263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28264$as_echo "no" >&6; }
28265fi
28266
28267
28268          if test "x$JAVA" = x; then
28269            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28270          fi
28271        else
28272          # Otherwise we believe it is a complete path. Use it as it is.
28273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28274$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28275          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28276$as_echo_n "checking for JAVA... " >&6; }
28277          if test ! -x "$tool_specified"; then
28278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28279$as_echo "not found" >&6; }
28280            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28281          fi
28282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28283$as_echo "$tool_specified" >&6; }
28284        fi
28285      fi
28286    fi
28287
28288  fi
28289
28290
28291
28292  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28293
28294  # Publish this variable in the help.
28295
28296
28297  if [ -z "${JAVAC+x}" ]; then
28298    # The variable is not set by user, try to locate tool using the code snippet
28299
28300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28301$as_echo_n "checking for javac in Boot JDK... " >&6; }
28302      JAVAC=$BOOT_JDK/bin/javac
28303      if test ! -x $JAVAC; then
28304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28305$as_echo "not found" >&6; }
28306        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28307$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28308        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28309      fi
28310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28311$as_echo "ok" >&6; }
28312
28313
28314  else
28315    # The variable is set, but is it from the command line or the environment?
28316
28317    # Try to remove the string !JAVAC! from our list.
28318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28320      # If it failed, the variable was not from the command line. Ignore it,
28321      # but warn the user (except for BASH, which is always set by the calling BASH).
28322      if test "xJAVAC" != xBASH; then
28323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28324$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28325      fi
28326      # Try to locate tool using the code snippet
28327
28328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28329$as_echo_n "checking for javac in Boot JDK... " >&6; }
28330      JAVAC=$BOOT_JDK/bin/javac
28331      if test ! -x $JAVAC; then
28332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28333$as_echo "not found" >&6; }
28334        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28335$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28336        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28337      fi
28338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28339$as_echo "ok" >&6; }
28340
28341
28342    else
28343      # If it succeeded, then it was overridden by the user. We will use it
28344      # for the tool.
28345
28346      # First remove it from the list of overridden variables, so we can test
28347      # for unknown variables in the end.
28348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28349
28350      # Check if we try to supply an empty value
28351      if test "x$JAVAC" = x; then
28352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28353$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28355$as_echo_n "checking for JAVAC... " >&6; }
28356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28357$as_echo "disabled" >&6; }
28358      else
28359        # Check if the provided tool contains a complete path.
28360        tool_specified="$JAVAC"
28361        tool_basename="${tool_specified##*/}"
28362        if test "x$tool_basename" = "x$tool_specified"; then
28363          # A command without a complete path is provided, search $PATH.
28364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28365$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28366          # Extract the first word of "$tool_basename", so it can be a program name with args.
28367set dummy $tool_basename; ac_word=$2
28368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28369$as_echo_n "checking for $ac_word... " >&6; }
28370if ${ac_cv_path_JAVAC+:} false; then :
28371  $as_echo_n "(cached) " >&6
28372else
28373  case $JAVAC in
28374  [\\/]* | ?:[\\/]*)
28375  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28376  ;;
28377  *)
28378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28379for as_dir in $PATH
28380do
28381  IFS=$as_save_IFS
28382  test -z "$as_dir" && as_dir=.
28383    for ac_exec_ext in '' $ac_executable_extensions; do
28384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28385    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28387    break 2
28388  fi
28389done
28390  done
28391IFS=$as_save_IFS
28392
28393  ;;
28394esac
28395fi
28396JAVAC=$ac_cv_path_JAVAC
28397if test -n "$JAVAC"; then
28398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28399$as_echo "$JAVAC" >&6; }
28400else
28401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28402$as_echo "no" >&6; }
28403fi
28404
28405
28406          if test "x$JAVAC" = x; then
28407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28408          fi
28409        else
28410          # Otherwise we believe it is a complete path. Use it as it is.
28411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28412$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28414$as_echo_n "checking for JAVAC... " >&6; }
28415          if test ! -x "$tool_specified"; then
28416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28417$as_echo "not found" >&6; }
28418            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28419          fi
28420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28421$as_echo "$tool_specified" >&6; }
28422        fi
28423      fi
28424    fi
28425
28426  fi
28427
28428
28429
28430  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28431
28432  # Publish this variable in the help.
28433
28434
28435  if [ -z "${JAVAH+x}" ]; then
28436    # The variable is not set by user, try to locate tool using the code snippet
28437
28438      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28439$as_echo_n "checking for javah in Boot JDK... " >&6; }
28440      JAVAH=$BOOT_JDK/bin/javah
28441      if test ! -x $JAVAH; then
28442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28443$as_echo "not found" >&6; }
28444        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28445$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28446        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28447      fi
28448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28449$as_echo "ok" >&6; }
28450
28451
28452  else
28453    # The variable is set, but is it from the command line or the environment?
28454
28455    # Try to remove the string !JAVAH! from our list.
28456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28458      # If it failed, the variable was not from the command line. Ignore it,
28459      # but warn the user (except for BASH, which is always set by the calling BASH).
28460      if test "xJAVAH" != xBASH; then
28461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28462$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28463      fi
28464      # Try to locate tool using the code snippet
28465
28466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28467$as_echo_n "checking for javah in Boot JDK... " >&6; }
28468      JAVAH=$BOOT_JDK/bin/javah
28469      if test ! -x $JAVAH; then
28470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28471$as_echo "not found" >&6; }
28472        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28473$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28474        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28475      fi
28476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28477$as_echo "ok" >&6; }
28478
28479
28480    else
28481      # If it succeeded, then it was overridden by the user. We will use it
28482      # for the tool.
28483
28484      # First remove it from the list of overridden variables, so we can test
28485      # for unknown variables in the end.
28486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28487
28488      # Check if we try to supply an empty value
28489      if test "x$JAVAH" = x; then
28490        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28491$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28492        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28493$as_echo_n "checking for JAVAH... " >&6; }
28494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28495$as_echo "disabled" >&6; }
28496      else
28497        # Check if the provided tool contains a complete path.
28498        tool_specified="$JAVAH"
28499        tool_basename="${tool_specified##*/}"
28500        if test "x$tool_basename" = "x$tool_specified"; then
28501          # A command without a complete path is provided, search $PATH.
28502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28503$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28504          # Extract the first word of "$tool_basename", so it can be a program name with args.
28505set dummy $tool_basename; ac_word=$2
28506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28507$as_echo_n "checking for $ac_word... " >&6; }
28508if ${ac_cv_path_JAVAH+:} false; then :
28509  $as_echo_n "(cached) " >&6
28510else
28511  case $JAVAH in
28512  [\\/]* | ?:[\\/]*)
28513  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28514  ;;
28515  *)
28516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28517for as_dir in $PATH
28518do
28519  IFS=$as_save_IFS
28520  test -z "$as_dir" && as_dir=.
28521    for ac_exec_ext in '' $ac_executable_extensions; do
28522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28523    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28525    break 2
28526  fi
28527done
28528  done
28529IFS=$as_save_IFS
28530
28531  ;;
28532esac
28533fi
28534JAVAH=$ac_cv_path_JAVAH
28535if test -n "$JAVAH"; then
28536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28537$as_echo "$JAVAH" >&6; }
28538else
28539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28540$as_echo "no" >&6; }
28541fi
28542
28543
28544          if test "x$JAVAH" = x; then
28545            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28546          fi
28547        else
28548          # Otherwise we believe it is a complete path. Use it as it is.
28549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28550$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28551          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28552$as_echo_n "checking for JAVAH... " >&6; }
28553          if test ! -x "$tool_specified"; then
28554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28555$as_echo "not found" >&6; }
28556            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28557          fi
28558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28559$as_echo "$tool_specified" >&6; }
28560        fi
28561      fi
28562    fi
28563
28564  fi
28565
28566
28567
28568  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28569
28570  # Publish this variable in the help.
28571
28572
28573  if [ -z "${JAR+x}" ]; then
28574    # The variable is not set by user, try to locate tool using the code snippet
28575
28576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28577$as_echo_n "checking for jar in Boot JDK... " >&6; }
28578      JAR=$BOOT_JDK/bin/jar
28579      if test ! -x $JAR; then
28580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28581$as_echo "not found" >&6; }
28582        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28583$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28584        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28585      fi
28586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28587$as_echo "ok" >&6; }
28588
28589
28590  else
28591    # The variable is set, but is it from the command line or the environment?
28592
28593    # Try to remove the string !JAR! from our list.
28594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28596      # If it failed, the variable was not from the command line. Ignore it,
28597      # but warn the user (except for BASH, which is always set by the calling BASH).
28598      if test "xJAR" != xBASH; then
28599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28600$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28601      fi
28602      # Try to locate tool using the code snippet
28603
28604      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28605$as_echo_n "checking for jar in Boot JDK... " >&6; }
28606      JAR=$BOOT_JDK/bin/jar
28607      if test ! -x $JAR; then
28608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28609$as_echo "not found" >&6; }
28610        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28611$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28612        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28613      fi
28614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28615$as_echo "ok" >&6; }
28616
28617
28618    else
28619      # If it succeeded, then it was overridden by the user. We will use it
28620      # for the tool.
28621
28622      # First remove it from the list of overridden variables, so we can test
28623      # for unknown variables in the end.
28624      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28625
28626      # Check if we try to supply an empty value
28627      if test "x$JAR" = x; then
28628        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28629$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28630        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28631$as_echo_n "checking for JAR... " >&6; }
28632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28633$as_echo "disabled" >&6; }
28634      else
28635        # Check if the provided tool contains a complete path.
28636        tool_specified="$JAR"
28637        tool_basename="${tool_specified##*/}"
28638        if test "x$tool_basename" = "x$tool_specified"; then
28639          # A command without a complete path is provided, search $PATH.
28640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28641$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28642          # Extract the first word of "$tool_basename", so it can be a program name with args.
28643set dummy $tool_basename; ac_word=$2
28644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28645$as_echo_n "checking for $ac_word... " >&6; }
28646if ${ac_cv_path_JAR+:} false; then :
28647  $as_echo_n "(cached) " >&6
28648else
28649  case $JAR in
28650  [\\/]* | ?:[\\/]*)
28651  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28652  ;;
28653  *)
28654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28655for as_dir in $PATH
28656do
28657  IFS=$as_save_IFS
28658  test -z "$as_dir" && as_dir=.
28659    for ac_exec_ext in '' $ac_executable_extensions; do
28660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28661    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28663    break 2
28664  fi
28665done
28666  done
28667IFS=$as_save_IFS
28668
28669  ;;
28670esac
28671fi
28672JAR=$ac_cv_path_JAR
28673if test -n "$JAR"; then
28674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28675$as_echo "$JAR" >&6; }
28676else
28677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28678$as_echo "no" >&6; }
28679fi
28680
28681
28682          if test "x$JAR" = x; then
28683            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28684          fi
28685        else
28686          # Otherwise we believe it is a complete path. Use it as it is.
28687          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28688$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28689          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28690$as_echo_n "checking for JAR... " >&6; }
28691          if test ! -x "$tool_specified"; then
28692            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28693$as_echo "not found" >&6; }
28694            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28695          fi
28696          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28697$as_echo "$tool_specified" >&6; }
28698        fi
28699      fi
28700    fi
28701
28702  fi
28703
28704
28705
28706  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28707
28708  # Publish this variable in the help.
28709
28710
28711  if [ -z "${JARSIGNER+x}" ]; then
28712    # The variable is not set by user, try to locate tool using the code snippet
28713
28714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28715$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28716      JARSIGNER=$BOOT_JDK/bin/jarsigner
28717      if test ! -x $JARSIGNER; then
28718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28719$as_echo "not found" >&6; }
28720        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28721$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28722        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28723      fi
28724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28725$as_echo "ok" >&6; }
28726
28727
28728  else
28729    # The variable is set, but is it from the command line or the environment?
28730
28731    # Try to remove the string !JARSIGNER! from our list.
28732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28734      # If it failed, the variable was not from the command line. Ignore it,
28735      # but warn the user (except for BASH, which is always set by the calling BASH).
28736      if test "xJARSIGNER" != xBASH; then
28737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28738$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28739      fi
28740      # Try to locate tool using the code snippet
28741
28742      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28743$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28744      JARSIGNER=$BOOT_JDK/bin/jarsigner
28745      if test ! -x $JARSIGNER; then
28746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28747$as_echo "not found" >&6; }
28748        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28749$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28750        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28751      fi
28752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28753$as_echo "ok" >&6; }
28754
28755
28756    else
28757      # If it succeeded, then it was overridden by the user. We will use it
28758      # for the tool.
28759
28760      # First remove it from the list of overridden variables, so we can test
28761      # for unknown variables in the end.
28762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28763
28764      # Check if we try to supply an empty value
28765      if test "x$JARSIGNER" = x; then
28766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28767$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28769$as_echo_n "checking for JARSIGNER... " >&6; }
28770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28771$as_echo "disabled" >&6; }
28772      else
28773        # Check if the provided tool contains a complete path.
28774        tool_specified="$JARSIGNER"
28775        tool_basename="${tool_specified##*/}"
28776        if test "x$tool_basename" = "x$tool_specified"; then
28777          # A command without a complete path is provided, search $PATH.
28778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28779$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28780          # Extract the first word of "$tool_basename", so it can be a program name with args.
28781set dummy $tool_basename; ac_word=$2
28782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28783$as_echo_n "checking for $ac_word... " >&6; }
28784if ${ac_cv_path_JARSIGNER+:} false; then :
28785  $as_echo_n "(cached) " >&6
28786else
28787  case $JARSIGNER in
28788  [\\/]* | ?:[\\/]*)
28789  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28790  ;;
28791  *)
28792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28793for as_dir in $PATH
28794do
28795  IFS=$as_save_IFS
28796  test -z "$as_dir" && as_dir=.
28797    for ac_exec_ext in '' $ac_executable_extensions; do
28798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28799    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28801    break 2
28802  fi
28803done
28804  done
28805IFS=$as_save_IFS
28806
28807  ;;
28808esac
28809fi
28810JARSIGNER=$ac_cv_path_JARSIGNER
28811if test -n "$JARSIGNER"; then
28812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28813$as_echo "$JARSIGNER" >&6; }
28814else
28815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28816$as_echo "no" >&6; }
28817fi
28818
28819
28820          if test "x$JARSIGNER" = x; then
28821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28822          fi
28823        else
28824          # Otherwise we believe it is a complete path. Use it as it is.
28825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28826$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28828$as_echo_n "checking for JARSIGNER... " >&6; }
28829          if test ! -x "$tool_specified"; then
28830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28831$as_echo "not found" >&6; }
28832            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28833          fi
28834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28835$as_echo "$tool_specified" >&6; }
28836        fi
28837      fi
28838    fi
28839
28840  fi
28841
28842
28843
28844  # Finally, set some other options...
28845
28846  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28847  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28848
28849
28850
28851  # Check if the boot jdk is 32 or 64 bit
28852  if "$JAVA" -d64 -version > /dev/null 2>&1; then
28853    BOOT_JDK_BITS="64"
28854  else
28855    BOOT_JDK_BITS="32"
28856  fi
28857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28858$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28860$as_echo "$BOOT_JDK_BITS" >&6; }
28861
28862
28863
28864###############################################################################
28865#
28866# Configure the sources to use. We can add or override individual directories.
28867#
28868###############################################################################
28869
28870
28871  # Where are the sources. Any of these can be overridden
28872  # using --with-override-corba and the likes.
28873  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28874  CORBA_TOPDIR="$SRC_ROOT/corba"
28875  JAXP_TOPDIR="$SRC_ROOT/jaxp"
28876  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28877  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28878  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28879  JDK_TOPDIR="$SRC_ROOT/jdk"
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890  ###############################################################################
28891  #
28892  # Pickup additional source for a component from outside of the source root
28893  # or override source for a component.
28894  #
28895
28896# Check whether --with-add-source-root was given.
28897if test "${with_add_source_root+set}" = set; then :
28898  withval=$with_add_source_root;
28899fi
28900
28901
28902
28903# Check whether --with-override-source-root was given.
28904if test "${with_override_source_root+set}" = set; then :
28905  withval=$with_override_source_root;
28906fi
28907
28908
28909
28910# Check whether --with-adds-and-overrides was given.
28911if test "${with_adds_and_overrides+set}" = set; then :
28912  withval=$with_adds_and_overrides;
28913fi
28914
28915
28916  if test "x$with_adds_and_overrides" != x; then
28917    with_add_source_root="$with_adds_and_overrides/adds"
28918    with_override_source_root="$with_adds_and_overrides/overrides"
28919  fi
28920
28921  if test "x$with_add_source_root" != x; then
28922    if ! test -d $with_add_source_root; then
28923      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
28924    fi
28925    CURDIR="$PWD"
28926    cd "$with_add_source_root"
28927    ADD_SRC_ROOT="`pwd`"
28928    cd "$CURDIR"
28929    # Verify that the addon source root does not have any root makefiles.
28930    # If it does, then it is usually an error, prevent this.
28931    if test -f $with_add_source_root/langtools/make/Makefile; then
28932      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
28933    fi
28934    if test -f $with_add_source_root/corba/make/Makefile; then
28935      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
28936    fi
28937    if test -f $with_add_source_root/jaxp/make/Makefile; then
28938      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
28939    fi
28940    if test -f $with_add_source_root/jaxws/make/Makefile; then
28941      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
28942    fi
28943    if test -f $with_add_source_root/hotspot/make/Makefile; then
28944      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
28945    fi
28946    if test -f $with_add_source_root/nashorn/make/Makefile; then
28947      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
28948    fi
28949    if test -f $with_add_source_root/jdk/make/Makefile; then
28950      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
28951    fi
28952  fi
28953
28954
28955  if test "x$with_override_source_root" != x; then
28956    if ! test -d $with_override_source_root; then
28957      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
28958    fi
28959    CURDIR="$PWD"
28960    cd "$with_override_source_root"
28961    OVERRIDE_SRC_ROOT="`pwd`"
28962    cd "$CURDIR"
28963    if test -f $with_override_source_root/langtools/make/Makefile; then
28964      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
28965    fi
28966    if test -f $with_override_source_root/corba/make/Makefile; then
28967      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
28968    fi
28969    if test -f $with_override_source_root/jaxp/make/Makefile; then
28970      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
28971    fi
28972    if test -f $with_override_source_root/jaxws/make/Makefile; then
28973      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
28974    fi
28975    if test -f $with_override_source_root/hotspot/make/Makefile; then
28976      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
28977    fi
28978    if test -f $with_override_source_root/nashorn/make/Makefile; then
28979      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
28980    fi
28981    if test -f $with_override_source_root/jdk/make/Makefile; then
28982      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
28983    fi
28984  fi
28985
28986
28987  ###############################################################################
28988  #
28989  # Override a repo completely, this is used for example when you have 3 small
28990  # development sandboxes of the langtools sources and want to avoid having 3 full
28991  # OpenJDK sources checked out on disk.
28992  #
28993  # Assuming that the 3 langtools sandboxes are located here:
28994  # /home/fredrik/sandbox1/langtools
28995  # /home/fredrik/sandbox2/langtools
28996  # /home/fredrik/sandbox3/langtools
28997  #
28998  # From the source root you create build subdirs manually:
28999  #     mkdir -p build1 build2 build3
29000  # in each build directory run:
29001  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
29002  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
29003  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
29004  #
29005
29006
29007# Check whether --with-override-langtools was given.
29008if test "${with_override_langtools+set}" = set; then :
29009  withval=$with_override_langtools;
29010fi
29011
29012
29013
29014# Check whether --with-override-corba was given.
29015if test "${with_override_corba+set}" = set; then :
29016  withval=$with_override_corba;
29017fi
29018
29019
29020
29021# Check whether --with-override-jaxp was given.
29022if test "${with_override_jaxp+set}" = set; then :
29023  withval=$with_override_jaxp;
29024fi
29025
29026
29027
29028# Check whether --with-override-jaxws was given.
29029if test "${with_override_jaxws+set}" = set; then :
29030  withval=$with_override_jaxws;
29031fi
29032
29033
29034
29035# Check whether --with-override-hotspot was given.
29036if test "${with_override_hotspot+set}" = set; then :
29037  withval=$with_override_hotspot;
29038fi
29039
29040
29041
29042# Check whether --with-override-nashorn was given.
29043if test "${with_override_nashorn+set}" = set; then :
29044  withval=$with_override_nashorn;
29045fi
29046
29047
29048
29049# Check whether --with-override-jdk was given.
29050if test "${with_override_jdk+set}" = set; then :
29051  withval=$with_override_jdk;
29052fi
29053
29054
29055  if test "x$with_override_langtools" != x; then
29056    CURDIR="$PWD"
29057    cd "$with_override_langtools"
29058    LANGTOOLS_TOPDIR="`pwd`"
29059    cd "$CURDIR"
29060    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
29061      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
29062    fi
29063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
29064$as_echo_n "checking if langtools should be overridden... " >&6; }
29065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
29066$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
29067  fi
29068  if test "x$with_override_corba" != x; then
29069    CURDIR="$PWD"
29070    cd "$with_override_corba"
29071    CORBA_TOPDIR="`pwd`"
29072    cd "$CURDIR"
29073    if ! test -f $CORBA_TOPDIR/make/Makefile; then
29074      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
29075    fi
29076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
29077$as_echo_n "checking if corba should be overridden... " >&6; }
29078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
29079$as_echo "yes with $CORBA_TOPDIR" >&6; }
29080  fi
29081  if test "x$with_override_jaxp" != x; then
29082    CURDIR="$PWD"
29083    cd "$with_override_jaxp"
29084    JAXP_TOPDIR="`pwd`"
29085    cd "$CURDIR"
29086    if ! test -f $JAXP_TOPDIR/make/Makefile; then
29087      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
29088    fi
29089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
29090$as_echo_n "checking if jaxp should be overridden... " >&6; }
29091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
29092$as_echo "yes with $JAXP_TOPDIR" >&6; }
29093  fi
29094  if test "x$with_override_jaxws" != x; then
29095    CURDIR="$PWD"
29096    cd "$with_override_jaxws"
29097    JAXWS_TOPDIR="`pwd`"
29098    cd "$CURDIR"
29099    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
29100      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
29101    fi
29102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
29103$as_echo_n "checking if jaxws should be overridden... " >&6; }
29104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
29105$as_echo "yes with $JAXWS_TOPDIR" >&6; }
29106  fi
29107  if test "x$with_override_hotspot" != x; then
29108    CURDIR="$PWD"
29109    cd "$with_override_hotspot"
29110    HOTSPOT_TOPDIR="`pwd`"
29111    cd "$CURDIR"
29112    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
29113      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
29114    fi
29115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
29116$as_echo_n "checking if hotspot should be overridden... " >&6; }
29117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
29118$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
29119  fi
29120  if test "x$with_override_nashorn" != x; then
29121    CURDIR="$PWD"
29122    cd "$with_override_nashorn"
29123    NASHORN_TOPDIR="`pwd`"
29124    cd "$CURDIR"
29125    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
29126      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
29127    fi
29128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
29129$as_echo_n "checking if nashorn should be overridden... " >&6; }
29130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
29131$as_echo "yes with $NASHORN_TOPDIR" >&6; }
29132  fi
29133  if test "x$with_override_jdk" != x; then
29134    CURDIR="$PWD"
29135    cd "$with_override_jdk"
29136    JDK_TOPDIR="`pwd`"
29137    cd "$CURDIR"
29138    if ! test -f $JDK_TOPDIR/make/Makefile; then
29139      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
29140    fi
29141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
29142$as_echo_n "checking if JDK should be overridden... " >&6; }
29143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
29144$as_echo "yes with $JDK_TOPDIR" >&6; }
29145  fi
29146
29147
29148  BUILD_OUTPUT="$OUTPUT_ROOT"
29149
29150
29151  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29152  BUILD_HOTSPOT=true
29153
29154
29155
29156# Check whether --with-import-hotspot was given.
29157if test "${with_import_hotspot+set}" = set; then :
29158  withval=$with_import_hotspot;
29159fi
29160
29161  if test "x$with_import_hotspot" != x; then
29162    CURDIR="$PWD"
29163    cd "$with_import_hotspot"
29164    HOTSPOT_DIST="`pwd`"
29165    cd "$CURDIR"
29166    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29167      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29168    fi
29169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29170$as_echo_n "checking if hotspot should be imported... " >&6; }
29171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29172$as_echo "yes from $HOTSPOT_DIST" >&6; }
29173    BUILD_HOTSPOT=false
29174  fi
29175
29176  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29177
29178
29179###############################################################################
29180#
29181# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29182# native code.
29183#
29184###############################################################################
29185
29186# First determine the toolchain type (compiler family)
29187
29188
29189# Check whether --with-toolchain-type was given.
29190if test "${with_toolchain_type+set}" = set; then :
29191  withval=$with_toolchain_type;
29192fi
29193
29194
29195  # Use indirect variable referencing
29196  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29197  VALID_TOOLCHAINS=${!toolchain_var_name}
29198
29199  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29200    if test -n "$XCODEBUILD"; then
29201      # On Mac OS X, default toolchain to clang after Xcode 5
29202      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29203      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29204      if test $? -ne 0; then
29205        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29206      fi
29207      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29208          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29209          $CUT -f 1 -d .`
29210      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29211$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29212      if test $XCODE_MAJOR_VERSION -ge 5; then
29213          DEFAULT_TOOLCHAIN="clang"
29214      else
29215          DEFAULT_TOOLCHAIN="gcc"
29216      fi
29217    else
29218      # If Xcode is not installed, but the command line tools are
29219      # then we can't run xcodebuild. On these systems we should
29220      # default to clang
29221      DEFAULT_TOOLCHAIN="clang"
29222    fi
29223  else
29224    # First toolchain type in the list is the default
29225    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29226  fi
29227
29228  if test "x$with_toolchain_type" = xlist; then
29229    # List all toolchains
29230    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29231$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29232    for toolchain in $VALID_TOOLCHAINS; do
29233      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29234      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29235      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29236    done
29237
29238    exit 0
29239  elif test "x$with_toolchain_type" != x; then
29240    # User override; check that it is valid
29241    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29242      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29243$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29244      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29245$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29246      as_fn_error $? "Cannot continue." "$LINENO" 5
29247    fi
29248    TOOLCHAIN_TYPE=$with_toolchain_type
29249  else
29250    # No flag given, use default
29251    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29252  fi
29253
29254
29255  TOOLCHAIN_CC_BINARY_clang="clang"
29256  TOOLCHAIN_CC_BINARY_gcc="gcc"
29257  TOOLCHAIN_CC_BINARY_microsoft="cl"
29258  TOOLCHAIN_CC_BINARY_solstudio="cc"
29259  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29260
29261  TOOLCHAIN_CXX_BINARY_clang="clang++"
29262  TOOLCHAIN_CXX_BINARY_gcc="g++"
29263  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29264  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29265  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29266
29267  # Use indirect variable referencing
29268  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29269  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29270  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29271  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29272  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29273  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29274
29275
29276  # Define filename patterns
29277  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29278    LIBRARY_PREFIX=
29279    SHARED_LIBRARY_SUFFIX='.dll'
29280    STATIC_LIBRARY_SUFFIX='.lib'
29281    SHARED_LIBRARY='$1.dll'
29282    STATIC_LIBRARY='$1.lib'
29283    OBJ_SUFFIX='.obj'
29284    EXE_SUFFIX='.exe'
29285  else
29286    LIBRARY_PREFIX=lib
29287    SHARED_LIBRARY_SUFFIX='.so'
29288    STATIC_LIBRARY_SUFFIX='.a'
29289    SHARED_LIBRARY='lib$1.so'
29290    STATIC_LIBRARY='lib$1.a'
29291    OBJ_SUFFIX='.o'
29292    EXE_SUFFIX=''
29293    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29294      SHARED_LIBRARY='lib$1.dylib'
29295      SHARED_LIBRARY_SUFFIX='.dylib'
29296    fi
29297  fi
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29309    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29310$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29311  else
29312    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29313$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29314  fi
29315
29316
29317# User supplied flags should be used when configure detects compilers
29318
29319  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29320    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29321$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29322  fi
29323
29324  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29325    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29326$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29327  fi
29328
29329  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29330    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29331$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29332  fi
29333
29334
29335# Check whether --with-extra-cflags was given.
29336if test "${with_extra_cflags+set}" = set; then :
29337  withval=$with_extra_cflags;
29338fi
29339
29340
29341
29342# Check whether --with-extra-cxxflags was given.
29343if test "${with_extra_cxxflags+set}" = set; then :
29344  withval=$with_extra_cxxflags;
29345fi
29346
29347
29348
29349# Check whether --with-extra-ldflags was given.
29350if test "${with_extra_ldflags+set}" = set; then :
29351  withval=$with_extra_ldflags;
29352fi
29353
29354
29355  EXTRA_CFLAGS="$with_extra_cflags"
29356  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29357  EXTRA_LDFLAGS="$with_extra_ldflags"
29358
29359  # Hotspot needs these set in their legacy form
29360  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29361  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29362  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29363
29364
29365
29366
29367
29368  # The global CFLAGS and LDLAGS variables are used by configure tests and
29369  # should include the extra parameters
29370  CFLAGS="$EXTRA_CFLAGS"
29371  CXXFLAGS="$EXTRA_CXXFLAGS"
29372  LDFLAGS="$EXTRA_LDFLAGS"
29373  CPPFLAGS=""
29374
29375# The sysroot cflags are needed for configure to be able to run the compilers
29376
29377  if test "x$SYSROOT" != "x"; then
29378    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29379      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29380        # Solaris Studio does not have a concept of sysroot. Instead we must
29381        # make sure the default include and lib dirs are appended to each
29382        # compile and link command line.
29383        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29384        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29385            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29386            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29387      fi
29388    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29389      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29390      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29391    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29392      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29393      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29394    fi
29395    # Propagate the sysroot args to hotspot
29396    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29397    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29398    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29399    # The global CFLAGS and LDFLAGS variables need these for configure to function
29400    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29401    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29402    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29403    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29404  fi
29405
29406  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29407    # We also need -iframework<path>/System/Library/Frameworks
29408    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29409    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29410    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29411    # set this here so it doesn't have to be peppered throughout the forest
29412    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29413    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29414  fi
29415
29416
29417
29418
29419
29420# Then detect the actual binaries needed
29421
29422  # FIXME: Is this needed?
29423  ac_ext=cpp
29424ac_cpp='$CXXCPP $CPPFLAGS'
29425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29428
29429
29430  # Store the CFLAGS etc passed to the configure script.
29431  ORG_CFLAGS="$CFLAGS"
29432  ORG_CXXFLAGS="$CXXFLAGS"
29433
29434  # autoconf magic only relies on PATH, so update it if tools dir is specified
29435  OLD_PATH="$PATH"
29436
29437  # On Windows, we need to detect the visual studio installation first.
29438  # This will change the PATH, but we need to keep that new PATH even
29439  # after toolchain detection is done, since the compiler (on x86) uses
29440  # it for DLL resolution in runtime.
29441  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29442      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29443
29444  # Store path to cygwin link.exe to help excluding it when searching for
29445  # VS linker. This must be done before changing the PATH when looking for VS.
29446  # Extract the first word of "link", so it can be a program name with args.
29447set dummy link; ac_word=$2
29448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29449$as_echo_n "checking for $ac_word... " >&6; }
29450if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29451  $as_echo_n "(cached) " >&6
29452else
29453  case $CYGWIN_LINK in
29454  [\\/]* | ?:[\\/]*)
29455  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29456  ;;
29457  *)
29458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29459for as_dir in $PATH
29460do
29461  IFS=$as_save_IFS
29462  test -z "$as_dir" && as_dir=.
29463    for ac_exec_ext in '' $ac_executable_extensions; do
29464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29465    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29467    break 2
29468  fi
29469done
29470  done
29471IFS=$as_save_IFS
29472
29473  ;;
29474esac
29475fi
29476CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29477if test -n "$CYGWIN_LINK"; then
29478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29479$as_echo "$CYGWIN_LINK" >&6; }
29480else
29481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29482$as_echo "no" >&6; }
29483fi
29484
29485
29486  if test "x$CYGWIN_LINK" != x; then
29487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29488$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29489    "$CYGWIN_LINK" --version > /dev/null
29490    if test $? -eq 0 ; then
29491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29492$as_echo "yes" >&6; }
29493    else
29494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29495$as_echo "no" >&6; }
29496      # This might be the VS linker. Don't exclude it later on.
29497      CYGWIN_LINK=""
29498    fi
29499  fi
29500
29501  # First-hand choice is to locate and run the vsvars bat file.
29502
29503
29504# Check whether --with-toolchain-version was given.
29505if test "${with_toolchain_version+set}" = set; then :
29506  withval=$with_toolchain_version;
29507fi
29508
29509
29510  if test "x$with_toolchain_version" = xlist; then
29511    # List all toolchains
29512    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29513$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29514    for version in $VALID_VS_VERSIONS; do
29515      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29516      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29517    done
29518
29519    exit 0
29520  elif test "x$DEVKIT_VS_VERSION" != x; then
29521    VS_VERSION=$DEVKIT_VS_VERSION
29522    TOOLCHAIN_VERSION=$VS_VERSION
29523    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29524    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29525    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29526    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29527    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29528    VS_PATH="$TOOLCHAIN_PATH:$PATH"
29529
29530    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29531    # can still be exported as INCLUDE for compiler invocations without
29532    # SYSROOT_CFLAGS
29533    OLDIFS="$IFS"
29534    IFS=";"
29535    for i in $DEVKIT_VS_INCLUDE; do
29536      ipath=$i
29537
29538  unix_path="$ipath"
29539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29540    windows_path=`$CYGPATH -m "$unix_path"`
29541    ipath="$windows_path"
29542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29543    windows_path=`cmd //c echo $unix_path`
29544    ipath="$windows_path"
29545  fi
29546
29547      VS_INCLUDE="$VS_INCLUDE;$ipath"
29548    done
29549    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29550    # as LIB for compiler invocations without SYSROOT_LDFLAGS
29551    for i in $DEVKIT_VS_LIB; do
29552      libpath=$i
29553
29554  unix_path="$libpath"
29555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29556    windows_path=`$CYGPATH -m "$unix_path"`
29557    libpath="$windows_path"
29558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29559    windows_path=`cmd //c echo $unix_path`
29560    libpath="$windows_path"
29561  fi
29562
29563      VS_LIB="$VS_LIB;$libpath"
29564    done
29565    IFS="$OLDIFS"
29566
29567    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29568$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29569
29570  elif test "x$with_toolchain_version" != x; then
29571    # User override; check that it is valid
29572    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29573      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29574$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29575      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29576$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29577      as_fn_error $? "Cannot continue." "$LINENO" 5
29578    fi
29579    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29580  else
29581    # No flag given, use default
29582    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29583  fi
29584
29585  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29586
29587  VS_VERSION="$VS_VERSION"
29588  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29589  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29590  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29591  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29592
29593  # When using --with-tools-dir, assume it points to the correct and default
29594  # version of Visual Studio or that --with-toolchain-version was also set.
29595  if test "x$with_tools_dir" != x; then
29596
29597  if test "x$VS_ENV_CMD" = x; then
29598    VS_VERSION="${VS_VERSION}"
29599    VS_BASE="$with_tools_dir/../.."
29600    METHOD="--with-tools-dir"
29601
29602    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29603      VCVARSFILE="vc/bin/vcvars32.bat"
29604    else
29605      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29606    fi
29607
29608
29609  windows_path="$VS_BASE"
29610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29611    unix_path=`$CYGPATH -u "$windows_path"`
29612    VS_BASE="$unix_path"
29613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29615    VS_BASE="$unix_path"
29616  fi
29617
29618    if test -d "$VS_BASE"; then
29619      if test -f "$VS_BASE/$VCVARSFILE"; then
29620        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29621$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29622        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29623        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29624        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29625        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29626      else
29627        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29628$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29629        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29630$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29631      fi
29632    fi
29633  fi
29634
29635
29636  if test "x$VS_ENV_CMD" = x; then
29637    VS_VERSION="${VS_VERSION}"
29638    VS_BASE="$with_tools_dir/../../.."
29639    METHOD="--with-tools-dir"
29640
29641    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29642      VCVARSFILE="vc/bin/vcvars32.bat"
29643    else
29644      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29645    fi
29646
29647
29648  windows_path="$VS_BASE"
29649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29650    unix_path=`$CYGPATH -u "$windows_path"`
29651    VS_BASE="$unix_path"
29652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29654    VS_BASE="$unix_path"
29655  fi
29656
29657    if test -d "$VS_BASE"; then
29658      if test -f "$VS_BASE/$VCVARSFILE"; then
29659        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29660$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29661        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29662        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29663        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29664        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29665      else
29666        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29667$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29668        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29669$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29670      fi
29671    fi
29672  fi
29673
29674    if test "x$VS_ENV_CMD" = x; then
29675      # Having specified an argument which is incorrect will produce an instant failure;
29676      # we should not go on looking
29677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29678$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29679      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29680$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29681      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29682$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29683      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29684    fi
29685  fi
29686
29687  VS_ENV_CMD=""
29688  VS_ENV_ARGS=""
29689
29690  if test "x$VS_COMNTOOLS" != x; then
29691
29692  if test "x$VS_ENV_CMD" = x; then
29693    VS_VERSION="${VS_VERSION}"
29694    VS_BASE="$VS_COMNTOOLS/../.."
29695    METHOD="$VS_COMNTOOLS_VAR variable"
29696
29697    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29698      VCVARSFILE="vc/bin/vcvars32.bat"
29699    else
29700      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29701    fi
29702
29703
29704  windows_path="$VS_BASE"
29705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29706    unix_path=`$CYGPATH -u "$windows_path"`
29707    VS_BASE="$unix_path"
29708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29710    VS_BASE="$unix_path"
29711  fi
29712
29713    if test -d "$VS_BASE"; then
29714      if test -f "$VS_BASE/$VCVARSFILE"; then
29715        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29716$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29717        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29718        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29719        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29720        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29721      else
29722        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29723$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29724        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29725$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29726      fi
29727    fi
29728  fi
29729
29730  fi
29731  if test "x$PROGRAMFILES" != x; then
29732
29733  if test "x$VS_ENV_CMD" = x; then
29734    VS_VERSION="${VS_VERSION}"
29735    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29736    METHOD="well-known name"
29737
29738    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29739      VCVARSFILE="vc/bin/vcvars32.bat"
29740    else
29741      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29742    fi
29743
29744
29745  windows_path="$VS_BASE"
29746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29747    unix_path=`$CYGPATH -u "$windows_path"`
29748    VS_BASE="$unix_path"
29749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29751    VS_BASE="$unix_path"
29752  fi
29753
29754    if test -d "$VS_BASE"; then
29755      if test -f "$VS_BASE/$VCVARSFILE"; then
29756        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29757$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29758        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29759        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29760        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29761        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29762      else
29763        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29764$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29765        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29766$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29767      fi
29768    fi
29769  fi
29770
29771  fi
29772  # Work around the insanely named ProgramFiles(x86) env variable
29773  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29774  if test "x$PROGRAMFILES_X86" != x; then
29775
29776  if test "x$VS_ENV_CMD" = x; then
29777    VS_VERSION="${VS_VERSION}"
29778    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29779    METHOD="well-known name"
29780
29781    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29782      VCVARSFILE="vc/bin/vcvars32.bat"
29783    else
29784      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29785    fi
29786
29787
29788  windows_path="$VS_BASE"
29789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29790    unix_path=`$CYGPATH -u "$windows_path"`
29791    VS_BASE="$unix_path"
29792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29794    VS_BASE="$unix_path"
29795  fi
29796
29797    if test -d "$VS_BASE"; then
29798      if test -f "$VS_BASE/$VCVARSFILE"; then
29799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29800$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29801        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29802        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29803        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29804        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29805      else
29806        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29807$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29808        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29809$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29810      fi
29811    fi
29812  fi
29813
29814  fi
29815
29816  if test "x$VS_ENV_CMD" = x; then
29817    VS_VERSION="${VS_VERSION}"
29818    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29819    METHOD="well-known name"
29820
29821    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29822      VCVARSFILE="vc/bin/vcvars32.bat"
29823    else
29824      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29825    fi
29826
29827
29828  windows_path="$VS_BASE"
29829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29830    unix_path=`$CYGPATH -u "$windows_path"`
29831    VS_BASE="$unix_path"
29832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29834    VS_BASE="$unix_path"
29835  fi
29836
29837    if test -d "$VS_BASE"; then
29838      if test -f "$VS_BASE/$VCVARSFILE"; then
29839        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29840$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29841        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29842        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29843        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29844        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29845      else
29846        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29847$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29848        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29849$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29850      fi
29851    fi
29852  fi
29853
29854
29855  if test "x$VS_ENV_CMD" = x; then
29856    VS_VERSION="${VS_VERSION}"
29857    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29858    METHOD="well-known name"
29859
29860    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29861      VCVARSFILE="vc/bin/vcvars32.bat"
29862    else
29863      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29864    fi
29865
29866
29867  windows_path="$VS_BASE"
29868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29869    unix_path=`$CYGPATH -u "$windows_path"`
29870    VS_BASE="$unix_path"
29871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29873    VS_BASE="$unix_path"
29874  fi
29875
29876    if test -d "$VS_BASE"; then
29877      if test -f "$VS_BASE/$VCVARSFILE"; then
29878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29879$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29880        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29881        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29882        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29883        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29884      else
29885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29886$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29887        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29888$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29889      fi
29890    fi
29891  fi
29892
29893
29894  if test "x$SDK_INSTALL_DIR" != x; then
29895    if test "x$ProgramW6432" != x; then
29896
29897  if test "x$VS_ENV_CMD" = x; then
29898    VS_VERSION="${VS_VERSION}"
29899    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29900    METHOD="well-known name"
29901
29902  windows_path="$WIN_SDK_BASE"
29903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29904    unix_path=`$CYGPATH -u "$windows_path"`
29905    WIN_SDK_BASE="$unix_path"
29906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29908    WIN_SDK_BASE="$unix_path"
29909  fi
29910
29911    if test -d "$WIN_SDK_BASE"; then
29912      # There have been cases of partial or broken SDK installations. A missing
29913      # lib dir is not going to work.
29914      if test ! -d "$WIN_SDK_BASE/lib"; then
29915        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29916$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29917        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29918$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29919      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29920        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29921$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29922        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29923        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29924          VS_ENV_ARGS="/x86"
29925        else
29926          VS_ENV_ARGS="/x64"
29927        fi
29928        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29929        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29930        # TODO: improve detection for other versions of SDK
29931        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29932      else
29933        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29934$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29935        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29936$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29937      fi
29938    fi
29939  fi
29940
29941    fi
29942    if test "x$PROGRAMW6432" != x; then
29943
29944  if test "x$VS_ENV_CMD" = x; then
29945    VS_VERSION="${VS_VERSION}"
29946    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
29947    METHOD="well-known name"
29948
29949  windows_path="$WIN_SDK_BASE"
29950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29951    unix_path=`$CYGPATH -u "$windows_path"`
29952    WIN_SDK_BASE="$unix_path"
29953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29955    WIN_SDK_BASE="$unix_path"
29956  fi
29957
29958    if test -d "$WIN_SDK_BASE"; then
29959      # There have been cases of partial or broken SDK installations. A missing
29960      # lib dir is not going to work.
29961      if test ! -d "$WIN_SDK_BASE/lib"; then
29962        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29963$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29964        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29965$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29966      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29970        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29971          VS_ENV_ARGS="/x86"
29972        else
29973          VS_ENV_ARGS="/x64"
29974        fi
29975        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29976        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29977        # TODO: improve detection for other versions of SDK
29978        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29979      else
29980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29981$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29982        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29983$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29984      fi
29985    fi
29986  fi
29987
29988    fi
29989    if test "x$PROGRAMFILES" != x; then
29990
29991  if test "x$VS_ENV_CMD" = x; then
29992    VS_VERSION="${VS_VERSION}"
29993    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
29994    METHOD="well-known name"
29995
29996  windows_path="$WIN_SDK_BASE"
29997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29998    unix_path=`$CYGPATH -u "$windows_path"`
29999    WIN_SDK_BASE="$unix_path"
30000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30002    WIN_SDK_BASE="$unix_path"
30003  fi
30004
30005    if test -d "$WIN_SDK_BASE"; then
30006      # There have been cases of partial or broken SDK installations. A missing
30007      # lib dir is not going to work.
30008      if test ! -d "$WIN_SDK_BASE/lib"; then
30009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30010$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30011        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30012$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30013      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30014        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30015$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30016        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30017        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30018          VS_ENV_ARGS="/x86"
30019        else
30020          VS_ENV_ARGS="/x64"
30021        fi
30022        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30023        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30024        # TODO: improve detection for other versions of SDK
30025        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30026      else
30027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30028$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30029        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30030$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30031      fi
30032    fi
30033  fi
30034
30035    fi
30036
30037  if test "x$VS_ENV_CMD" = x; then
30038    VS_VERSION="${VS_VERSION}"
30039    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30040    METHOD="well-known name"
30041
30042  windows_path="$WIN_SDK_BASE"
30043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30044    unix_path=`$CYGPATH -u "$windows_path"`
30045    WIN_SDK_BASE="$unix_path"
30046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30048    WIN_SDK_BASE="$unix_path"
30049  fi
30050
30051    if test -d "$WIN_SDK_BASE"; then
30052      # There have been cases of partial or broken SDK installations. A missing
30053      # lib dir is not going to work.
30054      if test ! -d "$WIN_SDK_BASE/lib"; then
30055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30056$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30057        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30058$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30059      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30061$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30062        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30063        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30064          VS_ENV_ARGS="/x86"
30065        else
30066          VS_ENV_ARGS="/x64"
30067        fi
30068        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30069        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30070        # TODO: improve detection for other versions of SDK
30071        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30072      else
30073        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30074$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30075        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30076$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30077      fi
30078    fi
30079  fi
30080
30081
30082  if test "x$VS_ENV_CMD" = x; then
30083    VS_VERSION="${VS_VERSION}"
30084    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30085    METHOD="well-known name"
30086
30087  windows_path="$WIN_SDK_BASE"
30088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30089    unix_path=`$CYGPATH -u "$windows_path"`
30090    WIN_SDK_BASE="$unix_path"
30091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30093    WIN_SDK_BASE="$unix_path"
30094  fi
30095
30096    if test -d "$WIN_SDK_BASE"; then
30097      # There have been cases of partial or broken SDK installations. A missing
30098      # lib dir is not going to work.
30099      if test ! -d "$WIN_SDK_BASE/lib"; then
30100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30101$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30102        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30103$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30104      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30106$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30107        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30108        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30109          VS_ENV_ARGS="/x86"
30110        else
30111          VS_ENV_ARGS="/x64"
30112        fi
30113        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30114        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30115        # TODO: improve detection for other versions of SDK
30116        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30117      else
30118        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30119$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30120        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30121$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30122      fi
30123    fi
30124  fi
30125
30126  fi
30127
30128    if test "x$VS_ENV_CMD" != x; then
30129      TOOLCHAIN_VERSION=$VS_VERSION
30130      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30131      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30132      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30133      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30134      # The rest of the variables are already evaled while probing
30135      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30136$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30137      break
30138    fi
30139  done
30140
30141
30142  # If we have a devkit, skip all of the below.
30143  if test "x$DEVKIT_VS_VERSION" = x; then
30144    if test "x$VS_ENV_CMD" != x; then
30145      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30146
30147  # Only process if variable expands to non-empty
30148
30149  if test "x$VS_ENV_CMD" != x; then
30150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30151
30152  # First separate the path from the arguments. This will split at the first
30153  # space.
30154  complete="$VS_ENV_CMD"
30155  path="${complete%% *}"
30156  tmp="$complete EOL"
30157  arguments="${tmp#* }"
30158
30159  # Input might be given as Windows format, start by converting to
30160  # unix format.
30161  new_path=`$CYGPATH -u "$path"`
30162
30163  # Now try to locate executable using which
30164  new_path=`$WHICH "$new_path" 2> /dev/null`
30165  # bat and cmd files are not always considered executable in cygwin causing which
30166  # to not find them
30167  if test "x$new_path" = x \
30168      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30169      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30170    new_path=`$CYGPATH -u "$path"`
30171  fi
30172  if test "x$new_path" = x; then
30173    # Oops. Which didn't find the executable.
30174    # The splitting of arguments from the executable at a space might have been incorrect,
30175    # since paths with space are more likely in Windows. Give it another try with the whole
30176    # argument.
30177    path="$complete"
30178    arguments="EOL"
30179    new_path=`$CYGPATH -u "$path"`
30180    new_path=`$WHICH "$new_path" 2> /dev/null`
30181    # bat and cmd files are not always considered executable in cygwin causing which
30182    # to not find them
30183    if test "x$new_path" = x \
30184        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30185        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30186      new_path=`$CYGPATH -u "$path"`
30187    fi
30188    if test "x$new_path" = x; then
30189      # It's still not found. Now this is an unrecoverable error.
30190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30191$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30192      has_space=`$ECHO "$complete" | $GREP " "`
30193      if test "x$has_space" != x; then
30194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30196      fi
30197      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30198    fi
30199  fi
30200
30201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30204  # "foo.exe" is OK but "foo" is an error.
30205  #
30206  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30207  # It is also a way to make sure we got the proper file name for the real test later on.
30208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30209  if test "x$test_shortpath" = x; then
30210    # Short path failed, file does not exist as specified.
30211    # Try adding .exe or .cmd
30212    if test -f "${new_path}.exe"; then
30213      input_to_shortpath="${new_path}.exe"
30214    elif test -f "${new_path}.cmd"; then
30215      input_to_shortpath="${new_path}.cmd"
30216    else
30217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30218$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30219      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30220$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30221      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30222    fi
30223  else
30224    input_to_shortpath="$new_path"
30225  fi
30226
30227  # Call helper function which possibly converts this using DOS-style short mode.
30228  # If so, the updated path is stored in $new_path.
30229  new_path="$input_to_shortpath"
30230
30231  input_path="$input_to_shortpath"
30232  # Check if we need to convert this using DOS-style short mode. If the path
30233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30234  # take no chances and rewrite it.
30235  # Note: m4 eats our [], so we need to use [ and ] instead.
30236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30237  if test "x$has_forbidden_chars" != x; then
30238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30242      # Going to short mode and back again did indeed matter. Since short mode is
30243      # case insensitive, let's make it lowercase to improve readability.
30244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30245      # Now convert it back to Unix-style (cygpath)
30246      input_path=`$CYGPATH -u "$shortmode_path"`
30247      new_path="$input_path"
30248    fi
30249  fi
30250
30251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30252  if test "x$test_cygdrive_prefix" = x; then
30253    # As a simple fix, exclude /usr/bin since it's not a real path.
30254    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30256      # a path prefixed by /cygdrive for fixpath to work.
30257      new_path="$CYGWIN_ROOT_PATH$input_path"
30258    fi
30259  fi
30260
30261  # remove trailing .exe if any
30262  new_path="${new_path/%.exe/}"
30263
30264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30265
30266  # First separate the path from the arguments. This will split at the first
30267  # space.
30268  complete="$VS_ENV_CMD"
30269  path="${complete%% *}"
30270  tmp="$complete EOL"
30271  arguments="${tmp#* }"
30272
30273  # Input might be given as Windows format, start by converting to
30274  # unix format.
30275  new_path="$path"
30276
30277  windows_path="$new_path"
30278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30279    unix_path=`$CYGPATH -u "$windows_path"`
30280    new_path="$unix_path"
30281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30283    new_path="$unix_path"
30284  fi
30285
30286
30287  # Now try to locate executable using which
30288  new_path=`$WHICH "$new_path" 2> /dev/null`
30289
30290  if test "x$new_path" = x; then
30291    # Oops. Which didn't find the executable.
30292    # The splitting of arguments from the executable at a space might have been incorrect,
30293    # since paths with space are more likely in Windows. Give it another try with the whole
30294    # argument.
30295    path="$complete"
30296    arguments="EOL"
30297    new_path="$path"
30298
30299  windows_path="$new_path"
30300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30301    unix_path=`$CYGPATH -u "$windows_path"`
30302    new_path="$unix_path"
30303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30305    new_path="$unix_path"
30306  fi
30307
30308
30309    new_path=`$WHICH "$new_path" 2> /dev/null`
30310    # bat and cmd files are not always considered executable in MSYS causing which
30311    # to not find them
30312    if test "x$new_path" = x \
30313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30315      new_path="$path"
30316
30317  windows_path="$new_path"
30318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30319    unix_path=`$CYGPATH -u "$windows_path"`
30320    new_path="$unix_path"
30321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30323    new_path="$unix_path"
30324  fi
30325
30326    fi
30327
30328    if test "x$new_path" = x; then
30329      # It's still not found. Now this is an unrecoverable error.
30330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30331$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30332      has_space=`$ECHO "$complete" | $GREP " "`
30333      if test "x$has_space" != x; then
30334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30336      fi
30337      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30338    fi
30339  fi
30340
30341  # Now new_path has a complete unix path to the binary
30342  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30343    # Keep paths in /bin as-is, but remove trailing .exe if any
30344    new_path="${new_path/%.exe/}"
30345    # Do not save /bin paths to all_fixpath_prefixes!
30346  else
30347    # Not in mixed or Windows style, start by that.
30348    new_path=`cmd //c echo $new_path`
30349
30350  input_path="$new_path"
30351  # Check if we need to convert this using DOS-style short mode. If the path
30352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30353  # take no chances and rewrite it.
30354  # Note: m4 eats our [], so we need to use [ and ] instead.
30355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30356  if test "x$has_forbidden_chars" != x; then
30357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30359  fi
30360
30361    # Output is in $new_path
30362
30363  windows_path="$new_path"
30364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30365    unix_path=`$CYGPATH -u "$windows_path"`
30366    new_path="$unix_path"
30367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30369    new_path="$unix_path"
30370  fi
30371
30372    # remove trailing .exe if any
30373    new_path="${new_path/%.exe/}"
30374
30375    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30376    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30377  fi
30378
30379    else
30380      # We're on a unix platform. Hooray! :)
30381      # First separate the path from the arguments. This will split at the first
30382      # space.
30383      complete="$VS_ENV_CMD"
30384      path="${complete%% *}"
30385      tmp="$complete EOL"
30386      arguments="${tmp#* }"
30387
30388      # Cannot rely on the command "which" here since it doesn't always work.
30389      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30390      if test -z "$is_absolute_path"; then
30391        # Path to executable is not absolute. Find it.
30392        IFS_save="$IFS"
30393        IFS=:
30394        for p in $PATH; do
30395          if test -f "$p/$path" && test -x "$p/$path"; then
30396            new_path="$p/$path"
30397            break
30398          fi
30399        done
30400        IFS="$IFS_save"
30401      else
30402        # This is an absolute path, we can use it without further modifications.
30403        new_path="$path"
30404      fi
30405
30406      if test "x$new_path" = x; then
30407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30408$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30409        has_space=`$ECHO "$complete" | $GREP " "`
30410        if test "x$has_space" != x; then
30411          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30412$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30413        fi
30414        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30415      fi
30416    fi
30417
30418    # Now join together the path and the arguments once again
30419    if test "x$arguments" != xEOL; then
30420      new_complete="$new_path ${arguments% *}"
30421    else
30422      new_complete="$new_path"
30423    fi
30424
30425    if test "x$complete" != "x$new_complete"; then
30426      VS_ENV_CMD="$new_complete"
30427      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30428$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30429    fi
30430  fi
30431
30432
30433      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30434      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30435$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30436
30437      # We need to create a couple of temporary files.
30438      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30439      $MKDIR -p $VS_ENV_TMP_DIR
30440
30441      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30442      # Instead create a shell script which will set the relevant variables when run.
30443      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30444
30445  unix_path="$WINPATH_VS_ENV_CMD"
30446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30447    windows_path=`$CYGPATH -m "$unix_path"`
30448    WINPATH_VS_ENV_CMD="$windows_path"
30449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30450    windows_path=`cmd //c echo $unix_path`
30451    WINPATH_VS_ENV_CMD="$windows_path"
30452  fi
30453
30454      WINPATH_BASH="$BASH"
30455
30456  unix_path="$WINPATH_BASH"
30457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30458    windows_path=`$CYGPATH -m "$unix_path"`
30459    WINPATH_BASH="$windows_path"
30460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30461    windows_path=`cmd //c echo $unix_path`
30462    WINPATH_BASH="$windows_path"
30463  fi
30464
30465
30466      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30467      # script (executable by bash) that will setup the important variables.
30468      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30469      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30470      # This will end up something like:
30471      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30472      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30473      # These will end up something like:
30474      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30475      # The trailing space for everyone except PATH is no typo, but is needed due
30476      # to trailing \ in the Windows paths. These will be stripped later.
30477      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30478          >> $EXTRACT_VC_ENV_BAT_FILE
30479      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30480          >> $EXTRACT_VC_ENV_BAT_FILE
30481      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30482          >> $EXTRACT_VC_ENV_BAT_FILE
30483      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30484          >> $EXTRACT_VC_ENV_BAT_FILE
30485      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30486          >> $EXTRACT_VC_ENV_BAT_FILE
30487      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30488          >> $EXTRACT_VC_ENV_BAT_FILE
30489
30490      # Now execute the newly created bat file.
30491      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30492      # Change directory so we don't need to mess with Windows paths in redirects.
30493      cd $VS_ENV_TMP_DIR
30494      cmd /c extract-vs-env.bat | $CAT
30495      cd $CURDIR
30496
30497      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30498        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30499$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30500        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30501$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30502        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30503$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30504        as_fn_error $? "Cannot continue" "$LINENO" 5
30505      fi
30506
30507      # Now set all paths and other env variables. This will allow the rest of
30508      # the configure script to find and run the compiler in the proper way.
30509      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30510$as_echo "$as_me: Setting extracted environment variables" >&6;}
30511      . $VS_ENV_TMP_DIR/set-vs-env.sh
30512      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30513      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30514    else
30515      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30516      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30517$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30518    fi
30519  fi
30520
30521  # At this point, we should have correct variables in the environment, or we can't continue.
30522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30523$as_echo_n "checking for Visual Studio variables... " >&6; }
30524
30525  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30526      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30527    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30529$as_echo "present but broken" >&6; }
30530      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30531    else
30532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30533$as_echo "ok" >&6; }
30534      # Remove any trailing "\" ";" and " " from the variables.
30535      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30536      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30537      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30538      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30539      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30540      # Remove any paths containing # (typically F#) as that messes up make. This
30541      # is needed if visual studio was installed with F# support.
30542      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30543
30544
30545
30546
30547
30548      # Convert VS_INCLUDE into SYSROOT_CFLAGS
30549      OLDIFS="$IFS"
30550      IFS=";"
30551      for i in $VS_INCLUDE; do
30552        ipath=$i
30553        # Only process non-empty elements
30554        if test "x$ipath" != x; then
30555          IFS="$OLDIFS"
30556          # Check that directory exists before calling fixup_path
30557          testpath=$ipath
30558
30559  windows_path="$testpath"
30560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30561    unix_path=`$CYGPATH -u "$windows_path"`
30562    testpath="$unix_path"
30563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30565    testpath="$unix_path"
30566  fi
30567
30568          if test -d "$testpath"; then
30569
30570  # Only process if variable expands to non-empty
30571
30572  if test "x$ipath" != x; then
30573    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30574
30575  # Input might be given as Windows format, start by converting to
30576  # unix format.
30577  path="$ipath"
30578  new_path=`$CYGPATH -u "$path"`
30579
30580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30583  # "foo.exe" is OK but "foo" is an error.
30584  #
30585  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30586  # It is also a way to make sure we got the proper file name for the real test later on.
30587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30588  if test "x$test_shortpath" = x; then
30589    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30590$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30591    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30592  fi
30593
30594  # Call helper function which possibly converts this using DOS-style short mode.
30595  # If so, the updated path is stored in $new_path.
30596
30597  input_path="$new_path"
30598  # Check if we need to convert this using DOS-style short mode. If the path
30599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30600  # take no chances and rewrite it.
30601  # Note: m4 eats our [], so we need to use [ and ] instead.
30602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30603  if test "x$has_forbidden_chars" != x; then
30604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30608      # Going to short mode and back again did indeed matter. Since short mode is
30609      # case insensitive, let's make it lowercase to improve readability.
30610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30611      # Now convert it back to Unix-style (cygpath)
30612      input_path=`$CYGPATH -u "$shortmode_path"`
30613      new_path="$input_path"
30614    fi
30615  fi
30616
30617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30618  if test "x$test_cygdrive_prefix" = x; then
30619    # As a simple fix, exclude /usr/bin since it's not a real path.
30620    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30622      # a path prefixed by /cygdrive for fixpath to work.
30623      new_path="$CYGWIN_ROOT_PATH$input_path"
30624    fi
30625  fi
30626
30627
30628  if test "x$path" != "x$new_path"; then
30629    ipath="$new_path"
30630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30631$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30632  fi
30633
30634    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30635
30636  path="$ipath"
30637  has_colon=`$ECHO $path | $GREP ^.:`
30638  new_path="$path"
30639  if test "x$has_colon" = x; then
30640    # Not in mixed or Windows style, start by that.
30641    new_path=`cmd //c echo $path`
30642  fi
30643
30644
30645  input_path="$new_path"
30646  # Check if we need to convert this using DOS-style short mode. If the path
30647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30648  # take no chances and rewrite it.
30649  # Note: m4 eats our [], so we need to use [ and ] instead.
30650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30651  if test "x$has_forbidden_chars" != x; then
30652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30654  fi
30655
30656
30657  windows_path="$new_path"
30658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30659    unix_path=`$CYGPATH -u "$windows_path"`
30660    new_path="$unix_path"
30661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30663    new_path="$unix_path"
30664  fi
30665
30666  if test "x$path" != "x$new_path"; then
30667    ipath="$new_path"
30668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30669$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30670  fi
30671
30672  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30673  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30674
30675    else
30676      # We're on a unix platform. Hooray! :)
30677      path="$ipath"
30678      has_space=`$ECHO "$path" | $GREP " "`
30679      if test "x$has_space" != x; then
30680        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30681$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30682        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30683      fi
30684
30685      # Use eval to expand a potential ~
30686      eval path="$path"
30687      if test ! -f "$path" && test ! -d "$path"; then
30688        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30689      fi
30690
30691      ipath="`cd "$path"; $THEPWDCMD -L`"
30692    fi
30693  fi
30694
30695            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30696          fi
30697          IFS=";"
30698        fi
30699      done
30700      # Convert VS_LIB into SYSROOT_LDFLAGS
30701      for i in $VS_LIB; do
30702        libpath=$i
30703        # Only process non-empty elements
30704        if test "x$libpath" != x; then
30705          IFS="$OLDIFS"
30706          # Check that directory exists before calling fixup_path
30707          testpath=$libpath
30708
30709  windows_path="$testpath"
30710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30711    unix_path=`$CYGPATH -u "$windows_path"`
30712    testpath="$unix_path"
30713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30715    testpath="$unix_path"
30716  fi
30717
30718          if test -d "$testpath"; then
30719
30720  # Only process if variable expands to non-empty
30721
30722  if test "x$libpath" != x; then
30723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30724
30725  # Input might be given as Windows format, start by converting to
30726  # unix format.
30727  path="$libpath"
30728  new_path=`$CYGPATH -u "$path"`
30729
30730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30733  # "foo.exe" is OK but "foo" is an error.
30734  #
30735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30736  # It is also a way to make sure we got the proper file name for the real test later on.
30737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30738  if test "x$test_shortpath" = x; then
30739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30740$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30741    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30742  fi
30743
30744  # Call helper function which possibly converts this using DOS-style short mode.
30745  # If so, the updated path is stored in $new_path.
30746
30747  input_path="$new_path"
30748  # Check if we need to convert this using DOS-style short mode. If the path
30749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30750  # take no chances and rewrite it.
30751  # Note: m4 eats our [], so we need to use [ and ] instead.
30752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30753  if test "x$has_forbidden_chars" != x; then
30754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30758      # Going to short mode and back again did indeed matter. Since short mode is
30759      # case insensitive, let's make it lowercase to improve readability.
30760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30761      # Now convert it back to Unix-style (cygpath)
30762      input_path=`$CYGPATH -u "$shortmode_path"`
30763      new_path="$input_path"
30764    fi
30765  fi
30766
30767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30768  if test "x$test_cygdrive_prefix" = x; then
30769    # As a simple fix, exclude /usr/bin since it's not a real path.
30770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30772      # a path prefixed by /cygdrive for fixpath to work.
30773      new_path="$CYGWIN_ROOT_PATH$input_path"
30774    fi
30775  fi
30776
30777
30778  if test "x$path" != "x$new_path"; then
30779    libpath="$new_path"
30780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30781$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30782  fi
30783
30784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30785
30786  path="$libpath"
30787  has_colon=`$ECHO $path | $GREP ^.:`
30788  new_path="$path"
30789  if test "x$has_colon" = x; then
30790    # Not in mixed or Windows style, start by that.
30791    new_path=`cmd //c echo $path`
30792  fi
30793
30794
30795  input_path="$new_path"
30796  # Check if we need to convert this using DOS-style short mode. If the path
30797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30798  # take no chances and rewrite it.
30799  # Note: m4 eats our [], so we need to use [ and ] instead.
30800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30801  if test "x$has_forbidden_chars" != x; then
30802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30804  fi
30805
30806
30807  windows_path="$new_path"
30808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30809    unix_path=`$CYGPATH -u "$windows_path"`
30810    new_path="$unix_path"
30811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30813    new_path="$unix_path"
30814  fi
30815
30816  if test "x$path" != "x$new_path"; then
30817    libpath="$new_path"
30818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30819$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30820  fi
30821
30822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30824
30825    else
30826      # We're on a unix platform. Hooray! :)
30827      path="$libpath"
30828      has_space=`$ECHO "$path" | $GREP " "`
30829      if test "x$has_space" != x; then
30830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30831$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30833      fi
30834
30835      # Use eval to expand a potential ~
30836      eval path="$path"
30837      if test ! -f "$path" && test ! -d "$path"; then
30838        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30839      fi
30840
30841      libpath="`cd "$path"; $THEPWDCMD -L`"
30842    fi
30843  fi
30844
30845            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30846          fi
30847          IFS=";"
30848        fi
30849      done
30850      IFS="$OLDIFS"
30851    fi
30852  else
30853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30854$as_echo "not found" >&6; }
30855
30856    if test "x$VS_ENV_CMD" = x; then
30857      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30858$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30859      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30860$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30861    else
30862      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30863$as_echo "$as_me: Running the extraction script failed." >&6;}
30864    fi
30865    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30866$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30867    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30868$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30869    as_fn_error $? "Cannot continue" "$LINENO" 5
30870  fi
30871
30872    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30873    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30874    PATH="$VS_PATH"
30875    # The microsoft toolchain also requires INCLUDE and LIB to be set.
30876    export INCLUDE="$VS_INCLUDE"
30877    export LIB="$VS_LIB"
30878  fi
30879
30880  # For solaris we really need solaris tools, and not the GNU equivalent.
30881  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30882  # so add that to path before starting to probe.
30883  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30884  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30885    PATH="/usr/ccs/bin:$PATH"
30886  fi
30887
30888  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30889  # override all other locations.
30890  if test "x$TOOLCHAIN_PATH" != x; then
30891    PATH=$TOOLCHAIN_PATH:$PATH
30892  fi
30893
30894
30895  #
30896  # Setup the compilers (CC and CXX)
30897  #
30898
30899  COMPILER_NAME=C
30900  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30901
30902  if test "x$CC" != x; then
30903    # User has supplied compiler name already, always let that override.
30904    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30905$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30906    if test "x`basename $CC`" = "x$CC"; then
30907      # A command without a complete path is provided, search $PATH.
30908
30909      for ac_prog in $CC
30910do
30911  # Extract the first word of "$ac_prog", so it can be a program name with args.
30912set dummy $ac_prog; ac_word=$2
30913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30914$as_echo_n "checking for $ac_word... " >&6; }
30915if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30916  $as_echo_n "(cached) " >&6
30917else
30918  case $POTENTIAL_CC in
30919  [\\/]* | ?:[\\/]*)
30920  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30921  ;;
30922  *)
30923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30924for as_dir in $PATH
30925do
30926  IFS=$as_save_IFS
30927  test -z "$as_dir" && as_dir=.
30928    for ac_exec_ext in '' $ac_executable_extensions; do
30929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30930    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30932    break 2
30933  fi
30934done
30935  done
30936IFS=$as_save_IFS
30937
30938  ;;
30939esac
30940fi
30941POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30942if test -n "$POTENTIAL_CC"; then
30943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30944$as_echo "$POTENTIAL_CC" >&6; }
30945else
30946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30947$as_echo "no" >&6; }
30948fi
30949
30950
30951  test -n "$POTENTIAL_CC" && break
30952done
30953
30954      if test "x$POTENTIAL_CC" != x; then
30955        CC=$POTENTIAL_CC
30956      else
30957        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
30958      fi
30959    else
30960      # Otherwise it might already be a complete path
30961      if test ! -x "$CC"; then
30962        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
30963      fi
30964    fi
30965  else
30966    # No user supplied value. Locate compiler ourselves.
30967
30968    # If we are cross compiling, assume cross compilation tools follows the
30969    # cross compilation standard where they are prefixed with the autoconf
30970    # standard name for the target. For example the binary
30971    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30972    # If we are not cross compiling, then the default compiler name will be
30973    # used.
30974
30975    CC=
30976    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30977    # before checking the rest of the PATH.
30978    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30979    # step, this should not be necessary.
30980    if test -n "$TOOLCHAIN_PATH"; then
30981      PATH_save="$PATH"
30982      PATH="$TOOLCHAIN_PATH"
30983      for ac_prog in $SEARCH_LIST
30984do
30985  # Extract the first word of "$ac_prog", so it can be a program name with args.
30986set dummy $ac_prog; ac_word=$2
30987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30988$as_echo_n "checking for $ac_word... " >&6; }
30989if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
30990  $as_echo_n "(cached) " >&6
30991else
30992  case $TOOLCHAIN_PATH_CC in
30993  [\\/]* | ?:[\\/]*)
30994  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
30995  ;;
30996  *)
30997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30998for as_dir in $PATH
30999do
31000  IFS=$as_save_IFS
31001  test -z "$as_dir" && as_dir=.
31002    for ac_exec_ext in '' $ac_executable_extensions; do
31003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31004    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31006    break 2
31007  fi
31008done
31009  done
31010IFS=$as_save_IFS
31011
31012  ;;
31013esac
31014fi
31015TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31016if test -n "$TOOLCHAIN_PATH_CC"; then
31017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31018$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31019else
31020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31021$as_echo "no" >&6; }
31022fi
31023
31024
31025  test -n "$TOOLCHAIN_PATH_CC" && break
31026done
31027
31028      CC=$TOOLCHAIN_PATH_CC
31029      PATH="$PATH_save"
31030    fi
31031
31032    # AC_PATH_PROGS can't be run multiple times with the same variable,
31033    # so create a new name for this run.
31034    if test "x$CC" = x; then
31035      for ac_prog in $SEARCH_LIST
31036do
31037  # Extract the first word of "$ac_prog", so it can be a program name with args.
31038set dummy $ac_prog; ac_word=$2
31039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31040$as_echo_n "checking for $ac_word... " >&6; }
31041if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31042  $as_echo_n "(cached) " >&6
31043else
31044  case $POTENTIAL_CC in
31045  [\\/]* | ?:[\\/]*)
31046  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31047  ;;
31048  *)
31049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31050for as_dir in $PATH
31051do
31052  IFS=$as_save_IFS
31053  test -z "$as_dir" && as_dir=.
31054    for ac_exec_ext in '' $ac_executable_extensions; do
31055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31056    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31058    break 2
31059  fi
31060done
31061  done
31062IFS=$as_save_IFS
31063
31064  ;;
31065esac
31066fi
31067POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31068if test -n "$POTENTIAL_CC"; then
31069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31070$as_echo "$POTENTIAL_CC" >&6; }
31071else
31072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31073$as_echo "no" >&6; }
31074fi
31075
31076
31077  test -n "$POTENTIAL_CC" && break
31078done
31079
31080      CC=$POTENTIAL_CC
31081    fi
31082
31083    if test "x$CC" = x; then
31084
31085  # Print a helpful message on how to acquire the necessary build dependency.
31086  # devkit is the help tag: freetype, cups, alsa etc
31087  MISSING_DEPENDENCY=devkit
31088
31089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31090    cygwin_help $MISSING_DEPENDENCY
31091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31092    msys_help $MISSING_DEPENDENCY
31093  else
31094    PKGHANDLER_COMMAND=
31095
31096    case $PKGHANDLER in
31097      apt-get)
31098        apt_help     $MISSING_DEPENDENCY ;;
31099      yum)
31100        yum_help     $MISSING_DEPENDENCY ;;
31101      port)
31102        port_help    $MISSING_DEPENDENCY ;;
31103      pkgutil)
31104        pkgutil_help $MISSING_DEPENDENCY ;;
31105      pkgadd)
31106        pkgadd_help  $MISSING_DEPENDENCY ;;
31107    esac
31108
31109    if test "x$PKGHANDLER_COMMAND" != x; then
31110      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31111    fi
31112  fi
31113
31114      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31115    fi
31116  fi
31117
31118  # Now we have a compiler binary in CC. Make sure it's okay.
31119
31120  # Only process if variable expands to non-empty
31121
31122  if test "x$CC" != x; then
31123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31124
31125  # First separate the path from the arguments. This will split at the first
31126  # space.
31127  complete="$CC"
31128  path="${complete%% *}"
31129  tmp="$complete EOL"
31130  arguments="${tmp#* }"
31131
31132  # Input might be given as Windows format, start by converting to
31133  # unix format.
31134  new_path=`$CYGPATH -u "$path"`
31135
31136  # Now try to locate executable using which
31137  new_path=`$WHICH "$new_path" 2> /dev/null`
31138  # bat and cmd files are not always considered executable in cygwin causing which
31139  # to not find them
31140  if test "x$new_path" = x \
31141      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31142      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31143    new_path=`$CYGPATH -u "$path"`
31144  fi
31145  if test "x$new_path" = x; then
31146    # Oops. Which didn't find the executable.
31147    # The splitting of arguments from the executable at a space might have been incorrect,
31148    # since paths with space are more likely in Windows. Give it another try with the whole
31149    # argument.
31150    path="$complete"
31151    arguments="EOL"
31152    new_path=`$CYGPATH -u "$path"`
31153    new_path=`$WHICH "$new_path" 2> /dev/null`
31154    # bat and cmd files are not always considered executable in cygwin causing which
31155    # to not find them
31156    if test "x$new_path" = x \
31157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31159      new_path=`$CYGPATH -u "$path"`
31160    fi
31161    if test "x$new_path" = x; then
31162      # It's still not found. Now this is an unrecoverable error.
31163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31164$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31165      has_space=`$ECHO "$complete" | $GREP " "`
31166      if test "x$has_space" != x; then
31167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31169      fi
31170      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31171    fi
31172  fi
31173
31174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31177  # "foo.exe" is OK but "foo" is an error.
31178  #
31179  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31180  # It is also a way to make sure we got the proper file name for the real test later on.
31181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31182  if test "x$test_shortpath" = x; then
31183    # Short path failed, file does not exist as specified.
31184    # Try adding .exe or .cmd
31185    if test -f "${new_path}.exe"; then
31186      input_to_shortpath="${new_path}.exe"
31187    elif test -f "${new_path}.cmd"; then
31188      input_to_shortpath="${new_path}.cmd"
31189    else
31190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31191$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31192      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31194      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31195    fi
31196  else
31197    input_to_shortpath="$new_path"
31198  fi
31199
31200  # Call helper function which possibly converts this using DOS-style short mode.
31201  # If so, the updated path is stored in $new_path.
31202  new_path="$input_to_shortpath"
31203
31204  input_path="$input_to_shortpath"
31205  # Check if we need to convert this using DOS-style short mode. If the path
31206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31207  # take no chances and rewrite it.
31208  # Note: m4 eats our [], so we need to use [ and ] instead.
31209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31210  if test "x$has_forbidden_chars" != x; then
31211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31215      # Going to short mode and back again did indeed matter. Since short mode is
31216      # case insensitive, let's make it lowercase to improve readability.
31217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31218      # Now convert it back to Unix-style (cygpath)
31219      input_path=`$CYGPATH -u "$shortmode_path"`
31220      new_path="$input_path"
31221    fi
31222  fi
31223
31224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31225  if test "x$test_cygdrive_prefix" = x; then
31226    # As a simple fix, exclude /usr/bin since it's not a real path.
31227    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31229      # a path prefixed by /cygdrive for fixpath to work.
31230      new_path="$CYGWIN_ROOT_PATH$input_path"
31231    fi
31232  fi
31233
31234  # remove trailing .exe if any
31235  new_path="${new_path/%.exe/}"
31236
31237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31238
31239  # First separate the path from the arguments. This will split at the first
31240  # space.
31241  complete="$CC"
31242  path="${complete%% *}"
31243  tmp="$complete EOL"
31244  arguments="${tmp#* }"
31245
31246  # Input might be given as Windows format, start by converting to
31247  # unix format.
31248  new_path="$path"
31249
31250  windows_path="$new_path"
31251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31252    unix_path=`$CYGPATH -u "$windows_path"`
31253    new_path="$unix_path"
31254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31256    new_path="$unix_path"
31257  fi
31258
31259
31260  # Now try to locate executable using which
31261  new_path=`$WHICH "$new_path" 2> /dev/null`
31262
31263  if test "x$new_path" = x; then
31264    # Oops. Which didn't find the executable.
31265    # The splitting of arguments from the executable at a space might have been incorrect,
31266    # since paths with space are more likely in Windows. Give it another try with the whole
31267    # argument.
31268    path="$complete"
31269    arguments="EOL"
31270    new_path="$path"
31271
31272  windows_path="$new_path"
31273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31274    unix_path=`$CYGPATH -u "$windows_path"`
31275    new_path="$unix_path"
31276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31278    new_path="$unix_path"
31279  fi
31280
31281
31282    new_path=`$WHICH "$new_path" 2> /dev/null`
31283    # bat and cmd files are not always considered executable in MSYS causing which
31284    # to not find them
31285    if test "x$new_path" = x \
31286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31288      new_path="$path"
31289
31290  windows_path="$new_path"
31291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31292    unix_path=`$CYGPATH -u "$windows_path"`
31293    new_path="$unix_path"
31294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31296    new_path="$unix_path"
31297  fi
31298
31299    fi
31300
31301    if test "x$new_path" = x; then
31302      # It's still not found. Now this is an unrecoverable error.
31303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31304$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31305      has_space=`$ECHO "$complete" | $GREP " "`
31306      if test "x$has_space" != x; then
31307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31309      fi
31310      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31311    fi
31312  fi
31313
31314  # Now new_path has a complete unix path to the binary
31315  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31316    # Keep paths in /bin as-is, but remove trailing .exe if any
31317    new_path="${new_path/%.exe/}"
31318    # Do not save /bin paths to all_fixpath_prefixes!
31319  else
31320    # Not in mixed or Windows style, start by that.
31321    new_path=`cmd //c echo $new_path`
31322
31323  input_path="$new_path"
31324  # Check if we need to convert this using DOS-style short mode. If the path
31325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31326  # take no chances and rewrite it.
31327  # Note: m4 eats our [], so we need to use [ and ] instead.
31328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31329  if test "x$has_forbidden_chars" != x; then
31330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31332  fi
31333
31334    # Output is in $new_path
31335
31336  windows_path="$new_path"
31337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31338    unix_path=`$CYGPATH -u "$windows_path"`
31339    new_path="$unix_path"
31340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31342    new_path="$unix_path"
31343  fi
31344
31345    # remove trailing .exe if any
31346    new_path="${new_path/%.exe/}"
31347
31348    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31349    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31350  fi
31351
31352    else
31353      # We're on a unix platform. Hooray! :)
31354      # First separate the path from the arguments. This will split at the first
31355      # space.
31356      complete="$CC"
31357      path="${complete%% *}"
31358      tmp="$complete EOL"
31359      arguments="${tmp#* }"
31360
31361      # Cannot rely on the command "which" here since it doesn't always work.
31362      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31363      if test -z "$is_absolute_path"; then
31364        # Path to executable is not absolute. Find it.
31365        IFS_save="$IFS"
31366        IFS=:
31367        for p in $PATH; do
31368          if test -f "$p/$path" && test -x "$p/$path"; then
31369            new_path="$p/$path"
31370            break
31371          fi
31372        done
31373        IFS="$IFS_save"
31374      else
31375        # This is an absolute path, we can use it without further modifications.
31376        new_path="$path"
31377      fi
31378
31379      if test "x$new_path" = x; then
31380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31381$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31382        has_space=`$ECHO "$complete" | $GREP " "`
31383        if test "x$has_space" != x; then
31384          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31385$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31386        fi
31387        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31388      fi
31389    fi
31390
31391    # Now join together the path and the arguments once again
31392    if test "x$arguments" != xEOL; then
31393      new_complete="$new_path ${arguments% *}"
31394    else
31395      new_complete="$new_path"
31396    fi
31397
31398    if test "x$complete" != "x$new_complete"; then
31399      CC="$new_complete"
31400      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31401$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31402    fi
31403  fi
31404
31405  TEST_COMPILER="$CC"
31406  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31407  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31408  if test "x$OPENJDK_BUILD_OS" != xaix; then
31409    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31411$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31412
31413  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31414    # Follow a chain of symbolic links. Use readlink
31415    # where it exists, else fall back to horribly
31416    # complicated shell code.
31417    if test "x$READLINK_TESTED" != yes; then
31418      # On MacOSX there is a readlink tool with a different
31419      # purpose than the GNU readlink tool. Check the found readlink.
31420      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31421      if test "x$ISGNU" = x; then
31422        # A readlink that we do not know how to use.
31423        # Are there other non-GNU readlinks out there?
31424        READLINK_TESTED=yes
31425        READLINK=
31426      fi
31427    fi
31428
31429    if test "x$READLINK" != x; then
31430      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31431    else
31432      # Save the current directory for restoring afterwards
31433      STARTDIR=$PWD
31434      COUNTER=0
31435      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31436      sym_link_file=`$BASENAME $TEST_COMPILER`
31437      cd $sym_link_dir
31438      # Use -P flag to resolve symlinks in directories.
31439      cd `$THEPWDCMD -P`
31440      sym_link_dir=`$THEPWDCMD -P`
31441      # Resolve file symlinks
31442      while test $COUNTER -lt 20; do
31443        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31444        if test "x$ISLINK" == x; then
31445          # This is not a symbolic link! We are done!
31446          break
31447        fi
31448        # Again resolve directory symlinks since the target of the just found
31449        # link could be in a different directory
31450        cd `$DIRNAME $ISLINK`
31451        sym_link_dir=`$THEPWDCMD -P`
31452        sym_link_file=`$BASENAME $ISLINK`
31453        let COUNTER=COUNTER+1
31454      done
31455      cd $STARTDIR
31456      TEST_COMPILER=$sym_link_dir/$sym_link_file
31457    fi
31458  fi
31459
31460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31461$as_echo "$TEST_COMPILER" >&6; }
31462  fi
31463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31464$as_echo_n "checking if CC is disguised ccache... " >&6; }
31465
31466  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31467  if test "x$COMPILER_BASENAME" = "xccache"; then
31468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31469$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31470    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31471    # We want to control ccache invocation ourselves, so ignore this cc and try
31472    # searching again.
31473
31474    # Remove the path to the fake ccache cc from the PATH
31475    RETRY_COMPILER_SAVED_PATH="$PATH"
31476    COMPILER_DIRNAME=`$DIRNAME $CC`
31477    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31478
31479    # Try again looking for our compiler
31480    if test -n "$ac_tool_prefix"; then
31481  for ac_prog in $TOOLCHAIN_CC_BINARY
31482  do
31483    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31484set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31486$as_echo_n "checking for $ac_word... " >&6; }
31487if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31488  $as_echo_n "(cached) " >&6
31489else
31490  if test -n "$PROPER_COMPILER_CC"; then
31491  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31492else
31493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31494for as_dir in $PATH
31495do
31496  IFS=$as_save_IFS
31497  test -z "$as_dir" && as_dir=.
31498    for ac_exec_ext in '' $ac_executable_extensions; do
31499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31500    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31502    break 2
31503  fi
31504done
31505  done
31506IFS=$as_save_IFS
31507
31508fi
31509fi
31510PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31511if test -n "$PROPER_COMPILER_CC"; then
31512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31513$as_echo "$PROPER_COMPILER_CC" >&6; }
31514else
31515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31516$as_echo "no" >&6; }
31517fi
31518
31519
31520    test -n "$PROPER_COMPILER_CC" && break
31521  done
31522fi
31523if test -z "$PROPER_COMPILER_CC"; then
31524  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31525  for ac_prog in $TOOLCHAIN_CC_BINARY
31526do
31527  # Extract the first word of "$ac_prog", so it can be a program name with args.
31528set dummy $ac_prog; ac_word=$2
31529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31530$as_echo_n "checking for $ac_word... " >&6; }
31531if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31532  $as_echo_n "(cached) " >&6
31533else
31534  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31535  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31536else
31537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31538for as_dir in $PATH
31539do
31540  IFS=$as_save_IFS
31541  test -z "$as_dir" && as_dir=.
31542    for ac_exec_ext in '' $ac_executable_extensions; do
31543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31544    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31546    break 2
31547  fi
31548done
31549  done
31550IFS=$as_save_IFS
31551
31552fi
31553fi
31554ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31555if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31557$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31558else
31559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31560$as_echo "no" >&6; }
31561fi
31562
31563
31564  test -n "$ac_ct_PROPER_COMPILER_CC" && break
31565done
31566
31567  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31568    PROPER_COMPILER_CC=""
31569  else
31570    case $cross_compiling:$ac_tool_warned in
31571yes:)
31572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31574ac_tool_warned=yes ;;
31575esac
31576    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31577  fi
31578fi
31579
31580
31581  # Only process if variable expands to non-empty
31582
31583  if test "x$PROPER_COMPILER_CC" != x; then
31584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31585
31586  # First separate the path from the arguments. This will split at the first
31587  # space.
31588  complete="$PROPER_COMPILER_CC"
31589  path="${complete%% *}"
31590  tmp="$complete EOL"
31591  arguments="${tmp#* }"
31592
31593  # Input might be given as Windows format, start by converting to
31594  # unix format.
31595  new_path=`$CYGPATH -u "$path"`
31596
31597  # Now try to locate executable using which
31598  new_path=`$WHICH "$new_path" 2> /dev/null`
31599  # bat and cmd files are not always considered executable in cygwin causing which
31600  # to not find them
31601  if test "x$new_path" = x \
31602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31604    new_path=`$CYGPATH -u "$path"`
31605  fi
31606  if test "x$new_path" = x; then
31607    # Oops. Which didn't find the executable.
31608    # The splitting of arguments from the executable at a space might have been incorrect,
31609    # since paths with space are more likely in Windows. Give it another try with the whole
31610    # argument.
31611    path="$complete"
31612    arguments="EOL"
31613    new_path=`$CYGPATH -u "$path"`
31614    new_path=`$WHICH "$new_path" 2> /dev/null`
31615    # bat and cmd files are not always considered executable in cygwin causing which
31616    # to not find them
31617    if test "x$new_path" = x \
31618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31620      new_path=`$CYGPATH -u "$path"`
31621    fi
31622    if test "x$new_path" = x; then
31623      # It's still not found. Now this is an unrecoverable error.
31624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31625$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31626      has_space=`$ECHO "$complete" | $GREP " "`
31627      if test "x$has_space" != x; then
31628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31630      fi
31631      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31632    fi
31633  fi
31634
31635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31638  # "foo.exe" is OK but "foo" is an error.
31639  #
31640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31641  # It is also a way to make sure we got the proper file name for the real test later on.
31642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31643  if test "x$test_shortpath" = x; then
31644    # Short path failed, file does not exist as specified.
31645    # Try adding .exe or .cmd
31646    if test -f "${new_path}.exe"; then
31647      input_to_shortpath="${new_path}.exe"
31648    elif test -f "${new_path}.cmd"; then
31649      input_to_shortpath="${new_path}.cmd"
31650    else
31651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31652$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31655      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31656    fi
31657  else
31658    input_to_shortpath="$new_path"
31659  fi
31660
31661  # Call helper function which possibly converts this using DOS-style short mode.
31662  # If so, the updated path is stored in $new_path.
31663  new_path="$input_to_shortpath"
31664
31665  input_path="$input_to_shortpath"
31666  # Check if we need to convert this using DOS-style short mode. If the path
31667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31668  # take no chances and rewrite it.
31669  # Note: m4 eats our [], so we need to use [ and ] instead.
31670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31671  if test "x$has_forbidden_chars" != x; then
31672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31676      # Going to short mode and back again did indeed matter. Since short mode is
31677      # case insensitive, let's make it lowercase to improve readability.
31678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31679      # Now convert it back to Unix-style (cygpath)
31680      input_path=`$CYGPATH -u "$shortmode_path"`
31681      new_path="$input_path"
31682    fi
31683  fi
31684
31685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31686  if test "x$test_cygdrive_prefix" = x; then
31687    # As a simple fix, exclude /usr/bin since it's not a real path.
31688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31690      # a path prefixed by /cygdrive for fixpath to work.
31691      new_path="$CYGWIN_ROOT_PATH$input_path"
31692    fi
31693  fi
31694
31695  # remove trailing .exe if any
31696  new_path="${new_path/%.exe/}"
31697
31698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31699
31700  # First separate the path from the arguments. This will split at the first
31701  # space.
31702  complete="$PROPER_COMPILER_CC"
31703  path="${complete%% *}"
31704  tmp="$complete EOL"
31705  arguments="${tmp#* }"
31706
31707  # Input might be given as Windows format, start by converting to
31708  # unix format.
31709  new_path="$path"
31710
31711  windows_path="$new_path"
31712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31713    unix_path=`$CYGPATH -u "$windows_path"`
31714    new_path="$unix_path"
31715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31717    new_path="$unix_path"
31718  fi
31719
31720
31721  # Now try to locate executable using which
31722  new_path=`$WHICH "$new_path" 2> /dev/null`
31723
31724  if test "x$new_path" = x; then
31725    # Oops. Which didn't find the executable.
31726    # The splitting of arguments from the executable at a space might have been incorrect,
31727    # since paths with space are more likely in Windows. Give it another try with the whole
31728    # argument.
31729    path="$complete"
31730    arguments="EOL"
31731    new_path="$path"
31732
31733  windows_path="$new_path"
31734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31735    unix_path=`$CYGPATH -u "$windows_path"`
31736    new_path="$unix_path"
31737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31739    new_path="$unix_path"
31740  fi
31741
31742
31743    new_path=`$WHICH "$new_path" 2> /dev/null`
31744    # bat and cmd files are not always considered executable in MSYS causing which
31745    # to not find them
31746    if test "x$new_path" = x \
31747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31749      new_path="$path"
31750
31751  windows_path="$new_path"
31752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31753    unix_path=`$CYGPATH -u "$windows_path"`
31754    new_path="$unix_path"
31755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31757    new_path="$unix_path"
31758  fi
31759
31760    fi
31761
31762    if test "x$new_path" = x; then
31763      # It's still not found. Now this is an unrecoverable error.
31764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31765$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31766      has_space=`$ECHO "$complete" | $GREP " "`
31767      if test "x$has_space" != x; then
31768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31770      fi
31771      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31772    fi
31773  fi
31774
31775  # Now new_path has a complete unix path to the binary
31776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31777    # Keep paths in /bin as-is, but remove trailing .exe if any
31778    new_path="${new_path/%.exe/}"
31779    # Do not save /bin paths to all_fixpath_prefixes!
31780  else
31781    # Not in mixed or Windows style, start by that.
31782    new_path=`cmd //c echo $new_path`
31783
31784  input_path="$new_path"
31785  # Check if we need to convert this using DOS-style short mode. If the path
31786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31787  # take no chances and rewrite it.
31788  # Note: m4 eats our [], so we need to use [ and ] instead.
31789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31790  if test "x$has_forbidden_chars" != x; then
31791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31793  fi
31794
31795    # Output is in $new_path
31796
31797  windows_path="$new_path"
31798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31799    unix_path=`$CYGPATH -u "$windows_path"`
31800    new_path="$unix_path"
31801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31803    new_path="$unix_path"
31804  fi
31805
31806    # remove trailing .exe if any
31807    new_path="${new_path/%.exe/}"
31808
31809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31811  fi
31812
31813    else
31814      # We're on a unix platform. Hooray! :)
31815      # First separate the path from the arguments. This will split at the first
31816      # space.
31817      complete="$PROPER_COMPILER_CC"
31818      path="${complete%% *}"
31819      tmp="$complete EOL"
31820      arguments="${tmp#* }"
31821
31822      # Cannot rely on the command "which" here since it doesn't always work.
31823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31824      if test -z "$is_absolute_path"; then
31825        # Path to executable is not absolute. Find it.
31826        IFS_save="$IFS"
31827        IFS=:
31828        for p in $PATH; do
31829          if test -f "$p/$path" && test -x "$p/$path"; then
31830            new_path="$p/$path"
31831            break
31832          fi
31833        done
31834        IFS="$IFS_save"
31835      else
31836        # This is an absolute path, we can use it without further modifications.
31837        new_path="$path"
31838      fi
31839
31840      if test "x$new_path" = x; then
31841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31842$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31843        has_space=`$ECHO "$complete" | $GREP " "`
31844        if test "x$has_space" != x; then
31845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31847        fi
31848        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31849      fi
31850    fi
31851
31852    # Now join together the path and the arguments once again
31853    if test "x$arguments" != xEOL; then
31854      new_complete="$new_path ${arguments% *}"
31855    else
31856      new_complete="$new_path"
31857    fi
31858
31859    if test "x$complete" != "x$new_complete"; then
31860      PROPER_COMPILER_CC="$new_complete"
31861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31862$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31863    fi
31864  fi
31865
31866    PATH="$RETRY_COMPILER_SAVED_PATH"
31867
31868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31869$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31870
31871  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31872    # Follow a chain of symbolic links. Use readlink
31873    # where it exists, else fall back to horribly
31874    # complicated shell code.
31875    if test "x$READLINK_TESTED" != yes; then
31876      # On MacOSX there is a readlink tool with a different
31877      # purpose than the GNU readlink tool. Check the found readlink.
31878      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31879      if test "x$ISGNU" = x; then
31880        # A readlink that we do not know how to use.
31881        # Are there other non-GNU readlinks out there?
31882        READLINK_TESTED=yes
31883        READLINK=
31884      fi
31885    fi
31886
31887    if test "x$READLINK" != x; then
31888      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31889    else
31890      # Save the current directory for restoring afterwards
31891      STARTDIR=$PWD
31892      COUNTER=0
31893      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31894      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31895      cd $sym_link_dir
31896      # Use -P flag to resolve symlinks in directories.
31897      cd `$THEPWDCMD -P`
31898      sym_link_dir=`$THEPWDCMD -P`
31899      # Resolve file symlinks
31900      while test $COUNTER -lt 20; do
31901        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31902        if test "x$ISLINK" == x; then
31903          # This is not a symbolic link! We are done!
31904          break
31905        fi
31906        # Again resolve directory symlinks since the target of the just found
31907        # link could be in a different directory
31908        cd `$DIRNAME $ISLINK`
31909        sym_link_dir=`$THEPWDCMD -P`
31910        sym_link_file=`$BASENAME $ISLINK`
31911        let COUNTER=COUNTER+1
31912      done
31913      cd $STARTDIR
31914      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31915    fi
31916  fi
31917
31918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31919$as_echo "$PROPER_COMPILER_CC" >&6; }
31920    CC="$PROPER_COMPILER_CC"
31921  else
31922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31923$as_echo "no, keeping CC" >&6; }
31924  fi
31925
31926
31927  COMPILER=$CC
31928  COMPILER_NAME=$COMPILER_NAME
31929
31930  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31931    # cc -V output typically looks like
31932    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31933    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31934    # Check that this is likely to be the Solaris Studio cc.
31935    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31936    if test $? -ne 0; then
31937      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31938      { $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
31939$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31940      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31941$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31942      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31943$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31944      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31945    fi
31946    # Remove usage instructions (if present), and
31947    # collapse compiler output into a single line
31948    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31949        $SED -e 's/ *[Uu]sage:.*//'`
31950    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31951        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31952  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31953    # xlc -qversion output typically looks like
31954    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31955    #     Version: 11.01.0000.0015
31956    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31957    # Check that this is likely to be the IBM XL C compiler.
31958    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31959    if test $? -ne 0; then
31960      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31961      { $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
31962$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31963      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31964$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31965      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31966$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31967      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31968    fi
31969    # Collapse compiler output into a single line
31970    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31971    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31972        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31973  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31974    # There is no specific version flag, but all output starts with a version string.
31975    # First line typically looks something like:
31976    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31977    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31978    # Check that this is likely to be Microsoft CL.EXE.
31979    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31980    if test $? -ne 0; then
31981      { $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
31982$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31983      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31984$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31985      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31986    fi
31987    # Collapse compiler output into a single line
31988    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31990        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31991  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31992    # gcc --version output typically looks like
31993    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31994    #     Copyright (C) 2013 Free Software Foundation, Inc.
31995    #     This is free software; see the source for copying conditions.  There is NO
31996    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31997    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31998    # Check that this is likely to be GCC.
31999    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32000    if test $? -ne 0; then
32001      { $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
32002$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32003      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32004$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32005      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32006    fi
32007    # Remove Copyright and legalese from version string, and
32008    # collapse into a single line
32009    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32010        $SED -e 's/ *Copyright .*//'`
32011    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32012        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32013  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32014    # clang --version output typically looks like
32015    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32016    #    clang version 3.3 (tags/RELEASE_33/final)
32017    # or
32018    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32019    #    Target: x86_64-pc-linux-gnu
32020    #    Thread model: posix
32021    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32022    # Check that this is likely to be clang
32023    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32024    if test $? -ne 0; then
32025      { $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
32026$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32027      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32028$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32029      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32030    fi
32031    # Collapse compiler output into a single line
32032    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32033    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32034        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32035  else
32036      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32037  fi
32038  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32039  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32040  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32041  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32042
32043  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32044$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32045
32046
32047  # Now that we have resolved CC ourself, let autoconf have its go at it
32048  ac_ext=c
32049ac_cpp='$CPP $CPPFLAGS'
32050ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32051ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32052ac_compiler_gnu=$ac_cv_c_compiler_gnu
32053if test -n "$ac_tool_prefix"; then
32054  for ac_prog in $CC
32055  do
32056    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32057set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32059$as_echo_n "checking for $ac_word... " >&6; }
32060if ${ac_cv_prog_CC+:} false; then :
32061  $as_echo_n "(cached) " >&6
32062else
32063  if test -n "$CC"; then
32064  ac_cv_prog_CC="$CC" # Let the user override the test.
32065else
32066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32067for as_dir in $PATH
32068do
32069  IFS=$as_save_IFS
32070  test -z "$as_dir" && as_dir=.
32071    for ac_exec_ext in '' $ac_executable_extensions; do
32072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32073    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32075    break 2
32076  fi
32077done
32078  done
32079IFS=$as_save_IFS
32080
32081fi
32082fi
32083CC=$ac_cv_prog_CC
32084if test -n "$CC"; then
32085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32086$as_echo "$CC" >&6; }
32087else
32088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32089$as_echo "no" >&6; }
32090fi
32091
32092
32093    test -n "$CC" && break
32094  done
32095fi
32096if test -z "$CC"; then
32097  ac_ct_CC=$CC
32098  for ac_prog in $CC
32099do
32100  # Extract the first word of "$ac_prog", so it can be a program name with args.
32101set dummy $ac_prog; ac_word=$2
32102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32103$as_echo_n "checking for $ac_word... " >&6; }
32104if ${ac_cv_prog_ac_ct_CC+:} false; then :
32105  $as_echo_n "(cached) " >&6
32106else
32107  if test -n "$ac_ct_CC"; then
32108  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32109else
32110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32111for as_dir in $PATH
32112do
32113  IFS=$as_save_IFS
32114  test -z "$as_dir" && as_dir=.
32115    for ac_exec_ext in '' $ac_executable_extensions; do
32116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32117    ac_cv_prog_ac_ct_CC="$ac_prog"
32118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32119    break 2
32120  fi
32121done
32122  done
32123IFS=$as_save_IFS
32124
32125fi
32126fi
32127ac_ct_CC=$ac_cv_prog_ac_ct_CC
32128if test -n "$ac_ct_CC"; then
32129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32130$as_echo "$ac_ct_CC" >&6; }
32131else
32132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32133$as_echo "no" >&6; }
32134fi
32135
32136
32137  test -n "$ac_ct_CC" && break
32138done
32139
32140  if test "x$ac_ct_CC" = x; then
32141    CC=""
32142  else
32143    case $cross_compiling:$ac_tool_warned in
32144yes:)
32145{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32146$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32147ac_tool_warned=yes ;;
32148esac
32149    CC=$ac_ct_CC
32150  fi
32151fi
32152
32153
32154test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32155$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32156as_fn_error $? "no acceptable C compiler found in \$PATH
32157See \`config.log' for more details" "$LINENO" 5; }
32158
32159# Provide some information about the compiler.
32160$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32161set X $ac_compile
32162ac_compiler=$2
32163for ac_option in --version -v -V -qversion; do
32164  { { ac_try="$ac_compiler $ac_option >&5"
32165case "(($ac_try" in
32166  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32167  *) ac_try_echo=$ac_try;;
32168esac
32169eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32170$as_echo "$ac_try_echo"; } >&5
32171  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32172  ac_status=$?
32173  if test -s conftest.err; then
32174    sed '10a\
32175... rest of stderr output deleted ...
32176         10q' conftest.err >conftest.er1
32177    cat conftest.er1 >&5
32178  fi
32179  rm -f conftest.er1 conftest.err
32180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32181  test $ac_status = 0; }
32182done
32183
32184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32185/* end confdefs.h.  */
32186
32187int
32188main ()
32189{
32190
32191  ;
32192  return 0;
32193}
32194_ACEOF
32195ac_clean_files_save=$ac_clean_files
32196ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32197# Try to create an executable without -o first, disregard a.out.
32198# It will help us diagnose broken compilers, and finding out an intuition
32199# of exeext.
32200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32201$as_echo_n "checking whether the C compiler works... " >&6; }
32202ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32203
32204# The possible output files:
32205ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32206
32207ac_rmfiles=
32208for ac_file in $ac_files
32209do
32210  case $ac_file in
32211    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32212    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32213  esac
32214done
32215rm -f $ac_rmfiles
32216
32217if { { ac_try="$ac_link_default"
32218case "(($ac_try" in
32219  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32220  *) ac_try_echo=$ac_try;;
32221esac
32222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32223$as_echo "$ac_try_echo"; } >&5
32224  (eval "$ac_link_default") 2>&5
32225  ac_status=$?
32226  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32227  test $ac_status = 0; }; then :
32228  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32229# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32230# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32231# so that the user can short-circuit this test for compilers unknown to
32232# Autoconf.
32233for ac_file in $ac_files ''
32234do
32235  test -f "$ac_file" || continue
32236  case $ac_file in
32237    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32238	;;
32239    [ab].out )
32240	# We found the default executable, but exeext='' is most
32241	# certainly right.
32242	break;;
32243    *.* )
32244	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32245	then :; else
32246	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32247	fi
32248	# We set ac_cv_exeext here because the later test for it is not
32249	# safe: cross compilers may not add the suffix if given an `-o'
32250	# argument, so we may need to know it at that point already.
32251	# Even if this section looks crufty: it has the advantage of
32252	# actually working.
32253	break;;
32254    * )
32255	break;;
32256  esac
32257done
32258test "$ac_cv_exeext" = no && ac_cv_exeext=
32259
32260else
32261  ac_file=''
32262fi
32263if test -z "$ac_file"; then :
32264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32265$as_echo "no" >&6; }
32266$as_echo "$as_me: failed program was:" >&5
32267sed 's/^/| /' conftest.$ac_ext >&5
32268
32269{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32271as_fn_error 77 "C compiler cannot create executables
32272See \`config.log' for more details" "$LINENO" 5; }
32273else
32274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32275$as_echo "yes" >&6; }
32276fi
32277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32278$as_echo_n "checking for C compiler default output file name... " >&6; }
32279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32280$as_echo "$ac_file" >&6; }
32281ac_exeext=$ac_cv_exeext
32282
32283rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32284ac_clean_files=$ac_clean_files_save
32285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32286$as_echo_n "checking for suffix of executables... " >&6; }
32287if { { ac_try="$ac_link"
32288case "(($ac_try" in
32289  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32290  *) ac_try_echo=$ac_try;;
32291esac
32292eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32293$as_echo "$ac_try_echo"; } >&5
32294  (eval "$ac_link") 2>&5
32295  ac_status=$?
32296  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32297  test $ac_status = 0; }; then :
32298  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32299# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32300# work properly (i.e., refer to `conftest.exe'), while it won't with
32301# `rm'.
32302for ac_file in conftest.exe conftest conftest.*; do
32303  test -f "$ac_file" || continue
32304  case $ac_file in
32305    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32306    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32307	  break;;
32308    * ) break;;
32309  esac
32310done
32311else
32312  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32313$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32314as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32315See \`config.log' for more details" "$LINENO" 5; }
32316fi
32317rm -f conftest conftest$ac_cv_exeext
32318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32319$as_echo "$ac_cv_exeext" >&6; }
32320
32321rm -f conftest.$ac_ext
32322EXEEXT=$ac_cv_exeext
32323ac_exeext=$EXEEXT
32324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32325/* end confdefs.h.  */
32326#include <stdio.h>
32327int
32328main ()
32329{
32330FILE *f = fopen ("conftest.out", "w");
32331 return ferror (f) || fclose (f) != 0;
32332
32333  ;
32334  return 0;
32335}
32336_ACEOF
32337ac_clean_files="$ac_clean_files conftest.out"
32338# Check that the compiler produces executables we can run.  If not, either
32339# the compiler is broken, or we cross compile.
32340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32341$as_echo_n "checking whether we are cross compiling... " >&6; }
32342if test "$cross_compiling" != yes; then
32343  { { ac_try="$ac_link"
32344case "(($ac_try" in
32345  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32346  *) ac_try_echo=$ac_try;;
32347esac
32348eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32349$as_echo "$ac_try_echo"; } >&5
32350  (eval "$ac_link") 2>&5
32351  ac_status=$?
32352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32353  test $ac_status = 0; }
32354  if { ac_try='./conftest$ac_cv_exeext'
32355  { { case "(($ac_try" in
32356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32357  *) ac_try_echo=$ac_try;;
32358esac
32359eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32360$as_echo "$ac_try_echo"; } >&5
32361  (eval "$ac_try") 2>&5
32362  ac_status=$?
32363  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32364  test $ac_status = 0; }; }; then
32365    cross_compiling=no
32366  else
32367    if test "$cross_compiling" = maybe; then
32368	cross_compiling=yes
32369    else
32370	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32371$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32372as_fn_error $? "cannot run C compiled programs.
32373If you meant to cross compile, use \`--host'.
32374See \`config.log' for more details" "$LINENO" 5; }
32375    fi
32376  fi
32377fi
32378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32379$as_echo "$cross_compiling" >&6; }
32380
32381rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32382ac_clean_files=$ac_clean_files_save
32383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32384$as_echo_n "checking for suffix of object files... " >&6; }
32385if ${ac_cv_objext+:} false; then :
32386  $as_echo_n "(cached) " >&6
32387else
32388  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32389/* end confdefs.h.  */
32390
32391int
32392main ()
32393{
32394
32395  ;
32396  return 0;
32397}
32398_ACEOF
32399rm -f conftest.o conftest.obj
32400if { { ac_try="$ac_compile"
32401case "(($ac_try" in
32402  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32403  *) ac_try_echo=$ac_try;;
32404esac
32405eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32406$as_echo "$ac_try_echo"; } >&5
32407  (eval "$ac_compile") 2>&5
32408  ac_status=$?
32409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32410  test $ac_status = 0; }; then :
32411  for ac_file in conftest.o conftest.obj conftest.*; do
32412  test -f "$ac_file" || continue;
32413  case $ac_file in
32414    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32415    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32416       break;;
32417  esac
32418done
32419else
32420  $as_echo "$as_me: failed program was:" >&5
32421sed 's/^/| /' conftest.$ac_ext >&5
32422
32423{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32425as_fn_error $? "cannot compute suffix of object files: cannot compile
32426See \`config.log' for more details" "$LINENO" 5; }
32427fi
32428rm -f conftest.$ac_cv_objext conftest.$ac_ext
32429fi
32430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32431$as_echo "$ac_cv_objext" >&6; }
32432OBJEXT=$ac_cv_objext
32433ac_objext=$OBJEXT
32434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32435$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32436if ${ac_cv_c_compiler_gnu+:} false; then :
32437  $as_echo_n "(cached) " >&6
32438else
32439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32440/* end confdefs.h.  */
32441
32442int
32443main ()
32444{
32445#ifndef __GNUC__
32446       choke me
32447#endif
32448
32449  ;
32450  return 0;
32451}
32452_ACEOF
32453if ac_fn_c_try_compile "$LINENO"; then :
32454  ac_compiler_gnu=yes
32455else
32456  ac_compiler_gnu=no
32457fi
32458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32459ac_cv_c_compiler_gnu=$ac_compiler_gnu
32460
32461fi
32462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32463$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32464if test $ac_compiler_gnu = yes; then
32465  GCC=yes
32466else
32467  GCC=
32468fi
32469ac_test_CFLAGS=${CFLAGS+set}
32470ac_save_CFLAGS=$CFLAGS
32471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32472$as_echo_n "checking whether $CC accepts -g... " >&6; }
32473if ${ac_cv_prog_cc_g+:} false; then :
32474  $as_echo_n "(cached) " >&6
32475else
32476  ac_save_c_werror_flag=$ac_c_werror_flag
32477   ac_c_werror_flag=yes
32478   ac_cv_prog_cc_g=no
32479   CFLAGS="-g"
32480   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32481/* end confdefs.h.  */
32482
32483int
32484main ()
32485{
32486
32487  ;
32488  return 0;
32489}
32490_ACEOF
32491if ac_fn_c_try_compile "$LINENO"; then :
32492  ac_cv_prog_cc_g=yes
32493else
32494  CFLAGS=""
32495      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32496/* end confdefs.h.  */
32497
32498int
32499main ()
32500{
32501
32502  ;
32503  return 0;
32504}
32505_ACEOF
32506if ac_fn_c_try_compile "$LINENO"; then :
32507
32508else
32509  ac_c_werror_flag=$ac_save_c_werror_flag
32510	 CFLAGS="-g"
32511	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32512/* end confdefs.h.  */
32513
32514int
32515main ()
32516{
32517
32518  ;
32519  return 0;
32520}
32521_ACEOF
32522if ac_fn_c_try_compile "$LINENO"; then :
32523  ac_cv_prog_cc_g=yes
32524fi
32525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32526fi
32527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32528fi
32529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32530   ac_c_werror_flag=$ac_save_c_werror_flag
32531fi
32532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32533$as_echo "$ac_cv_prog_cc_g" >&6; }
32534if test "$ac_test_CFLAGS" = set; then
32535  CFLAGS=$ac_save_CFLAGS
32536elif test $ac_cv_prog_cc_g = yes; then
32537  if test "$GCC" = yes; then
32538    CFLAGS="-g -O2"
32539  else
32540    CFLAGS="-g"
32541  fi
32542else
32543  if test "$GCC" = yes; then
32544    CFLAGS="-O2"
32545  else
32546    CFLAGS=
32547  fi
32548fi
32549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32550$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32551if ${ac_cv_prog_cc_c89+:} false; then :
32552  $as_echo_n "(cached) " >&6
32553else
32554  ac_cv_prog_cc_c89=no
32555ac_save_CC=$CC
32556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32557/* end confdefs.h.  */
32558#include <stdarg.h>
32559#include <stdio.h>
32560struct stat;
32561/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32562struct buf { int x; };
32563FILE * (*rcsopen) (struct buf *, struct stat *, int);
32564static char *e (p, i)
32565     char **p;
32566     int i;
32567{
32568  return p[i];
32569}
32570static char *f (char * (*g) (char **, int), char **p, ...)
32571{
32572  char *s;
32573  va_list v;
32574  va_start (v,p);
32575  s = g (p, va_arg (v,int));
32576  va_end (v);
32577  return s;
32578}
32579
32580/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32581   function prototypes and stuff, but not '\xHH' hex character constants.
32582   These don't provoke an error unfortunately, instead are silently treated
32583   as 'x'.  The following induces an error, until -std is added to get
32584   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32585   array size at least.  It's necessary to write '\x00'==0 to get something
32586   that's true only with -std.  */
32587int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32588
32589/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32590   inside strings and character constants.  */
32591#define FOO(x) 'x'
32592int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32593
32594int test (int i, double x);
32595struct s1 {int (*f) (int a);};
32596struct s2 {int (*f) (double a);};
32597int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32598int argc;
32599char **argv;
32600int
32601main ()
32602{
32603return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32604  ;
32605  return 0;
32606}
32607_ACEOF
32608for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32609	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32610do
32611  CC="$ac_save_CC $ac_arg"
32612  if ac_fn_c_try_compile "$LINENO"; then :
32613  ac_cv_prog_cc_c89=$ac_arg
32614fi
32615rm -f core conftest.err conftest.$ac_objext
32616  test "x$ac_cv_prog_cc_c89" != "xno" && break
32617done
32618rm -f conftest.$ac_ext
32619CC=$ac_save_CC
32620
32621fi
32622# AC_CACHE_VAL
32623case "x$ac_cv_prog_cc_c89" in
32624  x)
32625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32626$as_echo "none needed" >&6; } ;;
32627  xno)
32628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32629$as_echo "unsupported" >&6; } ;;
32630  *)
32631    CC="$CC $ac_cv_prog_cc_c89"
32632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32633$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32634esac
32635if test "x$ac_cv_prog_cc_c89" != xno; then :
32636
32637fi
32638
32639ac_ext=cpp
32640ac_cpp='$CXXCPP $CPPFLAGS'
32641ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32642ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32643ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32644
32645
32646
32647  COMPILER_NAME=C++
32648  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32649
32650  if test "x$CXX" != x; then
32651    # User has supplied compiler name already, always let that override.
32652    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32653$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32654    if test "x`basename $CXX`" = "x$CXX"; then
32655      # A command without a complete path is provided, search $PATH.
32656
32657      for ac_prog in $CXX
32658do
32659  # Extract the first word of "$ac_prog", so it can be a program name with args.
32660set dummy $ac_prog; ac_word=$2
32661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32662$as_echo_n "checking for $ac_word... " >&6; }
32663if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32664  $as_echo_n "(cached) " >&6
32665else
32666  case $POTENTIAL_CXX in
32667  [\\/]* | ?:[\\/]*)
32668  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32669  ;;
32670  *)
32671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32672for as_dir in $PATH
32673do
32674  IFS=$as_save_IFS
32675  test -z "$as_dir" && as_dir=.
32676    for ac_exec_ext in '' $ac_executable_extensions; do
32677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32678    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32680    break 2
32681  fi
32682done
32683  done
32684IFS=$as_save_IFS
32685
32686  ;;
32687esac
32688fi
32689POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32690if test -n "$POTENTIAL_CXX"; then
32691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32692$as_echo "$POTENTIAL_CXX" >&6; }
32693else
32694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32695$as_echo "no" >&6; }
32696fi
32697
32698
32699  test -n "$POTENTIAL_CXX" && break
32700done
32701
32702      if test "x$POTENTIAL_CXX" != x; then
32703        CXX=$POTENTIAL_CXX
32704      else
32705        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32706      fi
32707    else
32708      # Otherwise it might already be a complete path
32709      if test ! -x "$CXX"; then
32710        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32711      fi
32712    fi
32713  else
32714    # No user supplied value. Locate compiler ourselves.
32715
32716    # If we are cross compiling, assume cross compilation tools follows the
32717    # cross compilation standard where they are prefixed with the autoconf
32718    # standard name for the target. For example the binary
32719    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32720    # If we are not cross compiling, then the default compiler name will be
32721    # used.
32722
32723    CXX=
32724    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32725    # before checking the rest of the PATH.
32726    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32727    # step, this should not be necessary.
32728    if test -n "$TOOLCHAIN_PATH"; then
32729      PATH_save="$PATH"
32730      PATH="$TOOLCHAIN_PATH"
32731      for ac_prog in $SEARCH_LIST
32732do
32733  # Extract the first word of "$ac_prog", so it can be a program name with args.
32734set dummy $ac_prog; ac_word=$2
32735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32736$as_echo_n "checking for $ac_word... " >&6; }
32737if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32738  $as_echo_n "(cached) " >&6
32739else
32740  case $TOOLCHAIN_PATH_CXX in
32741  [\\/]* | ?:[\\/]*)
32742  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32743  ;;
32744  *)
32745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32746for as_dir in $PATH
32747do
32748  IFS=$as_save_IFS
32749  test -z "$as_dir" && as_dir=.
32750    for ac_exec_ext in '' $ac_executable_extensions; do
32751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32752    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32754    break 2
32755  fi
32756done
32757  done
32758IFS=$as_save_IFS
32759
32760  ;;
32761esac
32762fi
32763TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32764if test -n "$TOOLCHAIN_PATH_CXX"; then
32765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32766$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32767else
32768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32769$as_echo "no" >&6; }
32770fi
32771
32772
32773  test -n "$TOOLCHAIN_PATH_CXX" && break
32774done
32775
32776      CXX=$TOOLCHAIN_PATH_CXX
32777      PATH="$PATH_save"
32778    fi
32779
32780    # AC_PATH_PROGS can't be run multiple times with the same variable,
32781    # so create a new name for this run.
32782    if test "x$CXX" = x; then
32783      for ac_prog in $SEARCH_LIST
32784do
32785  # Extract the first word of "$ac_prog", so it can be a program name with args.
32786set dummy $ac_prog; ac_word=$2
32787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32788$as_echo_n "checking for $ac_word... " >&6; }
32789if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32790  $as_echo_n "(cached) " >&6
32791else
32792  case $POTENTIAL_CXX in
32793  [\\/]* | ?:[\\/]*)
32794  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32795  ;;
32796  *)
32797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32798for as_dir in $PATH
32799do
32800  IFS=$as_save_IFS
32801  test -z "$as_dir" && as_dir=.
32802    for ac_exec_ext in '' $ac_executable_extensions; do
32803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32804    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32806    break 2
32807  fi
32808done
32809  done
32810IFS=$as_save_IFS
32811
32812  ;;
32813esac
32814fi
32815POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32816if test -n "$POTENTIAL_CXX"; then
32817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32818$as_echo "$POTENTIAL_CXX" >&6; }
32819else
32820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32821$as_echo "no" >&6; }
32822fi
32823
32824
32825  test -n "$POTENTIAL_CXX" && break
32826done
32827
32828      CXX=$POTENTIAL_CXX
32829    fi
32830
32831    if test "x$CXX" = x; then
32832
32833  # Print a helpful message on how to acquire the necessary build dependency.
32834  # devkit is the help tag: freetype, cups, alsa etc
32835  MISSING_DEPENDENCY=devkit
32836
32837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32838    cygwin_help $MISSING_DEPENDENCY
32839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32840    msys_help $MISSING_DEPENDENCY
32841  else
32842    PKGHANDLER_COMMAND=
32843
32844    case $PKGHANDLER in
32845      apt-get)
32846        apt_help     $MISSING_DEPENDENCY ;;
32847      yum)
32848        yum_help     $MISSING_DEPENDENCY ;;
32849      port)
32850        port_help    $MISSING_DEPENDENCY ;;
32851      pkgutil)
32852        pkgutil_help $MISSING_DEPENDENCY ;;
32853      pkgadd)
32854        pkgadd_help  $MISSING_DEPENDENCY ;;
32855    esac
32856
32857    if test "x$PKGHANDLER_COMMAND" != x; then
32858      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32859    fi
32860  fi
32861
32862      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32863    fi
32864  fi
32865
32866  # Now we have a compiler binary in CXX. Make sure it's okay.
32867
32868  # Only process if variable expands to non-empty
32869
32870  if test "x$CXX" != x; then
32871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32872
32873  # First separate the path from the arguments. This will split at the first
32874  # space.
32875  complete="$CXX"
32876  path="${complete%% *}"
32877  tmp="$complete EOL"
32878  arguments="${tmp#* }"
32879
32880  # Input might be given as Windows format, start by converting to
32881  # unix format.
32882  new_path=`$CYGPATH -u "$path"`
32883
32884  # Now try to locate executable using which
32885  new_path=`$WHICH "$new_path" 2> /dev/null`
32886  # bat and cmd files are not always considered executable in cygwin causing which
32887  # to not find them
32888  if test "x$new_path" = x \
32889      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32890      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32891    new_path=`$CYGPATH -u "$path"`
32892  fi
32893  if test "x$new_path" = x; then
32894    # Oops. Which didn't find the executable.
32895    # The splitting of arguments from the executable at a space might have been incorrect,
32896    # since paths with space are more likely in Windows. Give it another try with the whole
32897    # argument.
32898    path="$complete"
32899    arguments="EOL"
32900    new_path=`$CYGPATH -u "$path"`
32901    new_path=`$WHICH "$new_path" 2> /dev/null`
32902    # bat and cmd files are not always considered executable in cygwin causing which
32903    # to not find them
32904    if test "x$new_path" = x \
32905        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32906        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32907      new_path=`$CYGPATH -u "$path"`
32908    fi
32909    if test "x$new_path" = x; then
32910      # It's still not found. Now this is an unrecoverable error.
32911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32912$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32913      has_space=`$ECHO "$complete" | $GREP " "`
32914      if test "x$has_space" != x; then
32915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32917      fi
32918      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32919    fi
32920  fi
32921
32922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32925  # "foo.exe" is OK but "foo" is an error.
32926  #
32927  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32928  # It is also a way to make sure we got the proper file name for the real test later on.
32929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32930  if test "x$test_shortpath" = x; then
32931    # Short path failed, file does not exist as specified.
32932    # Try adding .exe or .cmd
32933    if test -f "${new_path}.exe"; then
32934      input_to_shortpath="${new_path}.exe"
32935    elif test -f "${new_path}.cmd"; then
32936      input_to_shortpath="${new_path}.cmd"
32937    else
32938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32939$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32940      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32941$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32942      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32943    fi
32944  else
32945    input_to_shortpath="$new_path"
32946  fi
32947
32948  # Call helper function which possibly converts this using DOS-style short mode.
32949  # If so, the updated path is stored in $new_path.
32950  new_path="$input_to_shortpath"
32951
32952  input_path="$input_to_shortpath"
32953  # Check if we need to convert this using DOS-style short mode. If the path
32954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32955  # take no chances and rewrite it.
32956  # Note: m4 eats our [], so we need to use [ and ] instead.
32957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32958  if test "x$has_forbidden_chars" != x; then
32959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32963      # Going to short mode and back again did indeed matter. Since short mode is
32964      # case insensitive, let's make it lowercase to improve readability.
32965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32966      # Now convert it back to Unix-style (cygpath)
32967      input_path=`$CYGPATH -u "$shortmode_path"`
32968      new_path="$input_path"
32969    fi
32970  fi
32971
32972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32973  if test "x$test_cygdrive_prefix" = x; then
32974    # As a simple fix, exclude /usr/bin since it's not a real path.
32975    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32977      # a path prefixed by /cygdrive for fixpath to work.
32978      new_path="$CYGWIN_ROOT_PATH$input_path"
32979    fi
32980  fi
32981
32982  # remove trailing .exe if any
32983  new_path="${new_path/%.exe/}"
32984
32985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32986
32987  # First separate the path from the arguments. This will split at the first
32988  # space.
32989  complete="$CXX"
32990  path="${complete%% *}"
32991  tmp="$complete EOL"
32992  arguments="${tmp#* }"
32993
32994  # Input might be given as Windows format, start by converting to
32995  # unix format.
32996  new_path="$path"
32997
32998  windows_path="$new_path"
32999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33000    unix_path=`$CYGPATH -u "$windows_path"`
33001    new_path="$unix_path"
33002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33004    new_path="$unix_path"
33005  fi
33006
33007
33008  # Now try to locate executable using which
33009  new_path=`$WHICH "$new_path" 2> /dev/null`
33010
33011  if test "x$new_path" = x; then
33012    # Oops. Which didn't find the executable.
33013    # The splitting of arguments from the executable at a space might have been incorrect,
33014    # since paths with space are more likely in Windows. Give it another try with the whole
33015    # argument.
33016    path="$complete"
33017    arguments="EOL"
33018    new_path="$path"
33019
33020  windows_path="$new_path"
33021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33022    unix_path=`$CYGPATH -u "$windows_path"`
33023    new_path="$unix_path"
33024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33026    new_path="$unix_path"
33027  fi
33028
33029
33030    new_path=`$WHICH "$new_path" 2> /dev/null`
33031    # bat and cmd files are not always considered executable in MSYS causing which
33032    # to not find them
33033    if test "x$new_path" = x \
33034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33036      new_path="$path"
33037
33038  windows_path="$new_path"
33039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33040    unix_path=`$CYGPATH -u "$windows_path"`
33041    new_path="$unix_path"
33042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33044    new_path="$unix_path"
33045  fi
33046
33047    fi
33048
33049    if test "x$new_path" = x; then
33050      # It's still not found. Now this is an unrecoverable error.
33051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33052$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33053      has_space=`$ECHO "$complete" | $GREP " "`
33054      if test "x$has_space" != x; then
33055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33057      fi
33058      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33059    fi
33060  fi
33061
33062  # Now new_path has a complete unix path to the binary
33063  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33064    # Keep paths in /bin as-is, but remove trailing .exe if any
33065    new_path="${new_path/%.exe/}"
33066    # Do not save /bin paths to all_fixpath_prefixes!
33067  else
33068    # Not in mixed or Windows style, start by that.
33069    new_path=`cmd //c echo $new_path`
33070
33071  input_path="$new_path"
33072  # Check if we need to convert this using DOS-style short mode. If the path
33073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33074  # take no chances and rewrite it.
33075  # Note: m4 eats our [], so we need to use [ and ] instead.
33076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33077  if test "x$has_forbidden_chars" != x; then
33078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33080  fi
33081
33082    # Output is in $new_path
33083
33084  windows_path="$new_path"
33085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33086    unix_path=`$CYGPATH -u "$windows_path"`
33087    new_path="$unix_path"
33088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33090    new_path="$unix_path"
33091  fi
33092
33093    # remove trailing .exe if any
33094    new_path="${new_path/%.exe/}"
33095
33096    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33097    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33098  fi
33099
33100    else
33101      # We're on a unix platform. Hooray! :)
33102      # First separate the path from the arguments. This will split at the first
33103      # space.
33104      complete="$CXX"
33105      path="${complete%% *}"
33106      tmp="$complete EOL"
33107      arguments="${tmp#* }"
33108
33109      # Cannot rely on the command "which" here since it doesn't always work.
33110      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33111      if test -z "$is_absolute_path"; then
33112        # Path to executable is not absolute. Find it.
33113        IFS_save="$IFS"
33114        IFS=:
33115        for p in $PATH; do
33116          if test -f "$p/$path" && test -x "$p/$path"; then
33117            new_path="$p/$path"
33118            break
33119          fi
33120        done
33121        IFS="$IFS_save"
33122      else
33123        # This is an absolute path, we can use it without further modifications.
33124        new_path="$path"
33125      fi
33126
33127      if test "x$new_path" = x; then
33128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33129$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33130        has_space=`$ECHO "$complete" | $GREP " "`
33131        if test "x$has_space" != x; then
33132          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33134        fi
33135        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33136      fi
33137    fi
33138
33139    # Now join together the path and the arguments once again
33140    if test "x$arguments" != xEOL; then
33141      new_complete="$new_path ${arguments% *}"
33142    else
33143      new_complete="$new_path"
33144    fi
33145
33146    if test "x$complete" != "x$new_complete"; then
33147      CXX="$new_complete"
33148      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33149$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33150    fi
33151  fi
33152
33153  TEST_COMPILER="$CXX"
33154  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33155  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33156  if test "x$OPENJDK_BUILD_OS" != xaix; then
33157    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33159$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33160
33161  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33162    # Follow a chain of symbolic links. Use readlink
33163    # where it exists, else fall back to horribly
33164    # complicated shell code.
33165    if test "x$READLINK_TESTED" != yes; then
33166      # On MacOSX there is a readlink tool with a different
33167      # purpose than the GNU readlink tool. Check the found readlink.
33168      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33169      if test "x$ISGNU" = x; then
33170        # A readlink that we do not know how to use.
33171        # Are there other non-GNU readlinks out there?
33172        READLINK_TESTED=yes
33173        READLINK=
33174      fi
33175    fi
33176
33177    if test "x$READLINK" != x; then
33178      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33179    else
33180      # Save the current directory for restoring afterwards
33181      STARTDIR=$PWD
33182      COUNTER=0
33183      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33184      sym_link_file=`$BASENAME $TEST_COMPILER`
33185      cd $sym_link_dir
33186      # Use -P flag to resolve symlinks in directories.
33187      cd `$THEPWDCMD -P`
33188      sym_link_dir=`$THEPWDCMD -P`
33189      # Resolve file symlinks
33190      while test $COUNTER -lt 20; do
33191        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33192        if test "x$ISLINK" == x; then
33193          # This is not a symbolic link! We are done!
33194          break
33195        fi
33196        # Again resolve directory symlinks since the target of the just found
33197        # link could be in a different directory
33198        cd `$DIRNAME $ISLINK`
33199        sym_link_dir=`$THEPWDCMD -P`
33200        sym_link_file=`$BASENAME $ISLINK`
33201        let COUNTER=COUNTER+1
33202      done
33203      cd $STARTDIR
33204      TEST_COMPILER=$sym_link_dir/$sym_link_file
33205    fi
33206  fi
33207
33208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33209$as_echo "$TEST_COMPILER" >&6; }
33210  fi
33211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33212$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33213
33214  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33215  if test "x$COMPILER_BASENAME" = "xccache"; then
33216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33217$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33218    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33219    # We want to control ccache invocation ourselves, so ignore this cc and try
33220    # searching again.
33221
33222    # Remove the path to the fake ccache cc from the PATH
33223    RETRY_COMPILER_SAVED_PATH="$PATH"
33224    COMPILER_DIRNAME=`$DIRNAME $CXX`
33225    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33226
33227    # Try again looking for our compiler
33228    if test -n "$ac_tool_prefix"; then
33229  for ac_prog in $TOOLCHAIN_CXX_BINARY
33230  do
33231    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33232set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33234$as_echo_n "checking for $ac_word... " >&6; }
33235if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33236  $as_echo_n "(cached) " >&6
33237else
33238  if test -n "$PROPER_COMPILER_CXX"; then
33239  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33240else
33241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33242for as_dir in $PATH
33243do
33244  IFS=$as_save_IFS
33245  test -z "$as_dir" && as_dir=.
33246    for ac_exec_ext in '' $ac_executable_extensions; do
33247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33248    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33250    break 2
33251  fi
33252done
33253  done
33254IFS=$as_save_IFS
33255
33256fi
33257fi
33258PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33259if test -n "$PROPER_COMPILER_CXX"; then
33260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33261$as_echo "$PROPER_COMPILER_CXX" >&6; }
33262else
33263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33264$as_echo "no" >&6; }
33265fi
33266
33267
33268    test -n "$PROPER_COMPILER_CXX" && break
33269  done
33270fi
33271if test -z "$PROPER_COMPILER_CXX"; then
33272  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33273  for ac_prog in $TOOLCHAIN_CXX_BINARY
33274do
33275  # Extract the first word of "$ac_prog", so it can be a program name with args.
33276set dummy $ac_prog; ac_word=$2
33277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33278$as_echo_n "checking for $ac_word... " >&6; }
33279if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33280  $as_echo_n "(cached) " >&6
33281else
33282  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33283  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33284else
33285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33286for as_dir in $PATH
33287do
33288  IFS=$as_save_IFS
33289  test -z "$as_dir" && as_dir=.
33290    for ac_exec_ext in '' $ac_executable_extensions; do
33291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33292    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33294    break 2
33295  fi
33296done
33297  done
33298IFS=$as_save_IFS
33299
33300fi
33301fi
33302ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33303if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33305$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33306else
33307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33308$as_echo "no" >&6; }
33309fi
33310
33311
33312  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33313done
33314
33315  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33316    PROPER_COMPILER_CXX=""
33317  else
33318    case $cross_compiling:$ac_tool_warned in
33319yes:)
33320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33322ac_tool_warned=yes ;;
33323esac
33324    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33325  fi
33326fi
33327
33328
33329  # Only process if variable expands to non-empty
33330
33331  if test "x$PROPER_COMPILER_CXX" != x; then
33332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33333
33334  # First separate the path from the arguments. This will split at the first
33335  # space.
33336  complete="$PROPER_COMPILER_CXX"
33337  path="${complete%% *}"
33338  tmp="$complete EOL"
33339  arguments="${tmp#* }"
33340
33341  # Input might be given as Windows format, start by converting to
33342  # unix format.
33343  new_path=`$CYGPATH -u "$path"`
33344
33345  # Now try to locate executable using which
33346  new_path=`$WHICH "$new_path" 2> /dev/null`
33347  # bat and cmd files are not always considered executable in cygwin causing which
33348  # to not find them
33349  if test "x$new_path" = x \
33350      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33351      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33352    new_path=`$CYGPATH -u "$path"`
33353  fi
33354  if test "x$new_path" = x; then
33355    # Oops. Which didn't find the executable.
33356    # The splitting of arguments from the executable at a space might have been incorrect,
33357    # since paths with space are more likely in Windows. Give it another try with the whole
33358    # argument.
33359    path="$complete"
33360    arguments="EOL"
33361    new_path=`$CYGPATH -u "$path"`
33362    new_path=`$WHICH "$new_path" 2> /dev/null`
33363    # bat and cmd files are not always considered executable in cygwin causing which
33364    # to not find them
33365    if test "x$new_path" = x \
33366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33368      new_path=`$CYGPATH -u "$path"`
33369    fi
33370    if test "x$new_path" = x; then
33371      # It's still not found. Now this is an unrecoverable error.
33372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33373$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33374      has_space=`$ECHO "$complete" | $GREP " "`
33375      if test "x$has_space" != x; then
33376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33378      fi
33379      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33380    fi
33381  fi
33382
33383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33386  # "foo.exe" is OK but "foo" is an error.
33387  #
33388  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33389  # It is also a way to make sure we got the proper file name for the real test later on.
33390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33391  if test "x$test_shortpath" = x; then
33392    # Short path failed, file does not exist as specified.
33393    # Try adding .exe or .cmd
33394    if test -f "${new_path}.exe"; then
33395      input_to_shortpath="${new_path}.exe"
33396    elif test -f "${new_path}.cmd"; then
33397      input_to_shortpath="${new_path}.cmd"
33398    else
33399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33400$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33403      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33404    fi
33405  else
33406    input_to_shortpath="$new_path"
33407  fi
33408
33409  # Call helper function which possibly converts this using DOS-style short mode.
33410  # If so, the updated path is stored in $new_path.
33411  new_path="$input_to_shortpath"
33412
33413  input_path="$input_to_shortpath"
33414  # Check if we need to convert this using DOS-style short mode. If the path
33415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33416  # take no chances and rewrite it.
33417  # Note: m4 eats our [], so we need to use [ and ] instead.
33418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33419  if test "x$has_forbidden_chars" != x; then
33420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33424      # Going to short mode and back again did indeed matter. Since short mode is
33425      # case insensitive, let's make it lowercase to improve readability.
33426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33427      # Now convert it back to Unix-style (cygpath)
33428      input_path=`$CYGPATH -u "$shortmode_path"`
33429      new_path="$input_path"
33430    fi
33431  fi
33432
33433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33434  if test "x$test_cygdrive_prefix" = x; then
33435    # As a simple fix, exclude /usr/bin since it's not a real path.
33436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33438      # a path prefixed by /cygdrive for fixpath to work.
33439      new_path="$CYGWIN_ROOT_PATH$input_path"
33440    fi
33441  fi
33442
33443  # remove trailing .exe if any
33444  new_path="${new_path/%.exe/}"
33445
33446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33447
33448  # First separate the path from the arguments. This will split at the first
33449  # space.
33450  complete="$PROPER_COMPILER_CXX"
33451  path="${complete%% *}"
33452  tmp="$complete EOL"
33453  arguments="${tmp#* }"
33454
33455  # Input might be given as Windows format, start by converting to
33456  # unix format.
33457  new_path="$path"
33458
33459  windows_path="$new_path"
33460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33461    unix_path=`$CYGPATH -u "$windows_path"`
33462    new_path="$unix_path"
33463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33465    new_path="$unix_path"
33466  fi
33467
33468
33469  # Now try to locate executable using which
33470  new_path=`$WHICH "$new_path" 2> /dev/null`
33471
33472  if test "x$new_path" = x; then
33473    # Oops. Which didn't find the executable.
33474    # The splitting of arguments from the executable at a space might have been incorrect,
33475    # since paths with space are more likely in Windows. Give it another try with the whole
33476    # argument.
33477    path="$complete"
33478    arguments="EOL"
33479    new_path="$path"
33480
33481  windows_path="$new_path"
33482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33483    unix_path=`$CYGPATH -u "$windows_path"`
33484    new_path="$unix_path"
33485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33487    new_path="$unix_path"
33488  fi
33489
33490
33491    new_path=`$WHICH "$new_path" 2> /dev/null`
33492    # bat and cmd files are not always considered executable in MSYS causing which
33493    # to not find them
33494    if test "x$new_path" = x \
33495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33497      new_path="$path"
33498
33499  windows_path="$new_path"
33500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33501    unix_path=`$CYGPATH -u "$windows_path"`
33502    new_path="$unix_path"
33503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33505    new_path="$unix_path"
33506  fi
33507
33508    fi
33509
33510    if test "x$new_path" = x; then
33511      # It's still not found. Now this is an unrecoverable error.
33512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33513$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33514      has_space=`$ECHO "$complete" | $GREP " "`
33515      if test "x$has_space" != x; then
33516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33518      fi
33519      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33520    fi
33521  fi
33522
33523  # Now new_path has a complete unix path to the binary
33524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33525    # Keep paths in /bin as-is, but remove trailing .exe if any
33526    new_path="${new_path/%.exe/}"
33527    # Do not save /bin paths to all_fixpath_prefixes!
33528  else
33529    # Not in mixed or Windows style, start by that.
33530    new_path=`cmd //c echo $new_path`
33531
33532  input_path="$new_path"
33533  # Check if we need to convert this using DOS-style short mode. If the path
33534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33535  # take no chances and rewrite it.
33536  # Note: m4 eats our [], so we need to use [ and ] instead.
33537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33538  if test "x$has_forbidden_chars" != x; then
33539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33541  fi
33542
33543    # Output is in $new_path
33544
33545  windows_path="$new_path"
33546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33547    unix_path=`$CYGPATH -u "$windows_path"`
33548    new_path="$unix_path"
33549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33551    new_path="$unix_path"
33552  fi
33553
33554    # remove trailing .exe if any
33555    new_path="${new_path/%.exe/}"
33556
33557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33559  fi
33560
33561    else
33562      # We're on a unix platform. Hooray! :)
33563      # First separate the path from the arguments. This will split at the first
33564      # space.
33565      complete="$PROPER_COMPILER_CXX"
33566      path="${complete%% *}"
33567      tmp="$complete EOL"
33568      arguments="${tmp#* }"
33569
33570      # Cannot rely on the command "which" here since it doesn't always work.
33571      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33572      if test -z "$is_absolute_path"; then
33573        # Path to executable is not absolute. Find it.
33574        IFS_save="$IFS"
33575        IFS=:
33576        for p in $PATH; do
33577          if test -f "$p/$path" && test -x "$p/$path"; then
33578            new_path="$p/$path"
33579            break
33580          fi
33581        done
33582        IFS="$IFS_save"
33583      else
33584        # This is an absolute path, we can use it without further modifications.
33585        new_path="$path"
33586      fi
33587
33588      if test "x$new_path" = x; then
33589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33590$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33591        has_space=`$ECHO "$complete" | $GREP " "`
33592        if test "x$has_space" != x; then
33593          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33594$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33595        fi
33596        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33597      fi
33598    fi
33599
33600    # Now join together the path and the arguments once again
33601    if test "x$arguments" != xEOL; then
33602      new_complete="$new_path ${arguments% *}"
33603    else
33604      new_complete="$new_path"
33605    fi
33606
33607    if test "x$complete" != "x$new_complete"; then
33608      PROPER_COMPILER_CXX="$new_complete"
33609      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33610$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33611    fi
33612  fi
33613
33614    PATH="$RETRY_COMPILER_SAVED_PATH"
33615
33616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33617$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33618
33619  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33620    # Follow a chain of symbolic links. Use readlink
33621    # where it exists, else fall back to horribly
33622    # complicated shell code.
33623    if test "x$READLINK_TESTED" != yes; then
33624      # On MacOSX there is a readlink tool with a different
33625      # purpose than the GNU readlink tool. Check the found readlink.
33626      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33627      if test "x$ISGNU" = x; then
33628        # A readlink that we do not know how to use.
33629        # Are there other non-GNU readlinks out there?
33630        READLINK_TESTED=yes
33631        READLINK=
33632      fi
33633    fi
33634
33635    if test "x$READLINK" != x; then
33636      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33637    else
33638      # Save the current directory for restoring afterwards
33639      STARTDIR=$PWD
33640      COUNTER=0
33641      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33642      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33643      cd $sym_link_dir
33644      # Use -P flag to resolve symlinks in directories.
33645      cd `$THEPWDCMD -P`
33646      sym_link_dir=`$THEPWDCMD -P`
33647      # Resolve file symlinks
33648      while test $COUNTER -lt 20; do
33649        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33650        if test "x$ISLINK" == x; then
33651          # This is not a symbolic link! We are done!
33652          break
33653        fi
33654        # Again resolve directory symlinks since the target of the just found
33655        # link could be in a different directory
33656        cd `$DIRNAME $ISLINK`
33657        sym_link_dir=`$THEPWDCMD -P`
33658        sym_link_file=`$BASENAME $ISLINK`
33659        let COUNTER=COUNTER+1
33660      done
33661      cd $STARTDIR
33662      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33663    fi
33664  fi
33665
33666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33667$as_echo "$PROPER_COMPILER_CXX" >&6; }
33668    CXX="$PROPER_COMPILER_CXX"
33669  else
33670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33671$as_echo "no, keeping CXX" >&6; }
33672  fi
33673
33674
33675  COMPILER=$CXX
33676  COMPILER_NAME=$COMPILER_NAME
33677
33678  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33679    # cc -V output typically looks like
33680    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33681    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33682    # Check that this is likely to be the Solaris Studio cc.
33683    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33684    if test $? -ne 0; then
33685      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33686      { $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
33687$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33688      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33689$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33690      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33691$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33692      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33693    fi
33694    # Remove usage instructions (if present), and
33695    # collapse compiler output into a single line
33696    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33697        $SED -e 's/ *[Uu]sage:.*//'`
33698    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33699        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33700  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33701    # xlc -qversion output typically looks like
33702    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33703    #     Version: 11.01.0000.0015
33704    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33705    # Check that this is likely to be the IBM XL C compiler.
33706    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33707    if test $? -ne 0; then
33708      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33709      { $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
33710$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33711      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33712$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33713      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33714$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33715      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33716    fi
33717    # Collapse compiler output into a single line
33718    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33719    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33720        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33721  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33722    # There is no specific version flag, but all output starts with a version string.
33723    # First line typically looks something like:
33724    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33725    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33726    # Check that this is likely to be Microsoft CL.EXE.
33727    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33728    if test $? -ne 0; then
33729      { $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
33730$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33731      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33732$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33733      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33734    fi
33735    # Collapse compiler output into a single line
33736    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33737    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33738        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33739  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33740    # gcc --version output typically looks like
33741    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33742    #     Copyright (C) 2013 Free Software Foundation, Inc.
33743    #     This is free software; see the source for copying conditions.  There is NO
33744    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33745    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33746    # Check that this is likely to be GCC.
33747    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33748    if test $? -ne 0; then
33749      { $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
33750$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33751      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33752$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33753      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33754    fi
33755    # Remove Copyright and legalese from version string, and
33756    # collapse into a single line
33757    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33758        $SED -e 's/ *Copyright .*//'`
33759    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33760        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33761  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33762    # clang --version output typically looks like
33763    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33764    #    clang version 3.3 (tags/RELEASE_33/final)
33765    # or
33766    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33767    #    Target: x86_64-pc-linux-gnu
33768    #    Thread model: posix
33769    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33770    # Check that this is likely to be clang
33771    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33772    if test $? -ne 0; then
33773      { $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
33774$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33775      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33776$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33777      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33778    fi
33779    # Collapse compiler output into a single line
33780    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33781    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33782        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33783  else
33784      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33785  fi
33786  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33787  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33788  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33789  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33790
33791  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33792$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33793
33794
33795  # Now that we have resolved CXX ourself, let autoconf have its go at it
33796  ac_ext=cpp
33797ac_cpp='$CXXCPP $CPPFLAGS'
33798ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33799ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33800ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33801if test -z "$CXX"; then
33802  if test -n "$CCC"; then
33803    CXX=$CCC
33804  else
33805    if test -n "$ac_tool_prefix"; then
33806  for ac_prog in $CXX
33807  do
33808    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33809set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33811$as_echo_n "checking for $ac_word... " >&6; }
33812if ${ac_cv_prog_CXX+:} false; then :
33813  $as_echo_n "(cached) " >&6
33814else
33815  if test -n "$CXX"; then
33816  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33817else
33818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33819for as_dir in $PATH
33820do
33821  IFS=$as_save_IFS
33822  test -z "$as_dir" && as_dir=.
33823    for ac_exec_ext in '' $ac_executable_extensions; do
33824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33825    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33827    break 2
33828  fi
33829done
33830  done
33831IFS=$as_save_IFS
33832
33833fi
33834fi
33835CXX=$ac_cv_prog_CXX
33836if test -n "$CXX"; then
33837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33838$as_echo "$CXX" >&6; }
33839else
33840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33841$as_echo "no" >&6; }
33842fi
33843
33844
33845    test -n "$CXX" && break
33846  done
33847fi
33848if test -z "$CXX"; then
33849  ac_ct_CXX=$CXX
33850  for ac_prog in $CXX
33851do
33852  # Extract the first word of "$ac_prog", so it can be a program name with args.
33853set dummy $ac_prog; ac_word=$2
33854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33855$as_echo_n "checking for $ac_word... " >&6; }
33856if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33857  $as_echo_n "(cached) " >&6
33858else
33859  if test -n "$ac_ct_CXX"; then
33860  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33861else
33862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33863for as_dir in $PATH
33864do
33865  IFS=$as_save_IFS
33866  test -z "$as_dir" && as_dir=.
33867    for ac_exec_ext in '' $ac_executable_extensions; do
33868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33869    ac_cv_prog_ac_ct_CXX="$ac_prog"
33870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33871    break 2
33872  fi
33873done
33874  done
33875IFS=$as_save_IFS
33876
33877fi
33878fi
33879ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33880if test -n "$ac_ct_CXX"; then
33881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33882$as_echo "$ac_ct_CXX" >&6; }
33883else
33884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33885$as_echo "no" >&6; }
33886fi
33887
33888
33889  test -n "$ac_ct_CXX" && break
33890done
33891
33892  if test "x$ac_ct_CXX" = x; then
33893    CXX="g++"
33894  else
33895    case $cross_compiling:$ac_tool_warned in
33896yes:)
33897{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33898$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33899ac_tool_warned=yes ;;
33900esac
33901    CXX=$ac_ct_CXX
33902  fi
33903fi
33904
33905  fi
33906fi
33907# Provide some information about the compiler.
33908$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33909set X $ac_compile
33910ac_compiler=$2
33911for ac_option in --version -v -V -qversion; do
33912  { { ac_try="$ac_compiler $ac_option >&5"
33913case "(($ac_try" in
33914  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33915  *) ac_try_echo=$ac_try;;
33916esac
33917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33918$as_echo "$ac_try_echo"; } >&5
33919  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33920  ac_status=$?
33921  if test -s conftest.err; then
33922    sed '10a\
33923... rest of stderr output deleted ...
33924         10q' conftest.err >conftest.er1
33925    cat conftest.er1 >&5
33926  fi
33927  rm -f conftest.er1 conftest.err
33928  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33929  test $ac_status = 0; }
33930done
33931
33932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33933$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33934if ${ac_cv_cxx_compiler_gnu+:} false; then :
33935  $as_echo_n "(cached) " >&6
33936else
33937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33938/* end confdefs.h.  */
33939
33940int
33941main ()
33942{
33943#ifndef __GNUC__
33944       choke me
33945#endif
33946
33947  ;
33948  return 0;
33949}
33950_ACEOF
33951if ac_fn_cxx_try_compile "$LINENO"; then :
33952  ac_compiler_gnu=yes
33953else
33954  ac_compiler_gnu=no
33955fi
33956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33957ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33958
33959fi
33960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33961$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33962if test $ac_compiler_gnu = yes; then
33963  GXX=yes
33964else
33965  GXX=
33966fi
33967ac_test_CXXFLAGS=${CXXFLAGS+set}
33968ac_save_CXXFLAGS=$CXXFLAGS
33969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33970$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33971if ${ac_cv_prog_cxx_g+:} false; then :
33972  $as_echo_n "(cached) " >&6
33973else
33974  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33975   ac_cxx_werror_flag=yes
33976   ac_cv_prog_cxx_g=no
33977   CXXFLAGS="-g"
33978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33979/* end confdefs.h.  */
33980
33981int
33982main ()
33983{
33984
33985  ;
33986  return 0;
33987}
33988_ACEOF
33989if ac_fn_cxx_try_compile "$LINENO"; then :
33990  ac_cv_prog_cxx_g=yes
33991else
33992  CXXFLAGS=""
33993      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33994/* end confdefs.h.  */
33995
33996int
33997main ()
33998{
33999
34000  ;
34001  return 0;
34002}
34003_ACEOF
34004if ac_fn_cxx_try_compile "$LINENO"; then :
34005
34006else
34007  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34008	 CXXFLAGS="-g"
34009	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34010/* end confdefs.h.  */
34011
34012int
34013main ()
34014{
34015
34016  ;
34017  return 0;
34018}
34019_ACEOF
34020if ac_fn_cxx_try_compile "$LINENO"; then :
34021  ac_cv_prog_cxx_g=yes
34022fi
34023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34024fi
34025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34026fi
34027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34028   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34029fi
34030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34031$as_echo "$ac_cv_prog_cxx_g" >&6; }
34032if test "$ac_test_CXXFLAGS" = set; then
34033  CXXFLAGS=$ac_save_CXXFLAGS
34034elif test $ac_cv_prog_cxx_g = yes; then
34035  if test "$GXX" = yes; then
34036    CXXFLAGS="-g -O2"
34037  else
34038    CXXFLAGS="-g"
34039  fi
34040else
34041  if test "$GXX" = yes; then
34042    CXXFLAGS="-O2"
34043  else
34044    CXXFLAGS=
34045  fi
34046fi
34047ac_ext=cpp
34048ac_cpp='$CXXCPP $CPPFLAGS'
34049ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34050ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34051ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34052
34053
34054  #
34055  # Setup the preprocessor (CPP and CXXCPP)
34056  #
34057  ac_ext=c
34058ac_cpp='$CPP $CPPFLAGS'
34059ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34060ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34061ac_compiler_gnu=$ac_cv_c_compiler_gnu
34062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34063$as_echo_n "checking how to run the C preprocessor... " >&6; }
34064# On Suns, sometimes $CPP names a directory.
34065if test -n "$CPP" && test -d "$CPP"; then
34066  CPP=
34067fi
34068if test -z "$CPP"; then
34069  if ${ac_cv_prog_CPP+:} false; then :
34070  $as_echo_n "(cached) " >&6
34071else
34072      # Double quotes because CPP needs to be expanded
34073    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34074    do
34075      ac_preproc_ok=false
34076for ac_c_preproc_warn_flag in '' yes
34077do
34078  # Use a header file that comes with gcc, so configuring glibc
34079  # with a fresh cross-compiler works.
34080  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34081  # <limits.h> exists even on freestanding compilers.
34082  # On the NeXT, cc -E runs the code through the compiler's parser,
34083  # not just through cpp. "Syntax error" is here to catch this case.
34084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34085/* end confdefs.h.  */
34086#ifdef __STDC__
34087# include <limits.h>
34088#else
34089# include <assert.h>
34090#endif
34091		     Syntax error
34092_ACEOF
34093if ac_fn_c_try_cpp "$LINENO"; then :
34094
34095else
34096  # Broken: fails on valid input.
34097continue
34098fi
34099rm -f conftest.err conftest.i conftest.$ac_ext
34100
34101  # OK, works on sane cases.  Now check whether nonexistent headers
34102  # can be detected and how.
34103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34104/* end confdefs.h.  */
34105#include <ac_nonexistent.h>
34106_ACEOF
34107if ac_fn_c_try_cpp "$LINENO"; then :
34108  # Broken: success on invalid input.
34109continue
34110else
34111  # Passes both tests.
34112ac_preproc_ok=:
34113break
34114fi
34115rm -f conftest.err conftest.i conftest.$ac_ext
34116
34117done
34118# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34119rm -f conftest.i conftest.err conftest.$ac_ext
34120if $ac_preproc_ok; then :
34121  break
34122fi
34123
34124    done
34125    ac_cv_prog_CPP=$CPP
34126
34127fi
34128  CPP=$ac_cv_prog_CPP
34129else
34130  ac_cv_prog_CPP=$CPP
34131fi
34132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34133$as_echo "$CPP" >&6; }
34134ac_preproc_ok=false
34135for ac_c_preproc_warn_flag in '' yes
34136do
34137  # Use a header file that comes with gcc, so configuring glibc
34138  # with a fresh cross-compiler works.
34139  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34140  # <limits.h> exists even on freestanding compilers.
34141  # On the NeXT, cc -E runs the code through the compiler's parser,
34142  # not just through cpp. "Syntax error" is here to catch this case.
34143  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34144/* end confdefs.h.  */
34145#ifdef __STDC__
34146# include <limits.h>
34147#else
34148# include <assert.h>
34149#endif
34150		     Syntax error
34151_ACEOF
34152if ac_fn_c_try_cpp "$LINENO"; then :
34153
34154else
34155  # Broken: fails on valid input.
34156continue
34157fi
34158rm -f conftest.err conftest.i conftest.$ac_ext
34159
34160  # OK, works on sane cases.  Now check whether nonexistent headers
34161  # can be detected and how.
34162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34163/* end confdefs.h.  */
34164#include <ac_nonexistent.h>
34165_ACEOF
34166if ac_fn_c_try_cpp "$LINENO"; then :
34167  # Broken: success on invalid input.
34168continue
34169else
34170  # Passes both tests.
34171ac_preproc_ok=:
34172break
34173fi
34174rm -f conftest.err conftest.i conftest.$ac_ext
34175
34176done
34177# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34178rm -f conftest.i conftest.err conftest.$ac_ext
34179if $ac_preproc_ok; then :
34180
34181else
34182  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34184as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34185See \`config.log' for more details" "$LINENO" 5; }
34186fi
34187
34188ac_ext=cpp
34189ac_cpp='$CXXCPP $CPPFLAGS'
34190ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34191ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34192ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34193
34194
34195  # Only process if variable expands to non-empty
34196
34197  if test "x$CPP" != x; then
34198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34199
34200  # First separate the path from the arguments. This will split at the first
34201  # space.
34202  complete="$CPP"
34203  path="${complete%% *}"
34204  tmp="$complete EOL"
34205  arguments="${tmp#* }"
34206
34207  # Input might be given as Windows format, start by converting to
34208  # unix format.
34209  new_path=`$CYGPATH -u "$path"`
34210
34211  # Now try to locate executable using which
34212  new_path=`$WHICH "$new_path" 2> /dev/null`
34213  # bat and cmd files are not always considered executable in cygwin causing which
34214  # to not find them
34215  if test "x$new_path" = x \
34216      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34217      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34218    new_path=`$CYGPATH -u "$path"`
34219  fi
34220  if test "x$new_path" = x; then
34221    # Oops. Which didn't find the executable.
34222    # The splitting of arguments from the executable at a space might have been incorrect,
34223    # since paths with space are more likely in Windows. Give it another try with the whole
34224    # argument.
34225    path="$complete"
34226    arguments="EOL"
34227    new_path=`$CYGPATH -u "$path"`
34228    new_path=`$WHICH "$new_path" 2> /dev/null`
34229    # bat and cmd files are not always considered executable in cygwin causing which
34230    # to not find them
34231    if test "x$new_path" = x \
34232        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34233        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34234      new_path=`$CYGPATH -u "$path"`
34235    fi
34236    if test "x$new_path" = x; then
34237      # It's still not found. Now this is an unrecoverable error.
34238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34239$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34240      has_space=`$ECHO "$complete" | $GREP " "`
34241      if test "x$has_space" != x; then
34242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34244      fi
34245      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34246    fi
34247  fi
34248
34249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34252  # "foo.exe" is OK but "foo" is an error.
34253  #
34254  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34255  # It is also a way to make sure we got the proper file name for the real test later on.
34256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34257  if test "x$test_shortpath" = x; then
34258    # Short path failed, file does not exist as specified.
34259    # Try adding .exe or .cmd
34260    if test -f "${new_path}.exe"; then
34261      input_to_shortpath="${new_path}.exe"
34262    elif test -f "${new_path}.cmd"; then
34263      input_to_shortpath="${new_path}.cmd"
34264    else
34265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34266$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34267      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34268$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34269      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34270    fi
34271  else
34272    input_to_shortpath="$new_path"
34273  fi
34274
34275  # Call helper function which possibly converts this using DOS-style short mode.
34276  # If so, the updated path is stored in $new_path.
34277  new_path="$input_to_shortpath"
34278
34279  input_path="$input_to_shortpath"
34280  # Check if we need to convert this using DOS-style short mode. If the path
34281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34282  # take no chances and rewrite it.
34283  # Note: m4 eats our [], so we need to use [ and ] instead.
34284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34285  if test "x$has_forbidden_chars" != x; then
34286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34290      # Going to short mode and back again did indeed matter. Since short mode is
34291      # case insensitive, let's make it lowercase to improve readability.
34292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34293      # Now convert it back to Unix-style (cygpath)
34294      input_path=`$CYGPATH -u "$shortmode_path"`
34295      new_path="$input_path"
34296    fi
34297  fi
34298
34299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34300  if test "x$test_cygdrive_prefix" = x; then
34301    # As a simple fix, exclude /usr/bin since it's not a real path.
34302    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34304      # a path prefixed by /cygdrive for fixpath to work.
34305      new_path="$CYGWIN_ROOT_PATH$input_path"
34306    fi
34307  fi
34308
34309  # remove trailing .exe if any
34310  new_path="${new_path/%.exe/}"
34311
34312    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34313
34314  # First separate the path from the arguments. This will split at the first
34315  # space.
34316  complete="$CPP"
34317  path="${complete%% *}"
34318  tmp="$complete EOL"
34319  arguments="${tmp#* }"
34320
34321  # Input might be given as Windows format, start by converting to
34322  # unix format.
34323  new_path="$path"
34324
34325  windows_path="$new_path"
34326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34327    unix_path=`$CYGPATH -u "$windows_path"`
34328    new_path="$unix_path"
34329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34331    new_path="$unix_path"
34332  fi
34333
34334
34335  # Now try to locate executable using which
34336  new_path=`$WHICH "$new_path" 2> /dev/null`
34337
34338  if test "x$new_path" = x; then
34339    # Oops. Which didn't find the executable.
34340    # The splitting of arguments from the executable at a space might have been incorrect,
34341    # since paths with space are more likely in Windows. Give it another try with the whole
34342    # argument.
34343    path="$complete"
34344    arguments="EOL"
34345    new_path="$path"
34346
34347  windows_path="$new_path"
34348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34349    unix_path=`$CYGPATH -u "$windows_path"`
34350    new_path="$unix_path"
34351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34353    new_path="$unix_path"
34354  fi
34355
34356
34357    new_path=`$WHICH "$new_path" 2> /dev/null`
34358    # bat and cmd files are not always considered executable in MSYS causing which
34359    # to not find them
34360    if test "x$new_path" = x \
34361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34363      new_path="$path"
34364
34365  windows_path="$new_path"
34366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34367    unix_path=`$CYGPATH -u "$windows_path"`
34368    new_path="$unix_path"
34369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34371    new_path="$unix_path"
34372  fi
34373
34374    fi
34375
34376    if test "x$new_path" = x; then
34377      # It's still not found. Now this is an unrecoverable error.
34378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34379$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34380      has_space=`$ECHO "$complete" | $GREP " "`
34381      if test "x$has_space" != x; then
34382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34384      fi
34385      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34386    fi
34387  fi
34388
34389  # Now new_path has a complete unix path to the binary
34390  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34391    # Keep paths in /bin as-is, but remove trailing .exe if any
34392    new_path="${new_path/%.exe/}"
34393    # Do not save /bin paths to all_fixpath_prefixes!
34394  else
34395    # Not in mixed or Windows style, start by that.
34396    new_path=`cmd //c echo $new_path`
34397
34398  input_path="$new_path"
34399  # Check if we need to convert this using DOS-style short mode. If the path
34400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34401  # take no chances and rewrite it.
34402  # Note: m4 eats our [], so we need to use [ and ] instead.
34403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34404  if test "x$has_forbidden_chars" != x; then
34405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34407  fi
34408
34409    # Output is in $new_path
34410
34411  windows_path="$new_path"
34412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34413    unix_path=`$CYGPATH -u "$windows_path"`
34414    new_path="$unix_path"
34415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34417    new_path="$unix_path"
34418  fi
34419
34420    # remove trailing .exe if any
34421    new_path="${new_path/%.exe/}"
34422
34423    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34424    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34425  fi
34426
34427    else
34428      # We're on a unix platform. Hooray! :)
34429      # First separate the path from the arguments. This will split at the first
34430      # space.
34431      complete="$CPP"
34432      path="${complete%% *}"
34433      tmp="$complete EOL"
34434      arguments="${tmp#* }"
34435
34436      # Cannot rely on the command "which" here since it doesn't always work.
34437      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34438      if test -z "$is_absolute_path"; then
34439        # Path to executable is not absolute. Find it.
34440        IFS_save="$IFS"
34441        IFS=:
34442        for p in $PATH; do
34443          if test -f "$p/$path" && test -x "$p/$path"; then
34444            new_path="$p/$path"
34445            break
34446          fi
34447        done
34448        IFS="$IFS_save"
34449      else
34450        # This is an absolute path, we can use it without further modifications.
34451        new_path="$path"
34452      fi
34453
34454      if test "x$new_path" = x; then
34455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34456$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34457        has_space=`$ECHO "$complete" | $GREP " "`
34458        if test "x$has_space" != x; then
34459          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34460$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34461        fi
34462        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34463      fi
34464    fi
34465
34466    # Now join together the path and the arguments once again
34467    if test "x$arguments" != xEOL; then
34468      new_complete="$new_path ${arguments% *}"
34469    else
34470      new_complete="$new_path"
34471    fi
34472
34473    if test "x$complete" != "x$new_complete"; then
34474      CPP="$new_complete"
34475      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34476$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34477    fi
34478  fi
34479
34480  ac_ext=cpp
34481ac_cpp='$CXXCPP $CPPFLAGS'
34482ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34483ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34484ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34486$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34487if test -z "$CXXCPP"; then
34488  if ${ac_cv_prog_CXXCPP+:} false; then :
34489  $as_echo_n "(cached) " >&6
34490else
34491      # Double quotes because CXXCPP needs to be expanded
34492    for CXXCPP in "$CXX -E" "/lib/cpp"
34493    do
34494      ac_preproc_ok=false
34495for ac_cxx_preproc_warn_flag in '' yes
34496do
34497  # Use a header file that comes with gcc, so configuring glibc
34498  # with a fresh cross-compiler works.
34499  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34500  # <limits.h> exists even on freestanding compilers.
34501  # On the NeXT, cc -E runs the code through the compiler's parser,
34502  # not just through cpp. "Syntax error" is here to catch this case.
34503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34504/* end confdefs.h.  */
34505#ifdef __STDC__
34506# include <limits.h>
34507#else
34508# include <assert.h>
34509#endif
34510		     Syntax error
34511_ACEOF
34512if ac_fn_cxx_try_cpp "$LINENO"; then :
34513
34514else
34515  # Broken: fails on valid input.
34516continue
34517fi
34518rm -f conftest.err conftest.i conftest.$ac_ext
34519
34520  # OK, works on sane cases.  Now check whether nonexistent headers
34521  # can be detected and how.
34522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34523/* end confdefs.h.  */
34524#include <ac_nonexistent.h>
34525_ACEOF
34526if ac_fn_cxx_try_cpp "$LINENO"; then :
34527  # Broken: success on invalid input.
34528continue
34529else
34530  # Passes both tests.
34531ac_preproc_ok=:
34532break
34533fi
34534rm -f conftest.err conftest.i conftest.$ac_ext
34535
34536done
34537# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34538rm -f conftest.i conftest.err conftest.$ac_ext
34539if $ac_preproc_ok; then :
34540  break
34541fi
34542
34543    done
34544    ac_cv_prog_CXXCPP=$CXXCPP
34545
34546fi
34547  CXXCPP=$ac_cv_prog_CXXCPP
34548else
34549  ac_cv_prog_CXXCPP=$CXXCPP
34550fi
34551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34552$as_echo "$CXXCPP" >&6; }
34553ac_preproc_ok=false
34554for ac_cxx_preproc_warn_flag in '' yes
34555do
34556  # Use a header file that comes with gcc, so configuring glibc
34557  # with a fresh cross-compiler works.
34558  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34559  # <limits.h> exists even on freestanding compilers.
34560  # On the NeXT, cc -E runs the code through the compiler's parser,
34561  # not just through cpp. "Syntax error" is here to catch this case.
34562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34563/* end confdefs.h.  */
34564#ifdef __STDC__
34565# include <limits.h>
34566#else
34567# include <assert.h>
34568#endif
34569		     Syntax error
34570_ACEOF
34571if ac_fn_cxx_try_cpp "$LINENO"; then :
34572
34573else
34574  # Broken: fails on valid input.
34575continue
34576fi
34577rm -f conftest.err conftest.i conftest.$ac_ext
34578
34579  # OK, works on sane cases.  Now check whether nonexistent headers
34580  # can be detected and how.
34581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34582/* end confdefs.h.  */
34583#include <ac_nonexistent.h>
34584_ACEOF
34585if ac_fn_cxx_try_cpp "$LINENO"; then :
34586  # Broken: success on invalid input.
34587continue
34588else
34589  # Passes both tests.
34590ac_preproc_ok=:
34591break
34592fi
34593rm -f conftest.err conftest.i conftest.$ac_ext
34594
34595done
34596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34597rm -f conftest.i conftest.err conftest.$ac_ext
34598if $ac_preproc_ok; then :
34599
34600else
34601  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34603as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34604See \`config.log' for more details" "$LINENO" 5; }
34605fi
34606
34607ac_ext=cpp
34608ac_cpp='$CXXCPP $CPPFLAGS'
34609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34612
34613
34614  # Only process if variable expands to non-empty
34615
34616  if test "x$CXXCPP" != x; then
34617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34618
34619  # First separate the path from the arguments. This will split at the first
34620  # space.
34621  complete="$CXXCPP"
34622  path="${complete%% *}"
34623  tmp="$complete EOL"
34624  arguments="${tmp#* }"
34625
34626  # Input might be given as Windows format, start by converting to
34627  # unix format.
34628  new_path=`$CYGPATH -u "$path"`
34629
34630  # Now try to locate executable using which
34631  new_path=`$WHICH "$new_path" 2> /dev/null`
34632  # bat and cmd files are not always considered executable in cygwin causing which
34633  # to not find them
34634  if test "x$new_path" = x \
34635      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34636      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34637    new_path=`$CYGPATH -u "$path"`
34638  fi
34639  if test "x$new_path" = x; then
34640    # Oops. Which didn't find the executable.
34641    # The splitting of arguments from the executable at a space might have been incorrect,
34642    # since paths with space are more likely in Windows. Give it another try with the whole
34643    # argument.
34644    path="$complete"
34645    arguments="EOL"
34646    new_path=`$CYGPATH -u "$path"`
34647    new_path=`$WHICH "$new_path" 2> /dev/null`
34648    # bat and cmd files are not always considered executable in cygwin causing which
34649    # to not find them
34650    if test "x$new_path" = x \
34651        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34652        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34653      new_path=`$CYGPATH -u "$path"`
34654    fi
34655    if test "x$new_path" = x; then
34656      # It's still not found. Now this is an unrecoverable error.
34657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34658$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34659      has_space=`$ECHO "$complete" | $GREP " "`
34660      if test "x$has_space" != x; then
34661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34663      fi
34664      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34665    fi
34666  fi
34667
34668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34671  # "foo.exe" is OK but "foo" is an error.
34672  #
34673  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34674  # It is also a way to make sure we got the proper file name for the real test later on.
34675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34676  if test "x$test_shortpath" = x; then
34677    # Short path failed, file does not exist as specified.
34678    # Try adding .exe or .cmd
34679    if test -f "${new_path}.exe"; then
34680      input_to_shortpath="${new_path}.exe"
34681    elif test -f "${new_path}.cmd"; then
34682      input_to_shortpath="${new_path}.cmd"
34683    else
34684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34685$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34686      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34687$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34688      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34689    fi
34690  else
34691    input_to_shortpath="$new_path"
34692  fi
34693
34694  # Call helper function which possibly converts this using DOS-style short mode.
34695  # If so, the updated path is stored in $new_path.
34696  new_path="$input_to_shortpath"
34697
34698  input_path="$input_to_shortpath"
34699  # Check if we need to convert this using DOS-style short mode. If the path
34700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34701  # take no chances and rewrite it.
34702  # Note: m4 eats our [], so we need to use [ and ] instead.
34703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34704  if test "x$has_forbidden_chars" != x; then
34705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34709      # Going to short mode and back again did indeed matter. Since short mode is
34710      # case insensitive, let's make it lowercase to improve readability.
34711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34712      # Now convert it back to Unix-style (cygpath)
34713      input_path=`$CYGPATH -u "$shortmode_path"`
34714      new_path="$input_path"
34715    fi
34716  fi
34717
34718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34719  if test "x$test_cygdrive_prefix" = x; then
34720    # As a simple fix, exclude /usr/bin since it's not a real path.
34721    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34723      # a path prefixed by /cygdrive for fixpath to work.
34724      new_path="$CYGWIN_ROOT_PATH$input_path"
34725    fi
34726  fi
34727
34728  # remove trailing .exe if any
34729  new_path="${new_path/%.exe/}"
34730
34731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34732
34733  # First separate the path from the arguments. This will split at the first
34734  # space.
34735  complete="$CXXCPP"
34736  path="${complete%% *}"
34737  tmp="$complete EOL"
34738  arguments="${tmp#* }"
34739
34740  # Input might be given as Windows format, start by converting to
34741  # unix format.
34742  new_path="$path"
34743
34744  windows_path="$new_path"
34745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34746    unix_path=`$CYGPATH -u "$windows_path"`
34747    new_path="$unix_path"
34748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34750    new_path="$unix_path"
34751  fi
34752
34753
34754  # Now try to locate executable using which
34755  new_path=`$WHICH "$new_path" 2> /dev/null`
34756
34757  if test "x$new_path" = x; then
34758    # Oops. Which didn't find the executable.
34759    # The splitting of arguments from the executable at a space might have been incorrect,
34760    # since paths with space are more likely in Windows. Give it another try with the whole
34761    # argument.
34762    path="$complete"
34763    arguments="EOL"
34764    new_path="$path"
34765
34766  windows_path="$new_path"
34767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34768    unix_path=`$CYGPATH -u "$windows_path"`
34769    new_path="$unix_path"
34770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34772    new_path="$unix_path"
34773  fi
34774
34775
34776    new_path=`$WHICH "$new_path" 2> /dev/null`
34777    # bat and cmd files are not always considered executable in MSYS causing which
34778    # to not find them
34779    if test "x$new_path" = x \
34780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34782      new_path="$path"
34783
34784  windows_path="$new_path"
34785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34786    unix_path=`$CYGPATH -u "$windows_path"`
34787    new_path="$unix_path"
34788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34790    new_path="$unix_path"
34791  fi
34792
34793    fi
34794
34795    if test "x$new_path" = x; then
34796      # It's still not found. Now this is an unrecoverable error.
34797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34798$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34799      has_space=`$ECHO "$complete" | $GREP " "`
34800      if test "x$has_space" != x; then
34801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34803      fi
34804      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34805    fi
34806  fi
34807
34808  # Now new_path has a complete unix path to the binary
34809  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34810    # Keep paths in /bin as-is, but remove trailing .exe if any
34811    new_path="${new_path/%.exe/}"
34812    # Do not save /bin paths to all_fixpath_prefixes!
34813  else
34814    # Not in mixed or Windows style, start by that.
34815    new_path=`cmd //c echo $new_path`
34816
34817  input_path="$new_path"
34818  # Check if we need to convert this using DOS-style short mode. If the path
34819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34820  # take no chances and rewrite it.
34821  # Note: m4 eats our [], so we need to use [ and ] instead.
34822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34823  if test "x$has_forbidden_chars" != x; then
34824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34826  fi
34827
34828    # Output is in $new_path
34829
34830  windows_path="$new_path"
34831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34832    unix_path=`$CYGPATH -u "$windows_path"`
34833    new_path="$unix_path"
34834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34836    new_path="$unix_path"
34837  fi
34838
34839    # remove trailing .exe if any
34840    new_path="${new_path/%.exe/}"
34841
34842    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34843    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34844  fi
34845
34846    else
34847      # We're on a unix platform. Hooray! :)
34848      # First separate the path from the arguments. This will split at the first
34849      # space.
34850      complete="$CXXCPP"
34851      path="${complete%% *}"
34852      tmp="$complete EOL"
34853      arguments="${tmp#* }"
34854
34855      # Cannot rely on the command "which" here since it doesn't always work.
34856      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34857      if test -z "$is_absolute_path"; then
34858        # Path to executable is not absolute. Find it.
34859        IFS_save="$IFS"
34860        IFS=:
34861        for p in $PATH; do
34862          if test -f "$p/$path" && test -x "$p/$path"; then
34863            new_path="$p/$path"
34864            break
34865          fi
34866        done
34867        IFS="$IFS_save"
34868      else
34869        # This is an absolute path, we can use it without further modifications.
34870        new_path="$path"
34871      fi
34872
34873      if test "x$new_path" = x; then
34874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34875$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34876        has_space=`$ECHO "$complete" | $GREP " "`
34877        if test "x$has_space" != x; then
34878          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34879$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34880        fi
34881        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34882      fi
34883    fi
34884
34885    # Now join together the path and the arguments once again
34886    if test "x$arguments" != xEOL; then
34887      new_complete="$new_path ${arguments% *}"
34888    else
34889      new_complete="$new_path"
34890    fi
34891
34892    if test "x$complete" != "x$new_complete"; then
34893      CXXCPP="$new_complete"
34894      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34895$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34896    fi
34897  fi
34898
34899
34900  #
34901  # Setup the linker (LD)
34902  #
34903  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34904    # In the Microsoft toolchain we have a separate LD command "link".
34905    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34906    # a cygwin program for something completely different.
34907    # Extract the first word of "link", so it can be a program name with args.
34908set dummy link; ac_word=$2
34909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34910$as_echo_n "checking for $ac_word... " >&6; }
34911if ${ac_cv_prog_LD+:} false; then :
34912  $as_echo_n "(cached) " >&6
34913else
34914  if test -n "$LD"; then
34915  ac_cv_prog_LD="$LD" # Let the user override the test.
34916else
34917  ac_prog_rejected=no
34918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34919for as_dir in $PATH
34920do
34921  IFS=$as_save_IFS
34922  test -z "$as_dir" && as_dir=.
34923    for ac_exec_ext in '' $ac_executable_extensions; do
34924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34925    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34926       ac_prog_rejected=yes
34927       continue
34928     fi
34929    ac_cv_prog_LD="link"
34930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34931    break 2
34932  fi
34933done
34934  done
34935IFS=$as_save_IFS
34936
34937if test $ac_prog_rejected = yes; then
34938  # We found a bogon in the path, so make sure we never use it.
34939  set dummy $ac_cv_prog_LD
34940  shift
34941  if test $# != 0; then
34942    # We chose a different compiler from the bogus one.
34943    # However, it has the same basename, so the bogon will be chosen
34944    # first if we set LD to just the basename; use the full file name.
34945    shift
34946    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34947  fi
34948fi
34949fi
34950fi
34951LD=$ac_cv_prog_LD
34952if test -n "$LD"; then
34953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34954$as_echo "$LD" >&6; }
34955else
34956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34957$as_echo "no" >&6; }
34958fi
34959
34960
34961
34962  # Only process if variable expands to non-empty
34963
34964  if test "x$LD" != x; then
34965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34966
34967  # First separate the path from the arguments. This will split at the first
34968  # space.
34969  complete="$LD"
34970  path="${complete%% *}"
34971  tmp="$complete EOL"
34972  arguments="${tmp#* }"
34973
34974  # Input might be given as Windows format, start by converting to
34975  # unix format.
34976  new_path=`$CYGPATH -u "$path"`
34977
34978  # Now try to locate executable using which
34979  new_path=`$WHICH "$new_path" 2> /dev/null`
34980  # bat and cmd files are not always considered executable in cygwin causing which
34981  # to not find them
34982  if test "x$new_path" = x \
34983      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34984      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34985    new_path=`$CYGPATH -u "$path"`
34986  fi
34987  if test "x$new_path" = x; then
34988    # Oops. Which didn't find the executable.
34989    # The splitting of arguments from the executable at a space might have been incorrect,
34990    # since paths with space are more likely in Windows. Give it another try with the whole
34991    # argument.
34992    path="$complete"
34993    arguments="EOL"
34994    new_path=`$CYGPATH -u "$path"`
34995    new_path=`$WHICH "$new_path" 2> /dev/null`
34996    # bat and cmd files are not always considered executable in cygwin causing which
34997    # to not find them
34998    if test "x$new_path" = x \
34999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35001      new_path=`$CYGPATH -u "$path"`
35002    fi
35003    if test "x$new_path" = x; then
35004      # It's still not found. Now this is an unrecoverable error.
35005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35006$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35007      has_space=`$ECHO "$complete" | $GREP " "`
35008      if test "x$has_space" != x; then
35009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35011      fi
35012      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35013    fi
35014  fi
35015
35016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35019  # "foo.exe" is OK but "foo" is an error.
35020  #
35021  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35022  # It is also a way to make sure we got the proper file name for the real test later on.
35023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35024  if test "x$test_shortpath" = x; then
35025    # Short path failed, file does not exist as specified.
35026    # Try adding .exe or .cmd
35027    if test -f "${new_path}.exe"; then
35028      input_to_shortpath="${new_path}.exe"
35029    elif test -f "${new_path}.cmd"; then
35030      input_to_shortpath="${new_path}.cmd"
35031    else
35032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35033$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35036      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35037    fi
35038  else
35039    input_to_shortpath="$new_path"
35040  fi
35041
35042  # Call helper function which possibly converts this using DOS-style short mode.
35043  # If so, the updated path is stored in $new_path.
35044  new_path="$input_to_shortpath"
35045
35046  input_path="$input_to_shortpath"
35047  # Check if we need to convert this using DOS-style short mode. If the path
35048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35049  # take no chances and rewrite it.
35050  # Note: m4 eats our [], so we need to use [ and ] instead.
35051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35052  if test "x$has_forbidden_chars" != x; then
35053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35057      # Going to short mode and back again did indeed matter. Since short mode is
35058      # case insensitive, let's make it lowercase to improve readability.
35059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35060      # Now convert it back to Unix-style (cygpath)
35061      input_path=`$CYGPATH -u "$shortmode_path"`
35062      new_path="$input_path"
35063    fi
35064  fi
35065
35066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35067  if test "x$test_cygdrive_prefix" = x; then
35068    # As a simple fix, exclude /usr/bin since it's not a real path.
35069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35071      # a path prefixed by /cygdrive for fixpath to work.
35072      new_path="$CYGWIN_ROOT_PATH$input_path"
35073    fi
35074  fi
35075
35076  # remove trailing .exe if any
35077  new_path="${new_path/%.exe/}"
35078
35079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35080
35081  # First separate the path from the arguments. This will split at the first
35082  # space.
35083  complete="$LD"
35084  path="${complete%% *}"
35085  tmp="$complete EOL"
35086  arguments="${tmp#* }"
35087
35088  # Input might be given as Windows format, start by converting to
35089  # unix format.
35090  new_path="$path"
35091
35092  windows_path="$new_path"
35093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35094    unix_path=`$CYGPATH -u "$windows_path"`
35095    new_path="$unix_path"
35096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35098    new_path="$unix_path"
35099  fi
35100
35101
35102  # Now try to locate executable using which
35103  new_path=`$WHICH "$new_path" 2> /dev/null`
35104
35105  if test "x$new_path" = x; then
35106    # Oops. Which didn't find the executable.
35107    # The splitting of arguments from the executable at a space might have been incorrect,
35108    # since paths with space are more likely in Windows. Give it another try with the whole
35109    # argument.
35110    path="$complete"
35111    arguments="EOL"
35112    new_path="$path"
35113
35114  windows_path="$new_path"
35115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35116    unix_path=`$CYGPATH -u "$windows_path"`
35117    new_path="$unix_path"
35118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35120    new_path="$unix_path"
35121  fi
35122
35123
35124    new_path=`$WHICH "$new_path" 2> /dev/null`
35125    # bat and cmd files are not always considered executable in MSYS causing which
35126    # to not find them
35127    if test "x$new_path" = x \
35128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35130      new_path="$path"
35131
35132  windows_path="$new_path"
35133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35134    unix_path=`$CYGPATH -u "$windows_path"`
35135    new_path="$unix_path"
35136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35138    new_path="$unix_path"
35139  fi
35140
35141    fi
35142
35143    if test "x$new_path" = x; then
35144      # It's still not found. Now this is an unrecoverable error.
35145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35146$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35147      has_space=`$ECHO "$complete" | $GREP " "`
35148      if test "x$has_space" != x; then
35149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35151      fi
35152      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35153    fi
35154  fi
35155
35156  # Now new_path has a complete unix path to the binary
35157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35158    # Keep paths in /bin as-is, but remove trailing .exe if any
35159    new_path="${new_path/%.exe/}"
35160    # Do not save /bin paths to all_fixpath_prefixes!
35161  else
35162    # Not in mixed or Windows style, start by that.
35163    new_path=`cmd //c echo $new_path`
35164
35165  input_path="$new_path"
35166  # Check if we need to convert this using DOS-style short mode. If the path
35167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35168  # take no chances and rewrite it.
35169  # Note: m4 eats our [], so we need to use [ and ] instead.
35170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35171  if test "x$has_forbidden_chars" != x; then
35172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35174  fi
35175
35176    # Output is in $new_path
35177
35178  windows_path="$new_path"
35179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35180    unix_path=`$CYGPATH -u "$windows_path"`
35181    new_path="$unix_path"
35182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35184    new_path="$unix_path"
35185  fi
35186
35187    # remove trailing .exe if any
35188    new_path="${new_path/%.exe/}"
35189
35190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35192  fi
35193
35194    else
35195      # We're on a unix platform. Hooray! :)
35196      # First separate the path from the arguments. This will split at the first
35197      # space.
35198      complete="$LD"
35199      path="${complete%% *}"
35200      tmp="$complete EOL"
35201      arguments="${tmp#* }"
35202
35203      # Cannot rely on the command "which" here since it doesn't always work.
35204      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35205      if test -z "$is_absolute_path"; then
35206        # Path to executable is not absolute. Find it.
35207        IFS_save="$IFS"
35208        IFS=:
35209        for p in $PATH; do
35210          if test -f "$p/$path" && test -x "$p/$path"; then
35211            new_path="$p/$path"
35212            break
35213          fi
35214        done
35215        IFS="$IFS_save"
35216      else
35217        # This is an absolute path, we can use it without further modifications.
35218        new_path="$path"
35219      fi
35220
35221      if test "x$new_path" = x; then
35222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35223$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35224        has_space=`$ECHO "$complete" | $GREP " "`
35225        if test "x$has_space" != x; then
35226          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35228        fi
35229        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35230      fi
35231    fi
35232
35233    # Now join together the path and the arguments once again
35234    if test "x$arguments" != xEOL; then
35235      new_complete="$new_path ${arguments% *}"
35236    else
35237      new_complete="$new_path"
35238    fi
35239
35240    if test "x$complete" != "x$new_complete"; then
35241      LD="$new_complete"
35242      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35243$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35244    fi
35245  fi
35246
35247    # Verify that we indeed succeeded with this trick.
35248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35249$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35250    "$LD" --version > /dev/null
35251    if test $? -eq 0 ; then
35252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35253$as_echo "no" >&6; }
35254      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35255    else
35256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35257$as_echo "yes" >&6; }
35258    fi
35259    LDCXX="$LD"
35260  else
35261    # All other toolchains use the compiler to link.
35262    LD="$CC"
35263    LDCXX="$CXX"
35264  fi
35265
35266  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35267
35268
35269  #
35270  # Setup the assembler (AS)
35271  #
35272  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35273    # FIXME: should this really be solaris, or solstudio?
35274
35275
35276  # Publish this variable in the help.
35277
35278
35279  if [ -z "${AS+x}" ]; then
35280    # The variable is not set by user, try to locate tool using the code snippet
35281    for ac_prog in as
35282do
35283  # Extract the first word of "$ac_prog", so it can be a program name with args.
35284set dummy $ac_prog; ac_word=$2
35285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35286$as_echo_n "checking for $ac_word... " >&6; }
35287if ${ac_cv_path_AS+:} false; then :
35288  $as_echo_n "(cached) " >&6
35289else
35290  case $AS in
35291  [\\/]* | ?:[\\/]*)
35292  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35293  ;;
35294  *)
35295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35296for as_dir in $PATH
35297do
35298  IFS=$as_save_IFS
35299  test -z "$as_dir" && as_dir=.
35300    for ac_exec_ext in '' $ac_executable_extensions; do
35301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35302    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35304    break 2
35305  fi
35306done
35307  done
35308IFS=$as_save_IFS
35309
35310  ;;
35311esac
35312fi
35313AS=$ac_cv_path_AS
35314if test -n "$AS"; then
35315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35316$as_echo "$AS" >&6; }
35317else
35318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35319$as_echo "no" >&6; }
35320fi
35321
35322
35323  test -n "$AS" && break
35324done
35325
35326  else
35327    # The variable is set, but is it from the command line or the environment?
35328
35329    # Try to remove the string !AS! from our list.
35330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35332      # If it failed, the variable was not from the command line. Ignore it,
35333      # but warn the user (except for BASH, which is always set by the calling BASH).
35334      if test "xAS" != xBASH; then
35335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35336$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35337      fi
35338      # Try to locate tool using the code snippet
35339      for ac_prog in as
35340do
35341  # Extract the first word of "$ac_prog", so it can be a program name with args.
35342set dummy $ac_prog; ac_word=$2
35343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35344$as_echo_n "checking for $ac_word... " >&6; }
35345if ${ac_cv_path_AS+:} false; then :
35346  $as_echo_n "(cached) " >&6
35347else
35348  case $AS in
35349  [\\/]* | ?:[\\/]*)
35350  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35351  ;;
35352  *)
35353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35354for as_dir in $PATH
35355do
35356  IFS=$as_save_IFS
35357  test -z "$as_dir" && as_dir=.
35358    for ac_exec_ext in '' $ac_executable_extensions; do
35359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35360    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35362    break 2
35363  fi
35364done
35365  done
35366IFS=$as_save_IFS
35367
35368  ;;
35369esac
35370fi
35371AS=$ac_cv_path_AS
35372if test -n "$AS"; then
35373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35374$as_echo "$AS" >&6; }
35375else
35376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35377$as_echo "no" >&6; }
35378fi
35379
35380
35381  test -n "$AS" && break
35382done
35383
35384    else
35385      # If it succeeded, then it was overridden by the user. We will use it
35386      # for the tool.
35387
35388      # First remove it from the list of overridden variables, so we can test
35389      # for unknown variables in the end.
35390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35391
35392      # Check if we try to supply an empty value
35393      if test "x$AS" = x; then
35394        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35395$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35397$as_echo_n "checking for AS... " >&6; }
35398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35399$as_echo "disabled" >&6; }
35400      else
35401        # Check if the provided tool contains a complete path.
35402        tool_specified="$AS"
35403        tool_basename="${tool_specified##*/}"
35404        if test "x$tool_basename" = "x$tool_specified"; then
35405          # A command without a complete path is provided, search $PATH.
35406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35407$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35408          # Extract the first word of "$tool_basename", so it can be a program name with args.
35409set dummy $tool_basename; ac_word=$2
35410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35411$as_echo_n "checking for $ac_word... " >&6; }
35412if ${ac_cv_path_AS+:} false; then :
35413  $as_echo_n "(cached) " >&6
35414else
35415  case $AS in
35416  [\\/]* | ?:[\\/]*)
35417  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35418  ;;
35419  *)
35420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35421for as_dir in $PATH
35422do
35423  IFS=$as_save_IFS
35424  test -z "$as_dir" && as_dir=.
35425    for ac_exec_ext in '' $ac_executable_extensions; do
35426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35427    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35429    break 2
35430  fi
35431done
35432  done
35433IFS=$as_save_IFS
35434
35435  ;;
35436esac
35437fi
35438AS=$ac_cv_path_AS
35439if test -n "$AS"; then
35440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35441$as_echo "$AS" >&6; }
35442else
35443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35444$as_echo "no" >&6; }
35445fi
35446
35447
35448          if test "x$AS" = x; then
35449            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35450          fi
35451        else
35452          # Otherwise we believe it is a complete path. Use it as it is.
35453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35454$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35455          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35456$as_echo_n "checking for AS... " >&6; }
35457          if test ! -x "$tool_specified"; then
35458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35459$as_echo "not found" >&6; }
35460            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35461          fi
35462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35463$as_echo "$tool_specified" >&6; }
35464        fi
35465      fi
35466    fi
35467
35468  fi
35469
35470
35471
35472  # Only process if variable expands to non-empty
35473
35474  if test "x$AS" != x; then
35475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35476
35477  # First separate the path from the arguments. This will split at the first
35478  # space.
35479  complete="$AS"
35480  path="${complete%% *}"
35481  tmp="$complete EOL"
35482  arguments="${tmp#* }"
35483
35484  # Input might be given as Windows format, start by converting to
35485  # unix format.
35486  new_path=`$CYGPATH -u "$path"`
35487
35488  # Now try to locate executable using which
35489  new_path=`$WHICH "$new_path" 2> /dev/null`
35490  # bat and cmd files are not always considered executable in cygwin causing which
35491  # to not find them
35492  if test "x$new_path" = x \
35493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35495    new_path=`$CYGPATH -u "$path"`
35496  fi
35497  if test "x$new_path" = x; then
35498    # Oops. Which didn't find the executable.
35499    # The splitting of arguments from the executable at a space might have been incorrect,
35500    # since paths with space are more likely in Windows. Give it another try with the whole
35501    # argument.
35502    path="$complete"
35503    arguments="EOL"
35504    new_path=`$CYGPATH -u "$path"`
35505    new_path=`$WHICH "$new_path" 2> /dev/null`
35506    # bat and cmd files are not always considered executable in cygwin causing which
35507    # to not find them
35508    if test "x$new_path" = x \
35509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35511      new_path=`$CYGPATH -u "$path"`
35512    fi
35513    if test "x$new_path" = x; then
35514      # It's still not found. Now this is an unrecoverable error.
35515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35516$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35517      has_space=`$ECHO "$complete" | $GREP " "`
35518      if test "x$has_space" != x; then
35519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35521      fi
35522      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35523    fi
35524  fi
35525
35526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35529  # "foo.exe" is OK but "foo" is an error.
35530  #
35531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35532  # It is also a way to make sure we got the proper file name for the real test later on.
35533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35534  if test "x$test_shortpath" = x; then
35535    # Short path failed, file does not exist as specified.
35536    # Try adding .exe or .cmd
35537    if test -f "${new_path}.exe"; then
35538      input_to_shortpath="${new_path}.exe"
35539    elif test -f "${new_path}.cmd"; then
35540      input_to_shortpath="${new_path}.cmd"
35541    else
35542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35543$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35546      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35547    fi
35548  else
35549    input_to_shortpath="$new_path"
35550  fi
35551
35552  # Call helper function which possibly converts this using DOS-style short mode.
35553  # If so, the updated path is stored in $new_path.
35554  new_path="$input_to_shortpath"
35555
35556  input_path="$input_to_shortpath"
35557  # Check if we need to convert this using DOS-style short mode. If the path
35558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35559  # take no chances and rewrite it.
35560  # Note: m4 eats our [], so we need to use [ and ] instead.
35561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35562  if test "x$has_forbidden_chars" != x; then
35563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35567      # Going to short mode and back again did indeed matter. Since short mode is
35568      # case insensitive, let's make it lowercase to improve readability.
35569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35570      # Now convert it back to Unix-style (cygpath)
35571      input_path=`$CYGPATH -u "$shortmode_path"`
35572      new_path="$input_path"
35573    fi
35574  fi
35575
35576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35577  if test "x$test_cygdrive_prefix" = x; then
35578    # As a simple fix, exclude /usr/bin since it's not a real path.
35579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35581      # a path prefixed by /cygdrive for fixpath to work.
35582      new_path="$CYGWIN_ROOT_PATH$input_path"
35583    fi
35584  fi
35585
35586  # remove trailing .exe if any
35587  new_path="${new_path/%.exe/}"
35588
35589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35590
35591  # First separate the path from the arguments. This will split at the first
35592  # space.
35593  complete="$AS"
35594  path="${complete%% *}"
35595  tmp="$complete EOL"
35596  arguments="${tmp#* }"
35597
35598  # Input might be given as Windows format, start by converting to
35599  # unix format.
35600  new_path="$path"
35601
35602  windows_path="$new_path"
35603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35604    unix_path=`$CYGPATH -u "$windows_path"`
35605    new_path="$unix_path"
35606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35608    new_path="$unix_path"
35609  fi
35610
35611
35612  # Now try to locate executable using which
35613  new_path=`$WHICH "$new_path" 2> /dev/null`
35614
35615  if test "x$new_path" = x; then
35616    # Oops. Which didn't find the executable.
35617    # The splitting of arguments from the executable at a space might have been incorrect,
35618    # since paths with space are more likely in Windows. Give it another try with the whole
35619    # argument.
35620    path="$complete"
35621    arguments="EOL"
35622    new_path="$path"
35623
35624  windows_path="$new_path"
35625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35626    unix_path=`$CYGPATH -u "$windows_path"`
35627    new_path="$unix_path"
35628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35630    new_path="$unix_path"
35631  fi
35632
35633
35634    new_path=`$WHICH "$new_path" 2> /dev/null`
35635    # bat and cmd files are not always considered executable in MSYS causing which
35636    # to not find them
35637    if test "x$new_path" = x \
35638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35640      new_path="$path"
35641
35642  windows_path="$new_path"
35643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35644    unix_path=`$CYGPATH -u "$windows_path"`
35645    new_path="$unix_path"
35646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35648    new_path="$unix_path"
35649  fi
35650
35651    fi
35652
35653    if test "x$new_path" = x; then
35654      # It's still not found. Now this is an unrecoverable error.
35655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35656$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35657      has_space=`$ECHO "$complete" | $GREP " "`
35658      if test "x$has_space" != x; then
35659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35661      fi
35662      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35663    fi
35664  fi
35665
35666  # Now new_path has a complete unix path to the binary
35667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35668    # Keep paths in /bin as-is, but remove trailing .exe if any
35669    new_path="${new_path/%.exe/}"
35670    # Do not save /bin paths to all_fixpath_prefixes!
35671  else
35672    # Not in mixed or Windows style, start by that.
35673    new_path=`cmd //c echo $new_path`
35674
35675  input_path="$new_path"
35676  # Check if we need to convert this using DOS-style short mode. If the path
35677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35678  # take no chances and rewrite it.
35679  # Note: m4 eats our [], so we need to use [ and ] instead.
35680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35681  if test "x$has_forbidden_chars" != x; then
35682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35684  fi
35685
35686    # Output is in $new_path
35687
35688  windows_path="$new_path"
35689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35690    unix_path=`$CYGPATH -u "$windows_path"`
35691    new_path="$unix_path"
35692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35694    new_path="$unix_path"
35695  fi
35696
35697    # remove trailing .exe if any
35698    new_path="${new_path/%.exe/}"
35699
35700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35702  fi
35703
35704    else
35705      # We're on a unix platform. Hooray! :)
35706      # First separate the path from the arguments. This will split at the first
35707      # space.
35708      complete="$AS"
35709      path="${complete%% *}"
35710      tmp="$complete EOL"
35711      arguments="${tmp#* }"
35712
35713      # Cannot rely on the command "which" here since it doesn't always work.
35714      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35715      if test -z "$is_absolute_path"; then
35716        # Path to executable is not absolute. Find it.
35717        IFS_save="$IFS"
35718        IFS=:
35719        for p in $PATH; do
35720          if test -f "$p/$path" && test -x "$p/$path"; then
35721            new_path="$p/$path"
35722            break
35723          fi
35724        done
35725        IFS="$IFS_save"
35726      else
35727        # This is an absolute path, we can use it without further modifications.
35728        new_path="$path"
35729      fi
35730
35731      if test "x$new_path" = x; then
35732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35733$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35734        has_space=`$ECHO "$complete" | $GREP " "`
35735        if test "x$has_space" != x; then
35736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35738        fi
35739        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35740      fi
35741    fi
35742
35743    # Now join together the path and the arguments once again
35744    if test "x$arguments" != xEOL; then
35745      new_complete="$new_path ${arguments% *}"
35746    else
35747      new_complete="$new_path"
35748    fi
35749
35750    if test "x$complete" != "x$new_complete"; then
35751      AS="$new_complete"
35752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35753$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35754    fi
35755  fi
35756
35757  else
35758    # FIXME: is this correct for microsoft?
35759    AS="$CC -c"
35760  fi
35761
35762
35763  #
35764  # Setup the archiver (AR)
35765  #
35766  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35767    # The corresponding ar tool is lib.exe (used to create static libraries)
35768    # Extract the first word of "lib", so it can be a program name with args.
35769set dummy lib; ac_word=$2
35770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35771$as_echo_n "checking for $ac_word... " >&6; }
35772if ${ac_cv_prog_AR+:} false; then :
35773  $as_echo_n "(cached) " >&6
35774else
35775  if test -n "$AR"; then
35776  ac_cv_prog_AR="$AR" # Let the user override the test.
35777else
35778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35779for as_dir in $PATH
35780do
35781  IFS=$as_save_IFS
35782  test -z "$as_dir" && as_dir=.
35783    for ac_exec_ext in '' $ac_executable_extensions; do
35784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35785    ac_cv_prog_AR="lib"
35786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35787    break 2
35788  fi
35789done
35790  done
35791IFS=$as_save_IFS
35792
35793fi
35794fi
35795AR=$ac_cv_prog_AR
35796if test -n "$AR"; then
35797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35798$as_echo "$AR" >&6; }
35799else
35800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35801$as_echo "no" >&6; }
35802fi
35803
35804
35805  else
35806
35807
35808  # Publish this variable in the help.
35809
35810
35811  if [ -z "${AR+x}" ]; then
35812    # The variable is not set by user, try to locate tool using the code snippet
35813    if test -n "$ac_tool_prefix"; then
35814  for ac_prog in ar
35815  do
35816    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35819$as_echo_n "checking for $ac_word... " >&6; }
35820if ${ac_cv_prog_AR+:} false; then :
35821  $as_echo_n "(cached) " >&6
35822else
35823  if test -n "$AR"; then
35824  ac_cv_prog_AR="$AR" # Let the user override the test.
35825else
35826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35827for as_dir in $PATH
35828do
35829  IFS=$as_save_IFS
35830  test -z "$as_dir" && as_dir=.
35831    for ac_exec_ext in '' $ac_executable_extensions; do
35832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35833    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35835    break 2
35836  fi
35837done
35838  done
35839IFS=$as_save_IFS
35840
35841fi
35842fi
35843AR=$ac_cv_prog_AR
35844if test -n "$AR"; then
35845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35846$as_echo "$AR" >&6; }
35847else
35848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35849$as_echo "no" >&6; }
35850fi
35851
35852
35853    test -n "$AR" && break
35854  done
35855fi
35856if test -z "$AR"; then
35857  ac_ct_AR=$AR
35858  for ac_prog in ar
35859do
35860  # Extract the first word of "$ac_prog", so it can be a program name with args.
35861set dummy $ac_prog; ac_word=$2
35862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35863$as_echo_n "checking for $ac_word... " >&6; }
35864if ${ac_cv_prog_ac_ct_AR+:} false; then :
35865  $as_echo_n "(cached) " >&6
35866else
35867  if test -n "$ac_ct_AR"; then
35868  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35869else
35870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35871for as_dir in $PATH
35872do
35873  IFS=$as_save_IFS
35874  test -z "$as_dir" && as_dir=.
35875    for ac_exec_ext in '' $ac_executable_extensions; do
35876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35877    ac_cv_prog_ac_ct_AR="$ac_prog"
35878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35879    break 2
35880  fi
35881done
35882  done
35883IFS=$as_save_IFS
35884
35885fi
35886fi
35887ac_ct_AR=$ac_cv_prog_ac_ct_AR
35888if test -n "$ac_ct_AR"; then
35889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35890$as_echo "$ac_ct_AR" >&6; }
35891else
35892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35893$as_echo "no" >&6; }
35894fi
35895
35896
35897  test -n "$ac_ct_AR" && break
35898done
35899
35900  if test "x$ac_ct_AR" = x; then
35901    AR=""
35902  else
35903    case $cross_compiling:$ac_tool_warned in
35904yes:)
35905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35907ac_tool_warned=yes ;;
35908esac
35909    AR=$ac_ct_AR
35910  fi
35911fi
35912
35913  else
35914    # The variable is set, but is it from the command line or the environment?
35915
35916    # Try to remove the string !AR! from our list.
35917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35919      # If it failed, the variable was not from the command line. Ignore it,
35920      # but warn the user (except for BASH, which is always set by the calling BASH).
35921      if test "xAR" != xBASH; then
35922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35923$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35924      fi
35925      # Try to locate tool using the code snippet
35926      if test -n "$ac_tool_prefix"; then
35927  for ac_prog in ar
35928  do
35929    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35932$as_echo_n "checking for $ac_word... " >&6; }
35933if ${ac_cv_prog_AR+:} false; then :
35934  $as_echo_n "(cached) " >&6
35935else
35936  if test -n "$AR"; then
35937  ac_cv_prog_AR="$AR" # Let the user override the test.
35938else
35939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35940for as_dir in $PATH
35941do
35942  IFS=$as_save_IFS
35943  test -z "$as_dir" && as_dir=.
35944    for ac_exec_ext in '' $ac_executable_extensions; do
35945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35946    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35948    break 2
35949  fi
35950done
35951  done
35952IFS=$as_save_IFS
35953
35954fi
35955fi
35956AR=$ac_cv_prog_AR
35957if test -n "$AR"; then
35958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35959$as_echo "$AR" >&6; }
35960else
35961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35962$as_echo "no" >&6; }
35963fi
35964
35965
35966    test -n "$AR" && break
35967  done
35968fi
35969if test -z "$AR"; then
35970  ac_ct_AR=$AR
35971  for ac_prog in ar
35972do
35973  # Extract the first word of "$ac_prog", so it can be a program name with args.
35974set dummy $ac_prog; ac_word=$2
35975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35976$as_echo_n "checking for $ac_word... " >&6; }
35977if ${ac_cv_prog_ac_ct_AR+:} false; then :
35978  $as_echo_n "(cached) " >&6
35979else
35980  if test -n "$ac_ct_AR"; then
35981  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35982else
35983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35984for as_dir in $PATH
35985do
35986  IFS=$as_save_IFS
35987  test -z "$as_dir" && as_dir=.
35988    for ac_exec_ext in '' $ac_executable_extensions; do
35989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35990    ac_cv_prog_ac_ct_AR="$ac_prog"
35991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35992    break 2
35993  fi
35994done
35995  done
35996IFS=$as_save_IFS
35997
35998fi
35999fi
36000ac_ct_AR=$ac_cv_prog_ac_ct_AR
36001if test -n "$ac_ct_AR"; then
36002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36003$as_echo "$ac_ct_AR" >&6; }
36004else
36005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36006$as_echo "no" >&6; }
36007fi
36008
36009
36010  test -n "$ac_ct_AR" && break
36011done
36012
36013  if test "x$ac_ct_AR" = x; then
36014    AR=""
36015  else
36016    case $cross_compiling:$ac_tool_warned in
36017yes:)
36018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36020ac_tool_warned=yes ;;
36021esac
36022    AR=$ac_ct_AR
36023  fi
36024fi
36025
36026    else
36027      # If it succeeded, then it was overridden by the user. We will use it
36028      # for the tool.
36029
36030      # First remove it from the list of overridden variables, so we can test
36031      # for unknown variables in the end.
36032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36033
36034      # Check if we try to supply an empty value
36035      if test "x$AR" = x; then
36036        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36037$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36039$as_echo_n "checking for AR... " >&6; }
36040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36041$as_echo "disabled" >&6; }
36042      else
36043        # Check if the provided tool contains a complete path.
36044        tool_specified="$AR"
36045        tool_basename="${tool_specified##*/}"
36046        if test "x$tool_basename" = "x$tool_specified"; then
36047          # A command without a complete path is provided, search $PATH.
36048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36049$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36050          # Extract the first word of "$tool_basename", so it can be a program name with args.
36051set dummy $tool_basename; ac_word=$2
36052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36053$as_echo_n "checking for $ac_word... " >&6; }
36054if ${ac_cv_path_AR+:} false; then :
36055  $as_echo_n "(cached) " >&6
36056else
36057  case $AR in
36058  [\\/]* | ?:[\\/]*)
36059  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36060  ;;
36061  *)
36062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36063for as_dir in $PATH
36064do
36065  IFS=$as_save_IFS
36066  test -z "$as_dir" && as_dir=.
36067    for ac_exec_ext in '' $ac_executable_extensions; do
36068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36069    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36071    break 2
36072  fi
36073done
36074  done
36075IFS=$as_save_IFS
36076
36077  ;;
36078esac
36079fi
36080AR=$ac_cv_path_AR
36081if test -n "$AR"; then
36082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36083$as_echo "$AR" >&6; }
36084else
36085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36086$as_echo "no" >&6; }
36087fi
36088
36089
36090          if test "x$AR" = x; then
36091            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36092          fi
36093        else
36094          # Otherwise we believe it is a complete path. Use it as it is.
36095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36096$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36097          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36098$as_echo_n "checking for AR... " >&6; }
36099          if test ! -x "$tool_specified"; then
36100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36101$as_echo "not found" >&6; }
36102            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36103          fi
36104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36105$as_echo "$tool_specified" >&6; }
36106        fi
36107      fi
36108    fi
36109
36110  fi
36111
36112
36113  fi
36114
36115  # Only process if variable expands to non-empty
36116
36117  if test "x$AR" != x; then
36118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36119
36120  # First separate the path from the arguments. This will split at the first
36121  # space.
36122  complete="$AR"
36123  path="${complete%% *}"
36124  tmp="$complete EOL"
36125  arguments="${tmp#* }"
36126
36127  # Input might be given as Windows format, start by converting to
36128  # unix format.
36129  new_path=`$CYGPATH -u "$path"`
36130
36131  # Now try to locate executable using which
36132  new_path=`$WHICH "$new_path" 2> /dev/null`
36133  # bat and cmd files are not always considered executable in cygwin causing which
36134  # to not find them
36135  if test "x$new_path" = x \
36136      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36137      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36138    new_path=`$CYGPATH -u "$path"`
36139  fi
36140  if test "x$new_path" = x; then
36141    # Oops. Which didn't find the executable.
36142    # The splitting of arguments from the executable at a space might have been incorrect,
36143    # since paths with space are more likely in Windows. Give it another try with the whole
36144    # argument.
36145    path="$complete"
36146    arguments="EOL"
36147    new_path=`$CYGPATH -u "$path"`
36148    new_path=`$WHICH "$new_path" 2> /dev/null`
36149    # bat and cmd files are not always considered executable in cygwin causing which
36150    # to not find them
36151    if test "x$new_path" = x \
36152        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36153        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36154      new_path=`$CYGPATH -u "$path"`
36155    fi
36156    if test "x$new_path" = x; then
36157      # It's still not found. Now this is an unrecoverable error.
36158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36159$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36160      has_space=`$ECHO "$complete" | $GREP " "`
36161      if test "x$has_space" != x; then
36162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36164      fi
36165      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36166    fi
36167  fi
36168
36169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36172  # "foo.exe" is OK but "foo" is an error.
36173  #
36174  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36175  # It is also a way to make sure we got the proper file name for the real test later on.
36176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36177  if test "x$test_shortpath" = x; then
36178    # Short path failed, file does not exist as specified.
36179    # Try adding .exe or .cmd
36180    if test -f "${new_path}.exe"; then
36181      input_to_shortpath="${new_path}.exe"
36182    elif test -f "${new_path}.cmd"; then
36183      input_to_shortpath="${new_path}.cmd"
36184    else
36185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36186$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36187      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36188$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36189      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36190    fi
36191  else
36192    input_to_shortpath="$new_path"
36193  fi
36194
36195  # Call helper function which possibly converts this using DOS-style short mode.
36196  # If so, the updated path is stored in $new_path.
36197  new_path="$input_to_shortpath"
36198
36199  input_path="$input_to_shortpath"
36200  # Check if we need to convert this using DOS-style short mode. If the path
36201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36202  # take no chances and rewrite it.
36203  # Note: m4 eats our [], so we need to use [ and ] instead.
36204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36205  if test "x$has_forbidden_chars" != x; then
36206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36210      # Going to short mode and back again did indeed matter. Since short mode is
36211      # case insensitive, let's make it lowercase to improve readability.
36212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36213      # Now convert it back to Unix-style (cygpath)
36214      input_path=`$CYGPATH -u "$shortmode_path"`
36215      new_path="$input_path"
36216    fi
36217  fi
36218
36219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36220  if test "x$test_cygdrive_prefix" = x; then
36221    # As a simple fix, exclude /usr/bin since it's not a real path.
36222    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36224      # a path prefixed by /cygdrive for fixpath to work.
36225      new_path="$CYGWIN_ROOT_PATH$input_path"
36226    fi
36227  fi
36228
36229  # remove trailing .exe if any
36230  new_path="${new_path/%.exe/}"
36231
36232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36233
36234  # First separate the path from the arguments. This will split at the first
36235  # space.
36236  complete="$AR"
36237  path="${complete%% *}"
36238  tmp="$complete EOL"
36239  arguments="${tmp#* }"
36240
36241  # Input might be given as Windows format, start by converting to
36242  # unix format.
36243  new_path="$path"
36244
36245  windows_path="$new_path"
36246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36247    unix_path=`$CYGPATH -u "$windows_path"`
36248    new_path="$unix_path"
36249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36251    new_path="$unix_path"
36252  fi
36253
36254
36255  # Now try to locate executable using which
36256  new_path=`$WHICH "$new_path" 2> /dev/null`
36257
36258  if test "x$new_path" = x; then
36259    # Oops. Which didn't find the executable.
36260    # The splitting of arguments from the executable at a space might have been incorrect,
36261    # since paths with space are more likely in Windows. Give it another try with the whole
36262    # argument.
36263    path="$complete"
36264    arguments="EOL"
36265    new_path="$path"
36266
36267  windows_path="$new_path"
36268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36269    unix_path=`$CYGPATH -u "$windows_path"`
36270    new_path="$unix_path"
36271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36273    new_path="$unix_path"
36274  fi
36275
36276
36277    new_path=`$WHICH "$new_path" 2> /dev/null`
36278    # bat and cmd files are not always considered executable in MSYS causing which
36279    # to not find them
36280    if test "x$new_path" = x \
36281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36283      new_path="$path"
36284
36285  windows_path="$new_path"
36286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36287    unix_path=`$CYGPATH -u "$windows_path"`
36288    new_path="$unix_path"
36289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36291    new_path="$unix_path"
36292  fi
36293
36294    fi
36295
36296    if test "x$new_path" = x; then
36297      # It's still not found. Now this is an unrecoverable error.
36298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36299$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36300      has_space=`$ECHO "$complete" | $GREP " "`
36301      if test "x$has_space" != x; then
36302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36304      fi
36305      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36306    fi
36307  fi
36308
36309  # Now new_path has a complete unix path to the binary
36310  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36311    # Keep paths in /bin as-is, but remove trailing .exe if any
36312    new_path="${new_path/%.exe/}"
36313    # Do not save /bin paths to all_fixpath_prefixes!
36314  else
36315    # Not in mixed or Windows style, start by that.
36316    new_path=`cmd //c echo $new_path`
36317
36318  input_path="$new_path"
36319  # Check if we need to convert this using DOS-style short mode. If the path
36320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36321  # take no chances and rewrite it.
36322  # Note: m4 eats our [], so we need to use [ and ] instead.
36323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36324  if test "x$has_forbidden_chars" != x; then
36325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36327  fi
36328
36329    # Output is in $new_path
36330
36331  windows_path="$new_path"
36332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36333    unix_path=`$CYGPATH -u "$windows_path"`
36334    new_path="$unix_path"
36335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36337    new_path="$unix_path"
36338  fi
36339
36340    # remove trailing .exe if any
36341    new_path="${new_path/%.exe/}"
36342
36343    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36344    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36345  fi
36346
36347    else
36348      # We're on a unix platform. Hooray! :)
36349      # First separate the path from the arguments. This will split at the first
36350      # space.
36351      complete="$AR"
36352      path="${complete%% *}"
36353      tmp="$complete EOL"
36354      arguments="${tmp#* }"
36355
36356      # Cannot rely on the command "which" here since it doesn't always work.
36357      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36358      if test -z "$is_absolute_path"; then
36359        # Path to executable is not absolute. Find it.
36360        IFS_save="$IFS"
36361        IFS=:
36362        for p in $PATH; do
36363          if test -f "$p/$path" && test -x "$p/$path"; then
36364            new_path="$p/$path"
36365            break
36366          fi
36367        done
36368        IFS="$IFS_save"
36369      else
36370        # This is an absolute path, we can use it without further modifications.
36371        new_path="$path"
36372      fi
36373
36374      if test "x$new_path" = x; then
36375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36376$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36377        has_space=`$ECHO "$complete" | $GREP " "`
36378        if test "x$has_space" != x; then
36379          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36380$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36381        fi
36382        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36383      fi
36384    fi
36385
36386    # Now join together the path and the arguments once again
36387    if test "x$arguments" != xEOL; then
36388      new_complete="$new_path ${arguments% *}"
36389    else
36390      new_complete="$new_path"
36391    fi
36392
36393    if test "x$complete" != "x$new_complete"; then
36394      AR="$new_complete"
36395      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36396$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36397    fi
36398  fi
36399
36400
36401
36402  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36403
36404
36405  # Publish this variable in the help.
36406
36407
36408  if [ -z "${LIPO+x}" ]; then
36409    # The variable is not set by user, try to locate tool using the code snippet
36410    for ac_prog in lipo
36411do
36412  # Extract the first word of "$ac_prog", so it can be a program name with args.
36413set dummy $ac_prog; ac_word=$2
36414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36415$as_echo_n "checking for $ac_word... " >&6; }
36416if ${ac_cv_path_LIPO+:} false; then :
36417  $as_echo_n "(cached) " >&6
36418else
36419  case $LIPO in
36420  [\\/]* | ?:[\\/]*)
36421  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36422  ;;
36423  *)
36424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36425for as_dir in $PATH
36426do
36427  IFS=$as_save_IFS
36428  test -z "$as_dir" && as_dir=.
36429    for ac_exec_ext in '' $ac_executable_extensions; do
36430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36431    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36433    break 2
36434  fi
36435done
36436  done
36437IFS=$as_save_IFS
36438
36439  ;;
36440esac
36441fi
36442LIPO=$ac_cv_path_LIPO
36443if test -n "$LIPO"; then
36444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36445$as_echo "$LIPO" >&6; }
36446else
36447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36448$as_echo "no" >&6; }
36449fi
36450
36451
36452  test -n "$LIPO" && break
36453done
36454
36455  else
36456    # The variable is set, but is it from the command line or the environment?
36457
36458    # Try to remove the string !LIPO! from our list.
36459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36461      # If it failed, the variable was not from the command line. Ignore it,
36462      # but warn the user (except for BASH, which is always set by the calling BASH).
36463      if test "xLIPO" != xBASH; then
36464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36465$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36466      fi
36467      # Try to locate tool using the code snippet
36468      for ac_prog in lipo
36469do
36470  # Extract the first word of "$ac_prog", so it can be a program name with args.
36471set dummy $ac_prog; ac_word=$2
36472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36473$as_echo_n "checking for $ac_word... " >&6; }
36474if ${ac_cv_path_LIPO+:} false; then :
36475  $as_echo_n "(cached) " >&6
36476else
36477  case $LIPO in
36478  [\\/]* | ?:[\\/]*)
36479  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36480  ;;
36481  *)
36482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36483for as_dir in $PATH
36484do
36485  IFS=$as_save_IFS
36486  test -z "$as_dir" && as_dir=.
36487    for ac_exec_ext in '' $ac_executable_extensions; do
36488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36489    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36491    break 2
36492  fi
36493done
36494  done
36495IFS=$as_save_IFS
36496
36497  ;;
36498esac
36499fi
36500LIPO=$ac_cv_path_LIPO
36501if test -n "$LIPO"; then
36502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36503$as_echo "$LIPO" >&6; }
36504else
36505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36506$as_echo "no" >&6; }
36507fi
36508
36509
36510  test -n "$LIPO" && break
36511done
36512
36513    else
36514      # If it succeeded, then it was overridden by the user. We will use it
36515      # for the tool.
36516
36517      # First remove it from the list of overridden variables, so we can test
36518      # for unknown variables in the end.
36519      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36520
36521      # Check if we try to supply an empty value
36522      if test "x$LIPO" = x; then
36523        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36524$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36526$as_echo_n "checking for LIPO... " >&6; }
36527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36528$as_echo "disabled" >&6; }
36529      else
36530        # Check if the provided tool contains a complete path.
36531        tool_specified="$LIPO"
36532        tool_basename="${tool_specified##*/}"
36533        if test "x$tool_basename" = "x$tool_specified"; then
36534          # A command without a complete path is provided, search $PATH.
36535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36536$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36537          # Extract the first word of "$tool_basename", so it can be a program name with args.
36538set dummy $tool_basename; ac_word=$2
36539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36540$as_echo_n "checking for $ac_word... " >&6; }
36541if ${ac_cv_path_LIPO+:} false; then :
36542  $as_echo_n "(cached) " >&6
36543else
36544  case $LIPO in
36545  [\\/]* | ?:[\\/]*)
36546  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36547  ;;
36548  *)
36549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36550for as_dir in $PATH
36551do
36552  IFS=$as_save_IFS
36553  test -z "$as_dir" && as_dir=.
36554    for ac_exec_ext in '' $ac_executable_extensions; do
36555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36556    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36558    break 2
36559  fi
36560done
36561  done
36562IFS=$as_save_IFS
36563
36564  ;;
36565esac
36566fi
36567LIPO=$ac_cv_path_LIPO
36568if test -n "$LIPO"; then
36569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36570$as_echo "$LIPO" >&6; }
36571else
36572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36573$as_echo "no" >&6; }
36574fi
36575
36576
36577          if test "x$LIPO" = x; then
36578            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36579          fi
36580        else
36581          # Otherwise we believe it is a complete path. Use it as it is.
36582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36583$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36584          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36585$as_echo_n "checking for LIPO... " >&6; }
36586          if test ! -x "$tool_specified"; then
36587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36588$as_echo "not found" >&6; }
36589            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36590          fi
36591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36592$as_echo "$tool_specified" >&6; }
36593        fi
36594      fi
36595    fi
36596
36597  fi
36598
36599
36600
36601  # Only process if variable expands to non-empty
36602
36603  if test "x$LIPO" != x; then
36604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36605
36606  # First separate the path from the arguments. This will split at the first
36607  # space.
36608  complete="$LIPO"
36609  path="${complete%% *}"
36610  tmp="$complete EOL"
36611  arguments="${tmp#* }"
36612
36613  # Input might be given as Windows format, start by converting to
36614  # unix format.
36615  new_path=`$CYGPATH -u "$path"`
36616
36617  # Now try to locate executable using which
36618  new_path=`$WHICH "$new_path" 2> /dev/null`
36619  # bat and cmd files are not always considered executable in cygwin causing which
36620  # to not find them
36621  if test "x$new_path" = x \
36622      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36623      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36624    new_path=`$CYGPATH -u "$path"`
36625  fi
36626  if test "x$new_path" = x; then
36627    # Oops. Which didn't find the executable.
36628    # The splitting of arguments from the executable at a space might have been incorrect,
36629    # since paths with space are more likely in Windows. Give it another try with the whole
36630    # argument.
36631    path="$complete"
36632    arguments="EOL"
36633    new_path=`$CYGPATH -u "$path"`
36634    new_path=`$WHICH "$new_path" 2> /dev/null`
36635    # bat and cmd files are not always considered executable in cygwin causing which
36636    # to not find them
36637    if test "x$new_path" = x \
36638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36640      new_path=`$CYGPATH -u "$path"`
36641    fi
36642    if test "x$new_path" = x; then
36643      # It's still not found. Now this is an unrecoverable error.
36644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36645$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36646      has_space=`$ECHO "$complete" | $GREP " "`
36647      if test "x$has_space" != x; then
36648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36650      fi
36651      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36652    fi
36653  fi
36654
36655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36658  # "foo.exe" is OK but "foo" is an error.
36659  #
36660  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36661  # It is also a way to make sure we got the proper file name for the real test later on.
36662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36663  if test "x$test_shortpath" = x; then
36664    # Short path failed, file does not exist as specified.
36665    # Try adding .exe or .cmd
36666    if test -f "${new_path}.exe"; then
36667      input_to_shortpath="${new_path}.exe"
36668    elif test -f "${new_path}.cmd"; then
36669      input_to_shortpath="${new_path}.cmd"
36670    else
36671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36672$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36673      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36674$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36675      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36676    fi
36677  else
36678    input_to_shortpath="$new_path"
36679  fi
36680
36681  # Call helper function which possibly converts this using DOS-style short mode.
36682  # If so, the updated path is stored in $new_path.
36683  new_path="$input_to_shortpath"
36684
36685  input_path="$input_to_shortpath"
36686  # Check if we need to convert this using DOS-style short mode. If the path
36687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36688  # take no chances and rewrite it.
36689  # Note: m4 eats our [], so we need to use [ and ] instead.
36690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36691  if test "x$has_forbidden_chars" != x; then
36692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36696      # Going to short mode and back again did indeed matter. Since short mode is
36697      # case insensitive, let's make it lowercase to improve readability.
36698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36699      # Now convert it back to Unix-style (cygpath)
36700      input_path=`$CYGPATH -u "$shortmode_path"`
36701      new_path="$input_path"
36702    fi
36703  fi
36704
36705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36706  if test "x$test_cygdrive_prefix" = x; then
36707    # As a simple fix, exclude /usr/bin since it's not a real path.
36708    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36710      # a path prefixed by /cygdrive for fixpath to work.
36711      new_path="$CYGWIN_ROOT_PATH$input_path"
36712    fi
36713  fi
36714
36715  # remove trailing .exe if any
36716  new_path="${new_path/%.exe/}"
36717
36718    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36719
36720  # First separate the path from the arguments. This will split at the first
36721  # space.
36722  complete="$LIPO"
36723  path="${complete%% *}"
36724  tmp="$complete EOL"
36725  arguments="${tmp#* }"
36726
36727  # Input might be given as Windows format, start by converting to
36728  # unix format.
36729  new_path="$path"
36730
36731  windows_path="$new_path"
36732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36733    unix_path=`$CYGPATH -u "$windows_path"`
36734    new_path="$unix_path"
36735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36737    new_path="$unix_path"
36738  fi
36739
36740
36741  # Now try to locate executable using which
36742  new_path=`$WHICH "$new_path" 2> /dev/null`
36743
36744  if test "x$new_path" = x; then
36745    # Oops. Which didn't find the executable.
36746    # The splitting of arguments from the executable at a space might have been incorrect,
36747    # since paths with space are more likely in Windows. Give it another try with the whole
36748    # argument.
36749    path="$complete"
36750    arguments="EOL"
36751    new_path="$path"
36752
36753  windows_path="$new_path"
36754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36755    unix_path=`$CYGPATH -u "$windows_path"`
36756    new_path="$unix_path"
36757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36759    new_path="$unix_path"
36760  fi
36761
36762
36763    new_path=`$WHICH "$new_path" 2> /dev/null`
36764    # bat and cmd files are not always considered executable in MSYS causing which
36765    # to not find them
36766    if test "x$new_path" = x \
36767        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36768        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36769      new_path="$path"
36770
36771  windows_path="$new_path"
36772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36773    unix_path=`$CYGPATH -u "$windows_path"`
36774    new_path="$unix_path"
36775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36777    new_path="$unix_path"
36778  fi
36779
36780    fi
36781
36782    if test "x$new_path" = x; then
36783      # It's still not found. Now this is an unrecoverable error.
36784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36785$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36786      has_space=`$ECHO "$complete" | $GREP " "`
36787      if test "x$has_space" != x; then
36788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36790      fi
36791      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36792    fi
36793  fi
36794
36795  # Now new_path has a complete unix path to the binary
36796  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36797    # Keep paths in /bin as-is, but remove trailing .exe if any
36798    new_path="${new_path/%.exe/}"
36799    # Do not save /bin paths to all_fixpath_prefixes!
36800  else
36801    # Not in mixed or Windows style, start by that.
36802    new_path=`cmd //c echo $new_path`
36803
36804  input_path="$new_path"
36805  # Check if we need to convert this using DOS-style short mode. If the path
36806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36807  # take no chances and rewrite it.
36808  # Note: m4 eats our [], so we need to use [ and ] instead.
36809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36810  if test "x$has_forbidden_chars" != x; then
36811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36813  fi
36814
36815    # Output is in $new_path
36816
36817  windows_path="$new_path"
36818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36819    unix_path=`$CYGPATH -u "$windows_path"`
36820    new_path="$unix_path"
36821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36823    new_path="$unix_path"
36824  fi
36825
36826    # remove trailing .exe if any
36827    new_path="${new_path/%.exe/}"
36828
36829    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36830    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36831  fi
36832
36833    else
36834      # We're on a unix platform. Hooray! :)
36835      # First separate the path from the arguments. This will split at the first
36836      # space.
36837      complete="$LIPO"
36838      path="${complete%% *}"
36839      tmp="$complete EOL"
36840      arguments="${tmp#* }"
36841
36842      # Cannot rely on the command "which" here since it doesn't always work.
36843      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36844      if test -z "$is_absolute_path"; then
36845        # Path to executable is not absolute. Find it.
36846        IFS_save="$IFS"
36847        IFS=:
36848        for p in $PATH; do
36849          if test -f "$p/$path" && test -x "$p/$path"; then
36850            new_path="$p/$path"
36851            break
36852          fi
36853        done
36854        IFS="$IFS_save"
36855      else
36856        # This is an absolute path, we can use it without further modifications.
36857        new_path="$path"
36858      fi
36859
36860      if test "x$new_path" = x; then
36861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36862$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36863        has_space=`$ECHO "$complete" | $GREP " "`
36864        if test "x$has_space" != x; then
36865          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36866$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36867        fi
36868        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36869      fi
36870    fi
36871
36872    # Now join together the path and the arguments once again
36873    if test "x$arguments" != xEOL; then
36874      new_complete="$new_path ${arguments% *}"
36875    else
36876      new_complete="$new_path"
36877    fi
36878
36879    if test "x$complete" != "x$new_complete"; then
36880      LIPO="$new_complete"
36881      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
36882$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
36883    fi
36884  fi
36885
36886  fi
36887
36888  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36889    # Extract the first word of "mt", so it can be a program name with args.
36890set dummy mt; ac_word=$2
36891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36892$as_echo_n "checking for $ac_word... " >&6; }
36893if ${ac_cv_prog_MT+:} false; then :
36894  $as_echo_n "(cached) " >&6
36895else
36896  if test -n "$MT"; then
36897  ac_cv_prog_MT="$MT" # Let the user override the test.
36898else
36899  ac_prog_rejected=no
36900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36901for as_dir in $PATH
36902do
36903  IFS=$as_save_IFS
36904  test -z "$as_dir" && as_dir=.
36905    for ac_exec_ext in '' $ac_executable_extensions; do
36906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36907    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
36908       ac_prog_rejected=yes
36909       continue
36910     fi
36911    ac_cv_prog_MT="mt"
36912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36913    break 2
36914  fi
36915done
36916  done
36917IFS=$as_save_IFS
36918
36919if test $ac_prog_rejected = yes; then
36920  # We found a bogon in the path, so make sure we never use it.
36921  set dummy $ac_cv_prog_MT
36922  shift
36923  if test $# != 0; then
36924    # We chose a different compiler from the bogus one.
36925    # However, it has the same basename, so the bogon will be chosen
36926    # first if we set MT to just the basename; use the full file name.
36927    shift
36928    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
36929  fi
36930fi
36931fi
36932fi
36933MT=$ac_cv_prog_MT
36934if test -n "$MT"; then
36935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
36936$as_echo "$MT" >&6; }
36937else
36938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36939$as_echo "no" >&6; }
36940fi
36941
36942
36943
36944  # Only process if variable expands to non-empty
36945
36946  if test "x$MT" != x; then
36947    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36948
36949  # First separate the path from the arguments. This will split at the first
36950  # space.
36951  complete="$MT"
36952  path="${complete%% *}"
36953  tmp="$complete EOL"
36954  arguments="${tmp#* }"
36955
36956  # Input might be given as Windows format, start by converting to
36957  # unix format.
36958  new_path=`$CYGPATH -u "$path"`
36959
36960  # Now try to locate executable using which
36961  new_path=`$WHICH "$new_path" 2> /dev/null`
36962  # bat and cmd files are not always considered executable in cygwin causing which
36963  # to not find them
36964  if test "x$new_path" = x \
36965      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36966      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36967    new_path=`$CYGPATH -u "$path"`
36968  fi
36969  if test "x$new_path" = x; then
36970    # Oops. Which didn't find the executable.
36971    # The splitting of arguments from the executable at a space might have been incorrect,
36972    # since paths with space are more likely in Windows. Give it another try with the whole
36973    # argument.
36974    path="$complete"
36975    arguments="EOL"
36976    new_path=`$CYGPATH -u "$path"`
36977    new_path=`$WHICH "$new_path" 2> /dev/null`
36978    # bat and cmd files are not always considered executable in cygwin causing which
36979    # to not find them
36980    if test "x$new_path" = x \
36981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36983      new_path=`$CYGPATH -u "$path"`
36984    fi
36985    if test "x$new_path" = x; then
36986      # It's still not found. Now this is an unrecoverable error.
36987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
36988$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
36989      has_space=`$ECHO "$complete" | $GREP " "`
36990      if test "x$has_space" != x; then
36991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36993      fi
36994      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36995    fi
36996  fi
36997
36998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37001  # "foo.exe" is OK but "foo" is an error.
37002  #
37003  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37004  # It is also a way to make sure we got the proper file name for the real test later on.
37005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37006  if test "x$test_shortpath" = x; then
37007    # Short path failed, file does not exist as specified.
37008    # Try adding .exe or .cmd
37009    if test -f "${new_path}.exe"; then
37010      input_to_shortpath="${new_path}.exe"
37011    elif test -f "${new_path}.cmd"; then
37012      input_to_shortpath="${new_path}.cmd"
37013    else
37014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37015$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37016      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37017$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37018      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37019    fi
37020  else
37021    input_to_shortpath="$new_path"
37022  fi
37023
37024  # Call helper function which possibly converts this using DOS-style short mode.
37025  # If so, the updated path is stored in $new_path.
37026  new_path="$input_to_shortpath"
37027
37028  input_path="$input_to_shortpath"
37029  # Check if we need to convert this using DOS-style short mode. If the path
37030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37031  # take no chances and rewrite it.
37032  # Note: m4 eats our [], so we need to use [ and ] instead.
37033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37034  if test "x$has_forbidden_chars" != x; then
37035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37039      # Going to short mode and back again did indeed matter. Since short mode is
37040      # case insensitive, let's make it lowercase to improve readability.
37041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37042      # Now convert it back to Unix-style (cygpath)
37043      input_path=`$CYGPATH -u "$shortmode_path"`
37044      new_path="$input_path"
37045    fi
37046  fi
37047
37048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37049  if test "x$test_cygdrive_prefix" = x; then
37050    # As a simple fix, exclude /usr/bin since it's not a real path.
37051    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37053      # a path prefixed by /cygdrive for fixpath to work.
37054      new_path="$CYGWIN_ROOT_PATH$input_path"
37055    fi
37056  fi
37057
37058  # remove trailing .exe if any
37059  new_path="${new_path/%.exe/}"
37060
37061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37062
37063  # First separate the path from the arguments. This will split at the first
37064  # space.
37065  complete="$MT"
37066  path="${complete%% *}"
37067  tmp="$complete EOL"
37068  arguments="${tmp#* }"
37069
37070  # Input might be given as Windows format, start by converting to
37071  # unix format.
37072  new_path="$path"
37073
37074  windows_path="$new_path"
37075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37076    unix_path=`$CYGPATH -u "$windows_path"`
37077    new_path="$unix_path"
37078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37080    new_path="$unix_path"
37081  fi
37082
37083
37084  # Now try to locate executable using which
37085  new_path=`$WHICH "$new_path" 2> /dev/null`
37086
37087  if test "x$new_path" = x; then
37088    # Oops. Which didn't find the executable.
37089    # The splitting of arguments from the executable at a space might have been incorrect,
37090    # since paths with space are more likely in Windows. Give it another try with the whole
37091    # argument.
37092    path="$complete"
37093    arguments="EOL"
37094    new_path="$path"
37095
37096  windows_path="$new_path"
37097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37098    unix_path=`$CYGPATH -u "$windows_path"`
37099    new_path="$unix_path"
37100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37102    new_path="$unix_path"
37103  fi
37104
37105
37106    new_path=`$WHICH "$new_path" 2> /dev/null`
37107    # bat and cmd files are not always considered executable in MSYS causing which
37108    # to not find them
37109    if test "x$new_path" = x \
37110        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37111        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37112      new_path="$path"
37113
37114  windows_path="$new_path"
37115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37116    unix_path=`$CYGPATH -u "$windows_path"`
37117    new_path="$unix_path"
37118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37120    new_path="$unix_path"
37121  fi
37122
37123    fi
37124
37125    if test "x$new_path" = x; then
37126      # It's still not found. Now this is an unrecoverable error.
37127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37128$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37129      has_space=`$ECHO "$complete" | $GREP " "`
37130      if test "x$has_space" != x; then
37131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37133      fi
37134      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37135    fi
37136  fi
37137
37138  # Now new_path has a complete unix path to the binary
37139  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37140    # Keep paths in /bin as-is, but remove trailing .exe if any
37141    new_path="${new_path/%.exe/}"
37142    # Do not save /bin paths to all_fixpath_prefixes!
37143  else
37144    # Not in mixed or Windows style, start by that.
37145    new_path=`cmd //c echo $new_path`
37146
37147  input_path="$new_path"
37148  # Check if we need to convert this using DOS-style short mode. If the path
37149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37150  # take no chances and rewrite it.
37151  # Note: m4 eats our [], so we need to use [ and ] instead.
37152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37153  if test "x$has_forbidden_chars" != x; then
37154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37156  fi
37157
37158    # Output is in $new_path
37159
37160  windows_path="$new_path"
37161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37162    unix_path=`$CYGPATH -u "$windows_path"`
37163    new_path="$unix_path"
37164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37166    new_path="$unix_path"
37167  fi
37168
37169    # remove trailing .exe if any
37170    new_path="${new_path/%.exe/}"
37171
37172    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37173    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37174  fi
37175
37176    else
37177      # We're on a unix platform. Hooray! :)
37178      # First separate the path from the arguments. This will split at the first
37179      # space.
37180      complete="$MT"
37181      path="${complete%% *}"
37182      tmp="$complete EOL"
37183      arguments="${tmp#* }"
37184
37185      # Cannot rely on the command "which" here since it doesn't always work.
37186      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37187      if test -z "$is_absolute_path"; then
37188        # Path to executable is not absolute. Find it.
37189        IFS_save="$IFS"
37190        IFS=:
37191        for p in $PATH; do
37192          if test -f "$p/$path" && test -x "$p/$path"; then
37193            new_path="$p/$path"
37194            break
37195          fi
37196        done
37197        IFS="$IFS_save"
37198      else
37199        # This is an absolute path, we can use it without further modifications.
37200        new_path="$path"
37201      fi
37202
37203      if test "x$new_path" = x; then
37204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37205$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37206        has_space=`$ECHO "$complete" | $GREP " "`
37207        if test "x$has_space" != x; then
37208          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37209$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37210        fi
37211        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37212      fi
37213    fi
37214
37215    # Now join together the path and the arguments once again
37216    if test "x$arguments" != xEOL; then
37217      new_complete="$new_path ${arguments% *}"
37218    else
37219      new_complete="$new_path"
37220    fi
37221
37222    if test "x$complete" != "x$new_complete"; then
37223      MT="$new_complete"
37224      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37225$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37226    fi
37227  fi
37228
37229    # Setup the resource compiler (RC)
37230    # Extract the first word of "rc", so it can be a program name with args.
37231set dummy rc; ac_word=$2
37232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37233$as_echo_n "checking for $ac_word... " >&6; }
37234if ${ac_cv_prog_RC+:} false; then :
37235  $as_echo_n "(cached) " >&6
37236else
37237  if test -n "$RC"; then
37238  ac_cv_prog_RC="$RC" # Let the user override the test.
37239else
37240  ac_prog_rejected=no
37241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37242for as_dir in $PATH
37243do
37244  IFS=$as_save_IFS
37245  test -z "$as_dir" && as_dir=.
37246    for ac_exec_ext in '' $ac_executable_extensions; do
37247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37248    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37249       ac_prog_rejected=yes
37250       continue
37251     fi
37252    ac_cv_prog_RC="rc"
37253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37254    break 2
37255  fi
37256done
37257  done
37258IFS=$as_save_IFS
37259
37260if test $ac_prog_rejected = yes; then
37261  # We found a bogon in the path, so make sure we never use it.
37262  set dummy $ac_cv_prog_RC
37263  shift
37264  if test $# != 0; then
37265    # We chose a different compiler from the bogus one.
37266    # However, it has the same basename, so the bogon will be chosen
37267    # first if we set RC to just the basename; use the full file name.
37268    shift
37269    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37270  fi
37271fi
37272fi
37273fi
37274RC=$ac_cv_prog_RC
37275if test -n "$RC"; then
37276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37277$as_echo "$RC" >&6; }
37278else
37279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37280$as_echo "no" >&6; }
37281fi
37282
37283
37284
37285  # Only process if variable expands to non-empty
37286
37287  if test "x$RC" != x; then
37288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37289
37290  # First separate the path from the arguments. This will split at the first
37291  # space.
37292  complete="$RC"
37293  path="${complete%% *}"
37294  tmp="$complete EOL"
37295  arguments="${tmp#* }"
37296
37297  # Input might be given as Windows format, start by converting to
37298  # unix format.
37299  new_path=`$CYGPATH -u "$path"`
37300
37301  # Now try to locate executable using which
37302  new_path=`$WHICH "$new_path" 2> /dev/null`
37303  # bat and cmd files are not always considered executable in cygwin causing which
37304  # to not find them
37305  if test "x$new_path" = x \
37306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37308    new_path=`$CYGPATH -u "$path"`
37309  fi
37310  if test "x$new_path" = x; then
37311    # Oops. Which didn't find the executable.
37312    # The splitting of arguments from the executable at a space might have been incorrect,
37313    # since paths with space are more likely in Windows. Give it another try with the whole
37314    # argument.
37315    path="$complete"
37316    arguments="EOL"
37317    new_path=`$CYGPATH -u "$path"`
37318    new_path=`$WHICH "$new_path" 2> /dev/null`
37319    # bat and cmd files are not always considered executable in cygwin causing which
37320    # to not find them
37321    if test "x$new_path" = x \
37322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37324      new_path=`$CYGPATH -u "$path"`
37325    fi
37326    if test "x$new_path" = x; then
37327      # It's still not found. Now this is an unrecoverable error.
37328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37329$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37330      has_space=`$ECHO "$complete" | $GREP " "`
37331      if test "x$has_space" != x; then
37332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37334      fi
37335      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37336    fi
37337  fi
37338
37339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37342  # "foo.exe" is OK but "foo" is an error.
37343  #
37344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37345  # It is also a way to make sure we got the proper file name for the real test later on.
37346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37347  if test "x$test_shortpath" = x; then
37348    # Short path failed, file does not exist as specified.
37349    # Try adding .exe or .cmd
37350    if test -f "${new_path}.exe"; then
37351      input_to_shortpath="${new_path}.exe"
37352    elif test -f "${new_path}.cmd"; then
37353      input_to_shortpath="${new_path}.cmd"
37354    else
37355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37356$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37359      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37360    fi
37361  else
37362    input_to_shortpath="$new_path"
37363  fi
37364
37365  # Call helper function which possibly converts this using DOS-style short mode.
37366  # If so, the updated path is stored in $new_path.
37367  new_path="$input_to_shortpath"
37368
37369  input_path="$input_to_shortpath"
37370  # Check if we need to convert this using DOS-style short mode. If the path
37371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37372  # take no chances and rewrite it.
37373  # Note: m4 eats our [], so we need to use [ and ] instead.
37374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37375  if test "x$has_forbidden_chars" != x; then
37376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37380      # Going to short mode and back again did indeed matter. Since short mode is
37381      # case insensitive, let's make it lowercase to improve readability.
37382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37383      # Now convert it back to Unix-style (cygpath)
37384      input_path=`$CYGPATH -u "$shortmode_path"`
37385      new_path="$input_path"
37386    fi
37387  fi
37388
37389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37390  if test "x$test_cygdrive_prefix" = x; then
37391    # As a simple fix, exclude /usr/bin since it's not a real path.
37392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37394      # a path prefixed by /cygdrive for fixpath to work.
37395      new_path="$CYGWIN_ROOT_PATH$input_path"
37396    fi
37397  fi
37398
37399  # remove trailing .exe if any
37400  new_path="${new_path/%.exe/}"
37401
37402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37403
37404  # First separate the path from the arguments. This will split at the first
37405  # space.
37406  complete="$RC"
37407  path="${complete%% *}"
37408  tmp="$complete EOL"
37409  arguments="${tmp#* }"
37410
37411  # Input might be given as Windows format, start by converting to
37412  # unix format.
37413  new_path="$path"
37414
37415  windows_path="$new_path"
37416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37417    unix_path=`$CYGPATH -u "$windows_path"`
37418    new_path="$unix_path"
37419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37421    new_path="$unix_path"
37422  fi
37423
37424
37425  # Now try to locate executable using which
37426  new_path=`$WHICH "$new_path" 2> /dev/null`
37427
37428  if test "x$new_path" = x; then
37429    # Oops. Which didn't find the executable.
37430    # The splitting of arguments from the executable at a space might have been incorrect,
37431    # since paths with space are more likely in Windows. Give it another try with the whole
37432    # argument.
37433    path="$complete"
37434    arguments="EOL"
37435    new_path="$path"
37436
37437  windows_path="$new_path"
37438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37439    unix_path=`$CYGPATH -u "$windows_path"`
37440    new_path="$unix_path"
37441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37443    new_path="$unix_path"
37444  fi
37445
37446
37447    new_path=`$WHICH "$new_path" 2> /dev/null`
37448    # bat and cmd files are not always considered executable in MSYS causing which
37449    # to not find them
37450    if test "x$new_path" = x \
37451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37453      new_path="$path"
37454
37455  windows_path="$new_path"
37456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37457    unix_path=`$CYGPATH -u "$windows_path"`
37458    new_path="$unix_path"
37459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37461    new_path="$unix_path"
37462  fi
37463
37464    fi
37465
37466    if test "x$new_path" = x; then
37467      # It's still not found. Now this is an unrecoverable error.
37468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37469$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37470      has_space=`$ECHO "$complete" | $GREP " "`
37471      if test "x$has_space" != x; then
37472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37474      fi
37475      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37476    fi
37477  fi
37478
37479  # Now new_path has a complete unix path to the binary
37480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37481    # Keep paths in /bin as-is, but remove trailing .exe if any
37482    new_path="${new_path/%.exe/}"
37483    # Do not save /bin paths to all_fixpath_prefixes!
37484  else
37485    # Not in mixed or Windows style, start by that.
37486    new_path=`cmd //c echo $new_path`
37487
37488  input_path="$new_path"
37489  # Check if we need to convert this using DOS-style short mode. If the path
37490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37491  # take no chances and rewrite it.
37492  # Note: m4 eats our [], so we need to use [ and ] instead.
37493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37494  if test "x$has_forbidden_chars" != x; then
37495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37497  fi
37498
37499    # Output is in $new_path
37500
37501  windows_path="$new_path"
37502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37503    unix_path=`$CYGPATH -u "$windows_path"`
37504    new_path="$unix_path"
37505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37507    new_path="$unix_path"
37508  fi
37509
37510    # remove trailing .exe if any
37511    new_path="${new_path/%.exe/}"
37512
37513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37515  fi
37516
37517    else
37518      # We're on a unix platform. Hooray! :)
37519      # First separate the path from the arguments. This will split at the first
37520      # space.
37521      complete="$RC"
37522      path="${complete%% *}"
37523      tmp="$complete EOL"
37524      arguments="${tmp#* }"
37525
37526      # Cannot rely on the command "which" here since it doesn't always work.
37527      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37528      if test -z "$is_absolute_path"; then
37529        # Path to executable is not absolute. Find it.
37530        IFS_save="$IFS"
37531        IFS=:
37532        for p in $PATH; do
37533          if test -f "$p/$path" && test -x "$p/$path"; then
37534            new_path="$p/$path"
37535            break
37536          fi
37537        done
37538        IFS="$IFS_save"
37539      else
37540        # This is an absolute path, we can use it without further modifications.
37541        new_path="$path"
37542      fi
37543
37544      if test "x$new_path" = x; then
37545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37546$as_echo "$as_me: The path of RC, 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}: This might be caused by spaces in the path, which is not allowed." >&5
37550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37551        fi
37552        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37553      fi
37554    fi
37555
37556    # Now join together the path and the arguments once again
37557    if test "x$arguments" != xEOL; then
37558      new_complete="$new_path ${arguments% *}"
37559    else
37560      new_complete="$new_path"
37561    fi
37562
37563    if test "x$complete" != "x$new_complete"; then
37564      RC="$new_complete"
37565      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37566$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37567    fi
37568  fi
37569
37570    # Extract the first word of "dumpbin", so it can be a program name with args.
37571set dummy dumpbin; ac_word=$2
37572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37573$as_echo_n "checking for $ac_word... " >&6; }
37574if ${ac_cv_prog_DUMPBIN+:} false; then :
37575  $as_echo_n "(cached) " >&6
37576else
37577  if test -n "$DUMPBIN"; then
37578  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37579else
37580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37581for as_dir in $PATH
37582do
37583  IFS=$as_save_IFS
37584  test -z "$as_dir" && as_dir=.
37585    for ac_exec_ext in '' $ac_executable_extensions; do
37586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37587    ac_cv_prog_DUMPBIN="dumpbin"
37588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37589    break 2
37590  fi
37591done
37592  done
37593IFS=$as_save_IFS
37594
37595fi
37596fi
37597DUMPBIN=$ac_cv_prog_DUMPBIN
37598if test -n "$DUMPBIN"; then
37599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37600$as_echo "$DUMPBIN" >&6; }
37601else
37602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37603$as_echo "no" >&6; }
37604fi
37605
37606
37607
37608  # Only process if variable expands to non-empty
37609
37610  if test "x$DUMPBIN" != x; then
37611    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37612
37613  # First separate the path from the arguments. This will split at the first
37614  # space.
37615  complete="$DUMPBIN"
37616  path="${complete%% *}"
37617  tmp="$complete EOL"
37618  arguments="${tmp#* }"
37619
37620  # Input might be given as Windows format, start by converting to
37621  # unix format.
37622  new_path=`$CYGPATH -u "$path"`
37623
37624  # Now try to locate executable using which
37625  new_path=`$WHICH "$new_path" 2> /dev/null`
37626  # bat and cmd files are not always considered executable in cygwin causing which
37627  # to not find them
37628  if test "x$new_path" = x \
37629      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37630      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37631    new_path=`$CYGPATH -u "$path"`
37632  fi
37633  if test "x$new_path" = x; then
37634    # Oops. Which didn't find the executable.
37635    # The splitting of arguments from the executable at a space might have been incorrect,
37636    # since paths with space are more likely in Windows. Give it another try with the whole
37637    # argument.
37638    path="$complete"
37639    arguments="EOL"
37640    new_path=`$CYGPATH -u "$path"`
37641    new_path=`$WHICH "$new_path" 2> /dev/null`
37642    # bat and cmd files are not always considered executable in cygwin causing which
37643    # to not find them
37644    if test "x$new_path" = x \
37645        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37646        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37647      new_path=`$CYGPATH -u "$path"`
37648    fi
37649    if test "x$new_path" = x; then
37650      # It's still not found. Now this is an unrecoverable error.
37651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37652$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37653      has_space=`$ECHO "$complete" | $GREP " "`
37654      if test "x$has_space" != x; then
37655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37657      fi
37658      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37659    fi
37660  fi
37661
37662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37665  # "foo.exe" is OK but "foo" is an error.
37666  #
37667  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37668  # It is also a way to make sure we got the proper file name for the real test later on.
37669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37670  if test "x$test_shortpath" = x; then
37671    # Short path failed, file does not exist as specified.
37672    # Try adding .exe or .cmd
37673    if test -f "${new_path}.exe"; then
37674      input_to_shortpath="${new_path}.exe"
37675    elif test -f "${new_path}.cmd"; then
37676      input_to_shortpath="${new_path}.cmd"
37677    else
37678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37679$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37680      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37681$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37682      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37683    fi
37684  else
37685    input_to_shortpath="$new_path"
37686  fi
37687
37688  # Call helper function which possibly converts this using DOS-style short mode.
37689  # If so, the updated path is stored in $new_path.
37690  new_path="$input_to_shortpath"
37691
37692  input_path="$input_to_shortpath"
37693  # Check if we need to convert this using DOS-style short mode. If the path
37694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37695  # take no chances and rewrite it.
37696  # Note: m4 eats our [], so we need to use [ and ] instead.
37697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37698  if test "x$has_forbidden_chars" != x; then
37699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37703      # Going to short mode and back again did indeed matter. Since short mode is
37704      # case insensitive, let's make it lowercase to improve readability.
37705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37706      # Now convert it back to Unix-style (cygpath)
37707      input_path=`$CYGPATH -u "$shortmode_path"`
37708      new_path="$input_path"
37709    fi
37710  fi
37711
37712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37713  if test "x$test_cygdrive_prefix" = x; then
37714    # As a simple fix, exclude /usr/bin since it's not a real path.
37715    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37717      # a path prefixed by /cygdrive for fixpath to work.
37718      new_path="$CYGWIN_ROOT_PATH$input_path"
37719    fi
37720  fi
37721
37722  # remove trailing .exe if any
37723  new_path="${new_path/%.exe/}"
37724
37725    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37726
37727  # First separate the path from the arguments. This will split at the first
37728  # space.
37729  complete="$DUMPBIN"
37730  path="${complete%% *}"
37731  tmp="$complete EOL"
37732  arguments="${tmp#* }"
37733
37734  # Input might be given as Windows format, start by converting to
37735  # unix format.
37736  new_path="$path"
37737
37738  windows_path="$new_path"
37739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37740    unix_path=`$CYGPATH -u "$windows_path"`
37741    new_path="$unix_path"
37742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37744    new_path="$unix_path"
37745  fi
37746
37747
37748  # Now try to locate executable using which
37749  new_path=`$WHICH "$new_path" 2> /dev/null`
37750
37751  if test "x$new_path" = x; then
37752    # Oops. Which didn't find the executable.
37753    # The splitting of arguments from the executable at a space might have been incorrect,
37754    # since paths with space are more likely in Windows. Give it another try with the whole
37755    # argument.
37756    path="$complete"
37757    arguments="EOL"
37758    new_path="$path"
37759
37760  windows_path="$new_path"
37761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37762    unix_path=`$CYGPATH -u "$windows_path"`
37763    new_path="$unix_path"
37764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37766    new_path="$unix_path"
37767  fi
37768
37769
37770    new_path=`$WHICH "$new_path" 2> /dev/null`
37771    # bat and cmd files are not always considered executable in MSYS causing which
37772    # to not find them
37773    if test "x$new_path" = x \
37774        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37775        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37776      new_path="$path"
37777
37778  windows_path="$new_path"
37779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37780    unix_path=`$CYGPATH -u "$windows_path"`
37781    new_path="$unix_path"
37782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37784    new_path="$unix_path"
37785  fi
37786
37787    fi
37788
37789    if test "x$new_path" = x; then
37790      # It's still not found. Now this is an unrecoverable error.
37791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37792$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37793      has_space=`$ECHO "$complete" | $GREP " "`
37794      if test "x$has_space" != x; then
37795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37797      fi
37798      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37799    fi
37800  fi
37801
37802  # Now new_path has a complete unix path to the binary
37803  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37804    # Keep paths in /bin as-is, but remove trailing .exe if any
37805    new_path="${new_path/%.exe/}"
37806    # Do not save /bin paths to all_fixpath_prefixes!
37807  else
37808    # Not in mixed or Windows style, start by that.
37809    new_path=`cmd //c echo $new_path`
37810
37811  input_path="$new_path"
37812  # Check if we need to convert this using DOS-style short mode. If the path
37813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37814  # take no chances and rewrite it.
37815  # Note: m4 eats our [], so we need to use [ and ] instead.
37816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37817  if test "x$has_forbidden_chars" != x; then
37818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37820  fi
37821
37822    # Output is in $new_path
37823
37824  windows_path="$new_path"
37825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37826    unix_path=`$CYGPATH -u "$windows_path"`
37827    new_path="$unix_path"
37828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37830    new_path="$unix_path"
37831  fi
37832
37833    # remove trailing .exe if any
37834    new_path="${new_path/%.exe/}"
37835
37836    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37837    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37838  fi
37839
37840    else
37841      # We're on a unix platform. Hooray! :)
37842      # First separate the path from the arguments. This will split at the first
37843      # space.
37844      complete="$DUMPBIN"
37845      path="${complete%% *}"
37846      tmp="$complete EOL"
37847      arguments="${tmp#* }"
37848
37849      # Cannot rely on the command "which" here since it doesn't always work.
37850      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37851      if test -z "$is_absolute_path"; then
37852        # Path to executable is not absolute. Find it.
37853        IFS_save="$IFS"
37854        IFS=:
37855        for p in $PATH; do
37856          if test -f "$p/$path" && test -x "$p/$path"; then
37857            new_path="$p/$path"
37858            break
37859          fi
37860        done
37861        IFS="$IFS_save"
37862      else
37863        # This is an absolute path, we can use it without further modifications.
37864        new_path="$path"
37865      fi
37866
37867      if test "x$new_path" = x; then
37868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37869$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37870        has_space=`$ECHO "$complete" | $GREP " "`
37871        if test "x$has_space" != x; then
37872          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37873$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37874        fi
37875        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37876      fi
37877    fi
37878
37879    # Now join together the path and the arguments once again
37880    if test "x$arguments" != xEOL; then
37881      new_complete="$new_path ${arguments% *}"
37882    else
37883      new_complete="$new_path"
37884    fi
37885
37886    if test "x$complete" != "x$new_complete"; then
37887      DUMPBIN="$new_complete"
37888      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
37889$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
37890    fi
37891  fi
37892
37893    # We need to check for 'msbuild.exe' because at the place where we expect to
37894    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
37895    # won't find the 'msbuild.exe' executable in that case (and the
37896    # 'ac_executable_extensions' is unusable due to performance reasons).
37897    # Notice that we intentionally don't fix up the path to MSBUILD because we
37898    # will call it in a DOS shell during freetype detection on Windows (see
37899    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
37900    # Extract the first word of "msbuild.exe", so it can be a program name with args.
37901set dummy msbuild.exe; ac_word=$2
37902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37903$as_echo_n "checking for $ac_word... " >&6; }
37904if ${ac_cv_prog_MSBUILD+:} false; then :
37905  $as_echo_n "(cached) " >&6
37906else
37907  if test -n "$MSBUILD"; then
37908  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
37909else
37910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37911for as_dir in $PATH
37912do
37913  IFS=$as_save_IFS
37914  test -z "$as_dir" && as_dir=.
37915    for ac_exec_ext in '' $ac_executable_extensions; do
37916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37917    ac_cv_prog_MSBUILD="msbuild.exe"
37918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37919    break 2
37920  fi
37921done
37922  done
37923IFS=$as_save_IFS
37924
37925fi
37926fi
37927MSBUILD=$ac_cv_prog_MSBUILD
37928if test -n "$MSBUILD"; then
37929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
37930$as_echo "$MSBUILD" >&6; }
37931else
37932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37933$as_echo "no" >&6; }
37934fi
37935
37936
37937  fi
37938
37939  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37940
37941
37942  # Publish this variable in the help.
37943
37944
37945  if [ -z "${STRIP+x}" ]; then
37946    # The variable is not set by user, try to locate tool using the code snippet
37947    for ac_prog in strip
37948do
37949  # Extract the first word of "$ac_prog", so it can be a program name with args.
37950set dummy $ac_prog; ac_word=$2
37951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37952$as_echo_n "checking for $ac_word... " >&6; }
37953if ${ac_cv_path_STRIP+:} false; then :
37954  $as_echo_n "(cached) " >&6
37955else
37956  case $STRIP in
37957  [\\/]* | ?:[\\/]*)
37958  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37959  ;;
37960  *)
37961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37962for as_dir in $PATH
37963do
37964  IFS=$as_save_IFS
37965  test -z "$as_dir" && as_dir=.
37966    for ac_exec_ext in '' $ac_executable_extensions; do
37967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37968    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37970    break 2
37971  fi
37972done
37973  done
37974IFS=$as_save_IFS
37975
37976  ;;
37977esac
37978fi
37979STRIP=$ac_cv_path_STRIP
37980if test -n "$STRIP"; then
37981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37982$as_echo "$STRIP" >&6; }
37983else
37984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37985$as_echo "no" >&6; }
37986fi
37987
37988
37989  test -n "$STRIP" && break
37990done
37991
37992  else
37993    # The variable is set, but is it from the command line or the environment?
37994
37995    # Try to remove the string !STRIP! from our list.
37996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37998      # If it failed, the variable was not from the command line. Ignore it,
37999      # but warn the user (except for BASH, which is always set by the calling BASH).
38000      if test "xSTRIP" != xBASH; then
38001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38002$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38003      fi
38004      # Try to locate tool using the code snippet
38005      for ac_prog in strip
38006do
38007  # Extract the first word of "$ac_prog", so it can be a program name with args.
38008set dummy $ac_prog; ac_word=$2
38009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38010$as_echo_n "checking for $ac_word... " >&6; }
38011if ${ac_cv_path_STRIP+:} false; then :
38012  $as_echo_n "(cached) " >&6
38013else
38014  case $STRIP in
38015  [\\/]* | ?:[\\/]*)
38016  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38017  ;;
38018  *)
38019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38020for as_dir in $PATH
38021do
38022  IFS=$as_save_IFS
38023  test -z "$as_dir" && as_dir=.
38024    for ac_exec_ext in '' $ac_executable_extensions; do
38025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38026    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38028    break 2
38029  fi
38030done
38031  done
38032IFS=$as_save_IFS
38033
38034  ;;
38035esac
38036fi
38037STRIP=$ac_cv_path_STRIP
38038if test -n "$STRIP"; then
38039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38040$as_echo "$STRIP" >&6; }
38041else
38042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38043$as_echo "no" >&6; }
38044fi
38045
38046
38047  test -n "$STRIP" && break
38048done
38049
38050    else
38051      # If it succeeded, then it was overridden by the user. We will use it
38052      # for the tool.
38053
38054      # First remove it from the list of overridden variables, so we can test
38055      # for unknown variables in the end.
38056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38057
38058      # Check if we try to supply an empty value
38059      if test "x$STRIP" = x; then
38060        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38061$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38063$as_echo_n "checking for STRIP... " >&6; }
38064        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38065$as_echo "disabled" >&6; }
38066      else
38067        # Check if the provided tool contains a complete path.
38068        tool_specified="$STRIP"
38069        tool_basename="${tool_specified##*/}"
38070        if test "x$tool_basename" = "x$tool_specified"; then
38071          # A command without a complete path is provided, search $PATH.
38072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38073$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38074          # Extract the first word of "$tool_basename", so it can be a program name with args.
38075set dummy $tool_basename; ac_word=$2
38076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38077$as_echo_n "checking for $ac_word... " >&6; }
38078if ${ac_cv_path_STRIP+:} false; then :
38079  $as_echo_n "(cached) " >&6
38080else
38081  case $STRIP in
38082  [\\/]* | ?:[\\/]*)
38083  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38084  ;;
38085  *)
38086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38087for as_dir in $PATH
38088do
38089  IFS=$as_save_IFS
38090  test -z "$as_dir" && as_dir=.
38091    for ac_exec_ext in '' $ac_executable_extensions; do
38092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38093    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38095    break 2
38096  fi
38097done
38098  done
38099IFS=$as_save_IFS
38100
38101  ;;
38102esac
38103fi
38104STRIP=$ac_cv_path_STRIP
38105if test -n "$STRIP"; then
38106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38107$as_echo "$STRIP" >&6; }
38108else
38109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38110$as_echo "no" >&6; }
38111fi
38112
38113
38114          if test "x$STRIP" = x; then
38115            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38116          fi
38117        else
38118          # Otherwise we believe it is a complete path. Use it as it is.
38119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38120$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38121          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38122$as_echo_n "checking for STRIP... " >&6; }
38123          if test ! -x "$tool_specified"; then
38124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38125$as_echo "not found" >&6; }
38126            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38127          fi
38128          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38129$as_echo "$tool_specified" >&6; }
38130        fi
38131      fi
38132    fi
38133
38134  fi
38135
38136
38137
38138  # Only process if variable expands to non-empty
38139
38140  if test "x$STRIP" != x; then
38141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38142
38143  # First separate the path from the arguments. This will split at the first
38144  # space.
38145  complete="$STRIP"
38146  path="${complete%% *}"
38147  tmp="$complete EOL"
38148  arguments="${tmp#* }"
38149
38150  # Input might be given as Windows format, start by converting to
38151  # unix format.
38152  new_path=`$CYGPATH -u "$path"`
38153
38154  # Now try to locate executable using which
38155  new_path=`$WHICH "$new_path" 2> /dev/null`
38156  # bat and cmd files are not always considered executable in cygwin causing which
38157  # to not find them
38158  if test "x$new_path" = x \
38159      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38160      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38161    new_path=`$CYGPATH -u "$path"`
38162  fi
38163  if test "x$new_path" = x; then
38164    # Oops. Which didn't find the executable.
38165    # The splitting of arguments from the executable at a space might have been incorrect,
38166    # since paths with space are more likely in Windows. Give it another try with the whole
38167    # argument.
38168    path="$complete"
38169    arguments="EOL"
38170    new_path=`$CYGPATH -u "$path"`
38171    new_path=`$WHICH "$new_path" 2> /dev/null`
38172    # bat and cmd files are not always considered executable in cygwin causing which
38173    # to not find them
38174    if test "x$new_path" = x \
38175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38177      new_path=`$CYGPATH -u "$path"`
38178    fi
38179    if test "x$new_path" = x; then
38180      # It's still not found. Now this is an unrecoverable error.
38181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38182$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38183      has_space=`$ECHO "$complete" | $GREP " "`
38184      if test "x$has_space" != x; then
38185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38187      fi
38188      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38189    fi
38190  fi
38191
38192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38195  # "foo.exe" is OK but "foo" is an error.
38196  #
38197  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38198  # It is also a way to make sure we got the proper file name for the real test later on.
38199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38200  if test "x$test_shortpath" = x; then
38201    # Short path failed, file does not exist as specified.
38202    # Try adding .exe or .cmd
38203    if test -f "${new_path}.exe"; then
38204      input_to_shortpath="${new_path}.exe"
38205    elif test -f "${new_path}.cmd"; then
38206      input_to_shortpath="${new_path}.cmd"
38207    else
38208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38209$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38210      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38211$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38212      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38213    fi
38214  else
38215    input_to_shortpath="$new_path"
38216  fi
38217
38218  # Call helper function which possibly converts this using DOS-style short mode.
38219  # If so, the updated path is stored in $new_path.
38220  new_path="$input_to_shortpath"
38221
38222  input_path="$input_to_shortpath"
38223  # Check if we need to convert this using DOS-style short mode. If the path
38224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38225  # take no chances and rewrite it.
38226  # Note: m4 eats our [], so we need to use [ and ] instead.
38227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38228  if test "x$has_forbidden_chars" != x; then
38229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38233      # Going to short mode and back again did indeed matter. Since short mode is
38234      # case insensitive, let's make it lowercase to improve readability.
38235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38236      # Now convert it back to Unix-style (cygpath)
38237      input_path=`$CYGPATH -u "$shortmode_path"`
38238      new_path="$input_path"
38239    fi
38240  fi
38241
38242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38243  if test "x$test_cygdrive_prefix" = x; then
38244    # As a simple fix, exclude /usr/bin since it's not a real path.
38245    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38247      # a path prefixed by /cygdrive for fixpath to work.
38248      new_path="$CYGWIN_ROOT_PATH$input_path"
38249    fi
38250  fi
38251
38252  # remove trailing .exe if any
38253  new_path="${new_path/%.exe/}"
38254
38255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38256
38257  # First separate the path from the arguments. This will split at the first
38258  # space.
38259  complete="$STRIP"
38260  path="${complete%% *}"
38261  tmp="$complete EOL"
38262  arguments="${tmp#* }"
38263
38264  # Input might be given as Windows format, start by converting to
38265  # unix format.
38266  new_path="$path"
38267
38268  windows_path="$new_path"
38269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38270    unix_path=`$CYGPATH -u "$windows_path"`
38271    new_path="$unix_path"
38272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38274    new_path="$unix_path"
38275  fi
38276
38277
38278  # Now try to locate executable using which
38279  new_path=`$WHICH "$new_path" 2> /dev/null`
38280
38281  if test "x$new_path" = x; then
38282    # Oops. Which didn't find the executable.
38283    # The splitting of arguments from the executable at a space might have been incorrect,
38284    # since paths with space are more likely in Windows. Give it another try with the whole
38285    # argument.
38286    path="$complete"
38287    arguments="EOL"
38288    new_path="$path"
38289
38290  windows_path="$new_path"
38291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38292    unix_path=`$CYGPATH -u "$windows_path"`
38293    new_path="$unix_path"
38294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38296    new_path="$unix_path"
38297  fi
38298
38299
38300    new_path=`$WHICH "$new_path" 2> /dev/null`
38301    # bat and cmd files are not always considered executable in MSYS causing which
38302    # to not find them
38303    if test "x$new_path" = x \
38304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38306      new_path="$path"
38307
38308  windows_path="$new_path"
38309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38310    unix_path=`$CYGPATH -u "$windows_path"`
38311    new_path="$unix_path"
38312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38314    new_path="$unix_path"
38315  fi
38316
38317    fi
38318
38319    if test "x$new_path" = x; then
38320      # It's still not found. Now this is an unrecoverable error.
38321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38322$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38323      has_space=`$ECHO "$complete" | $GREP " "`
38324      if test "x$has_space" != x; then
38325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38327      fi
38328      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38329    fi
38330  fi
38331
38332  # Now new_path has a complete unix path to the binary
38333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38334    # Keep paths in /bin as-is, but remove trailing .exe if any
38335    new_path="${new_path/%.exe/}"
38336    # Do not save /bin paths to all_fixpath_prefixes!
38337  else
38338    # Not in mixed or Windows style, start by that.
38339    new_path=`cmd //c echo $new_path`
38340
38341  input_path="$new_path"
38342  # Check if we need to convert this using DOS-style short mode. If the path
38343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38344  # take no chances and rewrite it.
38345  # Note: m4 eats our [], so we need to use [ and ] instead.
38346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38347  if test "x$has_forbidden_chars" != x; then
38348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38350  fi
38351
38352    # Output is in $new_path
38353
38354  windows_path="$new_path"
38355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38356    unix_path=`$CYGPATH -u "$windows_path"`
38357    new_path="$unix_path"
38358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38360    new_path="$unix_path"
38361  fi
38362
38363    # remove trailing .exe if any
38364    new_path="${new_path/%.exe/}"
38365
38366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38368  fi
38369
38370    else
38371      # We're on a unix platform. Hooray! :)
38372      # First separate the path from the arguments. This will split at the first
38373      # space.
38374      complete="$STRIP"
38375      path="${complete%% *}"
38376      tmp="$complete EOL"
38377      arguments="${tmp#* }"
38378
38379      # Cannot rely on the command "which" here since it doesn't always work.
38380      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38381      if test -z "$is_absolute_path"; then
38382        # Path to executable is not absolute. Find it.
38383        IFS_save="$IFS"
38384        IFS=:
38385        for p in $PATH; do
38386          if test -f "$p/$path" && test -x "$p/$path"; then
38387            new_path="$p/$path"
38388            break
38389          fi
38390        done
38391        IFS="$IFS_save"
38392      else
38393        # This is an absolute path, we can use it without further modifications.
38394        new_path="$path"
38395      fi
38396
38397      if test "x$new_path" = x; then
38398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38399$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38400        has_space=`$ECHO "$complete" | $GREP " "`
38401        if test "x$has_space" != x; then
38402          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38403$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38404        fi
38405        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38406      fi
38407    fi
38408
38409    # Now join together the path and the arguments once again
38410    if test "x$arguments" != xEOL; then
38411      new_complete="$new_path ${arguments% *}"
38412    else
38413      new_complete="$new_path"
38414    fi
38415
38416    if test "x$complete" != "x$new_complete"; then
38417      STRIP="$new_complete"
38418      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38419$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38420    fi
38421  fi
38422
38423
38424
38425  # Publish this variable in the help.
38426
38427
38428  if [ -z "${NM+x}" ]; then
38429    # The variable is not set by user, try to locate tool using the code snippet
38430    for ac_prog in nm
38431do
38432  # Extract the first word of "$ac_prog", so it can be a program name with args.
38433set dummy $ac_prog; ac_word=$2
38434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38435$as_echo_n "checking for $ac_word... " >&6; }
38436if ${ac_cv_path_NM+:} false; then :
38437  $as_echo_n "(cached) " >&6
38438else
38439  case $NM in
38440  [\\/]* | ?:[\\/]*)
38441  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38442  ;;
38443  *)
38444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38445for as_dir in $PATH
38446do
38447  IFS=$as_save_IFS
38448  test -z "$as_dir" && as_dir=.
38449    for ac_exec_ext in '' $ac_executable_extensions; do
38450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38451    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38453    break 2
38454  fi
38455done
38456  done
38457IFS=$as_save_IFS
38458
38459  ;;
38460esac
38461fi
38462NM=$ac_cv_path_NM
38463if test -n "$NM"; then
38464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38465$as_echo "$NM" >&6; }
38466else
38467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38468$as_echo "no" >&6; }
38469fi
38470
38471
38472  test -n "$NM" && break
38473done
38474
38475  else
38476    # The variable is set, but is it from the command line or the environment?
38477
38478    # Try to remove the string !NM! from our list.
38479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38481      # If it failed, the variable was not from the command line. Ignore it,
38482      # but warn the user (except for BASH, which is always set by the calling BASH).
38483      if test "xNM" != xBASH; then
38484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38485$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38486      fi
38487      # Try to locate tool using the code snippet
38488      for ac_prog in nm
38489do
38490  # Extract the first word of "$ac_prog", so it can be a program name with args.
38491set dummy $ac_prog; ac_word=$2
38492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38493$as_echo_n "checking for $ac_word... " >&6; }
38494if ${ac_cv_path_NM+:} false; then :
38495  $as_echo_n "(cached) " >&6
38496else
38497  case $NM in
38498  [\\/]* | ?:[\\/]*)
38499  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38500  ;;
38501  *)
38502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38503for as_dir in $PATH
38504do
38505  IFS=$as_save_IFS
38506  test -z "$as_dir" && as_dir=.
38507    for ac_exec_ext in '' $ac_executable_extensions; do
38508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38509    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38511    break 2
38512  fi
38513done
38514  done
38515IFS=$as_save_IFS
38516
38517  ;;
38518esac
38519fi
38520NM=$ac_cv_path_NM
38521if test -n "$NM"; then
38522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38523$as_echo "$NM" >&6; }
38524else
38525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38526$as_echo "no" >&6; }
38527fi
38528
38529
38530  test -n "$NM" && break
38531done
38532
38533    else
38534      # If it succeeded, then it was overridden by the user. We will use it
38535      # for the tool.
38536
38537      # First remove it from the list of overridden variables, so we can test
38538      # for unknown variables in the end.
38539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38540
38541      # Check if we try to supply an empty value
38542      if test "x$NM" = x; then
38543        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38544$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38546$as_echo_n "checking for NM... " >&6; }
38547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38548$as_echo "disabled" >&6; }
38549      else
38550        # Check if the provided tool contains a complete path.
38551        tool_specified="$NM"
38552        tool_basename="${tool_specified##*/}"
38553        if test "x$tool_basename" = "x$tool_specified"; then
38554          # A command without a complete path is provided, search $PATH.
38555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38556$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38557          # Extract the first word of "$tool_basename", so it can be a program name with args.
38558set dummy $tool_basename; ac_word=$2
38559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38560$as_echo_n "checking for $ac_word... " >&6; }
38561if ${ac_cv_path_NM+:} false; then :
38562  $as_echo_n "(cached) " >&6
38563else
38564  case $NM in
38565  [\\/]* | ?:[\\/]*)
38566  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38567  ;;
38568  *)
38569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38570for as_dir in $PATH
38571do
38572  IFS=$as_save_IFS
38573  test -z "$as_dir" && as_dir=.
38574    for ac_exec_ext in '' $ac_executable_extensions; do
38575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38576    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38578    break 2
38579  fi
38580done
38581  done
38582IFS=$as_save_IFS
38583
38584  ;;
38585esac
38586fi
38587NM=$ac_cv_path_NM
38588if test -n "$NM"; then
38589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38590$as_echo "$NM" >&6; }
38591else
38592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38593$as_echo "no" >&6; }
38594fi
38595
38596
38597          if test "x$NM" = x; then
38598            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38599          fi
38600        else
38601          # Otherwise we believe it is a complete path. Use it as it is.
38602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38603$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38604          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38605$as_echo_n "checking for NM... " >&6; }
38606          if test ! -x "$tool_specified"; then
38607            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38608$as_echo "not found" >&6; }
38609            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38610          fi
38611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38612$as_echo "$tool_specified" >&6; }
38613        fi
38614      fi
38615    fi
38616
38617  fi
38618
38619
38620
38621  # Only process if variable expands to non-empty
38622
38623  if test "x$NM" != x; then
38624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38625
38626  # First separate the path from the arguments. This will split at the first
38627  # space.
38628  complete="$NM"
38629  path="${complete%% *}"
38630  tmp="$complete EOL"
38631  arguments="${tmp#* }"
38632
38633  # Input might be given as Windows format, start by converting to
38634  # unix format.
38635  new_path=`$CYGPATH -u "$path"`
38636
38637  # Now try to locate executable using which
38638  new_path=`$WHICH "$new_path" 2> /dev/null`
38639  # bat and cmd files are not always considered executable in cygwin causing which
38640  # to not find them
38641  if test "x$new_path" = x \
38642      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38643      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38644    new_path=`$CYGPATH -u "$path"`
38645  fi
38646  if test "x$new_path" = x; then
38647    # Oops. Which didn't find the executable.
38648    # The splitting of arguments from the executable at a space might have been incorrect,
38649    # since paths with space are more likely in Windows. Give it another try with the whole
38650    # argument.
38651    path="$complete"
38652    arguments="EOL"
38653    new_path=`$CYGPATH -u "$path"`
38654    new_path=`$WHICH "$new_path" 2> /dev/null`
38655    # bat and cmd files are not always considered executable in cygwin causing which
38656    # to not find them
38657    if test "x$new_path" = x \
38658        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38659        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38660      new_path=`$CYGPATH -u "$path"`
38661    fi
38662    if test "x$new_path" = x; then
38663      # It's still not found. Now this is an unrecoverable error.
38664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38665$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38666      has_space=`$ECHO "$complete" | $GREP " "`
38667      if test "x$has_space" != x; then
38668        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38669$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38670      fi
38671      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38672    fi
38673  fi
38674
38675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38678  # "foo.exe" is OK but "foo" is an error.
38679  #
38680  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38681  # It is also a way to make sure we got the proper file name for the real test later on.
38682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38683  if test "x$test_shortpath" = x; then
38684    # Short path failed, file does not exist as specified.
38685    # Try adding .exe or .cmd
38686    if test -f "${new_path}.exe"; then
38687      input_to_shortpath="${new_path}.exe"
38688    elif test -f "${new_path}.cmd"; then
38689      input_to_shortpath="${new_path}.cmd"
38690    else
38691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38692$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38693      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38694$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38695      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38696    fi
38697  else
38698    input_to_shortpath="$new_path"
38699  fi
38700
38701  # Call helper function which possibly converts this using DOS-style short mode.
38702  # If so, the updated path is stored in $new_path.
38703  new_path="$input_to_shortpath"
38704
38705  input_path="$input_to_shortpath"
38706  # Check if we need to convert this using DOS-style short mode. If the path
38707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38708  # take no chances and rewrite it.
38709  # Note: m4 eats our [], so we need to use [ and ] instead.
38710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38711  if test "x$has_forbidden_chars" != x; then
38712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38716      # Going to short mode and back again did indeed matter. Since short mode is
38717      # case insensitive, let's make it lowercase to improve readability.
38718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38719      # Now convert it back to Unix-style (cygpath)
38720      input_path=`$CYGPATH -u "$shortmode_path"`
38721      new_path="$input_path"
38722    fi
38723  fi
38724
38725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38726  if test "x$test_cygdrive_prefix" = x; then
38727    # As a simple fix, exclude /usr/bin since it's not a real path.
38728    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38730      # a path prefixed by /cygdrive for fixpath to work.
38731      new_path="$CYGWIN_ROOT_PATH$input_path"
38732    fi
38733  fi
38734
38735  # remove trailing .exe if any
38736  new_path="${new_path/%.exe/}"
38737
38738    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38739
38740  # First separate the path from the arguments. This will split at the first
38741  # space.
38742  complete="$NM"
38743  path="${complete%% *}"
38744  tmp="$complete EOL"
38745  arguments="${tmp#* }"
38746
38747  # Input might be given as Windows format, start by converting to
38748  # unix format.
38749  new_path="$path"
38750
38751  windows_path="$new_path"
38752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38753    unix_path=`$CYGPATH -u "$windows_path"`
38754    new_path="$unix_path"
38755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38757    new_path="$unix_path"
38758  fi
38759
38760
38761  # Now try to locate executable using which
38762  new_path=`$WHICH "$new_path" 2> /dev/null`
38763
38764  if test "x$new_path" = x; then
38765    # Oops. Which didn't find the executable.
38766    # The splitting of arguments from the executable at a space might have been incorrect,
38767    # since paths with space are more likely in Windows. Give it another try with the whole
38768    # argument.
38769    path="$complete"
38770    arguments="EOL"
38771    new_path="$path"
38772
38773  windows_path="$new_path"
38774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38775    unix_path=`$CYGPATH -u "$windows_path"`
38776    new_path="$unix_path"
38777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38779    new_path="$unix_path"
38780  fi
38781
38782
38783    new_path=`$WHICH "$new_path" 2> /dev/null`
38784    # bat and cmd files are not always considered executable in MSYS causing which
38785    # to not find them
38786    if test "x$new_path" = x \
38787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38789      new_path="$path"
38790
38791  windows_path="$new_path"
38792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38793    unix_path=`$CYGPATH -u "$windows_path"`
38794    new_path="$unix_path"
38795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38797    new_path="$unix_path"
38798  fi
38799
38800    fi
38801
38802    if test "x$new_path" = x; then
38803      # It's still not found. Now this is an unrecoverable error.
38804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38805$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38806      has_space=`$ECHO "$complete" | $GREP " "`
38807      if test "x$has_space" != x; then
38808        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38809$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38810      fi
38811      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38812    fi
38813  fi
38814
38815  # Now new_path has a complete unix path to the binary
38816  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38817    # Keep paths in /bin as-is, but remove trailing .exe if any
38818    new_path="${new_path/%.exe/}"
38819    # Do not save /bin paths to all_fixpath_prefixes!
38820  else
38821    # Not in mixed or Windows style, start by that.
38822    new_path=`cmd //c echo $new_path`
38823
38824  input_path="$new_path"
38825  # Check if we need to convert this using DOS-style short mode. If the path
38826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38827  # take no chances and rewrite it.
38828  # Note: m4 eats our [], so we need to use [ and ] instead.
38829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38830  if test "x$has_forbidden_chars" != x; then
38831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38833  fi
38834
38835    # Output is in $new_path
38836
38837  windows_path="$new_path"
38838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38839    unix_path=`$CYGPATH -u "$windows_path"`
38840    new_path="$unix_path"
38841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38843    new_path="$unix_path"
38844  fi
38845
38846    # remove trailing .exe if any
38847    new_path="${new_path/%.exe/}"
38848
38849    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38850    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38851  fi
38852
38853    else
38854      # We're on a unix platform. Hooray! :)
38855      # First separate the path from the arguments. This will split at the first
38856      # space.
38857      complete="$NM"
38858      path="${complete%% *}"
38859      tmp="$complete EOL"
38860      arguments="${tmp#* }"
38861
38862      # Cannot rely on the command "which" here since it doesn't always work.
38863      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38864      if test -z "$is_absolute_path"; then
38865        # Path to executable is not absolute. Find it.
38866        IFS_save="$IFS"
38867        IFS=:
38868        for p in $PATH; do
38869          if test -f "$p/$path" && test -x "$p/$path"; then
38870            new_path="$p/$path"
38871            break
38872          fi
38873        done
38874        IFS="$IFS_save"
38875      else
38876        # This is an absolute path, we can use it without further modifications.
38877        new_path="$path"
38878      fi
38879
38880      if test "x$new_path" = x; then
38881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38882$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38883        has_space=`$ECHO "$complete" | $GREP " "`
38884        if test "x$has_space" != x; then
38885          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38886$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38887        fi
38888        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38889      fi
38890    fi
38891
38892    # Now join together the path and the arguments once again
38893    if test "x$arguments" != xEOL; then
38894      new_complete="$new_path ${arguments% *}"
38895    else
38896      new_complete="$new_path"
38897    fi
38898
38899    if test "x$complete" != "x$new_complete"; then
38900      NM="$new_complete"
38901      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38902$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38903    fi
38904  fi
38905
38906
38907
38908  # Publish this variable in the help.
38909
38910
38911  if [ -z "${GNM+x}" ]; then
38912    # The variable is not set by user, try to locate tool using the code snippet
38913    for ac_prog in gnm
38914do
38915  # Extract the first word of "$ac_prog", so it can be a program name with args.
38916set dummy $ac_prog; ac_word=$2
38917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38918$as_echo_n "checking for $ac_word... " >&6; }
38919if ${ac_cv_path_GNM+:} false; then :
38920  $as_echo_n "(cached) " >&6
38921else
38922  case $GNM in
38923  [\\/]* | ?:[\\/]*)
38924  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38925  ;;
38926  *)
38927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38928for as_dir in $PATH
38929do
38930  IFS=$as_save_IFS
38931  test -z "$as_dir" && as_dir=.
38932    for ac_exec_ext in '' $ac_executable_extensions; do
38933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38934    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38936    break 2
38937  fi
38938done
38939  done
38940IFS=$as_save_IFS
38941
38942  ;;
38943esac
38944fi
38945GNM=$ac_cv_path_GNM
38946if test -n "$GNM"; then
38947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38948$as_echo "$GNM" >&6; }
38949else
38950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38951$as_echo "no" >&6; }
38952fi
38953
38954
38955  test -n "$GNM" && break
38956done
38957
38958  else
38959    # The variable is set, but is it from the command line or the environment?
38960
38961    # Try to remove the string !GNM! from our list.
38962    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
38963    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38964      # If it failed, the variable was not from the command line. Ignore it,
38965      # but warn the user (except for BASH, which is always set by the calling BASH).
38966      if test "xGNM" != xBASH; then
38967        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
38968$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
38969      fi
38970      # Try to locate tool using the code snippet
38971      for ac_prog in gnm
38972do
38973  # Extract the first word of "$ac_prog", so it can be a program name with args.
38974set dummy $ac_prog; ac_word=$2
38975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38976$as_echo_n "checking for $ac_word... " >&6; }
38977if ${ac_cv_path_GNM+:} false; then :
38978  $as_echo_n "(cached) " >&6
38979else
38980  case $GNM in
38981  [\\/]* | ?:[\\/]*)
38982  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38983  ;;
38984  *)
38985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38986for as_dir in $PATH
38987do
38988  IFS=$as_save_IFS
38989  test -z "$as_dir" && as_dir=.
38990    for ac_exec_ext in '' $ac_executable_extensions; do
38991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38992    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38994    break 2
38995  fi
38996done
38997  done
38998IFS=$as_save_IFS
38999
39000  ;;
39001esac
39002fi
39003GNM=$ac_cv_path_GNM
39004if test -n "$GNM"; then
39005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39006$as_echo "$GNM" >&6; }
39007else
39008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39009$as_echo "no" >&6; }
39010fi
39011
39012
39013  test -n "$GNM" && break
39014done
39015
39016    else
39017      # If it succeeded, then it was overridden by the user. We will use it
39018      # for the tool.
39019
39020      # First remove it from the list of overridden variables, so we can test
39021      # for unknown variables in the end.
39022      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39023
39024      # Check if we try to supply an empty value
39025      if test "x$GNM" = x; then
39026        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39027$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39029$as_echo_n "checking for GNM... " >&6; }
39030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39031$as_echo "disabled" >&6; }
39032      else
39033        # Check if the provided tool contains a complete path.
39034        tool_specified="$GNM"
39035        tool_basename="${tool_specified##*/}"
39036        if test "x$tool_basename" = "x$tool_specified"; then
39037          # A command without a complete path is provided, search $PATH.
39038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39039$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39040          # Extract the first word of "$tool_basename", so it can be a program name with args.
39041set dummy $tool_basename; ac_word=$2
39042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39043$as_echo_n "checking for $ac_word... " >&6; }
39044if ${ac_cv_path_GNM+:} false; then :
39045  $as_echo_n "(cached) " >&6
39046else
39047  case $GNM in
39048  [\\/]* | ?:[\\/]*)
39049  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39050  ;;
39051  *)
39052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39053for as_dir in $PATH
39054do
39055  IFS=$as_save_IFS
39056  test -z "$as_dir" && as_dir=.
39057    for ac_exec_ext in '' $ac_executable_extensions; do
39058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39059    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39061    break 2
39062  fi
39063done
39064  done
39065IFS=$as_save_IFS
39066
39067  ;;
39068esac
39069fi
39070GNM=$ac_cv_path_GNM
39071if test -n "$GNM"; then
39072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39073$as_echo "$GNM" >&6; }
39074else
39075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39076$as_echo "no" >&6; }
39077fi
39078
39079
39080          if test "x$GNM" = x; then
39081            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39082          fi
39083        else
39084          # Otherwise we believe it is a complete path. Use it as it is.
39085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39086$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39087          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39088$as_echo_n "checking for GNM... " >&6; }
39089          if test ! -x "$tool_specified"; then
39090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39091$as_echo "not found" >&6; }
39092            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39093          fi
39094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39095$as_echo "$tool_specified" >&6; }
39096        fi
39097      fi
39098    fi
39099
39100  fi
39101
39102
39103
39104  # Only process if variable expands to non-empty
39105
39106  if test "x$GNM" != x; then
39107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39108
39109  # First separate the path from the arguments. This will split at the first
39110  # space.
39111  complete="$GNM"
39112  path="${complete%% *}"
39113  tmp="$complete EOL"
39114  arguments="${tmp#* }"
39115
39116  # Input might be given as Windows format, start by converting to
39117  # unix format.
39118  new_path=`$CYGPATH -u "$path"`
39119
39120  # Now try to locate executable using which
39121  new_path=`$WHICH "$new_path" 2> /dev/null`
39122  # bat and cmd files are not always considered executable in cygwin causing which
39123  # to not find them
39124  if test "x$new_path" = x \
39125      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39126      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39127    new_path=`$CYGPATH -u "$path"`
39128  fi
39129  if test "x$new_path" = x; then
39130    # Oops. Which didn't find the executable.
39131    # The splitting of arguments from the executable at a space might have been incorrect,
39132    # since paths with space are more likely in Windows. Give it another try with the whole
39133    # argument.
39134    path="$complete"
39135    arguments="EOL"
39136    new_path=`$CYGPATH -u "$path"`
39137    new_path=`$WHICH "$new_path" 2> /dev/null`
39138    # bat and cmd files are not always considered executable in cygwin causing which
39139    # to not find them
39140    if test "x$new_path" = x \
39141        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39142        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39143      new_path=`$CYGPATH -u "$path"`
39144    fi
39145    if test "x$new_path" = x; then
39146      # It's still not found. Now this is an unrecoverable error.
39147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39148$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39149      has_space=`$ECHO "$complete" | $GREP " "`
39150      if test "x$has_space" != x; then
39151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39153      fi
39154      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39155    fi
39156  fi
39157
39158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39161  # "foo.exe" is OK but "foo" is an error.
39162  #
39163  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39164  # It is also a way to make sure we got the proper file name for the real test later on.
39165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39166  if test "x$test_shortpath" = x; then
39167    # Short path failed, file does not exist as specified.
39168    # Try adding .exe or .cmd
39169    if test -f "${new_path}.exe"; then
39170      input_to_shortpath="${new_path}.exe"
39171    elif test -f "${new_path}.cmd"; then
39172      input_to_shortpath="${new_path}.cmd"
39173    else
39174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39175$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39176      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39177$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39178      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39179    fi
39180  else
39181    input_to_shortpath="$new_path"
39182  fi
39183
39184  # Call helper function which possibly converts this using DOS-style short mode.
39185  # If so, the updated path is stored in $new_path.
39186  new_path="$input_to_shortpath"
39187
39188  input_path="$input_to_shortpath"
39189  # Check if we need to convert this using DOS-style short mode. If the path
39190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39191  # take no chances and rewrite it.
39192  # Note: m4 eats our [], so we need to use [ and ] instead.
39193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39194  if test "x$has_forbidden_chars" != x; then
39195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39199      # Going to short mode and back again did indeed matter. Since short mode is
39200      # case insensitive, let's make it lowercase to improve readability.
39201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39202      # Now convert it back to Unix-style (cygpath)
39203      input_path=`$CYGPATH -u "$shortmode_path"`
39204      new_path="$input_path"
39205    fi
39206  fi
39207
39208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39209  if test "x$test_cygdrive_prefix" = x; then
39210    # As a simple fix, exclude /usr/bin since it's not a real path.
39211    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39213      # a path prefixed by /cygdrive for fixpath to work.
39214      new_path="$CYGWIN_ROOT_PATH$input_path"
39215    fi
39216  fi
39217
39218  # remove trailing .exe if any
39219  new_path="${new_path/%.exe/}"
39220
39221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39222
39223  # First separate the path from the arguments. This will split at the first
39224  # space.
39225  complete="$GNM"
39226  path="${complete%% *}"
39227  tmp="$complete EOL"
39228  arguments="${tmp#* }"
39229
39230  # Input might be given as Windows format, start by converting to
39231  # unix format.
39232  new_path="$path"
39233
39234  windows_path="$new_path"
39235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39236    unix_path=`$CYGPATH -u "$windows_path"`
39237    new_path="$unix_path"
39238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39240    new_path="$unix_path"
39241  fi
39242
39243
39244  # Now try to locate executable using which
39245  new_path=`$WHICH "$new_path" 2> /dev/null`
39246
39247  if test "x$new_path" = x; then
39248    # Oops. Which didn't find the executable.
39249    # The splitting of arguments from the executable at a space might have been incorrect,
39250    # since paths with space are more likely in Windows. Give it another try with the whole
39251    # argument.
39252    path="$complete"
39253    arguments="EOL"
39254    new_path="$path"
39255
39256  windows_path="$new_path"
39257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39258    unix_path=`$CYGPATH -u "$windows_path"`
39259    new_path="$unix_path"
39260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39262    new_path="$unix_path"
39263  fi
39264
39265
39266    new_path=`$WHICH "$new_path" 2> /dev/null`
39267    # bat and cmd files are not always considered executable in MSYS causing which
39268    # to not find them
39269    if test "x$new_path" = x \
39270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39272      new_path="$path"
39273
39274  windows_path="$new_path"
39275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39276    unix_path=`$CYGPATH -u "$windows_path"`
39277    new_path="$unix_path"
39278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39280    new_path="$unix_path"
39281  fi
39282
39283    fi
39284
39285    if test "x$new_path" = x; then
39286      # It's still not found. Now this is an unrecoverable error.
39287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39288$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39289      has_space=`$ECHO "$complete" | $GREP " "`
39290      if test "x$has_space" != x; then
39291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39293      fi
39294      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39295    fi
39296  fi
39297
39298  # Now new_path has a complete unix path to the binary
39299  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39300    # Keep paths in /bin as-is, but remove trailing .exe if any
39301    new_path="${new_path/%.exe/}"
39302    # Do not save /bin paths to all_fixpath_prefixes!
39303  else
39304    # Not in mixed or Windows style, start by that.
39305    new_path=`cmd //c echo $new_path`
39306
39307  input_path="$new_path"
39308  # Check if we need to convert this using DOS-style short mode. If the path
39309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39310  # take no chances and rewrite it.
39311  # Note: m4 eats our [], so we need to use [ and ] instead.
39312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39313  if test "x$has_forbidden_chars" != x; then
39314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39316  fi
39317
39318    # Output is in $new_path
39319
39320  windows_path="$new_path"
39321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39322    unix_path=`$CYGPATH -u "$windows_path"`
39323    new_path="$unix_path"
39324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39326    new_path="$unix_path"
39327  fi
39328
39329    # remove trailing .exe if any
39330    new_path="${new_path/%.exe/}"
39331
39332    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39333    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39334  fi
39335
39336    else
39337      # We're on a unix platform. Hooray! :)
39338      # First separate the path from the arguments. This will split at the first
39339      # space.
39340      complete="$GNM"
39341      path="${complete%% *}"
39342      tmp="$complete EOL"
39343      arguments="${tmp#* }"
39344
39345      # Cannot rely on the command "which" here since it doesn't always work.
39346      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39347      if test -z "$is_absolute_path"; then
39348        # Path to executable is not absolute. Find it.
39349        IFS_save="$IFS"
39350        IFS=:
39351        for p in $PATH; do
39352          if test -f "$p/$path" && test -x "$p/$path"; then
39353            new_path="$p/$path"
39354            break
39355          fi
39356        done
39357        IFS="$IFS_save"
39358      else
39359        # This is an absolute path, we can use it without further modifications.
39360        new_path="$path"
39361      fi
39362
39363      if test "x$new_path" = x; then
39364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39365$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39366        has_space=`$ECHO "$complete" | $GREP " "`
39367        if test "x$has_space" != x; then
39368          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39369$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39370        fi
39371        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39372      fi
39373    fi
39374
39375    # Now join together the path and the arguments once again
39376    if test "x$arguments" != xEOL; then
39377      new_complete="$new_path ${arguments% *}"
39378    else
39379      new_complete="$new_path"
39380    fi
39381
39382    if test "x$complete" != "x$new_complete"; then
39383      GNM="$new_complete"
39384      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39385$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39386    fi
39387  fi
39388
39389  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39390    # FIXME: we should unify this with the solaris case above.
39391
39392
39393  # Publish this variable in the help.
39394
39395
39396  if [ -z "${STRIP+x}" ]; then
39397    # The variable is not set by user, try to locate tool using the code snippet
39398    if test -n "$ac_tool_prefix"; then
39399  for ac_prog in strip
39400  do
39401    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39402set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39404$as_echo_n "checking for $ac_word... " >&6; }
39405if ${ac_cv_prog_STRIP+:} false; then :
39406  $as_echo_n "(cached) " >&6
39407else
39408  if test -n "$STRIP"; then
39409  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39410else
39411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39412for as_dir in $PATH
39413do
39414  IFS=$as_save_IFS
39415  test -z "$as_dir" && as_dir=.
39416    for ac_exec_ext in '' $ac_executable_extensions; do
39417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39418    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39420    break 2
39421  fi
39422done
39423  done
39424IFS=$as_save_IFS
39425
39426fi
39427fi
39428STRIP=$ac_cv_prog_STRIP
39429if test -n "$STRIP"; then
39430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39431$as_echo "$STRIP" >&6; }
39432else
39433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39434$as_echo "no" >&6; }
39435fi
39436
39437
39438    test -n "$STRIP" && break
39439  done
39440fi
39441if test -z "$STRIP"; then
39442  ac_ct_STRIP=$STRIP
39443  for ac_prog in strip
39444do
39445  # Extract the first word of "$ac_prog", so it can be a program name with args.
39446set dummy $ac_prog; ac_word=$2
39447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39448$as_echo_n "checking for $ac_word... " >&6; }
39449if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39450  $as_echo_n "(cached) " >&6
39451else
39452  if test -n "$ac_ct_STRIP"; then
39453  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39454else
39455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39456for as_dir in $PATH
39457do
39458  IFS=$as_save_IFS
39459  test -z "$as_dir" && as_dir=.
39460    for ac_exec_ext in '' $ac_executable_extensions; do
39461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39462    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39464    break 2
39465  fi
39466done
39467  done
39468IFS=$as_save_IFS
39469
39470fi
39471fi
39472ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39473if test -n "$ac_ct_STRIP"; then
39474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39475$as_echo "$ac_ct_STRIP" >&6; }
39476else
39477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39478$as_echo "no" >&6; }
39479fi
39480
39481
39482  test -n "$ac_ct_STRIP" && break
39483done
39484
39485  if test "x$ac_ct_STRIP" = x; then
39486    STRIP=""
39487  else
39488    case $cross_compiling:$ac_tool_warned in
39489yes:)
39490{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39491$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39492ac_tool_warned=yes ;;
39493esac
39494    STRIP=$ac_ct_STRIP
39495  fi
39496fi
39497
39498  else
39499    # The variable is set, but is it from the command line or the environment?
39500
39501    # Try to remove the string !STRIP! from our list.
39502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39504      # If it failed, the variable was not from the command line. Ignore it,
39505      # but warn the user (except for BASH, which is always set by the calling BASH).
39506      if test "xSTRIP" != xBASH; then
39507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39508$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39509      fi
39510      # Try to locate tool using the code snippet
39511      if test -n "$ac_tool_prefix"; then
39512  for ac_prog in strip
39513  do
39514    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39515set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39517$as_echo_n "checking for $ac_word... " >&6; }
39518if ${ac_cv_prog_STRIP+:} false; then :
39519  $as_echo_n "(cached) " >&6
39520else
39521  if test -n "$STRIP"; then
39522  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39523else
39524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39525for as_dir in $PATH
39526do
39527  IFS=$as_save_IFS
39528  test -z "$as_dir" && as_dir=.
39529    for ac_exec_ext in '' $ac_executable_extensions; do
39530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39531    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39533    break 2
39534  fi
39535done
39536  done
39537IFS=$as_save_IFS
39538
39539fi
39540fi
39541STRIP=$ac_cv_prog_STRIP
39542if test -n "$STRIP"; then
39543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39544$as_echo "$STRIP" >&6; }
39545else
39546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39547$as_echo "no" >&6; }
39548fi
39549
39550
39551    test -n "$STRIP" && break
39552  done
39553fi
39554if test -z "$STRIP"; then
39555  ac_ct_STRIP=$STRIP
39556  for ac_prog in strip
39557do
39558  # Extract the first word of "$ac_prog", so it can be a program name with args.
39559set dummy $ac_prog; ac_word=$2
39560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39561$as_echo_n "checking for $ac_word... " >&6; }
39562if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39563  $as_echo_n "(cached) " >&6
39564else
39565  if test -n "$ac_ct_STRIP"; then
39566  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39567else
39568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39569for as_dir in $PATH
39570do
39571  IFS=$as_save_IFS
39572  test -z "$as_dir" && as_dir=.
39573    for ac_exec_ext in '' $ac_executable_extensions; do
39574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39575    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39577    break 2
39578  fi
39579done
39580  done
39581IFS=$as_save_IFS
39582
39583fi
39584fi
39585ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39586if test -n "$ac_ct_STRIP"; then
39587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39588$as_echo "$ac_ct_STRIP" >&6; }
39589else
39590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39591$as_echo "no" >&6; }
39592fi
39593
39594
39595  test -n "$ac_ct_STRIP" && break
39596done
39597
39598  if test "x$ac_ct_STRIP" = x; then
39599    STRIP=""
39600  else
39601    case $cross_compiling:$ac_tool_warned in
39602yes:)
39603{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39604$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39605ac_tool_warned=yes ;;
39606esac
39607    STRIP=$ac_ct_STRIP
39608  fi
39609fi
39610
39611    else
39612      # If it succeeded, then it was overridden by the user. We will use it
39613      # for the tool.
39614
39615      # First remove it from the list of overridden variables, so we can test
39616      # for unknown variables in the end.
39617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39618
39619      # Check if we try to supply an empty value
39620      if test "x$STRIP" = x; then
39621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39622$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39624$as_echo_n "checking for STRIP... " >&6; }
39625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39626$as_echo "disabled" >&6; }
39627      else
39628        # Check if the provided tool contains a complete path.
39629        tool_specified="$STRIP"
39630        tool_basename="${tool_specified##*/}"
39631        if test "x$tool_basename" = "x$tool_specified"; then
39632          # A command without a complete path is provided, search $PATH.
39633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39634$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39635          # Extract the first word of "$tool_basename", so it can be a program name with args.
39636set dummy $tool_basename; ac_word=$2
39637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39638$as_echo_n "checking for $ac_word... " >&6; }
39639if ${ac_cv_path_STRIP+:} false; then :
39640  $as_echo_n "(cached) " >&6
39641else
39642  case $STRIP in
39643  [\\/]* | ?:[\\/]*)
39644  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39645  ;;
39646  *)
39647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39648for as_dir in $PATH
39649do
39650  IFS=$as_save_IFS
39651  test -z "$as_dir" && as_dir=.
39652    for ac_exec_ext in '' $ac_executable_extensions; do
39653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39654    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39656    break 2
39657  fi
39658done
39659  done
39660IFS=$as_save_IFS
39661
39662  ;;
39663esac
39664fi
39665STRIP=$ac_cv_path_STRIP
39666if test -n "$STRIP"; then
39667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39668$as_echo "$STRIP" >&6; }
39669else
39670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39671$as_echo "no" >&6; }
39672fi
39673
39674
39675          if test "x$STRIP" = x; then
39676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39677          fi
39678        else
39679          # Otherwise we believe it is a complete path. Use it as it is.
39680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39681$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39683$as_echo_n "checking for STRIP... " >&6; }
39684          if test ! -x "$tool_specified"; then
39685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39686$as_echo "not found" >&6; }
39687            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39688          fi
39689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39690$as_echo "$tool_specified" >&6; }
39691        fi
39692      fi
39693    fi
39694
39695  fi
39696
39697
39698
39699  # Only process if variable expands to non-empty
39700
39701  if test "x$STRIP" != x; then
39702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39703
39704  # First separate the path from the arguments. This will split at the first
39705  # space.
39706  complete="$STRIP"
39707  path="${complete%% *}"
39708  tmp="$complete EOL"
39709  arguments="${tmp#* }"
39710
39711  # Input might be given as Windows format, start by converting to
39712  # unix format.
39713  new_path=`$CYGPATH -u "$path"`
39714
39715  # Now try to locate executable using which
39716  new_path=`$WHICH "$new_path" 2> /dev/null`
39717  # bat and cmd files are not always considered executable in cygwin causing which
39718  # to not find them
39719  if test "x$new_path" = x \
39720      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39721      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39722    new_path=`$CYGPATH -u "$path"`
39723  fi
39724  if test "x$new_path" = x; then
39725    # Oops. Which didn't find the executable.
39726    # The splitting of arguments from the executable at a space might have been incorrect,
39727    # since paths with space are more likely in Windows. Give it another try with the whole
39728    # argument.
39729    path="$complete"
39730    arguments="EOL"
39731    new_path=`$CYGPATH -u "$path"`
39732    new_path=`$WHICH "$new_path" 2> /dev/null`
39733    # bat and cmd files are not always considered executable in cygwin causing which
39734    # to not find them
39735    if test "x$new_path" = x \
39736        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39737        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39738      new_path=`$CYGPATH -u "$path"`
39739    fi
39740    if test "x$new_path" = x; then
39741      # It's still not found. Now this is an unrecoverable error.
39742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39743$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39744      has_space=`$ECHO "$complete" | $GREP " "`
39745      if test "x$has_space" != x; then
39746        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39748      fi
39749      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39750    fi
39751  fi
39752
39753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39756  # "foo.exe" is OK but "foo" is an error.
39757  #
39758  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39759  # It is also a way to make sure we got the proper file name for the real test later on.
39760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39761  if test "x$test_shortpath" = x; then
39762    # Short path failed, file does not exist as specified.
39763    # Try adding .exe or .cmd
39764    if test -f "${new_path}.exe"; then
39765      input_to_shortpath="${new_path}.exe"
39766    elif test -f "${new_path}.cmd"; then
39767      input_to_shortpath="${new_path}.cmd"
39768    else
39769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39770$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39771      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39772$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39773      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39774    fi
39775  else
39776    input_to_shortpath="$new_path"
39777  fi
39778
39779  # Call helper function which possibly converts this using DOS-style short mode.
39780  # If so, the updated path is stored in $new_path.
39781  new_path="$input_to_shortpath"
39782
39783  input_path="$input_to_shortpath"
39784  # Check if we need to convert this using DOS-style short mode. If the path
39785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39786  # take no chances and rewrite it.
39787  # Note: m4 eats our [], so we need to use [ and ] instead.
39788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39789  if test "x$has_forbidden_chars" != x; then
39790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39794      # Going to short mode and back again did indeed matter. Since short mode is
39795      # case insensitive, let's make it lowercase to improve readability.
39796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39797      # Now convert it back to Unix-style (cygpath)
39798      input_path=`$CYGPATH -u "$shortmode_path"`
39799      new_path="$input_path"
39800    fi
39801  fi
39802
39803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39804  if test "x$test_cygdrive_prefix" = x; then
39805    # As a simple fix, exclude /usr/bin since it's not a real path.
39806    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39808      # a path prefixed by /cygdrive for fixpath to work.
39809      new_path="$CYGWIN_ROOT_PATH$input_path"
39810    fi
39811  fi
39812
39813  # remove trailing .exe if any
39814  new_path="${new_path/%.exe/}"
39815
39816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39817
39818  # First separate the path from the arguments. This will split at the first
39819  # space.
39820  complete="$STRIP"
39821  path="${complete%% *}"
39822  tmp="$complete EOL"
39823  arguments="${tmp#* }"
39824
39825  # Input might be given as Windows format, start by converting to
39826  # unix format.
39827  new_path="$path"
39828
39829  windows_path="$new_path"
39830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39831    unix_path=`$CYGPATH -u "$windows_path"`
39832    new_path="$unix_path"
39833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39835    new_path="$unix_path"
39836  fi
39837
39838
39839  # Now try to locate executable using which
39840  new_path=`$WHICH "$new_path" 2> /dev/null`
39841
39842  if test "x$new_path" = x; then
39843    # Oops. Which didn't find the executable.
39844    # The splitting of arguments from the executable at a space might have been incorrect,
39845    # since paths with space are more likely in Windows. Give it another try with the whole
39846    # argument.
39847    path="$complete"
39848    arguments="EOL"
39849    new_path="$path"
39850
39851  windows_path="$new_path"
39852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39853    unix_path=`$CYGPATH -u "$windows_path"`
39854    new_path="$unix_path"
39855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39857    new_path="$unix_path"
39858  fi
39859
39860
39861    new_path=`$WHICH "$new_path" 2> /dev/null`
39862    # bat and cmd files are not always considered executable in MSYS causing which
39863    # to not find them
39864    if test "x$new_path" = x \
39865        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39866        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39867      new_path="$path"
39868
39869  windows_path="$new_path"
39870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39871    unix_path=`$CYGPATH -u "$windows_path"`
39872    new_path="$unix_path"
39873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39875    new_path="$unix_path"
39876  fi
39877
39878    fi
39879
39880    if test "x$new_path" = x; then
39881      # It's still not found. Now this is an unrecoverable error.
39882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39883$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39884      has_space=`$ECHO "$complete" | $GREP " "`
39885      if test "x$has_space" != x; then
39886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39888      fi
39889      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39890    fi
39891  fi
39892
39893  # Now new_path has a complete unix path to the binary
39894  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39895    # Keep paths in /bin as-is, but remove trailing .exe if any
39896    new_path="${new_path/%.exe/}"
39897    # Do not save /bin paths to all_fixpath_prefixes!
39898  else
39899    # Not in mixed or Windows style, start by that.
39900    new_path=`cmd //c echo $new_path`
39901
39902  input_path="$new_path"
39903  # Check if we need to convert this using DOS-style short mode. If the path
39904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39905  # take no chances and rewrite it.
39906  # Note: m4 eats our [], so we need to use [ and ] instead.
39907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39908  if test "x$has_forbidden_chars" != x; then
39909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39911  fi
39912
39913    # Output is in $new_path
39914
39915  windows_path="$new_path"
39916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39917    unix_path=`$CYGPATH -u "$windows_path"`
39918    new_path="$unix_path"
39919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39921    new_path="$unix_path"
39922  fi
39923
39924    # remove trailing .exe if any
39925    new_path="${new_path/%.exe/}"
39926
39927    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39928    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39929  fi
39930
39931    else
39932      # We're on a unix platform. Hooray! :)
39933      # First separate the path from the arguments. This will split at the first
39934      # space.
39935      complete="$STRIP"
39936      path="${complete%% *}"
39937      tmp="$complete EOL"
39938      arguments="${tmp#* }"
39939
39940      # Cannot rely on the command "which" here since it doesn't always work.
39941      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39942      if test -z "$is_absolute_path"; then
39943        # Path to executable is not absolute. Find it.
39944        IFS_save="$IFS"
39945        IFS=:
39946        for p in $PATH; do
39947          if test -f "$p/$path" && test -x "$p/$path"; then
39948            new_path="$p/$path"
39949            break
39950          fi
39951        done
39952        IFS="$IFS_save"
39953      else
39954        # This is an absolute path, we can use it without further modifications.
39955        new_path="$path"
39956      fi
39957
39958      if test "x$new_path" = x; then
39959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39960$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39961        has_space=`$ECHO "$complete" | $GREP " "`
39962        if test "x$has_space" != x; then
39963          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39964$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39965        fi
39966        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39967      fi
39968    fi
39969
39970    # Now join together the path and the arguments once again
39971    if test "x$arguments" != xEOL; then
39972      new_complete="$new_path ${arguments% *}"
39973    else
39974      new_complete="$new_path"
39975    fi
39976
39977    if test "x$complete" != "x$new_complete"; then
39978      STRIP="$new_complete"
39979      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39980$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39981    fi
39982  fi
39983
39984
39985
39986  # Publish this variable in the help.
39987
39988
39989  if [ -z "${NM+x}" ]; then
39990    # The variable is not set by user, try to locate tool using the code snippet
39991    if test -n "$ac_tool_prefix"; then
39992  for ac_prog in nm
39993  do
39994    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39995set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39997$as_echo_n "checking for $ac_word... " >&6; }
39998if ${ac_cv_prog_NM+:} false; then :
39999  $as_echo_n "(cached) " >&6
40000else
40001  if test -n "$NM"; then
40002  ac_cv_prog_NM="$NM" # Let the user override the test.
40003else
40004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40005for as_dir in $PATH
40006do
40007  IFS=$as_save_IFS
40008  test -z "$as_dir" && as_dir=.
40009    for ac_exec_ext in '' $ac_executable_extensions; do
40010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40011    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40013    break 2
40014  fi
40015done
40016  done
40017IFS=$as_save_IFS
40018
40019fi
40020fi
40021NM=$ac_cv_prog_NM
40022if test -n "$NM"; then
40023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40024$as_echo "$NM" >&6; }
40025else
40026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40027$as_echo "no" >&6; }
40028fi
40029
40030
40031    test -n "$NM" && break
40032  done
40033fi
40034if test -z "$NM"; then
40035  ac_ct_NM=$NM
40036  for ac_prog in nm
40037do
40038  # Extract the first word of "$ac_prog", so it can be a program name with args.
40039set dummy $ac_prog; ac_word=$2
40040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40041$as_echo_n "checking for $ac_word... " >&6; }
40042if ${ac_cv_prog_ac_ct_NM+:} false; then :
40043  $as_echo_n "(cached) " >&6
40044else
40045  if test -n "$ac_ct_NM"; then
40046  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40047else
40048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40049for as_dir in $PATH
40050do
40051  IFS=$as_save_IFS
40052  test -z "$as_dir" && as_dir=.
40053    for ac_exec_ext in '' $ac_executable_extensions; do
40054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40055    ac_cv_prog_ac_ct_NM="$ac_prog"
40056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40057    break 2
40058  fi
40059done
40060  done
40061IFS=$as_save_IFS
40062
40063fi
40064fi
40065ac_ct_NM=$ac_cv_prog_ac_ct_NM
40066if test -n "$ac_ct_NM"; then
40067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40068$as_echo "$ac_ct_NM" >&6; }
40069else
40070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40071$as_echo "no" >&6; }
40072fi
40073
40074
40075  test -n "$ac_ct_NM" && break
40076done
40077
40078  if test "x$ac_ct_NM" = x; then
40079    NM=""
40080  else
40081    case $cross_compiling:$ac_tool_warned in
40082yes:)
40083{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40084$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40085ac_tool_warned=yes ;;
40086esac
40087    NM=$ac_ct_NM
40088  fi
40089fi
40090
40091  else
40092    # The variable is set, but is it from the command line or the environment?
40093
40094    # Try to remove the string !NM! from our list.
40095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40097      # If it failed, the variable was not from the command line. Ignore it,
40098      # but warn the user (except for BASH, which is always set by the calling BASH).
40099      if test "xNM" != xBASH; then
40100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40101$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40102      fi
40103      # Try to locate tool using the code snippet
40104      if test -n "$ac_tool_prefix"; then
40105  for ac_prog in nm
40106  do
40107    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40108set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40110$as_echo_n "checking for $ac_word... " >&6; }
40111if ${ac_cv_prog_NM+:} false; then :
40112  $as_echo_n "(cached) " >&6
40113else
40114  if test -n "$NM"; then
40115  ac_cv_prog_NM="$NM" # Let the user override the test.
40116else
40117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40118for as_dir in $PATH
40119do
40120  IFS=$as_save_IFS
40121  test -z "$as_dir" && as_dir=.
40122    for ac_exec_ext in '' $ac_executable_extensions; do
40123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40124    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40126    break 2
40127  fi
40128done
40129  done
40130IFS=$as_save_IFS
40131
40132fi
40133fi
40134NM=$ac_cv_prog_NM
40135if test -n "$NM"; then
40136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40137$as_echo "$NM" >&6; }
40138else
40139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40140$as_echo "no" >&6; }
40141fi
40142
40143
40144    test -n "$NM" && break
40145  done
40146fi
40147if test -z "$NM"; then
40148  ac_ct_NM=$NM
40149  for ac_prog in nm
40150do
40151  # Extract the first word of "$ac_prog", so it can be a program name with args.
40152set dummy $ac_prog; ac_word=$2
40153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40154$as_echo_n "checking for $ac_word... " >&6; }
40155if ${ac_cv_prog_ac_ct_NM+:} false; then :
40156  $as_echo_n "(cached) " >&6
40157else
40158  if test -n "$ac_ct_NM"; then
40159  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40160else
40161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40162for as_dir in $PATH
40163do
40164  IFS=$as_save_IFS
40165  test -z "$as_dir" && as_dir=.
40166    for ac_exec_ext in '' $ac_executable_extensions; do
40167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40168    ac_cv_prog_ac_ct_NM="$ac_prog"
40169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40170    break 2
40171  fi
40172done
40173  done
40174IFS=$as_save_IFS
40175
40176fi
40177fi
40178ac_ct_NM=$ac_cv_prog_ac_ct_NM
40179if test -n "$ac_ct_NM"; then
40180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40181$as_echo "$ac_ct_NM" >&6; }
40182else
40183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40184$as_echo "no" >&6; }
40185fi
40186
40187
40188  test -n "$ac_ct_NM" && break
40189done
40190
40191  if test "x$ac_ct_NM" = x; then
40192    NM=""
40193  else
40194    case $cross_compiling:$ac_tool_warned in
40195yes:)
40196{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40197$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40198ac_tool_warned=yes ;;
40199esac
40200    NM=$ac_ct_NM
40201  fi
40202fi
40203
40204    else
40205      # If it succeeded, then it was overridden by the user. We will use it
40206      # for the tool.
40207
40208      # First remove it from the list of overridden variables, so we can test
40209      # for unknown variables in the end.
40210      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40211
40212      # Check if we try to supply an empty value
40213      if test "x$NM" = x; then
40214        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40215$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40217$as_echo_n "checking for NM... " >&6; }
40218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40219$as_echo "disabled" >&6; }
40220      else
40221        # Check if the provided tool contains a complete path.
40222        tool_specified="$NM"
40223        tool_basename="${tool_specified##*/}"
40224        if test "x$tool_basename" = "x$tool_specified"; then
40225          # A command without a complete path is provided, search $PATH.
40226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40227$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40228          # Extract the first word of "$tool_basename", so it can be a program name with args.
40229set dummy $tool_basename; ac_word=$2
40230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40231$as_echo_n "checking for $ac_word... " >&6; }
40232if ${ac_cv_path_NM+:} false; then :
40233  $as_echo_n "(cached) " >&6
40234else
40235  case $NM in
40236  [\\/]* | ?:[\\/]*)
40237  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40238  ;;
40239  *)
40240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40241for as_dir in $PATH
40242do
40243  IFS=$as_save_IFS
40244  test -z "$as_dir" && as_dir=.
40245    for ac_exec_ext in '' $ac_executable_extensions; do
40246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40247    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40249    break 2
40250  fi
40251done
40252  done
40253IFS=$as_save_IFS
40254
40255  ;;
40256esac
40257fi
40258NM=$ac_cv_path_NM
40259if test -n "$NM"; then
40260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40261$as_echo "$NM" >&6; }
40262else
40263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40264$as_echo "no" >&6; }
40265fi
40266
40267
40268          if test "x$NM" = x; then
40269            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40270          fi
40271        else
40272          # Otherwise we believe it is a complete path. Use it as it is.
40273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40274$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40275          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40276$as_echo_n "checking for NM... " >&6; }
40277          if test ! -x "$tool_specified"; then
40278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40279$as_echo "not found" >&6; }
40280            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40281          fi
40282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40283$as_echo "$tool_specified" >&6; }
40284        fi
40285      fi
40286    fi
40287
40288  fi
40289
40290
40291
40292  # Only process if variable expands to non-empty
40293
40294  if test "x$NM" != x; then
40295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40296
40297  # First separate the path from the arguments. This will split at the first
40298  # space.
40299  complete="$NM"
40300  path="${complete%% *}"
40301  tmp="$complete EOL"
40302  arguments="${tmp#* }"
40303
40304  # Input might be given as Windows format, start by converting to
40305  # unix format.
40306  new_path=`$CYGPATH -u "$path"`
40307
40308  # Now try to locate executable using which
40309  new_path=`$WHICH "$new_path" 2> /dev/null`
40310  # bat and cmd files are not always considered executable in cygwin causing which
40311  # to not find them
40312  if test "x$new_path" = x \
40313      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40314      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40315    new_path=`$CYGPATH -u "$path"`
40316  fi
40317  if test "x$new_path" = x; then
40318    # Oops. Which didn't find the executable.
40319    # The splitting of arguments from the executable at a space might have been incorrect,
40320    # since paths with space are more likely in Windows. Give it another try with the whole
40321    # argument.
40322    path="$complete"
40323    arguments="EOL"
40324    new_path=`$CYGPATH -u "$path"`
40325    new_path=`$WHICH "$new_path" 2> /dev/null`
40326    # bat and cmd files are not always considered executable in cygwin causing which
40327    # to not find them
40328    if test "x$new_path" = x \
40329        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40330        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40331      new_path=`$CYGPATH -u "$path"`
40332    fi
40333    if test "x$new_path" = x; then
40334      # It's still not found. Now this is an unrecoverable error.
40335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40336$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40337      has_space=`$ECHO "$complete" | $GREP " "`
40338      if test "x$has_space" != x; then
40339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40341      fi
40342      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40343    fi
40344  fi
40345
40346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40349  # "foo.exe" is OK but "foo" is an error.
40350  #
40351  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40352  # It is also a way to make sure we got the proper file name for the real test later on.
40353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40354  if test "x$test_shortpath" = x; then
40355    # Short path failed, file does not exist as specified.
40356    # Try adding .exe or .cmd
40357    if test -f "${new_path}.exe"; then
40358      input_to_shortpath="${new_path}.exe"
40359    elif test -f "${new_path}.cmd"; then
40360      input_to_shortpath="${new_path}.cmd"
40361    else
40362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40363$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40364      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40365$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40366      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40367    fi
40368  else
40369    input_to_shortpath="$new_path"
40370  fi
40371
40372  # Call helper function which possibly converts this using DOS-style short mode.
40373  # If so, the updated path is stored in $new_path.
40374  new_path="$input_to_shortpath"
40375
40376  input_path="$input_to_shortpath"
40377  # Check if we need to convert this using DOS-style short mode. If the path
40378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40379  # take no chances and rewrite it.
40380  # Note: m4 eats our [], so we need to use [ and ] instead.
40381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40382  if test "x$has_forbidden_chars" != x; then
40383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40387      # Going to short mode and back again did indeed matter. Since short mode is
40388      # case insensitive, let's make it lowercase to improve readability.
40389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40390      # Now convert it back to Unix-style (cygpath)
40391      input_path=`$CYGPATH -u "$shortmode_path"`
40392      new_path="$input_path"
40393    fi
40394  fi
40395
40396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40397  if test "x$test_cygdrive_prefix" = x; then
40398    # As a simple fix, exclude /usr/bin since it's not a real path.
40399    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40401      # a path prefixed by /cygdrive for fixpath to work.
40402      new_path="$CYGWIN_ROOT_PATH$input_path"
40403    fi
40404  fi
40405
40406  # remove trailing .exe if any
40407  new_path="${new_path/%.exe/}"
40408
40409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40410
40411  # First separate the path from the arguments. This will split at the first
40412  # space.
40413  complete="$NM"
40414  path="${complete%% *}"
40415  tmp="$complete EOL"
40416  arguments="${tmp#* }"
40417
40418  # Input might be given as Windows format, start by converting to
40419  # unix format.
40420  new_path="$path"
40421
40422  windows_path="$new_path"
40423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40424    unix_path=`$CYGPATH -u "$windows_path"`
40425    new_path="$unix_path"
40426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40428    new_path="$unix_path"
40429  fi
40430
40431
40432  # Now try to locate executable using which
40433  new_path=`$WHICH "$new_path" 2> /dev/null`
40434
40435  if test "x$new_path" = x; then
40436    # Oops. Which didn't find the executable.
40437    # The splitting of arguments from the executable at a space might have been incorrect,
40438    # since paths with space are more likely in Windows. Give it another try with the whole
40439    # argument.
40440    path="$complete"
40441    arguments="EOL"
40442    new_path="$path"
40443
40444  windows_path="$new_path"
40445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40446    unix_path=`$CYGPATH -u "$windows_path"`
40447    new_path="$unix_path"
40448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40450    new_path="$unix_path"
40451  fi
40452
40453
40454    new_path=`$WHICH "$new_path" 2> /dev/null`
40455    # bat and cmd files are not always considered executable in MSYS causing which
40456    # to not find them
40457    if test "x$new_path" = x \
40458        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40459        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40460      new_path="$path"
40461
40462  windows_path="$new_path"
40463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40464    unix_path=`$CYGPATH -u "$windows_path"`
40465    new_path="$unix_path"
40466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40468    new_path="$unix_path"
40469  fi
40470
40471    fi
40472
40473    if test "x$new_path" = x; then
40474      # It's still not found. Now this is an unrecoverable error.
40475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40476$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40477      has_space=`$ECHO "$complete" | $GREP " "`
40478      if test "x$has_space" != x; then
40479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40481      fi
40482      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40483    fi
40484  fi
40485
40486  # Now new_path has a complete unix path to the binary
40487  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40488    # Keep paths in /bin as-is, but remove trailing .exe if any
40489    new_path="${new_path/%.exe/}"
40490    # Do not save /bin paths to all_fixpath_prefixes!
40491  else
40492    # Not in mixed or Windows style, start by that.
40493    new_path=`cmd //c echo $new_path`
40494
40495  input_path="$new_path"
40496  # Check if we need to convert this using DOS-style short mode. If the path
40497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40498  # take no chances and rewrite it.
40499  # Note: m4 eats our [], so we need to use [ and ] instead.
40500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40501  if test "x$has_forbidden_chars" != x; then
40502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40504  fi
40505
40506    # Output is in $new_path
40507
40508  windows_path="$new_path"
40509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40510    unix_path=`$CYGPATH -u "$windows_path"`
40511    new_path="$unix_path"
40512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40514    new_path="$unix_path"
40515  fi
40516
40517    # remove trailing .exe if any
40518    new_path="${new_path/%.exe/}"
40519
40520    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40521    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40522  fi
40523
40524    else
40525      # We're on a unix platform. Hooray! :)
40526      # First separate the path from the arguments. This will split at the first
40527      # space.
40528      complete="$NM"
40529      path="${complete%% *}"
40530      tmp="$complete EOL"
40531      arguments="${tmp#* }"
40532
40533      # Cannot rely on the command "which" here since it doesn't always work.
40534      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40535      if test -z "$is_absolute_path"; then
40536        # Path to executable is not absolute. Find it.
40537        IFS_save="$IFS"
40538        IFS=:
40539        for p in $PATH; do
40540          if test -f "$p/$path" && test -x "$p/$path"; then
40541            new_path="$p/$path"
40542            break
40543          fi
40544        done
40545        IFS="$IFS_save"
40546      else
40547        # This is an absolute path, we can use it without further modifications.
40548        new_path="$path"
40549      fi
40550
40551      if test "x$new_path" = x; then
40552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40553$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40554        has_space=`$ECHO "$complete" | $GREP " "`
40555        if test "x$has_space" != x; then
40556          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40557$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40558        fi
40559        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40560      fi
40561    fi
40562
40563    # Now join together the path and the arguments once again
40564    if test "x$arguments" != xEOL; then
40565      new_complete="$new_path ${arguments% *}"
40566    else
40567      new_complete="$new_path"
40568    fi
40569
40570    if test "x$complete" != "x$new_complete"; then
40571      NM="$new_complete"
40572      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40573$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40574    fi
40575  fi
40576
40577    GNM="$NM"
40578
40579  fi
40580
40581  # objcopy is used for moving debug symbols to separate files when
40582  # full debug symbols are enabled.
40583  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40584
40585
40586  # Publish this variable in the help.
40587
40588
40589  if [ -z "${OBJCOPY+x}" ]; then
40590    # The variable is not set by user, try to locate tool using the code snippet
40591    if test -n "$ac_tool_prefix"; then
40592  for ac_prog in gobjcopy objcopy
40593  do
40594    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40595set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40597$as_echo_n "checking for $ac_word... " >&6; }
40598if ${ac_cv_prog_OBJCOPY+:} false; then :
40599  $as_echo_n "(cached) " >&6
40600else
40601  if test -n "$OBJCOPY"; then
40602  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40603else
40604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40605for as_dir in $PATH
40606do
40607  IFS=$as_save_IFS
40608  test -z "$as_dir" && as_dir=.
40609    for ac_exec_ext in '' $ac_executable_extensions; do
40610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40611    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40613    break 2
40614  fi
40615done
40616  done
40617IFS=$as_save_IFS
40618
40619fi
40620fi
40621OBJCOPY=$ac_cv_prog_OBJCOPY
40622if test -n "$OBJCOPY"; then
40623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40624$as_echo "$OBJCOPY" >&6; }
40625else
40626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40627$as_echo "no" >&6; }
40628fi
40629
40630
40631    test -n "$OBJCOPY" && break
40632  done
40633fi
40634if test -z "$OBJCOPY"; then
40635  ac_ct_OBJCOPY=$OBJCOPY
40636  for ac_prog in gobjcopy objcopy
40637do
40638  # Extract the first word of "$ac_prog", so it can be a program name with args.
40639set dummy $ac_prog; ac_word=$2
40640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40641$as_echo_n "checking for $ac_word... " >&6; }
40642if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40643  $as_echo_n "(cached) " >&6
40644else
40645  if test -n "$ac_ct_OBJCOPY"; then
40646  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40647else
40648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40649for as_dir in $PATH
40650do
40651  IFS=$as_save_IFS
40652  test -z "$as_dir" && as_dir=.
40653    for ac_exec_ext in '' $ac_executable_extensions; do
40654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40655    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40657    break 2
40658  fi
40659done
40660  done
40661IFS=$as_save_IFS
40662
40663fi
40664fi
40665ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40666if test -n "$ac_ct_OBJCOPY"; then
40667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40668$as_echo "$ac_ct_OBJCOPY" >&6; }
40669else
40670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40671$as_echo "no" >&6; }
40672fi
40673
40674
40675  test -n "$ac_ct_OBJCOPY" && break
40676done
40677
40678  if test "x$ac_ct_OBJCOPY" = x; then
40679    OBJCOPY=""
40680  else
40681    case $cross_compiling:$ac_tool_warned in
40682yes:)
40683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40685ac_tool_warned=yes ;;
40686esac
40687    OBJCOPY=$ac_ct_OBJCOPY
40688  fi
40689fi
40690
40691  else
40692    # The variable is set, but is it from the command line or the environment?
40693
40694    # Try to remove the string !OBJCOPY! from our list.
40695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
40696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40697      # If it failed, the variable was not from the command line. Ignore it,
40698      # but warn the user (except for BASH, which is always set by the calling BASH).
40699      if test "xOBJCOPY" != xBASH; then
40700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
40701$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
40702      fi
40703      # Try to locate tool using the code snippet
40704      if test -n "$ac_tool_prefix"; then
40705  for ac_prog in gobjcopy objcopy
40706  do
40707    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40708set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40710$as_echo_n "checking for $ac_word... " >&6; }
40711if ${ac_cv_prog_OBJCOPY+:} false; then :
40712  $as_echo_n "(cached) " >&6
40713else
40714  if test -n "$OBJCOPY"; then
40715  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40716else
40717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40718for as_dir in $PATH
40719do
40720  IFS=$as_save_IFS
40721  test -z "$as_dir" && as_dir=.
40722    for ac_exec_ext in '' $ac_executable_extensions; do
40723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40724    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40726    break 2
40727  fi
40728done
40729  done
40730IFS=$as_save_IFS
40731
40732fi
40733fi
40734OBJCOPY=$ac_cv_prog_OBJCOPY
40735if test -n "$OBJCOPY"; then
40736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40737$as_echo "$OBJCOPY" >&6; }
40738else
40739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40740$as_echo "no" >&6; }
40741fi
40742
40743
40744    test -n "$OBJCOPY" && break
40745  done
40746fi
40747if test -z "$OBJCOPY"; then
40748  ac_ct_OBJCOPY=$OBJCOPY
40749  for ac_prog in gobjcopy objcopy
40750do
40751  # Extract the first word of "$ac_prog", so it can be a program name with args.
40752set dummy $ac_prog; ac_word=$2
40753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40754$as_echo_n "checking for $ac_word... " >&6; }
40755if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40756  $as_echo_n "(cached) " >&6
40757else
40758  if test -n "$ac_ct_OBJCOPY"; then
40759  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40760else
40761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40762for as_dir in $PATH
40763do
40764  IFS=$as_save_IFS
40765  test -z "$as_dir" && as_dir=.
40766    for ac_exec_ext in '' $ac_executable_extensions; do
40767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40768    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40770    break 2
40771  fi
40772done
40773  done
40774IFS=$as_save_IFS
40775
40776fi
40777fi
40778ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40779if test -n "$ac_ct_OBJCOPY"; then
40780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40781$as_echo "$ac_ct_OBJCOPY" >&6; }
40782else
40783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40784$as_echo "no" >&6; }
40785fi
40786
40787
40788  test -n "$ac_ct_OBJCOPY" && break
40789done
40790
40791  if test "x$ac_ct_OBJCOPY" = x; then
40792    OBJCOPY=""
40793  else
40794    case $cross_compiling:$ac_tool_warned in
40795yes:)
40796{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40797$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40798ac_tool_warned=yes ;;
40799esac
40800    OBJCOPY=$ac_ct_OBJCOPY
40801  fi
40802fi
40803
40804    else
40805      # If it succeeded, then it was overridden by the user. We will use it
40806      # for the tool.
40807
40808      # First remove it from the list of overridden variables, so we can test
40809      # for unknown variables in the end.
40810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40811
40812      # Check if we try to supply an empty value
40813      if test "x$OBJCOPY" = x; then
40814        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
40815$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
40816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40817$as_echo_n "checking for OBJCOPY... " >&6; }
40818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40819$as_echo "disabled" >&6; }
40820      else
40821        # Check if the provided tool contains a complete path.
40822        tool_specified="$OBJCOPY"
40823        tool_basename="${tool_specified##*/}"
40824        if test "x$tool_basename" = "x$tool_specified"; then
40825          # A command without a complete path is provided, search $PATH.
40826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
40827$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
40828          # Extract the first word of "$tool_basename", so it can be a program name with args.
40829set dummy $tool_basename; ac_word=$2
40830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40831$as_echo_n "checking for $ac_word... " >&6; }
40832if ${ac_cv_path_OBJCOPY+:} false; then :
40833  $as_echo_n "(cached) " >&6
40834else
40835  case $OBJCOPY in
40836  [\\/]* | ?:[\\/]*)
40837  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
40838  ;;
40839  *)
40840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40841for as_dir in $PATH
40842do
40843  IFS=$as_save_IFS
40844  test -z "$as_dir" && as_dir=.
40845    for ac_exec_ext in '' $ac_executable_extensions; do
40846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40847    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
40848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40849    break 2
40850  fi
40851done
40852  done
40853IFS=$as_save_IFS
40854
40855  ;;
40856esac
40857fi
40858OBJCOPY=$ac_cv_path_OBJCOPY
40859if test -n "$OBJCOPY"; then
40860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40861$as_echo "$OBJCOPY" >&6; }
40862else
40863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40864$as_echo "no" >&6; }
40865fi
40866
40867
40868          if test "x$OBJCOPY" = x; then
40869            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40870          fi
40871        else
40872          # Otherwise we believe it is a complete path. Use it as it is.
40873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
40874$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
40875          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40876$as_echo_n "checking for OBJCOPY... " >&6; }
40877          if test ! -x "$tool_specified"; then
40878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40879$as_echo "not found" >&6; }
40880            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
40881          fi
40882          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40883$as_echo "$tool_specified" >&6; }
40884        fi
40885      fi
40886    fi
40887
40888  fi
40889
40890
40891    # Only call fixup if objcopy was found.
40892    if test -n "$OBJCOPY"; then
40893
40894  # Only process if variable expands to non-empty
40895
40896  if test "x$OBJCOPY" != x; then
40897    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40898
40899  # First separate the path from the arguments. This will split at the first
40900  # space.
40901  complete="$OBJCOPY"
40902  path="${complete%% *}"
40903  tmp="$complete EOL"
40904  arguments="${tmp#* }"
40905
40906  # Input might be given as Windows format, start by converting to
40907  # unix format.
40908  new_path=`$CYGPATH -u "$path"`
40909
40910  # Now try to locate executable using which
40911  new_path=`$WHICH "$new_path" 2> /dev/null`
40912  # bat and cmd files are not always considered executable in cygwin causing which
40913  # to not find them
40914  if test "x$new_path" = x \
40915      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40916      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40917    new_path=`$CYGPATH -u "$path"`
40918  fi
40919  if test "x$new_path" = x; then
40920    # Oops. Which didn't find the executable.
40921    # The splitting of arguments from the executable at a space might have been incorrect,
40922    # since paths with space are more likely in Windows. Give it another try with the whole
40923    # argument.
40924    path="$complete"
40925    arguments="EOL"
40926    new_path=`$CYGPATH -u "$path"`
40927    new_path=`$WHICH "$new_path" 2> /dev/null`
40928    # bat and cmd files are not always considered executable in cygwin causing which
40929    # to not find them
40930    if test "x$new_path" = x \
40931        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40932        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40933      new_path=`$CYGPATH -u "$path"`
40934    fi
40935    if test "x$new_path" = x; then
40936      # It's still not found. Now this is an unrecoverable error.
40937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40938$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40939      has_space=`$ECHO "$complete" | $GREP " "`
40940      if test "x$has_space" != x; then
40941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40943      fi
40944      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40945    fi
40946  fi
40947
40948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40951  # "foo.exe" is OK but "foo" is an error.
40952  #
40953  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40954  # It is also a way to make sure we got the proper file name for the real test later on.
40955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40956  if test "x$test_shortpath" = x; then
40957    # Short path failed, file does not exist as specified.
40958    # Try adding .exe or .cmd
40959    if test -f "${new_path}.exe"; then
40960      input_to_shortpath="${new_path}.exe"
40961    elif test -f "${new_path}.cmd"; then
40962      input_to_shortpath="${new_path}.cmd"
40963    else
40964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
40965$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
40966      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40967$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40968      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40969    fi
40970  else
40971    input_to_shortpath="$new_path"
40972  fi
40973
40974  # Call helper function which possibly converts this using DOS-style short mode.
40975  # If so, the updated path is stored in $new_path.
40976  new_path="$input_to_shortpath"
40977
40978  input_path="$input_to_shortpath"
40979  # Check if we need to convert this using DOS-style short mode. If the path
40980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40981  # take no chances and rewrite it.
40982  # Note: m4 eats our [], so we need to use [ and ] instead.
40983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40984  if test "x$has_forbidden_chars" != x; then
40985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40989      # Going to short mode and back again did indeed matter. Since short mode is
40990      # case insensitive, let's make it lowercase to improve readability.
40991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40992      # Now convert it back to Unix-style (cygpath)
40993      input_path=`$CYGPATH -u "$shortmode_path"`
40994      new_path="$input_path"
40995    fi
40996  fi
40997
40998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40999  if test "x$test_cygdrive_prefix" = x; then
41000    # As a simple fix, exclude /usr/bin since it's not a real path.
41001    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41003      # a path prefixed by /cygdrive for fixpath to work.
41004      new_path="$CYGWIN_ROOT_PATH$input_path"
41005    fi
41006  fi
41007
41008  # remove trailing .exe if any
41009  new_path="${new_path/%.exe/}"
41010
41011    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41012
41013  # First separate the path from the arguments. This will split at the first
41014  # space.
41015  complete="$OBJCOPY"
41016  path="${complete%% *}"
41017  tmp="$complete EOL"
41018  arguments="${tmp#* }"
41019
41020  # Input might be given as Windows format, start by converting to
41021  # unix format.
41022  new_path="$path"
41023
41024  windows_path="$new_path"
41025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41026    unix_path=`$CYGPATH -u "$windows_path"`
41027    new_path="$unix_path"
41028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41030    new_path="$unix_path"
41031  fi
41032
41033
41034  # Now try to locate executable using which
41035  new_path=`$WHICH "$new_path" 2> /dev/null`
41036
41037  if test "x$new_path" = x; then
41038    # Oops. Which didn't find the executable.
41039    # The splitting of arguments from the executable at a space might have been incorrect,
41040    # since paths with space are more likely in Windows. Give it another try with the whole
41041    # argument.
41042    path="$complete"
41043    arguments="EOL"
41044    new_path="$path"
41045
41046  windows_path="$new_path"
41047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41048    unix_path=`$CYGPATH -u "$windows_path"`
41049    new_path="$unix_path"
41050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41052    new_path="$unix_path"
41053  fi
41054
41055
41056    new_path=`$WHICH "$new_path" 2> /dev/null`
41057    # bat and cmd files are not always considered executable in MSYS causing which
41058    # to not find them
41059    if test "x$new_path" = x \
41060        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41061        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41062      new_path="$path"
41063
41064  windows_path="$new_path"
41065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41066    unix_path=`$CYGPATH -u "$windows_path"`
41067    new_path="$unix_path"
41068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41070    new_path="$unix_path"
41071  fi
41072
41073    fi
41074
41075    if test "x$new_path" = x; then
41076      # It's still not found. Now this is an unrecoverable error.
41077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41078$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41079      has_space=`$ECHO "$complete" | $GREP " "`
41080      if test "x$has_space" != x; then
41081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41083      fi
41084      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41085    fi
41086  fi
41087
41088  # Now new_path has a complete unix path to the binary
41089  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41090    # Keep paths in /bin as-is, but remove trailing .exe if any
41091    new_path="${new_path/%.exe/}"
41092    # Do not save /bin paths to all_fixpath_prefixes!
41093  else
41094    # Not in mixed or Windows style, start by that.
41095    new_path=`cmd //c echo $new_path`
41096
41097  input_path="$new_path"
41098  # Check if we need to convert this using DOS-style short mode. If the path
41099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41100  # take no chances and rewrite it.
41101  # Note: m4 eats our [], so we need to use [ and ] instead.
41102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41103  if test "x$has_forbidden_chars" != x; then
41104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41106  fi
41107
41108    # Output is in $new_path
41109
41110  windows_path="$new_path"
41111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41112    unix_path=`$CYGPATH -u "$windows_path"`
41113    new_path="$unix_path"
41114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41116    new_path="$unix_path"
41117  fi
41118
41119    # remove trailing .exe if any
41120    new_path="${new_path/%.exe/}"
41121
41122    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41123    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41124  fi
41125
41126    else
41127      # We're on a unix platform. Hooray! :)
41128      # First separate the path from the arguments. This will split at the first
41129      # space.
41130      complete="$OBJCOPY"
41131      path="${complete%% *}"
41132      tmp="$complete EOL"
41133      arguments="${tmp#* }"
41134
41135      # Cannot rely on the command "which" here since it doesn't always work.
41136      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41137      if test -z "$is_absolute_path"; then
41138        # Path to executable is not absolute. Find it.
41139        IFS_save="$IFS"
41140        IFS=:
41141        for p in $PATH; do
41142          if test -f "$p/$path" && test -x "$p/$path"; then
41143            new_path="$p/$path"
41144            break
41145          fi
41146        done
41147        IFS="$IFS_save"
41148      else
41149        # This is an absolute path, we can use it without further modifications.
41150        new_path="$path"
41151      fi
41152
41153      if test "x$new_path" = x; then
41154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41155$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41156        has_space=`$ECHO "$complete" | $GREP " "`
41157        if test "x$has_space" != x; then
41158          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41159$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41160        fi
41161        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41162      fi
41163    fi
41164
41165    # Now join together the path and the arguments once again
41166    if test "x$arguments" != xEOL; then
41167      new_complete="$new_path ${arguments% *}"
41168    else
41169      new_complete="$new_path"
41170    fi
41171
41172    if test "x$complete" != "x$new_complete"; then
41173      OBJCOPY="$new_complete"
41174      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41175$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41176    fi
41177  fi
41178
41179      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41180        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41181        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41182        # - version number is last blank separate word on first line
41183        # - version number formats that have been seen:
41184        #   - <major>.<minor>
41185        #   - <major>.<minor>.<micro>
41186        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41187        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41188         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41189              -e 's/.* //' \
41190              -e '/^[01]\./b bad' \
41191              -e '/^2\./{' \
41192              -e '  s/^2\.//' \
41193              -e '  /^[0-9]$/b bad' \
41194              -e '  /^[0-9]\./b bad' \
41195              -e '  /^1[0-9]$/b bad' \
41196              -e '  /^1[0-9]\./b bad' \
41197              -e '  /^20\./b bad' \
41198              -e '  /^21\.0$/b bad' \
41199              -e '  /^21\.0\./b bad' \
41200              -e '}' \
41201              -e ':good' \
41202              -e 's/.*/VALID_VERSION/p' \
41203              -e 'q' \
41204              -e ':bad' \
41205              -e 's/.*/BAD_VERSION/p' \
41206              -e 'q'`
41207        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41208          OBJCOPY=
41209          { $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
41210$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41211          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41212$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41213          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41214$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41215          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41216$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41217          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41218$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41219        fi
41220      fi
41221    fi
41222  fi
41223
41224
41225
41226  # Publish this variable in the help.
41227
41228
41229  if [ -z "${OBJDUMP+x}" ]; then
41230    # The variable is not set by user, try to locate tool using the code snippet
41231    if test -n "$ac_tool_prefix"; then
41232  for ac_prog in gobjdump objdump
41233  do
41234    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41235set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41237$as_echo_n "checking for $ac_word... " >&6; }
41238if ${ac_cv_prog_OBJDUMP+:} false; then :
41239  $as_echo_n "(cached) " >&6
41240else
41241  if test -n "$OBJDUMP"; then
41242  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41243else
41244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41245for as_dir in $PATH
41246do
41247  IFS=$as_save_IFS
41248  test -z "$as_dir" && as_dir=.
41249    for ac_exec_ext in '' $ac_executable_extensions; do
41250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41251    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41253    break 2
41254  fi
41255done
41256  done
41257IFS=$as_save_IFS
41258
41259fi
41260fi
41261OBJDUMP=$ac_cv_prog_OBJDUMP
41262if test -n "$OBJDUMP"; then
41263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41264$as_echo "$OBJDUMP" >&6; }
41265else
41266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41267$as_echo "no" >&6; }
41268fi
41269
41270
41271    test -n "$OBJDUMP" && break
41272  done
41273fi
41274if test -z "$OBJDUMP"; then
41275  ac_ct_OBJDUMP=$OBJDUMP
41276  for ac_prog in gobjdump objdump
41277do
41278  # Extract the first word of "$ac_prog", so it can be a program name with args.
41279set dummy $ac_prog; ac_word=$2
41280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41281$as_echo_n "checking for $ac_word... " >&6; }
41282if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41283  $as_echo_n "(cached) " >&6
41284else
41285  if test -n "$ac_ct_OBJDUMP"; then
41286  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41287else
41288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41289for as_dir in $PATH
41290do
41291  IFS=$as_save_IFS
41292  test -z "$as_dir" && as_dir=.
41293    for ac_exec_ext in '' $ac_executable_extensions; do
41294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41295    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41297    break 2
41298  fi
41299done
41300  done
41301IFS=$as_save_IFS
41302
41303fi
41304fi
41305ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41306if test -n "$ac_ct_OBJDUMP"; then
41307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41308$as_echo "$ac_ct_OBJDUMP" >&6; }
41309else
41310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41311$as_echo "no" >&6; }
41312fi
41313
41314
41315  test -n "$ac_ct_OBJDUMP" && break
41316done
41317
41318  if test "x$ac_ct_OBJDUMP" = x; then
41319    OBJDUMP=""
41320  else
41321    case $cross_compiling:$ac_tool_warned in
41322yes:)
41323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41325ac_tool_warned=yes ;;
41326esac
41327    OBJDUMP=$ac_ct_OBJDUMP
41328  fi
41329fi
41330
41331  else
41332    # The variable is set, but is it from the command line or the environment?
41333
41334    # Try to remove the string !OBJDUMP! from our list.
41335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41337      # If it failed, the variable was not from the command line. Ignore it,
41338      # but warn the user (except for BASH, which is always set by the calling BASH).
41339      if test "xOBJDUMP" != xBASH; then
41340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41341$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41342      fi
41343      # Try to locate tool using the code snippet
41344      if test -n "$ac_tool_prefix"; then
41345  for ac_prog in gobjdump objdump
41346  do
41347    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41348set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41350$as_echo_n "checking for $ac_word... " >&6; }
41351if ${ac_cv_prog_OBJDUMP+:} false; then :
41352  $as_echo_n "(cached) " >&6
41353else
41354  if test -n "$OBJDUMP"; then
41355  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41356else
41357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41358for as_dir in $PATH
41359do
41360  IFS=$as_save_IFS
41361  test -z "$as_dir" && as_dir=.
41362    for ac_exec_ext in '' $ac_executable_extensions; do
41363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41364    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41366    break 2
41367  fi
41368done
41369  done
41370IFS=$as_save_IFS
41371
41372fi
41373fi
41374OBJDUMP=$ac_cv_prog_OBJDUMP
41375if test -n "$OBJDUMP"; then
41376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41377$as_echo "$OBJDUMP" >&6; }
41378else
41379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41380$as_echo "no" >&6; }
41381fi
41382
41383
41384    test -n "$OBJDUMP" && break
41385  done
41386fi
41387if test -z "$OBJDUMP"; then
41388  ac_ct_OBJDUMP=$OBJDUMP
41389  for ac_prog in gobjdump objdump
41390do
41391  # Extract the first word of "$ac_prog", so it can be a program name with args.
41392set dummy $ac_prog; ac_word=$2
41393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41394$as_echo_n "checking for $ac_word... " >&6; }
41395if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41396  $as_echo_n "(cached) " >&6
41397else
41398  if test -n "$ac_ct_OBJDUMP"; then
41399  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41400else
41401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41402for as_dir in $PATH
41403do
41404  IFS=$as_save_IFS
41405  test -z "$as_dir" && as_dir=.
41406    for ac_exec_ext in '' $ac_executable_extensions; do
41407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41408    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41410    break 2
41411  fi
41412done
41413  done
41414IFS=$as_save_IFS
41415
41416fi
41417fi
41418ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41419if test -n "$ac_ct_OBJDUMP"; then
41420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41421$as_echo "$ac_ct_OBJDUMP" >&6; }
41422else
41423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41424$as_echo "no" >&6; }
41425fi
41426
41427
41428  test -n "$ac_ct_OBJDUMP" && break
41429done
41430
41431  if test "x$ac_ct_OBJDUMP" = x; then
41432    OBJDUMP=""
41433  else
41434    case $cross_compiling:$ac_tool_warned in
41435yes:)
41436{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41437$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41438ac_tool_warned=yes ;;
41439esac
41440    OBJDUMP=$ac_ct_OBJDUMP
41441  fi
41442fi
41443
41444    else
41445      # If it succeeded, then it was overridden by the user. We will use it
41446      # for the tool.
41447
41448      # First remove it from the list of overridden variables, so we can test
41449      # for unknown variables in the end.
41450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41451
41452      # Check if we try to supply an empty value
41453      if test "x$OBJDUMP" = x; then
41454        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41455$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41457$as_echo_n "checking for OBJDUMP... " >&6; }
41458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41459$as_echo "disabled" >&6; }
41460      else
41461        # Check if the provided tool contains a complete path.
41462        tool_specified="$OBJDUMP"
41463        tool_basename="${tool_specified##*/}"
41464        if test "x$tool_basename" = "x$tool_specified"; then
41465          # A command without a complete path is provided, search $PATH.
41466          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41467$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41468          # Extract the first word of "$tool_basename", so it can be a program name with args.
41469set dummy $tool_basename; ac_word=$2
41470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41471$as_echo_n "checking for $ac_word... " >&6; }
41472if ${ac_cv_path_OBJDUMP+:} false; then :
41473  $as_echo_n "(cached) " >&6
41474else
41475  case $OBJDUMP in
41476  [\\/]* | ?:[\\/]*)
41477  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41478  ;;
41479  *)
41480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41481for as_dir in $PATH
41482do
41483  IFS=$as_save_IFS
41484  test -z "$as_dir" && as_dir=.
41485    for ac_exec_ext in '' $ac_executable_extensions; do
41486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41487    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41489    break 2
41490  fi
41491done
41492  done
41493IFS=$as_save_IFS
41494
41495  ;;
41496esac
41497fi
41498OBJDUMP=$ac_cv_path_OBJDUMP
41499if test -n "$OBJDUMP"; then
41500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41501$as_echo "$OBJDUMP" >&6; }
41502else
41503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41504$as_echo "no" >&6; }
41505fi
41506
41507
41508          if test "x$OBJDUMP" = x; then
41509            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41510          fi
41511        else
41512          # Otherwise we believe it is a complete path. Use it as it is.
41513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41514$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41515          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41516$as_echo_n "checking for OBJDUMP... " >&6; }
41517          if test ! -x "$tool_specified"; then
41518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41519$as_echo "not found" >&6; }
41520            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41521          fi
41522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41523$as_echo "$tool_specified" >&6; }
41524        fi
41525      fi
41526    fi
41527
41528  fi
41529
41530
41531  if test "x$OBJDUMP" != x; then
41532    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41533    # bails if argument is missing.
41534
41535  # Only process if variable expands to non-empty
41536
41537  if test "x$OBJDUMP" != x; then
41538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41539
41540  # First separate the path from the arguments. This will split at the first
41541  # space.
41542  complete="$OBJDUMP"
41543  path="${complete%% *}"
41544  tmp="$complete EOL"
41545  arguments="${tmp#* }"
41546
41547  # Input might be given as Windows format, start by converting to
41548  # unix format.
41549  new_path=`$CYGPATH -u "$path"`
41550
41551  # Now try to locate executable using which
41552  new_path=`$WHICH "$new_path" 2> /dev/null`
41553  # bat and cmd files are not always considered executable in cygwin causing which
41554  # to not find them
41555  if test "x$new_path" = x \
41556      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41557      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41558    new_path=`$CYGPATH -u "$path"`
41559  fi
41560  if test "x$new_path" = x; then
41561    # Oops. Which didn't find the executable.
41562    # The splitting of arguments from the executable at a space might have been incorrect,
41563    # since paths with space are more likely in Windows. Give it another try with the whole
41564    # argument.
41565    path="$complete"
41566    arguments="EOL"
41567    new_path=`$CYGPATH -u "$path"`
41568    new_path=`$WHICH "$new_path" 2> /dev/null`
41569    # bat and cmd files are not always considered executable in cygwin causing which
41570    # to not find them
41571    if test "x$new_path" = x \
41572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41574      new_path=`$CYGPATH -u "$path"`
41575    fi
41576    if test "x$new_path" = x; then
41577      # It's still not found. Now this is an unrecoverable error.
41578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41579$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41580      has_space=`$ECHO "$complete" | $GREP " "`
41581      if test "x$has_space" != x; then
41582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41584      fi
41585      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41586    fi
41587  fi
41588
41589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41592  # "foo.exe" is OK but "foo" is an error.
41593  #
41594  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41595  # It is also a way to make sure we got the proper file name for the real test later on.
41596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41597  if test "x$test_shortpath" = x; then
41598    # Short path failed, file does not exist as specified.
41599    # Try adding .exe or .cmd
41600    if test -f "${new_path}.exe"; then
41601      input_to_shortpath="${new_path}.exe"
41602    elif test -f "${new_path}.cmd"; then
41603      input_to_shortpath="${new_path}.cmd"
41604    else
41605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41606$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41607      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41608$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41609      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41610    fi
41611  else
41612    input_to_shortpath="$new_path"
41613  fi
41614
41615  # Call helper function which possibly converts this using DOS-style short mode.
41616  # If so, the updated path is stored in $new_path.
41617  new_path="$input_to_shortpath"
41618
41619  input_path="$input_to_shortpath"
41620  # Check if we need to convert this using DOS-style short mode. If the path
41621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41622  # take no chances and rewrite it.
41623  # Note: m4 eats our [], so we need to use [ and ] instead.
41624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41625  if test "x$has_forbidden_chars" != x; then
41626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41630      # Going to short mode and back again did indeed matter. Since short mode is
41631      # case insensitive, let's make it lowercase to improve readability.
41632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41633      # Now convert it back to Unix-style (cygpath)
41634      input_path=`$CYGPATH -u "$shortmode_path"`
41635      new_path="$input_path"
41636    fi
41637  fi
41638
41639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41640  if test "x$test_cygdrive_prefix" = x; then
41641    # As a simple fix, exclude /usr/bin since it's not a real path.
41642    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41644      # a path prefixed by /cygdrive for fixpath to work.
41645      new_path="$CYGWIN_ROOT_PATH$input_path"
41646    fi
41647  fi
41648
41649  # remove trailing .exe if any
41650  new_path="${new_path/%.exe/}"
41651
41652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41653
41654  # First separate the path from the arguments. This will split at the first
41655  # space.
41656  complete="$OBJDUMP"
41657  path="${complete%% *}"
41658  tmp="$complete EOL"
41659  arguments="${tmp#* }"
41660
41661  # Input might be given as Windows format, start by converting to
41662  # unix format.
41663  new_path="$path"
41664
41665  windows_path="$new_path"
41666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41667    unix_path=`$CYGPATH -u "$windows_path"`
41668    new_path="$unix_path"
41669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41671    new_path="$unix_path"
41672  fi
41673
41674
41675  # Now try to locate executable using which
41676  new_path=`$WHICH "$new_path" 2> /dev/null`
41677
41678  if test "x$new_path" = x; then
41679    # Oops. Which didn't find the executable.
41680    # The splitting of arguments from the executable at a space might have been incorrect,
41681    # since paths with space are more likely in Windows. Give it another try with the whole
41682    # argument.
41683    path="$complete"
41684    arguments="EOL"
41685    new_path="$path"
41686
41687  windows_path="$new_path"
41688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41689    unix_path=`$CYGPATH -u "$windows_path"`
41690    new_path="$unix_path"
41691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41693    new_path="$unix_path"
41694  fi
41695
41696
41697    new_path=`$WHICH "$new_path" 2> /dev/null`
41698    # bat and cmd files are not always considered executable in MSYS causing which
41699    # to not find them
41700    if test "x$new_path" = x \
41701        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41702        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41703      new_path="$path"
41704
41705  windows_path="$new_path"
41706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41707    unix_path=`$CYGPATH -u "$windows_path"`
41708    new_path="$unix_path"
41709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41711    new_path="$unix_path"
41712  fi
41713
41714    fi
41715
41716    if test "x$new_path" = x; then
41717      # It's still not found. Now this is an unrecoverable error.
41718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41719$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41720      has_space=`$ECHO "$complete" | $GREP " "`
41721      if test "x$has_space" != x; then
41722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41724      fi
41725      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41726    fi
41727  fi
41728
41729  # Now new_path has a complete unix path to the binary
41730  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41731    # Keep paths in /bin as-is, but remove trailing .exe if any
41732    new_path="${new_path/%.exe/}"
41733    # Do not save /bin paths to all_fixpath_prefixes!
41734  else
41735    # Not in mixed or Windows style, start by that.
41736    new_path=`cmd //c echo $new_path`
41737
41738  input_path="$new_path"
41739  # Check if we need to convert this using DOS-style short mode. If the path
41740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41741  # take no chances and rewrite it.
41742  # Note: m4 eats our [], so we need to use [ and ] instead.
41743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41744  if test "x$has_forbidden_chars" != x; then
41745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41747  fi
41748
41749    # Output is in $new_path
41750
41751  windows_path="$new_path"
41752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41753    unix_path=`$CYGPATH -u "$windows_path"`
41754    new_path="$unix_path"
41755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41757    new_path="$unix_path"
41758  fi
41759
41760    # remove trailing .exe if any
41761    new_path="${new_path/%.exe/}"
41762
41763    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41764    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41765  fi
41766
41767    else
41768      # We're on a unix platform. Hooray! :)
41769      # First separate the path from the arguments. This will split at the first
41770      # space.
41771      complete="$OBJDUMP"
41772      path="${complete%% *}"
41773      tmp="$complete EOL"
41774      arguments="${tmp#* }"
41775
41776      # Cannot rely on the command "which" here since it doesn't always work.
41777      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41778      if test -z "$is_absolute_path"; then
41779        # Path to executable is not absolute. Find it.
41780        IFS_save="$IFS"
41781        IFS=:
41782        for p in $PATH; do
41783          if test -f "$p/$path" && test -x "$p/$path"; then
41784            new_path="$p/$path"
41785            break
41786          fi
41787        done
41788        IFS="$IFS_save"
41789      else
41790        # This is an absolute path, we can use it without further modifications.
41791        new_path="$path"
41792      fi
41793
41794      if test "x$new_path" = x; then
41795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41796$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41797        has_space=`$ECHO "$complete" | $GREP " "`
41798        if test "x$has_space" != x; then
41799          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41800$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41801        fi
41802        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41803      fi
41804    fi
41805
41806    # Now join together the path and the arguments once again
41807    if test "x$arguments" != xEOL; then
41808      new_complete="$new_path ${arguments% *}"
41809    else
41810      new_complete="$new_path"
41811    fi
41812
41813    if test "x$complete" != "x$new_complete"; then
41814      OBJDUMP="$new_complete"
41815      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
41816$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
41817    fi
41818  fi
41819
41820  fi
41821
41822
41823  # Restore old path.
41824  PATH="$OLD_PATH"
41825
41826  # Restore the flags to the user specified values.
41827  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
41828  CFLAGS="$ORG_CFLAGS"
41829  CXXFLAGS="$ORG_CXXFLAGS"
41830
41831
41832# Finally do some processing after the detection phase
41833
41834  if test "x$COMPILE_TYPE" = "xcross"; then
41835    # Now we need to find a C/C++ compiler that can build executables for the
41836    # build platform. We can't use the AC_PROG_CC macro, since it can only be
41837    # used once. Also, we need to do this without adding a tools dir to the
41838    # path, otherwise we might pick up cross-compilers which don't use standard
41839    # naming.
41840
41841    OLDPATH="$PATH"
41842
41843
41844# Check whether --with-build-devkit was given.
41845if test "${with_build_devkit+set}" = set; then :
41846  withval=$with_build_devkit;
41847fi
41848
41849    if test "x$with_build_devkit" = "xyes"; then
41850      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
41851    elif test -n "$with_build_devkit"; then
41852      if test ! -d "$with_build_devkit"; then
41853        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
41854      else
41855
41856  # Only process if variable expands to non-empty
41857
41858  if test "x$with_build_devkit" != x; then
41859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41860
41861  # Input might be given as Windows format, start by converting to
41862  # unix format.
41863  path="$with_build_devkit"
41864  new_path=`$CYGPATH -u "$path"`
41865
41866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41869  # "foo.exe" is OK but "foo" is an error.
41870  #
41871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41872  # It is also a way to make sure we got the proper file name for the real test later on.
41873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41874  if test "x$test_shortpath" = x; then
41875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41876$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41877    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
41878  fi
41879
41880  # Call helper function which possibly converts this using DOS-style short mode.
41881  # If so, the updated path is stored in $new_path.
41882
41883  input_path="$new_path"
41884  # Check if we need to convert this using DOS-style short mode. If the path
41885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41886  # take no chances and rewrite it.
41887  # Note: m4 eats our [], so we need to use [ and ] instead.
41888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41889  if test "x$has_forbidden_chars" != x; then
41890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41894      # Going to short mode and back again did indeed matter. Since short mode is
41895      # case insensitive, let's make it lowercase to improve readability.
41896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41897      # Now convert it back to Unix-style (cygpath)
41898      input_path=`$CYGPATH -u "$shortmode_path"`
41899      new_path="$input_path"
41900    fi
41901  fi
41902
41903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41904  if test "x$test_cygdrive_prefix" = x; then
41905    # As a simple fix, exclude /usr/bin since it's not a real path.
41906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41908      # a path prefixed by /cygdrive for fixpath to work.
41909      new_path="$CYGWIN_ROOT_PATH$input_path"
41910    fi
41911  fi
41912
41913
41914  if test "x$path" != "x$new_path"; then
41915    with_build_devkit="$new_path"
41916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41917$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41918  fi
41919
41920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41921
41922  path="$with_build_devkit"
41923  has_colon=`$ECHO $path | $GREP ^.:`
41924  new_path="$path"
41925  if test "x$has_colon" = x; then
41926    # Not in mixed or Windows style, start by that.
41927    new_path=`cmd //c echo $path`
41928  fi
41929
41930
41931  input_path="$new_path"
41932  # Check if we need to convert this using DOS-style short mode. If the path
41933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41934  # take no chances and rewrite it.
41935  # Note: m4 eats our [], so we need to use [ and ] instead.
41936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41937  if test "x$has_forbidden_chars" != x; then
41938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41940  fi
41941
41942
41943  windows_path="$new_path"
41944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41945    unix_path=`$CYGPATH -u "$windows_path"`
41946    new_path="$unix_path"
41947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41949    new_path="$unix_path"
41950  fi
41951
41952  if test "x$path" != "x$new_path"; then
41953    with_build_devkit="$new_path"
41954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41955$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41956  fi
41957
41958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41960
41961    else
41962      # We're on a unix platform. Hooray! :)
41963      path="$with_build_devkit"
41964      has_space=`$ECHO "$path" | $GREP " "`
41965      if test "x$has_space" != x; then
41966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41967$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41969      fi
41970
41971      # Use eval to expand a potential ~
41972      eval path="$path"
41973      if test ! -f "$path" && test ! -d "$path"; then
41974        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
41975      fi
41976
41977      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
41978    fi
41979  fi
41980
41981        BUILD_DEVKIT_ROOT="$with_build_devkit"
41982        # Check for a meta data info file in the root of the devkit
41983        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
41984          # Process devkit.info so that existing devkit variables are not
41985          # modified by this
41986          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
41987              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
41988              -e "s/\$host/\$build/g" \
41989              $BUILD_DEVKIT_ROOT/devkit.info \
41990              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41991          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41992          # This potentially sets the following:
41993          # A descriptive name of the devkit
41994
41995  if test "x$BUILD_DEVKIT_NAME" = x; then
41996    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
41997  fi
41998
41999          # Corresponds to --with-extra-path
42000
42001  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42002    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42003  fi
42004
42005          # Corresponds to --with-toolchain-path
42006
42007  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42008    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42009  fi
42010
42011          # Corresponds to --with-sysroot
42012
42013  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42014    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42015  fi
42016
42017          # Skip the Window specific parts
42018        fi
42019
42020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42021$as_echo_n "checking for build platform devkit... " >&6; }
42022        if test "x$BUILD_DEVKIT_NAME" != x; then
42023          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42024$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42025        else
42026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42027$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42028        fi
42029
42030        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42031
42032  if test "x$BUILD_SYSROOT" != "x"; then
42033    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42034      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42035        # Solaris Studio does not have a concept of sysroot. Instead we must
42036        # make sure the default include and lib dirs are appended to each
42037        # compile and link command line.
42038        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42039        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42040            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42041            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42042      fi
42043    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42044      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42045      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42046    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42047      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42048      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42049    fi
42050    # Propagate the sysroot args to hotspot
42051    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42052    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42053    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42054    # The global CFLAGS and LDFLAGS variables need these for configure to function
42055    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42056    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42057    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42058    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42059  fi
42060
42061  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42062    # We also need -iframework<path>/System/Library/Frameworks
42063    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42064    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42065    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42066    # set this here so it doesn't have to be peppered throughout the forest
42067    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42068    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42069  fi
42070
42071
42072
42073
42074
42075         # Fallback default of just /bin if DEVKIT_PATH is not defined
42076        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42077          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42078        fi
42079        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42080      fi
42081    fi
42082
42083    # FIXME: we should list the discovered compilers as an exclude pattern!
42084    # If we do that, we can do this detection before POST_DETECTION, and still
42085    # find the build compilers in the tools dir, if needed.
42086
42087
42088
42089  # Publish this variable in the help.
42090
42091
42092  if [ -z "${BUILD_CC+x}" ]; then
42093    # The variable is not set by user, try to locate tool using the code snippet
42094    for ac_prog in cl cc gcc
42095do
42096  # Extract the first word of "$ac_prog", so it can be a program name with args.
42097set dummy $ac_prog; ac_word=$2
42098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42099$as_echo_n "checking for $ac_word... " >&6; }
42100if ${ac_cv_path_BUILD_CC+:} false; then :
42101  $as_echo_n "(cached) " >&6
42102else
42103  case $BUILD_CC in
42104  [\\/]* | ?:[\\/]*)
42105  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42106  ;;
42107  *)
42108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42109for as_dir in $PATH
42110do
42111  IFS=$as_save_IFS
42112  test -z "$as_dir" && as_dir=.
42113    for ac_exec_ext in '' $ac_executable_extensions; do
42114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42115    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42117    break 2
42118  fi
42119done
42120  done
42121IFS=$as_save_IFS
42122
42123  ;;
42124esac
42125fi
42126BUILD_CC=$ac_cv_path_BUILD_CC
42127if test -n "$BUILD_CC"; then
42128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42129$as_echo "$BUILD_CC" >&6; }
42130else
42131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42132$as_echo "no" >&6; }
42133fi
42134
42135
42136  test -n "$BUILD_CC" && break
42137done
42138
42139  else
42140    # The variable is set, but is it from the command line or the environment?
42141
42142    # Try to remove the string !BUILD_CC! from our list.
42143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42145      # If it failed, the variable was not from the command line. Ignore it,
42146      # but warn the user (except for BASH, which is always set by the calling BASH).
42147      if test "xBUILD_CC" != xBASH; then
42148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42149$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42150      fi
42151      # Try to locate tool using the code snippet
42152      for ac_prog in cl cc gcc
42153do
42154  # Extract the first word of "$ac_prog", so it can be a program name with args.
42155set dummy $ac_prog; ac_word=$2
42156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42157$as_echo_n "checking for $ac_word... " >&6; }
42158if ${ac_cv_path_BUILD_CC+:} false; then :
42159  $as_echo_n "(cached) " >&6
42160else
42161  case $BUILD_CC in
42162  [\\/]* | ?:[\\/]*)
42163  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42164  ;;
42165  *)
42166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42167for as_dir in $PATH
42168do
42169  IFS=$as_save_IFS
42170  test -z "$as_dir" && as_dir=.
42171    for ac_exec_ext in '' $ac_executable_extensions; do
42172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42173    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42175    break 2
42176  fi
42177done
42178  done
42179IFS=$as_save_IFS
42180
42181  ;;
42182esac
42183fi
42184BUILD_CC=$ac_cv_path_BUILD_CC
42185if test -n "$BUILD_CC"; then
42186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42187$as_echo "$BUILD_CC" >&6; }
42188else
42189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42190$as_echo "no" >&6; }
42191fi
42192
42193
42194  test -n "$BUILD_CC" && break
42195done
42196
42197    else
42198      # If it succeeded, then it was overridden by the user. We will use it
42199      # for the tool.
42200
42201      # First remove it from the list of overridden variables, so we can test
42202      # for unknown variables in the end.
42203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42204
42205      # Check if we try to supply an empty value
42206      if test "x$BUILD_CC" = x; then
42207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42208$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42210$as_echo_n "checking for BUILD_CC... " >&6; }
42211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42212$as_echo "disabled" >&6; }
42213      else
42214        # Check if the provided tool contains a complete path.
42215        tool_specified="$BUILD_CC"
42216        tool_basename="${tool_specified##*/}"
42217        if test "x$tool_basename" = "x$tool_specified"; then
42218          # A command without a complete path is provided, search $PATH.
42219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42220$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42221          # Extract the first word of "$tool_basename", so it can be a program name with args.
42222set dummy $tool_basename; ac_word=$2
42223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42224$as_echo_n "checking for $ac_word... " >&6; }
42225if ${ac_cv_path_BUILD_CC+:} false; then :
42226  $as_echo_n "(cached) " >&6
42227else
42228  case $BUILD_CC in
42229  [\\/]* | ?:[\\/]*)
42230  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42231  ;;
42232  *)
42233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42234for as_dir in $PATH
42235do
42236  IFS=$as_save_IFS
42237  test -z "$as_dir" && as_dir=.
42238    for ac_exec_ext in '' $ac_executable_extensions; do
42239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42240    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42242    break 2
42243  fi
42244done
42245  done
42246IFS=$as_save_IFS
42247
42248  ;;
42249esac
42250fi
42251BUILD_CC=$ac_cv_path_BUILD_CC
42252if test -n "$BUILD_CC"; then
42253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42254$as_echo "$BUILD_CC" >&6; }
42255else
42256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42257$as_echo "no" >&6; }
42258fi
42259
42260
42261          if test "x$BUILD_CC" = x; then
42262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42263          fi
42264        else
42265          # Otherwise we believe it is a complete path. Use it as it is.
42266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42267$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42269$as_echo_n "checking for BUILD_CC... " >&6; }
42270          if test ! -x "$tool_specified"; then
42271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42272$as_echo "not found" >&6; }
42273            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42274          fi
42275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42276$as_echo "$tool_specified" >&6; }
42277        fi
42278      fi
42279    fi
42280
42281  fi
42282
42283
42284
42285  if test "x$BUILD_CC" = x; then
42286    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42287  fi
42288
42289
42290
42291  # Only process if variable expands to non-empty
42292
42293  if test "x$BUILD_CC" != x; then
42294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42295
42296  # First separate the path from the arguments. This will split at the first
42297  # space.
42298  complete="$BUILD_CC"
42299  path="${complete%% *}"
42300  tmp="$complete EOL"
42301  arguments="${tmp#* }"
42302
42303  # Input might be given as Windows format, start by converting to
42304  # unix format.
42305  new_path=`$CYGPATH -u "$path"`
42306
42307  # Now try to locate executable using which
42308  new_path=`$WHICH "$new_path" 2> /dev/null`
42309  # bat and cmd files are not always considered executable in cygwin causing which
42310  # to not find them
42311  if test "x$new_path" = x \
42312      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42313      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42314    new_path=`$CYGPATH -u "$path"`
42315  fi
42316  if test "x$new_path" = x; then
42317    # Oops. Which didn't find the executable.
42318    # The splitting of arguments from the executable at a space might have been incorrect,
42319    # since paths with space are more likely in Windows. Give it another try with the whole
42320    # argument.
42321    path="$complete"
42322    arguments="EOL"
42323    new_path=`$CYGPATH -u "$path"`
42324    new_path=`$WHICH "$new_path" 2> /dev/null`
42325    # bat and cmd files are not always considered executable in cygwin causing which
42326    # to not find them
42327    if test "x$new_path" = x \
42328        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42329        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42330      new_path=`$CYGPATH -u "$path"`
42331    fi
42332    if test "x$new_path" = x; then
42333      # It's still not found. Now this is an unrecoverable error.
42334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42335$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42336      has_space=`$ECHO "$complete" | $GREP " "`
42337      if test "x$has_space" != x; then
42338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42340      fi
42341      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42342    fi
42343  fi
42344
42345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42348  # "foo.exe" is OK but "foo" is an error.
42349  #
42350  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42351  # It is also a way to make sure we got the proper file name for the real test later on.
42352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42353  if test "x$test_shortpath" = x; then
42354    # Short path failed, file does not exist as specified.
42355    # Try adding .exe or .cmd
42356    if test -f "${new_path}.exe"; then
42357      input_to_shortpath="${new_path}.exe"
42358    elif test -f "${new_path}.cmd"; then
42359      input_to_shortpath="${new_path}.cmd"
42360    else
42361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42362$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42363      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42364$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42365      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42366    fi
42367  else
42368    input_to_shortpath="$new_path"
42369  fi
42370
42371  # Call helper function which possibly converts this using DOS-style short mode.
42372  # If so, the updated path is stored in $new_path.
42373  new_path="$input_to_shortpath"
42374
42375  input_path="$input_to_shortpath"
42376  # Check if we need to convert this using DOS-style short mode. If the path
42377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42378  # take no chances and rewrite it.
42379  # Note: m4 eats our [], so we need to use [ and ] instead.
42380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42381  if test "x$has_forbidden_chars" != x; then
42382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42386      # Going to short mode and back again did indeed matter. Since short mode is
42387      # case insensitive, let's make it lowercase to improve readability.
42388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42389      # Now convert it back to Unix-style (cygpath)
42390      input_path=`$CYGPATH -u "$shortmode_path"`
42391      new_path="$input_path"
42392    fi
42393  fi
42394
42395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42396  if test "x$test_cygdrive_prefix" = x; then
42397    # As a simple fix, exclude /usr/bin since it's not a real path.
42398    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42400      # a path prefixed by /cygdrive for fixpath to work.
42401      new_path="$CYGWIN_ROOT_PATH$input_path"
42402    fi
42403  fi
42404
42405  # remove trailing .exe if any
42406  new_path="${new_path/%.exe/}"
42407
42408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42409
42410  # First separate the path from the arguments. This will split at the first
42411  # space.
42412  complete="$BUILD_CC"
42413  path="${complete%% *}"
42414  tmp="$complete EOL"
42415  arguments="${tmp#* }"
42416
42417  # Input might be given as Windows format, start by converting to
42418  # unix format.
42419  new_path="$path"
42420
42421  windows_path="$new_path"
42422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42423    unix_path=`$CYGPATH -u "$windows_path"`
42424    new_path="$unix_path"
42425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42427    new_path="$unix_path"
42428  fi
42429
42430
42431  # Now try to locate executable using which
42432  new_path=`$WHICH "$new_path" 2> /dev/null`
42433
42434  if test "x$new_path" = x; then
42435    # Oops. Which didn't find the executable.
42436    # The splitting of arguments from the executable at a space might have been incorrect,
42437    # since paths with space are more likely in Windows. Give it another try with the whole
42438    # argument.
42439    path="$complete"
42440    arguments="EOL"
42441    new_path="$path"
42442
42443  windows_path="$new_path"
42444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42445    unix_path=`$CYGPATH -u "$windows_path"`
42446    new_path="$unix_path"
42447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42449    new_path="$unix_path"
42450  fi
42451
42452
42453    new_path=`$WHICH "$new_path" 2> /dev/null`
42454    # bat and cmd files are not always considered executable in MSYS causing which
42455    # to not find them
42456    if test "x$new_path" = x \
42457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42459      new_path="$path"
42460
42461  windows_path="$new_path"
42462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42463    unix_path=`$CYGPATH -u "$windows_path"`
42464    new_path="$unix_path"
42465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42467    new_path="$unix_path"
42468  fi
42469
42470    fi
42471
42472    if test "x$new_path" = x; then
42473      # It's still not found. Now this is an unrecoverable error.
42474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42475$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42476      has_space=`$ECHO "$complete" | $GREP " "`
42477      if test "x$has_space" != x; then
42478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42480      fi
42481      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42482    fi
42483  fi
42484
42485  # Now new_path has a complete unix path to the binary
42486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42487    # Keep paths in /bin as-is, but remove trailing .exe if any
42488    new_path="${new_path/%.exe/}"
42489    # Do not save /bin paths to all_fixpath_prefixes!
42490  else
42491    # Not in mixed or Windows style, start by that.
42492    new_path=`cmd //c echo $new_path`
42493
42494  input_path="$new_path"
42495  # Check if we need to convert this using DOS-style short mode. If the path
42496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42497  # take no chances and rewrite it.
42498  # Note: m4 eats our [], so we need to use [ and ] instead.
42499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42500  if test "x$has_forbidden_chars" != x; then
42501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42503  fi
42504
42505    # Output is in $new_path
42506
42507  windows_path="$new_path"
42508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42509    unix_path=`$CYGPATH -u "$windows_path"`
42510    new_path="$unix_path"
42511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42513    new_path="$unix_path"
42514  fi
42515
42516    # remove trailing .exe if any
42517    new_path="${new_path/%.exe/}"
42518
42519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42521  fi
42522
42523    else
42524      # We're on a unix platform. Hooray! :)
42525      # First separate the path from the arguments. This will split at the first
42526      # space.
42527      complete="$BUILD_CC"
42528      path="${complete%% *}"
42529      tmp="$complete EOL"
42530      arguments="${tmp#* }"
42531
42532      # Cannot rely on the command "which" here since it doesn't always work.
42533      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42534      if test -z "$is_absolute_path"; then
42535        # Path to executable is not absolute. Find it.
42536        IFS_save="$IFS"
42537        IFS=:
42538        for p in $PATH; do
42539          if test -f "$p/$path" && test -x "$p/$path"; then
42540            new_path="$p/$path"
42541            break
42542          fi
42543        done
42544        IFS="$IFS_save"
42545      else
42546        # This is an absolute path, we can use it without further modifications.
42547        new_path="$path"
42548      fi
42549
42550      if test "x$new_path" = x; then
42551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42552$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42553        has_space=`$ECHO "$complete" | $GREP " "`
42554        if test "x$has_space" != x; then
42555          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42556$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42557        fi
42558        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42559      fi
42560    fi
42561
42562    # Now join together the path and the arguments once again
42563    if test "x$arguments" != xEOL; then
42564      new_complete="$new_path ${arguments% *}"
42565    else
42566      new_complete="$new_path"
42567    fi
42568
42569    if test "x$complete" != "x$new_complete"; then
42570      BUILD_CC="$new_complete"
42571      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42572$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42573    fi
42574  fi
42575
42576
42577
42578
42579  # Publish this variable in the help.
42580
42581
42582  if [ -z "${BUILD_CXX+x}" ]; then
42583    # The variable is not set by user, try to locate tool using the code snippet
42584    for ac_prog in cl CC g++
42585do
42586  # Extract the first word of "$ac_prog", so it can be a program name with args.
42587set dummy $ac_prog; ac_word=$2
42588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42589$as_echo_n "checking for $ac_word... " >&6; }
42590if ${ac_cv_path_BUILD_CXX+:} false; then :
42591  $as_echo_n "(cached) " >&6
42592else
42593  case $BUILD_CXX in
42594  [\\/]* | ?:[\\/]*)
42595  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42596  ;;
42597  *)
42598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42599for as_dir in $PATH
42600do
42601  IFS=$as_save_IFS
42602  test -z "$as_dir" && as_dir=.
42603    for ac_exec_ext in '' $ac_executable_extensions; do
42604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42605    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42607    break 2
42608  fi
42609done
42610  done
42611IFS=$as_save_IFS
42612
42613  ;;
42614esac
42615fi
42616BUILD_CXX=$ac_cv_path_BUILD_CXX
42617if test -n "$BUILD_CXX"; then
42618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42619$as_echo "$BUILD_CXX" >&6; }
42620else
42621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42622$as_echo "no" >&6; }
42623fi
42624
42625
42626  test -n "$BUILD_CXX" && break
42627done
42628
42629  else
42630    # The variable is set, but is it from the command line or the environment?
42631
42632    # Try to remove the string !BUILD_CXX! from our list.
42633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42635      # If it failed, the variable was not from the command line. Ignore it,
42636      # but warn the user (except for BASH, which is always set by the calling BASH).
42637      if test "xBUILD_CXX" != xBASH; then
42638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42639$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42640      fi
42641      # Try to locate tool using the code snippet
42642      for ac_prog in cl CC g++
42643do
42644  # Extract the first word of "$ac_prog", so it can be a program name with args.
42645set dummy $ac_prog; ac_word=$2
42646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42647$as_echo_n "checking for $ac_word... " >&6; }
42648if ${ac_cv_path_BUILD_CXX+:} false; then :
42649  $as_echo_n "(cached) " >&6
42650else
42651  case $BUILD_CXX in
42652  [\\/]* | ?:[\\/]*)
42653  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42654  ;;
42655  *)
42656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42657for as_dir in $PATH
42658do
42659  IFS=$as_save_IFS
42660  test -z "$as_dir" && as_dir=.
42661    for ac_exec_ext in '' $ac_executable_extensions; do
42662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42663    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42665    break 2
42666  fi
42667done
42668  done
42669IFS=$as_save_IFS
42670
42671  ;;
42672esac
42673fi
42674BUILD_CXX=$ac_cv_path_BUILD_CXX
42675if test -n "$BUILD_CXX"; then
42676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42677$as_echo "$BUILD_CXX" >&6; }
42678else
42679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42680$as_echo "no" >&6; }
42681fi
42682
42683
42684  test -n "$BUILD_CXX" && break
42685done
42686
42687    else
42688      # If it succeeded, then it was overridden by the user. We will use it
42689      # for the tool.
42690
42691      # First remove it from the list of overridden variables, so we can test
42692      # for unknown variables in the end.
42693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42694
42695      # Check if we try to supply an empty value
42696      if test "x$BUILD_CXX" = x; then
42697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
42698$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
42699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42700$as_echo_n "checking for BUILD_CXX... " >&6; }
42701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42702$as_echo "disabled" >&6; }
42703      else
42704        # Check if the provided tool contains a complete path.
42705        tool_specified="$BUILD_CXX"
42706        tool_basename="${tool_specified##*/}"
42707        if test "x$tool_basename" = "x$tool_specified"; then
42708          # A command without a complete path is provided, search $PATH.
42709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
42710$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
42711          # Extract the first word of "$tool_basename", so it can be a program name with args.
42712set dummy $tool_basename; ac_word=$2
42713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42714$as_echo_n "checking for $ac_word... " >&6; }
42715if ${ac_cv_path_BUILD_CXX+:} false; then :
42716  $as_echo_n "(cached) " >&6
42717else
42718  case $BUILD_CXX in
42719  [\\/]* | ?:[\\/]*)
42720  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42721  ;;
42722  *)
42723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42724for as_dir in $PATH
42725do
42726  IFS=$as_save_IFS
42727  test -z "$as_dir" && as_dir=.
42728    for ac_exec_ext in '' $ac_executable_extensions; do
42729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42730    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42732    break 2
42733  fi
42734done
42735  done
42736IFS=$as_save_IFS
42737
42738  ;;
42739esac
42740fi
42741BUILD_CXX=$ac_cv_path_BUILD_CXX
42742if test -n "$BUILD_CXX"; then
42743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42744$as_echo "$BUILD_CXX" >&6; }
42745else
42746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42747$as_echo "no" >&6; }
42748fi
42749
42750
42751          if test "x$BUILD_CXX" = x; then
42752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42753          fi
42754        else
42755          # Otherwise we believe it is a complete path. Use it as it is.
42756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
42757$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
42758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42759$as_echo_n "checking for BUILD_CXX... " >&6; }
42760          if test ! -x "$tool_specified"; then
42761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42762$as_echo "not found" >&6; }
42763            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
42764          fi
42765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42766$as_echo "$tool_specified" >&6; }
42767        fi
42768      fi
42769    fi
42770
42771  fi
42772
42773
42774
42775  if test "x$BUILD_CXX" = x; then
42776    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
42777  fi
42778
42779
42780
42781  # Only process if variable expands to non-empty
42782
42783  if test "x$BUILD_CXX" != x; then
42784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42785
42786  # First separate the path from the arguments. This will split at the first
42787  # space.
42788  complete="$BUILD_CXX"
42789  path="${complete%% *}"
42790  tmp="$complete EOL"
42791  arguments="${tmp#* }"
42792
42793  # Input might be given as Windows format, start by converting to
42794  # unix format.
42795  new_path=`$CYGPATH -u "$path"`
42796
42797  # Now try to locate executable using which
42798  new_path=`$WHICH "$new_path" 2> /dev/null`
42799  # bat and cmd files are not always considered executable in cygwin causing which
42800  # to not find them
42801  if test "x$new_path" = x \
42802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42804    new_path=`$CYGPATH -u "$path"`
42805  fi
42806  if test "x$new_path" = x; then
42807    # Oops. Which didn't find the executable.
42808    # The splitting of arguments from the executable at a space might have been incorrect,
42809    # since paths with space are more likely in Windows. Give it another try with the whole
42810    # argument.
42811    path="$complete"
42812    arguments="EOL"
42813    new_path=`$CYGPATH -u "$path"`
42814    new_path=`$WHICH "$new_path" 2> /dev/null`
42815    # bat and cmd files are not always considered executable in cygwin causing which
42816    # to not find them
42817    if test "x$new_path" = x \
42818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42820      new_path=`$CYGPATH -u "$path"`
42821    fi
42822    if test "x$new_path" = x; then
42823      # It's still not found. Now this is an unrecoverable error.
42824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42825$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42826      has_space=`$ECHO "$complete" | $GREP " "`
42827      if test "x$has_space" != x; then
42828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42830      fi
42831      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42832    fi
42833  fi
42834
42835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42838  # "foo.exe" is OK but "foo" is an error.
42839  #
42840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42841  # It is also a way to make sure we got the proper file name for the real test later on.
42842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42843  if test "x$test_shortpath" = x; then
42844    # Short path failed, file does not exist as specified.
42845    # Try adding .exe or .cmd
42846    if test -f "${new_path}.exe"; then
42847      input_to_shortpath="${new_path}.exe"
42848    elif test -f "${new_path}.cmd"; then
42849      input_to_shortpath="${new_path}.cmd"
42850    else
42851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
42852$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
42853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42855      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42856    fi
42857  else
42858    input_to_shortpath="$new_path"
42859  fi
42860
42861  # Call helper function which possibly converts this using DOS-style short mode.
42862  # If so, the updated path is stored in $new_path.
42863  new_path="$input_to_shortpath"
42864
42865  input_path="$input_to_shortpath"
42866  # Check if we need to convert this using DOS-style short mode. If the path
42867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42868  # take no chances and rewrite it.
42869  # Note: m4 eats our [], so we need to use [ and ] instead.
42870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42871  if test "x$has_forbidden_chars" != x; then
42872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42876      # Going to short mode and back again did indeed matter. Since short mode is
42877      # case insensitive, let's make it lowercase to improve readability.
42878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42879      # Now convert it back to Unix-style (cygpath)
42880      input_path=`$CYGPATH -u "$shortmode_path"`
42881      new_path="$input_path"
42882    fi
42883  fi
42884
42885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42886  if test "x$test_cygdrive_prefix" = x; then
42887    # As a simple fix, exclude /usr/bin since it's not a real path.
42888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42890      # a path prefixed by /cygdrive for fixpath to work.
42891      new_path="$CYGWIN_ROOT_PATH$input_path"
42892    fi
42893  fi
42894
42895  # remove trailing .exe if any
42896  new_path="${new_path/%.exe/}"
42897
42898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42899
42900  # First separate the path from the arguments. This will split at the first
42901  # space.
42902  complete="$BUILD_CXX"
42903  path="${complete%% *}"
42904  tmp="$complete EOL"
42905  arguments="${tmp#* }"
42906
42907  # Input might be given as Windows format, start by converting to
42908  # unix format.
42909  new_path="$path"
42910
42911  windows_path="$new_path"
42912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42913    unix_path=`$CYGPATH -u "$windows_path"`
42914    new_path="$unix_path"
42915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42917    new_path="$unix_path"
42918  fi
42919
42920
42921  # Now try to locate executable using which
42922  new_path=`$WHICH "$new_path" 2> /dev/null`
42923
42924  if test "x$new_path" = x; then
42925    # Oops. Which didn't find the executable.
42926    # The splitting of arguments from the executable at a space might have been incorrect,
42927    # since paths with space are more likely in Windows. Give it another try with the whole
42928    # argument.
42929    path="$complete"
42930    arguments="EOL"
42931    new_path="$path"
42932
42933  windows_path="$new_path"
42934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42935    unix_path=`$CYGPATH -u "$windows_path"`
42936    new_path="$unix_path"
42937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42939    new_path="$unix_path"
42940  fi
42941
42942
42943    new_path=`$WHICH "$new_path" 2> /dev/null`
42944    # bat and cmd files are not always considered executable in MSYS causing which
42945    # to not find them
42946    if test "x$new_path" = x \
42947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42949      new_path="$path"
42950
42951  windows_path="$new_path"
42952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42953    unix_path=`$CYGPATH -u "$windows_path"`
42954    new_path="$unix_path"
42955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42957    new_path="$unix_path"
42958  fi
42959
42960    fi
42961
42962    if test "x$new_path" = x; then
42963      # It's still not found. Now this is an unrecoverable error.
42964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42965$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42966      has_space=`$ECHO "$complete" | $GREP " "`
42967      if test "x$has_space" != x; then
42968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42970      fi
42971      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42972    fi
42973  fi
42974
42975  # Now new_path has a complete unix path to the binary
42976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42977    # Keep paths in /bin as-is, but remove trailing .exe if any
42978    new_path="${new_path/%.exe/}"
42979    # Do not save /bin paths to all_fixpath_prefixes!
42980  else
42981    # Not in mixed or Windows style, start by that.
42982    new_path=`cmd //c echo $new_path`
42983
42984  input_path="$new_path"
42985  # Check if we need to convert this using DOS-style short mode. If the path
42986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42987  # take no chances and rewrite it.
42988  # Note: m4 eats our [], so we need to use [ and ] instead.
42989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42990  if test "x$has_forbidden_chars" != x; then
42991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42993  fi
42994
42995    # Output is in $new_path
42996
42997  windows_path="$new_path"
42998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42999    unix_path=`$CYGPATH -u "$windows_path"`
43000    new_path="$unix_path"
43001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43003    new_path="$unix_path"
43004  fi
43005
43006    # remove trailing .exe if any
43007    new_path="${new_path/%.exe/}"
43008
43009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43011  fi
43012
43013    else
43014      # We're on a unix platform. Hooray! :)
43015      # First separate the path from the arguments. This will split at the first
43016      # space.
43017      complete="$BUILD_CXX"
43018      path="${complete%% *}"
43019      tmp="$complete EOL"
43020      arguments="${tmp#* }"
43021
43022      # Cannot rely on the command "which" here since it doesn't always work.
43023      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43024      if test -z "$is_absolute_path"; then
43025        # Path to executable is not absolute. Find it.
43026        IFS_save="$IFS"
43027        IFS=:
43028        for p in $PATH; do
43029          if test -f "$p/$path" && test -x "$p/$path"; then
43030            new_path="$p/$path"
43031            break
43032          fi
43033        done
43034        IFS="$IFS_save"
43035      else
43036        # This is an absolute path, we can use it without further modifications.
43037        new_path="$path"
43038      fi
43039
43040      if test "x$new_path" = x; then
43041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43042$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43043        has_space=`$ECHO "$complete" | $GREP " "`
43044        if test "x$has_space" != x; then
43045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43047        fi
43048        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43049      fi
43050    fi
43051
43052    # Now join together the path and the arguments once again
43053    if test "x$arguments" != xEOL; then
43054      new_complete="$new_path ${arguments% *}"
43055    else
43056      new_complete="$new_path"
43057    fi
43058
43059    if test "x$complete" != "x$new_complete"; then
43060      BUILD_CXX="$new_complete"
43061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43062$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43063    fi
43064  fi
43065
43066    BUILD_LD="$BUILD_CC"
43067
43068    PATH="$OLDPATH"
43069  else
43070    # If we are not cross compiling, use the normal target compilers for
43071    # building the build platform executables.
43072    BUILD_CC="$CC"
43073    BUILD_CXX="$CXX"
43074    BUILD_LD="$LD"
43075    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
43076    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
43077  fi
43078
43079
43080
43081
43082
43083
43084
43085
43086  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43087    # For hotspot, we need these in Windows mixed path,
43088    # so rewrite them all. Need added .exe suffix.
43089    HOTSPOT_CXX="$CXX.exe"
43090    HOTSPOT_LD="$LD.exe"
43091    HOTSPOT_MT="$MT.exe"
43092    HOTSPOT_RC="$RC.exe"
43093
43094  unix_path="$HOTSPOT_CXX"
43095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43096    windows_path=`$CYGPATH -m "$unix_path"`
43097    HOTSPOT_CXX="$windows_path"
43098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43099    windows_path=`cmd //c echo $unix_path`
43100    HOTSPOT_CXX="$windows_path"
43101  fi
43102
43103
43104  unix_path="$HOTSPOT_LD"
43105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43106    windows_path=`$CYGPATH -m "$unix_path"`
43107    HOTSPOT_LD="$windows_path"
43108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43109    windows_path=`cmd //c echo $unix_path`
43110    HOTSPOT_LD="$windows_path"
43111  fi
43112
43113
43114  unix_path="$HOTSPOT_MT"
43115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43116    windows_path=`$CYGPATH -m "$unix_path"`
43117    HOTSPOT_MT="$windows_path"
43118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43119    windows_path=`cmd //c echo $unix_path`
43120    HOTSPOT_MT="$windows_path"
43121  fi
43122
43123
43124  unix_path="$HOTSPOT_RC"
43125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43126    windows_path=`$CYGPATH -m "$unix_path"`
43127    HOTSPOT_RC="$windows_path"
43128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43129    windows_path=`cmd //c echo $unix_path`
43130    HOTSPOT_RC="$windows_path"
43131  fi
43132
43133
43134
43135  else
43136    HOTSPOT_CXX="$CXX"
43137    HOTSPOT_LD="$LD"
43138  fi
43139
43140
43141
43142  if test  "x$TOOLCHAIN_TYPE" = xclang; then
43143    USE_CLANG=true
43144  fi
43145
43146
43147
43148
43149
43150  # The package path is used only on macosx?
43151  # FIXME: clean this up, and/or move it elsewhere.
43152  PACKAGE_PATH=/opt/local
43153
43154
43155  # Check for extra potential brokenness.
43156  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43157    # On Windows, double-check that we got the right compiler.
43158    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
43159    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
43160    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
43161      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
43162        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
43163      fi
43164    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
43165      if test "x$COMPILER_CPU_TEST" != "xx64"; then
43166        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
43167      fi
43168    fi
43169  fi
43170
43171  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43172    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43173    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
43174    # This is later checked when setting flags.
43175
43176    # "-Og" suppported for GCC 4.8 and later
43177    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
43178
43179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
43180$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
43181  supports=yes
43182
43183  saved_cflags="$CFLAGS"
43184  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
43185  ac_ext=c
43186ac_cpp='$CPP $CPPFLAGS'
43187ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43188ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43189ac_compiler_gnu=$ac_cv_c_compiler_gnu
43190
43191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43192/* end confdefs.h.  */
43193int i;
43194_ACEOF
43195if ac_fn_c_try_compile "$LINENO"; then :
43196
43197else
43198  supports=no
43199fi
43200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43201  ac_ext=cpp
43202ac_cpp='$CXXCPP $CPPFLAGS'
43203ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43204ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43205ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43206
43207  CFLAGS="$saved_cflags"
43208
43209  saved_cxxflags="$CXXFLAGS"
43210  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
43211  ac_ext=cpp
43212ac_cpp='$CXXCPP $CPPFLAGS'
43213ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43214ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43215ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43216
43217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43218/* end confdefs.h.  */
43219int i;
43220_ACEOF
43221if ac_fn_cxx_try_compile "$LINENO"; then :
43222
43223else
43224  supports=no
43225fi
43226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43227  ac_ext=cpp
43228ac_cpp='$CXXCPP $CPPFLAGS'
43229ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43230ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43231ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43232
43233  CXXFLAGS="$saved_cxxflags"
43234
43235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43236$as_echo "$supports" >&6; }
43237  if test "x$supports" = "xyes" ; then
43238    HAS_CFLAG_OPTIMIZE_DEBUG=true
43239  else
43240    HAS_CFLAG_OPTIMIZE_DEBUG=false
43241  fi
43242
43243
43244    # "-z relro" supported in GNU binutils 2.17 and later
43245    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
43246
43247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
43248$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
43249  supports=yes
43250
43251  saved_ldflags="$LDFLAGS"
43252  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
43253  ac_ext=c
43254ac_cpp='$CPP $CPPFLAGS'
43255ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43256ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43257ac_compiler_gnu=$ac_cv_c_compiler_gnu
43258
43259  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43260/* end confdefs.h.  */
43261
43262int
43263main ()
43264{
43265
43266  ;
43267  return 0;
43268}
43269_ACEOF
43270if ac_fn_c_try_link "$LINENO"; then :
43271
43272else
43273  supports=no
43274fi
43275rm -f core conftest.err conftest.$ac_objext \
43276    conftest$ac_exeext conftest.$ac_ext
43277  ac_ext=cpp
43278ac_cpp='$CXXCPP $CPPFLAGS'
43279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43282
43283  LDFLAGS="$saved_ldflags"
43284
43285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43286$as_echo "$supports" >&6; }
43287  if test "x$supports" = "xyes" ; then
43288    HAS_LINKER_RELRO=true
43289  else
43290    HAS_LINKER_RELRO=false
43291  fi
43292
43293
43294    # "-z now" supported in GNU binutils 2.11 and later
43295    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
43296
43297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
43298$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
43299  supports=yes
43300
43301  saved_ldflags="$LDFLAGS"
43302  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
43303  ac_ext=c
43304ac_cpp='$CPP $CPPFLAGS'
43305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43307ac_compiler_gnu=$ac_cv_c_compiler_gnu
43308
43309  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43310/* end confdefs.h.  */
43311
43312int
43313main ()
43314{
43315
43316  ;
43317  return 0;
43318}
43319_ACEOF
43320if ac_fn_c_try_link "$LINENO"; then :
43321
43322else
43323  supports=no
43324fi
43325rm -f core conftest.err conftest.$ac_objext \
43326    conftest$ac_exeext conftest.$ac_ext
43327  ac_ext=cpp
43328ac_cpp='$CXXCPP $CPPFLAGS'
43329ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43330ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43331ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43332
43333  LDFLAGS="$saved_ldflags"
43334
43335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43336$as_echo "$supports" >&6; }
43337  if test "x$supports" = "xyes" ; then
43338    HAS_LINKER_NOW=true
43339  else
43340    HAS_LINKER_NOW=false
43341  fi
43342
43343  fi
43344
43345  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
43346  # in executable.'
43347  USING_BROKEN_SUSE_LD=no
43348  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
43349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
43350$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
43351    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
43352    $ECHO "int main() { }" > main.c
43353    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
43354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43355$as_echo "no" >&6; }
43356      USING_BROKEN_SUSE_LD=no
43357    else
43358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43359$as_echo "yes" >&6; }
43360      USING_BROKEN_SUSE_LD=yes
43361    fi
43362    rm -rf version-script.map main.c a.out
43363  fi
43364
43365
43366
43367# Setup the JTReg Regression Test Harness.
43368
43369
43370# Check whether --with-jtreg was given.
43371if test "${with_jtreg+set}" = set; then :
43372  withval=$with_jtreg;
43373else
43374  with_jtreg=no
43375fi
43376
43377
43378  if test "x$with_jtreg" = xno; then
43379    # jtreg disabled
43380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43381$as_echo_n "checking for jtreg... " >&6; }
43382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43383$as_echo "no" >&6; }
43384  else
43385    if test "x$with_jtreg" != xyes; then
43386      # with path specified.
43387      JT_HOME="$with_jtreg"
43388    fi
43389
43390    if test "x$JT_HOME" != x; then
43391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43392$as_echo_n "checking for jtreg... " >&6; }
43393
43394      # use JT_HOME enviroment var.
43395
43396  # Only process if variable expands to non-empty
43397
43398  if test "x$JT_HOME" != x; then
43399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43400
43401  # Input might be given as Windows format, start by converting to
43402  # unix format.
43403  path="$JT_HOME"
43404  new_path=`$CYGPATH -u "$path"`
43405
43406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43409  # "foo.exe" is OK but "foo" is an error.
43410  #
43411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43412  # It is also a way to make sure we got the proper file name for the real test later on.
43413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43414  if test "x$test_shortpath" = x; then
43415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43416$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43417    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
43418  fi
43419
43420  # Call helper function which possibly converts this using DOS-style short mode.
43421  # If so, the updated path is stored in $new_path.
43422
43423  input_path="$new_path"
43424  # Check if we need to convert this using DOS-style short mode. If the path
43425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43426  # take no chances and rewrite it.
43427  # Note: m4 eats our [], so we need to use [ and ] instead.
43428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43429  if test "x$has_forbidden_chars" != x; then
43430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43434      # Going to short mode and back again did indeed matter. Since short mode is
43435      # case insensitive, let's make it lowercase to improve readability.
43436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43437      # Now convert it back to Unix-style (cygpath)
43438      input_path=`$CYGPATH -u "$shortmode_path"`
43439      new_path="$input_path"
43440    fi
43441  fi
43442
43443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43444  if test "x$test_cygdrive_prefix" = x; then
43445    # As a simple fix, exclude /usr/bin since it's not a real path.
43446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43448      # a path prefixed by /cygdrive for fixpath to work.
43449      new_path="$CYGWIN_ROOT_PATH$input_path"
43450    fi
43451  fi
43452
43453
43454  if test "x$path" != "x$new_path"; then
43455    JT_HOME="$new_path"
43456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43457$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43458  fi
43459
43460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43461
43462  path="$JT_HOME"
43463  has_colon=`$ECHO $path | $GREP ^.:`
43464  new_path="$path"
43465  if test "x$has_colon" = x; then
43466    # Not in mixed or Windows style, start by that.
43467    new_path=`cmd //c echo $path`
43468  fi
43469
43470
43471  input_path="$new_path"
43472  # Check if we need to convert this using DOS-style short mode. If the path
43473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43474  # take no chances and rewrite it.
43475  # Note: m4 eats our [], so we need to use [ and ] instead.
43476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43477  if test "x$has_forbidden_chars" != x; then
43478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43480  fi
43481
43482
43483  windows_path="$new_path"
43484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43485    unix_path=`$CYGPATH -u "$windows_path"`
43486    new_path="$unix_path"
43487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43489    new_path="$unix_path"
43490  fi
43491
43492  if test "x$path" != "x$new_path"; then
43493    JT_HOME="$new_path"
43494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43495$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43496  fi
43497
43498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43500
43501    else
43502      # We're on a unix platform. Hooray! :)
43503      path="$JT_HOME"
43504      has_space=`$ECHO "$path" | $GREP " "`
43505      if test "x$has_space" != x; then
43506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43507$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43509      fi
43510
43511      # Use eval to expand a potential ~
43512      eval path="$path"
43513      if test ! -f "$path" && test ! -d "$path"; then
43514        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
43515      fi
43516
43517      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
43518    fi
43519  fi
43520
43521
43522      # jtreg win32 script works for everybody
43523      JTREGEXE="$JT_HOME/bin/jtreg"
43524
43525      if test ! -f "$JTREGEXE"; then
43526        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
43527      fi
43528
43529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43530$as_echo "$JTREGEXE" >&6; }
43531    else
43532      # try to find jtreg on path
43533
43534
43535
43536  # Publish this variable in the help.
43537
43538
43539  if [ -z "${JTREGEXE+x}" ]; then
43540    # The variable is not set by user, try to locate tool using the code snippet
43541    for ac_prog in jtreg
43542do
43543  # Extract the first word of "$ac_prog", so it can be a program name with args.
43544set dummy $ac_prog; ac_word=$2
43545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43546$as_echo_n "checking for $ac_word... " >&6; }
43547if ${ac_cv_path_JTREGEXE+:} false; then :
43548  $as_echo_n "(cached) " >&6
43549else
43550  case $JTREGEXE in
43551  [\\/]* | ?:[\\/]*)
43552  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43553  ;;
43554  *)
43555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43556for as_dir in $PATH
43557do
43558  IFS=$as_save_IFS
43559  test -z "$as_dir" && as_dir=.
43560    for ac_exec_ext in '' $ac_executable_extensions; do
43561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43562    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43564    break 2
43565  fi
43566done
43567  done
43568IFS=$as_save_IFS
43569
43570  ;;
43571esac
43572fi
43573JTREGEXE=$ac_cv_path_JTREGEXE
43574if test -n "$JTREGEXE"; then
43575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43576$as_echo "$JTREGEXE" >&6; }
43577else
43578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43579$as_echo "no" >&6; }
43580fi
43581
43582
43583  test -n "$JTREGEXE" && break
43584done
43585
43586  else
43587    # The variable is set, but is it from the command line or the environment?
43588
43589    # Try to remove the string !JTREGEXE! from our list.
43590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
43591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43592      # If it failed, the variable was not from the command line. Ignore it,
43593      # but warn the user (except for BASH, which is always set by the calling BASH).
43594      if test "xJTREGEXE" != xBASH; then
43595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
43596$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
43597      fi
43598      # Try to locate tool using the code snippet
43599      for ac_prog in jtreg
43600do
43601  # Extract the first word of "$ac_prog", so it can be a program name with args.
43602set dummy $ac_prog; ac_word=$2
43603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43604$as_echo_n "checking for $ac_word... " >&6; }
43605if ${ac_cv_path_JTREGEXE+:} false; then :
43606  $as_echo_n "(cached) " >&6
43607else
43608  case $JTREGEXE in
43609  [\\/]* | ?:[\\/]*)
43610  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43611  ;;
43612  *)
43613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43614for as_dir in $PATH
43615do
43616  IFS=$as_save_IFS
43617  test -z "$as_dir" && as_dir=.
43618    for ac_exec_ext in '' $ac_executable_extensions; do
43619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43620    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43622    break 2
43623  fi
43624done
43625  done
43626IFS=$as_save_IFS
43627
43628  ;;
43629esac
43630fi
43631JTREGEXE=$ac_cv_path_JTREGEXE
43632if test -n "$JTREGEXE"; then
43633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43634$as_echo "$JTREGEXE" >&6; }
43635else
43636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43637$as_echo "no" >&6; }
43638fi
43639
43640
43641  test -n "$JTREGEXE" && break
43642done
43643
43644    else
43645      # If it succeeded, then it was overridden by the user. We will use it
43646      # for the tool.
43647
43648      # First remove it from the list of overridden variables, so we can test
43649      # for unknown variables in the end.
43650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43651
43652      # Check if we try to supply an empty value
43653      if test "x$JTREGEXE" = x; then
43654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
43655$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
43656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43657$as_echo_n "checking for JTREGEXE... " >&6; }
43658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43659$as_echo "disabled" >&6; }
43660      else
43661        # Check if the provided tool contains a complete path.
43662        tool_specified="$JTREGEXE"
43663        tool_basename="${tool_specified##*/}"
43664        if test "x$tool_basename" = "x$tool_specified"; then
43665          # A command without a complete path is provided, search $PATH.
43666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
43667$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
43668          # Extract the first word of "$tool_basename", so it can be a program name with args.
43669set dummy $tool_basename; ac_word=$2
43670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43671$as_echo_n "checking for $ac_word... " >&6; }
43672if ${ac_cv_path_JTREGEXE+:} false; then :
43673  $as_echo_n "(cached) " >&6
43674else
43675  case $JTREGEXE in
43676  [\\/]* | ?:[\\/]*)
43677  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43678  ;;
43679  *)
43680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43681for as_dir in $PATH
43682do
43683  IFS=$as_save_IFS
43684  test -z "$as_dir" && as_dir=.
43685    for ac_exec_ext in '' $ac_executable_extensions; do
43686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43687    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43689    break 2
43690  fi
43691done
43692  done
43693IFS=$as_save_IFS
43694
43695  ;;
43696esac
43697fi
43698JTREGEXE=$ac_cv_path_JTREGEXE
43699if test -n "$JTREGEXE"; then
43700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43701$as_echo "$JTREGEXE" >&6; }
43702else
43703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43704$as_echo "no" >&6; }
43705fi
43706
43707
43708          if test "x$JTREGEXE" = x; then
43709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43710          fi
43711        else
43712          # Otherwise we believe it is a complete path. Use it as it is.
43713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
43714$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
43715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43716$as_echo_n "checking for JTREGEXE... " >&6; }
43717          if test ! -x "$tool_specified"; then
43718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43719$as_echo "not found" >&6; }
43720            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
43721          fi
43722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43723$as_echo "$tool_specified" >&6; }
43724        fi
43725      fi
43726    fi
43727
43728  fi
43729
43730
43731
43732  if test "x$JTREGEXE" = x; then
43733    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
43734  fi
43735
43736
43737      JT_HOME="`$DIRNAME $JTREGEXE`"
43738    fi
43739  fi
43740
43741
43742
43743
43744
43745
43746  # Option used to tell the compiler whether to create 32- or 64-bit executables
43747  if test "x$TOOLCHAIN_TYPE" = xxlc; then
43748    COMPILER_TARGET_BITS_FLAG="-q"
43749  else
43750    COMPILER_TARGET_BITS_FLAG="-m"
43751  fi
43752
43753
43754  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
43755  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43756    ARFLAGS="-r"
43757  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43758    ARFLAGS="-X64"
43759  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
43760    # lib.exe is used as AR to create static libraries.
43761    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
43762  else
43763    ARFLAGS=""
43764  fi
43765
43766
43767  ## Setup strip.
43768  # FIXME: should this really be per platform, or should it be per toolchain type?
43769  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
43770  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
43771  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43772    STRIPFLAGS="-g"
43773  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
43774    STRIPFLAGS="-x"
43775  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
43776    STRIPFLAGS="-S"
43777  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43778    STRIPFLAGS="-X32_64"
43779  fi
43780
43781
43782
43783  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43784    CC_OUT_OPTION=-Fo
43785    EXE_OUT_OPTION=-out:
43786    LD_OUT_OPTION=-out:
43787    AR_OUT_OPTION=-out:
43788  else
43789    # The option used to specify the target .o,.a or .so file.
43790    # When compiling, how to specify the to be created object file.
43791    CC_OUT_OPTION='-o$(SPACE)'
43792    # When linking, how to specify the to be created executable.
43793    EXE_OUT_OPTION='-o$(SPACE)'
43794    # When linking, how to specify the to be created dynamically linkable library.
43795    LD_OUT_OPTION='-o$(SPACE)'
43796    # When archiving, how to specify the to be create static archive for object files.
43797    AR_OUT_OPTION='rcs$(SPACE)'
43798  fi
43799
43800
43801
43802
43803
43804  # On Windows, we need to set RC flags.
43805  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43806    RC_FLAGS="-nologo -l0x409"
43807    if test "x$VARIANT" = xOPT; then
43808      RC_FLAGS="$RC_FLAGS -DNDEBUG"
43809    fi
43810
43811    # The version variables used to create RC_FLAGS may be overridden
43812    # in a custom configure script, or possibly the command line.
43813    # Let those variables be expanded at make time in spec.gmk.
43814    # The \$ are escaped to the shell, and the $(...) variables
43815    # are evaluated by make.
43816    RC_FLAGS="$RC_FLAGS \
43817        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
43818        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
43819        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
43820        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
43821        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
43822        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
43823        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
43824  fi
43825
43826
43827  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43828    # silence copyright notice and other headers.
43829    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
43830  fi
43831
43832
43833# FIXME: Currently we must test this after toolchain but before flags. Fix!
43834
43835# Now we can test some aspects on the target using configure macros.
43836
43837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
43838$as_echo_n "checking for ANSI C header files... " >&6; }
43839if ${ac_cv_header_stdc+:} false; then :
43840  $as_echo_n "(cached) " >&6
43841else
43842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43843/* end confdefs.h.  */
43844#include <stdlib.h>
43845#include <stdarg.h>
43846#include <string.h>
43847#include <float.h>
43848
43849int
43850main ()
43851{
43852
43853  ;
43854  return 0;
43855}
43856_ACEOF
43857if ac_fn_cxx_try_compile "$LINENO"; then :
43858  ac_cv_header_stdc=yes
43859else
43860  ac_cv_header_stdc=no
43861fi
43862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43863
43864if test $ac_cv_header_stdc = yes; then
43865  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
43866  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43867/* end confdefs.h.  */
43868#include <string.h>
43869
43870_ACEOF
43871if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43872  $EGREP "memchr" >/dev/null 2>&1; then :
43873
43874else
43875  ac_cv_header_stdc=no
43876fi
43877rm -f conftest*
43878
43879fi
43880
43881if test $ac_cv_header_stdc = yes; then
43882  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
43883  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43884/* end confdefs.h.  */
43885#include <stdlib.h>
43886
43887_ACEOF
43888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43889  $EGREP "free" >/dev/null 2>&1; then :
43890
43891else
43892  ac_cv_header_stdc=no
43893fi
43894rm -f conftest*
43895
43896fi
43897
43898if test $ac_cv_header_stdc = yes; then
43899  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
43900  if test "$cross_compiling" = yes; then :
43901  :
43902else
43903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43904/* end confdefs.h.  */
43905#include <ctype.h>
43906#include <stdlib.h>
43907#if ((' ' & 0x0FF) == 0x020)
43908# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
43909# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
43910#else
43911# define ISLOWER(c) \
43912		   (('a' <= (c) && (c) <= 'i') \
43913		     || ('j' <= (c) && (c) <= 'r') \
43914		     || ('s' <= (c) && (c) <= 'z'))
43915# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
43916#endif
43917
43918#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
43919int
43920main ()
43921{
43922  int i;
43923  for (i = 0; i < 256; i++)
43924    if (XOR (islower (i), ISLOWER (i))
43925	|| toupper (i) != TOUPPER (i))
43926      return 2;
43927  return 0;
43928}
43929_ACEOF
43930if ac_fn_cxx_try_run "$LINENO"; then :
43931
43932else
43933  ac_cv_header_stdc=no
43934fi
43935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43936  conftest.$ac_objext conftest.beam conftest.$ac_ext
43937fi
43938
43939fi
43940fi
43941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
43942$as_echo "$ac_cv_header_stdc" >&6; }
43943if test $ac_cv_header_stdc = yes; then
43944
43945$as_echo "#define STDC_HEADERS 1" >>confdefs.h
43946
43947fi
43948
43949# On IRIX 5.3, sys/types and inttypes.h are conflicting.
43950for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
43951		  inttypes.h stdint.h unistd.h
43952do :
43953  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43954ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
43955"
43956if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43957  cat >>confdefs.h <<_ACEOF
43958#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43959_ACEOF
43960
43961fi
43962
43963done
43964
43965
43966
43967  ###############################################################################
43968  #
43969  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
43970  # (The JVM can use 32 or 64 bit Java pointers but that decision
43971  # is made at runtime.)
43972  #
43973
43974  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
43975    # Always specify -m flag on Solaris
43976    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
43977
43978  # When we add flags to the "official" CFLAGS etc, we need to
43979  # keep track of these additions in ADDED_CFLAGS etc. These
43980  # will later be checked to make sure only controlled additions
43981  # have been made to CFLAGS etc.
43982  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43983  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43984  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43985
43986  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43987  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43988  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43989
43990  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43991  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43992  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43993
43994  elif test "x$COMPILE_TYPE" = xreduced; then
43995    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
43996      # Specify -m if running reduced on unix platforms
43997
43998  # When we add flags to the "official" CFLAGS etc, we need to
43999  # keep track of these additions in ADDED_CFLAGS etc. These
44000  # will later be checked to make sure only controlled additions
44001  # have been made to CFLAGS etc.
44002  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44003  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44004  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44005
44006  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44007  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44008  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44009
44010  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44011  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44012  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44013
44014    fi
44015  fi
44016
44017  # Make compilation sanity check
44018  for ac_header in stdio.h
44019do :
44020  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
44021if test "x$ac_cv_header_stdio_h" = xyes; then :
44022  cat >>confdefs.h <<_ACEOF
44023#define HAVE_STDIO_H 1
44024_ACEOF
44025
44026else
44027
44028    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
44029$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
44030    if test "x$COMPILE_TYPE" = xreduced; then
44031
44032  # Print a helpful message on how to acquire the necessary build dependency.
44033  # reduced is the help tag: freetype, cups, alsa etc
44034  MISSING_DEPENDENCY=reduced
44035
44036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44037    cygwin_help $MISSING_DEPENDENCY
44038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44039    msys_help $MISSING_DEPENDENCY
44040  else
44041    PKGHANDLER_COMMAND=
44042
44043    case $PKGHANDLER in
44044      apt-get)
44045        apt_help     $MISSING_DEPENDENCY ;;
44046      yum)
44047        yum_help     $MISSING_DEPENDENCY ;;
44048      port)
44049        port_help    $MISSING_DEPENDENCY ;;
44050      pkgutil)
44051        pkgutil_help $MISSING_DEPENDENCY ;;
44052      pkgadd)
44053        pkgadd_help  $MISSING_DEPENDENCY ;;
44054    esac
44055
44056    if test "x$PKGHANDLER_COMMAND" != x; then
44057      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44058    fi
44059  fi
44060
44061      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44062$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44063    elif test "x$COMPILE_TYPE" = xcross; then
44064      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44065$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44066    fi
44067    as_fn_error $? "Cannot continue." "$LINENO" 5
44068
44069fi
44070
44071done
44072
44073
44074  # The cast to long int works around a bug in the HP C Compiler
44075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44077# This bug is HP SR number 8606223364.
44078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44079$as_echo_n "checking size of int *... " >&6; }
44080if ${ac_cv_sizeof_int_p+:} false; then :
44081  $as_echo_n "(cached) " >&6
44082else
44083  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44084
44085else
44086  if test "$ac_cv_type_int_p" = yes; then
44087     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44089as_fn_error 77 "cannot compute sizeof (int *)
44090See \`config.log' for more details" "$LINENO" 5; }
44091   else
44092     ac_cv_sizeof_int_p=0
44093   fi
44094fi
44095
44096fi
44097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44098$as_echo "$ac_cv_sizeof_int_p" >&6; }
44099
44100
44101
44102cat >>confdefs.h <<_ACEOF
44103#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44104_ACEOF
44105
44106
44107
44108  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
44109  if test "x$ac_cv_sizeof_int_p" = x; then
44110    # The test failed, lets stick to the assumed value.
44111    { $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
44112$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
44113  else
44114    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44115
44116    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44117      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
44118      # Let's try to implicitely set the compilers target architecture and retry the test
44119      { $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
44120$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;}
44121      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
44122$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
44123
44124  # When we add flags to the "official" CFLAGS etc, we need to
44125  # keep track of these additions in ADDED_CFLAGS etc. These
44126  # will later be checked to make sure only controlled additions
44127  # have been made to CFLAGS etc.
44128  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44129  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44130  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44131
44132  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44133  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44134  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44135
44136  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44137  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44138  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44139
44140
44141      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
44142      unset ac_cv_sizeof_int_p
44143      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
44144      cat >>confdefs.h <<_ACEOF
44145#undef SIZEOF_INT_P
44146_ACEOF
44147
44148      # The cast to long int works around a bug in the HP C Compiler
44149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44151# This bug is HP SR number 8606223364.
44152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44153$as_echo_n "checking size of int *... " >&6; }
44154if ${ac_cv_sizeof_int_p+:} false; then :
44155  $as_echo_n "(cached) " >&6
44156else
44157  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44158
44159else
44160  if test "$ac_cv_type_int_p" = yes; then
44161     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44163as_fn_error 77 "cannot compute sizeof (int *)
44164See \`config.log' for more details" "$LINENO" 5; }
44165   else
44166     ac_cv_sizeof_int_p=0
44167   fi
44168fi
44169
44170fi
44171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44172$as_echo "$ac_cv_sizeof_int_p" >&6; }
44173
44174
44175
44176cat >>confdefs.h <<_ACEOF
44177#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44178_ACEOF
44179
44180
44181
44182      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44183
44184      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44185        { $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
44186$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;}
44187        if test "x$COMPILE_TYPE" = xreduced; then
44188
44189  # Print a helpful message on how to acquire the necessary build dependency.
44190  # reduced is the help tag: freetype, cups, alsa etc
44191  MISSING_DEPENDENCY=reduced
44192
44193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44194    cygwin_help $MISSING_DEPENDENCY
44195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44196    msys_help $MISSING_DEPENDENCY
44197  else
44198    PKGHANDLER_COMMAND=
44199
44200    case $PKGHANDLER in
44201      apt-get)
44202        apt_help     $MISSING_DEPENDENCY ;;
44203      yum)
44204        yum_help     $MISSING_DEPENDENCY ;;
44205      port)
44206        port_help    $MISSING_DEPENDENCY ;;
44207      pkgutil)
44208        pkgutil_help $MISSING_DEPENDENCY ;;
44209      pkgadd)
44210        pkgadd_help  $MISSING_DEPENDENCY ;;
44211    esac
44212
44213    if test "x$PKGHANDLER_COMMAND" != x; then
44214      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44215    fi
44216  fi
44217
44218          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44219$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44220        elif test "x$COMPILE_TYPE" = xcross; then
44221          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44222$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44223        fi
44224        as_fn_error $? "Cannot continue." "$LINENO" 5
44225      fi
44226    fi
44227  fi
44228
44229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
44230$as_echo_n "checking for target address size... " >&6; }
44231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
44232$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
44233
44234
44235  ###############################################################################
44236  #
44237  # Is the target little of big endian?
44238  #
44239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
44240$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
44241if ${ac_cv_c_bigendian+:} false; then :
44242  $as_echo_n "(cached) " >&6
44243else
44244  ac_cv_c_bigendian=unknown
44245    # See if we're dealing with a universal compiler.
44246    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44247/* end confdefs.h.  */
44248#ifndef __APPLE_CC__
44249	       not a universal capable compiler
44250	     #endif
44251	     typedef int dummy;
44252
44253_ACEOF
44254if ac_fn_cxx_try_compile "$LINENO"; then :
44255
44256	# Check for potential -arch flags.  It is not universal unless
44257	# there are at least two -arch flags with different values.
44258	ac_arch=
44259	ac_prev=
44260	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
44261	 if test -n "$ac_prev"; then
44262	   case $ac_word in
44263	     i?86 | x86_64 | ppc | ppc64)
44264	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
44265		 ac_arch=$ac_word
44266	       else
44267		 ac_cv_c_bigendian=universal
44268		 break
44269	       fi
44270	       ;;
44271	   esac
44272	   ac_prev=
44273	 elif test "x$ac_word" = "x-arch"; then
44274	   ac_prev=arch
44275	 fi
44276       done
44277fi
44278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44279    if test $ac_cv_c_bigendian = unknown; then
44280      # See if sys/param.h defines the BYTE_ORDER macro.
44281      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44282/* end confdefs.h.  */
44283#include <sys/types.h>
44284	     #include <sys/param.h>
44285
44286int
44287main ()
44288{
44289#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
44290		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
44291		     && LITTLE_ENDIAN)
44292	      bogus endian macros
44293	     #endif
44294
44295  ;
44296  return 0;
44297}
44298_ACEOF
44299if ac_fn_cxx_try_compile "$LINENO"; then :
44300  # It does; now see whether it defined to BIG_ENDIAN or not.
44301	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44302/* end confdefs.h.  */
44303#include <sys/types.h>
44304		#include <sys/param.h>
44305
44306int
44307main ()
44308{
44309#if BYTE_ORDER != BIG_ENDIAN
44310		 not big endian
44311		#endif
44312
44313  ;
44314  return 0;
44315}
44316_ACEOF
44317if ac_fn_cxx_try_compile "$LINENO"; then :
44318  ac_cv_c_bigendian=yes
44319else
44320  ac_cv_c_bigendian=no
44321fi
44322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44323fi
44324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44325    fi
44326    if test $ac_cv_c_bigendian = unknown; then
44327      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
44328      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44329/* end confdefs.h.  */
44330#include <limits.h>
44331
44332int
44333main ()
44334{
44335#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
44336	      bogus endian macros
44337	     #endif
44338
44339  ;
44340  return 0;
44341}
44342_ACEOF
44343if ac_fn_cxx_try_compile "$LINENO"; then :
44344  # It does; now see whether it defined to _BIG_ENDIAN or not.
44345	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44346/* end confdefs.h.  */
44347#include <limits.h>
44348
44349int
44350main ()
44351{
44352#ifndef _BIG_ENDIAN
44353		 not big endian
44354		#endif
44355
44356  ;
44357  return 0;
44358}
44359_ACEOF
44360if ac_fn_cxx_try_compile "$LINENO"; then :
44361  ac_cv_c_bigendian=yes
44362else
44363  ac_cv_c_bigendian=no
44364fi
44365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44366fi
44367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44368    fi
44369    if test $ac_cv_c_bigendian = unknown; then
44370      # Compile a test program.
44371      if test "$cross_compiling" = yes; then :
44372  # Try to guess by grepping values from an object file.
44373	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44374/* end confdefs.h.  */
44375short int ascii_mm[] =
44376		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
44377		short int ascii_ii[] =
44378		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
44379		int use_ascii (int i) {
44380		  return ascii_mm[i] + ascii_ii[i];
44381		}
44382		short int ebcdic_ii[] =
44383		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
44384		short int ebcdic_mm[] =
44385		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
44386		int use_ebcdic (int i) {
44387		  return ebcdic_mm[i] + ebcdic_ii[i];
44388		}
44389		extern int foo;
44390
44391int
44392main ()
44393{
44394return use_ascii (foo) == use_ebcdic (foo);
44395  ;
44396  return 0;
44397}
44398_ACEOF
44399if ac_fn_cxx_try_compile "$LINENO"; then :
44400  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
44401	      ac_cv_c_bigendian=yes
44402	    fi
44403	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
44404	      if test "$ac_cv_c_bigendian" = unknown; then
44405		ac_cv_c_bigendian=no
44406	      else
44407		# finding both strings is unlikely to happen, but who knows?
44408		ac_cv_c_bigendian=unknown
44409	      fi
44410	    fi
44411fi
44412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44413else
44414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44415/* end confdefs.h.  */
44416$ac_includes_default
44417int
44418main ()
44419{
44420
44421	     /* Are we little or big endian?  From Harbison&Steele.  */
44422	     union
44423	     {
44424	       long int l;
44425	       char c[sizeof (long int)];
44426	     } u;
44427	     u.l = 1;
44428	     return u.c[sizeof (long int) - 1] == 1;
44429
44430  ;
44431  return 0;
44432}
44433_ACEOF
44434if ac_fn_cxx_try_run "$LINENO"; then :
44435  ac_cv_c_bigendian=no
44436else
44437  ac_cv_c_bigendian=yes
44438fi
44439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44440  conftest.$ac_objext conftest.beam conftest.$ac_ext
44441fi
44442
44443    fi
44444fi
44445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
44446$as_echo "$ac_cv_c_bigendian" >&6; }
44447 case $ac_cv_c_bigendian in #(
44448   yes)
44449     ENDIAN="big";; #(
44450   no)
44451     ENDIAN="little" ;; #(
44452   universal)
44453     ENDIAN="universal_endianness"
44454     ;; #(
44455   *)
44456     ENDIAN="unknown" ;;
44457 esac
44458
44459
44460  if test "x$ENDIAN" = xuniversal_endianness; then
44461    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
44462  fi
44463  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
44464    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
44465  fi
44466
44467
44468# Configure flags for the tools
44469
44470  ###############################################################################
44471  #
44472  # How to compile shared libraries.
44473  #
44474
44475  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44476    PICFLAG="-fPIC"
44477    C_FLAG_REORDER=''
44478    CXX_FLAG_REORDER=''
44479
44480    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44481      # Linking is different on MacOSX
44482      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44483      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44484      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44485      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44486      SET_SHARED_LIBRARY_MAPFILE=''
44487    else
44488      # Default works for linux, might work on other platforms as well.
44489      SHARED_LIBRARY_FLAGS='-shared'
44490      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44491      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44492      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44493      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44494    fi
44495  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44496    PICFLAG=''
44497    C_FLAG_REORDER=''
44498    CXX_FLAG_REORDER=''
44499
44500    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44501      # Linking is different on MacOSX
44502      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44503      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44504      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44505      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44506      SET_SHARED_LIBRARY_MAPFILE=''
44507    else
44508      # Default works for linux, might work on other platforms as well.
44509      SHARED_LIBRARY_FLAGS='-shared'
44510      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44511      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44512      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44513      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44514    fi
44515  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44516    PICFLAG="-KPIC"
44517    C_FLAG_REORDER='-xF'
44518    CXX_FLAG_REORDER='-xF'
44519    SHARED_LIBRARY_FLAGS="-G"
44520    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
44521    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44522    SET_SHARED_LIBRARY_NAME=''
44523    SET_SHARED_LIBRARY_MAPFILE='-M$1'
44524  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44525    PICFLAG="-qpic=large"
44526    C_FLAG_REORDER=''
44527    CXX_FLAG_REORDER=''
44528    SHARED_LIBRARY_FLAGS="-qmkshrobj"
44529    SET_EXECUTABLE_ORIGIN=""
44530    SET_SHARED_LIBRARY_ORIGIN=''
44531    SET_SHARED_LIBRARY_NAME=''
44532    SET_SHARED_LIBRARY_MAPFILE=''
44533  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44534    PICFLAG=""
44535    C_FLAG_REORDER=''
44536    CXX_FLAG_REORDER=''
44537    SHARED_LIBRARY_FLAGS="-LD"
44538    SET_EXECUTABLE_ORIGIN=''
44539    SET_SHARED_LIBRARY_ORIGIN=''
44540    SET_SHARED_LIBRARY_NAME=''
44541    SET_SHARED_LIBRARY_MAPFILE=''
44542  fi
44543
44544
44545
44546
44547
44548
44549
44550
44551  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44552    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
44553    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
44554    CFLAGS_JDKLIB_EXTRA='-xstrconst'
44555  fi
44556  # The (cross) compiler is now configured, we can now test capabilities
44557  # of the target platform.
44558
44559
44560
44561  ###############################################################################
44562  #
44563  # Setup the opt flags for different compilers
44564  # and different operating systems.
44565  #
44566
44567  # FIXME: this was indirectly the old default, but just inherited.
44568  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44569  #   C_FLAG_DEPS="-MMD -MF"
44570  # fi
44571
44572  # Generate make dependency files
44573  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44574    C_FLAG_DEPS="-MMD -MF"
44575  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44576    C_FLAG_DEPS="-MMD -MF"
44577  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44578    C_FLAG_DEPS="-xMMD -xMF"
44579  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44580    C_FLAG_DEPS="-qmakedep=gcc -MF"
44581  fi
44582  CXX_FLAG_DEPS="$C_FLAG_DEPS"
44583
44584
44585
44586  # Debug symbols
44587  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44588    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
44589      # reduce from default "-g2" option to save space
44590      CFLAGS_DEBUG_SYMBOLS="-g1"
44591      CXXFLAGS_DEBUG_SYMBOLS="-g1"
44592    else
44593      CFLAGS_DEBUG_SYMBOLS="-g"
44594      CXXFLAGS_DEBUG_SYMBOLS="-g"
44595    fi
44596  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44597    CFLAGS_DEBUG_SYMBOLS="-g"
44598    CXXFLAGS_DEBUG_SYMBOLS="-g"
44599  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44600    CFLAGS_DEBUG_SYMBOLS="-g -xs"
44601    # FIXME: likely a bug, this disables debug symbols rather than enables them
44602    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
44603  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44604    CFLAGS_DEBUG_SYMBOLS="-g"
44605    CXXFLAGS_DEBUG_SYMBOLS="-g"
44606  fi
44607
44608
44609
44610  # bounds, memory and behavior checking options
44611  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44612    case $DEBUG_LEVEL in
44613    release )
44614      # no adjustment
44615      ;;
44616    fastdebug )
44617      # no adjustment
44618      ;;
44619    slowdebug )
44620      # Add runtime stack smashing and undefined behavior checks.
44621      # Not all versions of gcc support -fstack-protector
44622      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
44623
44624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
44625$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
44626  supports=yes
44627
44628  saved_cflags="$CFLAGS"
44629  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
44630  ac_ext=c
44631ac_cpp='$CPP $CPPFLAGS'
44632ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44633ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44634ac_compiler_gnu=$ac_cv_c_compiler_gnu
44635
44636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44637/* end confdefs.h.  */
44638int i;
44639_ACEOF
44640if ac_fn_c_try_compile "$LINENO"; then :
44641
44642else
44643  supports=no
44644fi
44645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44646  ac_ext=cpp
44647ac_cpp='$CXXCPP $CPPFLAGS'
44648ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44649ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44650ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44651
44652  CFLAGS="$saved_cflags"
44653
44654  saved_cxxflags="$CXXFLAGS"
44655  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
44656  ac_ext=cpp
44657ac_cpp='$CXXCPP $CPPFLAGS'
44658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44661
44662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44663/* end confdefs.h.  */
44664int i;
44665_ACEOF
44666if ac_fn_cxx_try_compile "$LINENO"; then :
44667
44668else
44669  supports=no
44670fi
44671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44672  ac_ext=cpp
44673ac_cpp='$CXXCPP $CPPFLAGS'
44674ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44675ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44676ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44677
44678  CXXFLAGS="$saved_cxxflags"
44679
44680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44681$as_echo "$supports" >&6; }
44682  if test "x$supports" = "xyes" ; then
44683    :
44684  else
44685    STACK_PROTECTOR_CFLAG=""
44686  fi
44687
44688
44689      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44690      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44691      ;;
44692    esac
44693  fi
44694
44695  # Optimization levels
44696  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44697    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
44698
44699    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
44700      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
44701      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
44702      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
44703      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
44704      C_O_FLAG_DEBUG="-xregs=no%frameptr"
44705      C_O_FLAG_NONE="-xregs=no%frameptr"
44706      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
44707      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
44708      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
44709      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
44710      CXX_O_FLAG_NONE="-xregs=no%frameptr"
44711      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44712        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
44713        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
44714      fi
44715    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44716      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
44717      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44718      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44719      C_O_FLAG_DEBUG=""
44720      C_O_FLAG_NONE=""
44721      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
44722      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44723      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44724      C_O_FLAG_DEBUG=""
44725      CXX_O_FLAG_NONE=""
44726    fi
44727  else
44728    # The remaining toolchains share opt flags between CC and CXX;
44729    # setup for C and duplicate afterwards.
44730    if test "x$TOOLCHAIN_TYPE" = xgcc; then
44731      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44732        # On MacOSX we optimize for size, something
44733        # we should do for all platforms?
44734        C_O_FLAG_HIGHEST="-Os"
44735        C_O_FLAG_HI="-Os"
44736        C_O_FLAG_NORM="-Os"
44737      else
44738        C_O_FLAG_HIGHEST="-O3"
44739        C_O_FLAG_HI="-O3"
44740        C_O_FLAG_NORM="-O2"
44741      fi
44742      C_O_FLAG_DEBUG="-O0"
44743      C_O_FLAG_NONE="-O0"
44744    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44745      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44746        # On MacOSX we optimize for size, something
44747        # we should do for all platforms?
44748        C_O_FLAG_HIGHEST="-Os"
44749        C_O_FLAG_HI="-Os"
44750        C_O_FLAG_NORM="-Os"
44751      else
44752        C_O_FLAG_HIGHEST="-O3"
44753        C_O_FLAG_HI="-O3"
44754        C_O_FLAG_NORM="-O2"
44755      fi
44756      C_O_FLAG_DEBUG="-O0"
44757      C_O_FLAG_NONE="-O0"
44758    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44759      C_O_FLAG_HIGHEST="-O3"
44760      C_O_FLAG_HI="-O3 -qstrict"
44761      C_O_FLAG_NORM="-O2"
44762      C_O_FLAG_DEBUG="-qnoopt"
44763      C_O_FLAG_NONE="-qnoop"
44764    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44765      C_O_FLAG_HIGHEST="-O2"
44766      C_O_FLAG_HI="-O1"
44767      C_O_FLAG_NORM="-O1"
44768      C_O_FLAG_DEBUG="-Od"
44769      C_O_FLAG_NONE="-Od"
44770    fi
44771    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
44772    CXX_O_FLAG_HI="$C_O_FLAG_HI"
44773    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
44774    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
44775    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
44776  fi
44777
44778  # Adjust optimization flags according to debug level.
44779  case $DEBUG_LEVEL in
44780    release )
44781      # no adjustment
44782      ;;
44783    fastdebug )
44784      # Not quite so much optimization
44785      C_O_FLAG_HI="$C_O_FLAG_NORM"
44786      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
44787      ;;
44788    slowdebug )
44789      # Disable optimization
44790      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
44791      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
44792      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
44793      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
44794      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
44795      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
44796      ;;
44797  esac
44798
44799
44800
44801
44802
44803
44804
44805
44806
44807
44808
44809
44810
44811  # Special extras...
44812  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44813    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44814      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44815      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44816    fi
44817    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44818    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44819  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44820    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44821    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44822  fi
44823
44824  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
44825  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
44826  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
44827
44828  ###############################################################################
44829  #
44830  # Now setup the CFLAGS and LDFLAGS for the JDK build.
44831  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
44832  #
44833
44834  # Setup compiler/platform specific flags into
44835  #    CFLAGS_JDK    - C Compiler flags
44836  #    CXXFLAGS_JDK  - C++ Compiler flags
44837  #    COMMON_CCXXFLAGS_JDK - common to C and C++
44838  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44839    if test "x$OPENJDK_TARGET_CPU" = xx86; then
44840      # Force compatibility with i586 on 32 bit intel platforms.
44841      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
44842    fi
44843    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
44844        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
44845    case $OPENJDK_TARGET_CPU_ARCH in
44846      arm )
44847        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44848        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44849        ;;
44850      ppc )
44851        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44852        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44853        ;;
44854      * )
44855        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
44856        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44857        ;;
44858    esac
44859  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44860    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
44861    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
44862      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
44863    fi
44864
44865    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
44866    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
44867  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44868    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44869    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44870  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44871    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
44872        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
44873        -DWIN32_LEAN_AND_MEAN \
44874        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
44875        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
44876        -DWIN32 -DIAL"
44877    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44878      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
44879    else
44880      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
44881    fi
44882    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
44883    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
44884    # studio.
44885    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
44886      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44887          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
44888    fi
44889  fi
44890
44891  ###############################################################################
44892
44893  # Adjust flags according to debug level.
44894  case $DEBUG_LEVEL in
44895    fastdebug | slowdebug )
44896      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
44897      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
44898      JAVAC_FLAGS="$JAVAC_FLAGS -g"
44899      ;;
44900    release )
44901      ;;
44902    * )
44903      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44904      ;;
44905  esac
44906
44907  # Setup LP64
44908  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
44909
44910  # Set some common defines. These works for all compilers, but assume
44911  # -D is universally accepted.
44912
44913  # Setup endianness
44914  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
44915    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
44916    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
44917    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
44918    #   Note: -Dmacro         is the same as    #define macro 1
44919    #         -Dmacro=        is the same as    #define macro
44920    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44921      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
44922    else
44923      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
44924    fi
44925  else
44926    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
44927    # are defined in the system?
44928    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44929      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
44930    else
44931      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
44932    fi
44933  fi
44934
44935  # Setup target OS define. Use OS target name but in upper case.
44936  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
44937  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
44938
44939  # Setup target CPU
44940  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
44941
44942  # Setup debug/release defines
44943  if test "x$DEBUG_LEVEL" = xrelease; then
44944    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
44945    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44946      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
44947    fi
44948  else
44949    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
44950  fi
44951
44952  # Setup release name
44953  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
44954
44955
44956  # Set some additional per-OS defines.
44957  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44958    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
44959  elif test "x$OPENJDK_TARGET_OS" = xaix; then
44960    # FIXME: PPC64 should not be here.
44961    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
44962  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
44963    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
44964  fi
44965
44966  # Additional macosx handling
44967  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44968    # Setting these parameters makes it an error to link to macosx APIs that are
44969    # newer than the given OS version and makes the linked binaries compatible
44970    # even if built on a newer version of the OS.
44971    # The expected format is X.Y.Z
44972    MACOSX_VERSION_MIN=10.7.0
44973
44974
44975    # The macro takes the version with no dots, ex: 1070
44976    # Let the flags variables get resolved in make for easier override on make
44977    # command line.
44978    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44979    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44980  fi
44981
44982  # Setup some hard coded includes
44983  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44984      -I${JDK_TOPDIR}/src/java.base/share/native/include \
44985      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
44986      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
44987
44988  # The shared libraries are compiled using the picflag.
44989  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
44990  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
44991
44992  # Executable flags
44993  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
44994  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
44995
44996
44997
44998
44999
45000
45001  # Flags for compiling test libraries
45002  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
45003  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
45004
45005  # Flags for compiling test executables
45006  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
45007  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
45008
45009
45010
45011
45012
45013
45014  # Setup LDFLAGS et al.
45015  #
45016
45017  # Now this is odd. The JDK native libraries have to link against libjvm.so
45018  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
45019  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
45020  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
45021  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
45022  # libraries will link to whatever is in memory. Yuck.
45023  #
45024  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
45025  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45026    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
45027    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
45028      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
45029    fi
45030    # TODO: make -debug optional "--disable-full-debug-symbols"
45031    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
45032  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45033    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45034    # We have previously set HAS_GNU_HASH if this is the case
45035    if test -n "$HAS_GNU_HASH"; then
45036      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
45037    fi
45038    if test "x$OPENJDK_TARGET_OS" = xlinux; then
45039      # And since we now know that the linker is gnu, then add -z defs, to forbid
45040      # undefined symbols in object files.
45041      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
45042      case $DEBUG_LEVEL in
45043        release )
45044          # tell linker to optimize libraries.
45045          # Should this be supplied to the OSS linker as well?
45046          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
45047          ;;
45048        slowdebug )
45049          if test "x$HAS_LINKER_NOW" = "xtrue"; then
45050            # do relocations at load
45051            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
45052            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
45053          fi
45054          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45055            # mark relocations read only
45056            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45057            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45058          fi
45059          ;;
45060        fastdebug )
45061          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45062            # mark relocations read only
45063            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45064            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45065          fi
45066          ;;
45067        * )
45068          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
45069          ;;
45070        esac
45071    fi
45072  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45073    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
45074    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
45075  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45076    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
45077  fi
45078
45079  # Customize LDFLAGS for executables
45080
45081  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
45082
45083  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45084    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
45085      LDFLAGS_STACK_SIZE=1048576
45086    else
45087      LDFLAGS_STACK_SIZE=327680
45088    fi
45089    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
45090  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
45091    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
45092  fi
45093
45094  # Customize LDFLAGS for libs
45095  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
45096
45097  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45098    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
45099    JDKLIB_LIBS=""
45100  else
45101    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
45102        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
45103
45104    # On some platforms (mac) the linker warns about non existing -L dirs.
45105    # Add server first if available. Linking aginst client does not always produce the same results.
45106    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
45107    # Default to server for other variants.
45108    if test "x$JVM_VARIANT_SERVER" = xtrue; then
45109      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45110    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
45111      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
45112    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
45113      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
45114    else
45115      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45116    fi
45117
45118    JDKLIB_LIBS="-ljava -ljvm"
45119    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45120      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
45121    fi
45122  fi
45123
45124
45125
45126
45127
45128
45129
45130  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
45131  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
45132
45133
45134
45135
45136
45137  # Some Zero and Shark settings.
45138  # ZERO_ARCHFLAG tells the compiler which mode to build for
45139  case "${OPENJDK_TARGET_CPU}" in
45140    s390)
45141      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
45142      ;;
45143    *)
45144      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45145  esac
45146
45147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
45148$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
45149  supports=yes
45150
45151  saved_cflags="$CFLAGS"
45152  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
45153  ac_ext=c
45154ac_cpp='$CPP $CPPFLAGS'
45155ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45156ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45157ac_compiler_gnu=$ac_cv_c_compiler_gnu
45158
45159  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45160/* end confdefs.h.  */
45161int i;
45162_ACEOF
45163if ac_fn_c_try_compile "$LINENO"; then :
45164
45165else
45166  supports=no
45167fi
45168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45169  ac_ext=cpp
45170ac_cpp='$CXXCPP $CPPFLAGS'
45171ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45172ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45173ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45174
45175  CFLAGS="$saved_cflags"
45176
45177  saved_cxxflags="$CXXFLAGS"
45178  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
45179  ac_ext=cpp
45180ac_cpp='$CXXCPP $CPPFLAGS'
45181ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45182ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45183ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45184
45185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45186/* end confdefs.h.  */
45187int i;
45188_ACEOF
45189if ac_fn_cxx_try_compile "$LINENO"; then :
45190
45191else
45192  supports=no
45193fi
45194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45195  ac_ext=cpp
45196ac_cpp='$CXXCPP $CPPFLAGS'
45197ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45198ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45199ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45200
45201  CXXFLAGS="$saved_cxxflags"
45202
45203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45204$as_echo "$supports" >&6; }
45205  if test "x$supports" = "xyes" ; then
45206    :
45207  else
45208    ZERO_ARCHFLAG=""
45209  fi
45210
45211
45212
45213  # Check that the compiler supports -mX (or -qX on AIX) flags
45214  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
45215
45216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
45217$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
45218  supports=yes
45219
45220  saved_cflags="$CFLAGS"
45221  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45222  ac_ext=c
45223ac_cpp='$CPP $CPPFLAGS'
45224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45226ac_compiler_gnu=$ac_cv_c_compiler_gnu
45227
45228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45229/* end confdefs.h.  */
45230int i;
45231_ACEOF
45232if ac_fn_c_try_compile "$LINENO"; then :
45233
45234else
45235  supports=no
45236fi
45237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45238  ac_ext=cpp
45239ac_cpp='$CXXCPP $CPPFLAGS'
45240ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45241ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45242ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45243
45244  CFLAGS="$saved_cflags"
45245
45246  saved_cxxflags="$CXXFLAGS"
45247  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45248  ac_ext=cpp
45249ac_cpp='$CXXCPP $CPPFLAGS'
45250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45253
45254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45255/* end confdefs.h.  */
45256int i;
45257_ACEOF
45258if ac_fn_cxx_try_compile "$LINENO"; then :
45259
45260else
45261  supports=no
45262fi
45263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45264  ac_ext=cpp
45265ac_cpp='$CXXCPP $CPPFLAGS'
45266ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45267ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45268ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45269
45270  CXXFLAGS="$saved_cxxflags"
45271
45272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45273$as_echo "$supports" >&6; }
45274  if test "x$supports" = "xyes" ; then
45275    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
45276  else
45277    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
45278  fi
45279
45280
45281
45282  # Check whether --enable-warnings-as-errors was given.
45283if test "${enable_warnings_as_errors+set}" = set; then :
45284  enableval=$enable_warnings_as_errors;
45285fi
45286
45287
45288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
45289$as_echo_n "checking if native warnings are errors... " >&6; }
45290  if test "x$enable_warnings_as_errors" = "xyes"; then
45291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
45292$as_echo "yes (explicitely set)" >&6; }
45293    WARNINGS_AS_ERRORS=true
45294  elif test "x$enable_warnings_as_errors" = "xno"; then
45295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45296$as_echo "no" >&6; }
45297    WARNINGS_AS_ERRORS=false
45298  elif test "x$enable_warnings_as_errors" = "x"; then
45299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
45300$as_echo "yes (default)" >&6; }
45301    WARNINGS_AS_ERRORS=true
45302  else
45303    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
45304  fi
45305
45306
45307  case "${TOOLCHAIN_TYPE}" in
45308    microsoft)
45309      DISABLE_WARNING_PREFIX="-wd"
45310      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
45311      ;;
45312    solstudio)
45313      DISABLE_WARNING_PREFIX="-erroff="
45314      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
45315      ;;
45316    gcc)
45317      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
45318
45319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
45320$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
45321  supports=yes
45322
45323  saved_cflags="$CFLAGS"
45324  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
45325  ac_ext=c
45326ac_cpp='$CPP $CPPFLAGS'
45327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45329ac_compiler_gnu=$ac_cv_c_compiler_gnu
45330
45331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45332/* end confdefs.h.  */
45333int i;
45334_ACEOF
45335if ac_fn_c_try_compile "$LINENO"; then :
45336
45337else
45338  supports=no
45339fi
45340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45341  ac_ext=cpp
45342ac_cpp='$CXXCPP $CPPFLAGS'
45343ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45344ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45345ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45346
45347  CFLAGS="$saved_cflags"
45348
45349  saved_cxxflags="$CXXFLAGS"
45350  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
45351  ac_ext=cpp
45352ac_cpp='$CXXCPP $CPPFLAGS'
45353ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45354ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45355ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45356
45357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45358/* end confdefs.h.  */
45359int i;
45360_ACEOF
45361if ac_fn_cxx_try_compile "$LINENO"; then :
45362
45363else
45364  supports=no
45365fi
45366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45367  ac_ext=cpp
45368ac_cpp='$CXXCPP $CPPFLAGS'
45369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45372
45373  CXXFLAGS="$saved_cxxflags"
45374
45375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45376$as_echo "$supports" >&6; }
45377  if test "x$supports" = "xyes" ; then
45378    GCC_CAN_DISABLE_WARNINGS=true
45379  else
45380    GCC_CAN_DISABLE_WARNINGS=false
45381
45382  fi
45383
45384      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
45385        DISABLE_WARNING_PREFIX="-Wno-"
45386      else
45387        DISABLE_WARNING_PREFIX=
45388      fi
45389      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45390      ;;
45391    clang)
45392      DISABLE_WARNING_PREFIX="-Wno-"
45393      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45394      ;;
45395  esac
45396
45397
45398
45399
45400# Setup debug symbols (need objcopy from the toolchain for that)
45401
45402  #
45403  # ENABLE_DEBUG_SYMBOLS
45404  # This must be done after the toolchain is setup, since we're looking at objcopy.
45405  #
45406  # Check whether --enable-debug-symbols was given.
45407if test "${enable_debug_symbols+set}" = set; then :
45408  enableval=$enable_debug_symbols;
45409fi
45410
45411
45412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
45413$as_echo_n "checking if we should generate debug symbols... " >&6; }
45414
45415  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
45416    # explicit enabling of enable-debug-symbols and can't find objcopy
45417    #   this is an error
45418    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
45419  fi
45420
45421  if test "x$enable_debug_symbols" = "xyes"; then
45422    ENABLE_DEBUG_SYMBOLS=true
45423  elif test "x$enable_debug_symbols" = "xno"; then
45424    ENABLE_DEBUG_SYMBOLS=false
45425  else
45426    # Default is on if objcopy is found
45427    if test "x$OBJCOPY" != x; then
45428      ENABLE_DEBUG_SYMBOLS=true
45429    # MacOS X and Windows don't use objcopy but default is on for those OSes
45430    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
45431      ENABLE_DEBUG_SYMBOLS=true
45432    else
45433      ENABLE_DEBUG_SYMBOLS=false
45434    fi
45435  fi
45436
45437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
45438$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
45439
45440  #
45441  # ZIP_DEBUGINFO_FILES
45442  #
45443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
45444$as_echo_n "checking if we should zip debug-info files... " >&6; }
45445  # Check whether --enable-zip-debug-info was given.
45446if test "${enable_zip_debug_info+set}" = set; then :
45447  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
45448else
45449  enable_zip_debug_info="yes"
45450fi
45451
45452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
45453$as_echo "${enable_zip_debug_info}" >&6; }
45454
45455  if test "x${enable_zip_debug_info}" = "xno"; then
45456    ZIP_DEBUGINFO_FILES=false
45457  else
45458    ZIP_DEBUGINFO_FILES=true
45459  fi
45460
45461
45462
45463
45464
45465  # Check whether --enable-native-coverage was given.
45466if test "${enable_native_coverage+set}" = set; then :
45467  enableval=$enable_native_coverage;
45468fi
45469
45470  GCOV_ENABLED="false"
45471  if test "x$enable_native_coverage" = "xyes"; then
45472    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
45473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45474$as_echo_n "checking if native coverage is enabled... " >&6; }
45475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45476$as_echo "yes" >&6; }
45477      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
45478      GCOV_LDFLAGS="-fprofile-arcs"
45479      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
45480      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
45481      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
45482      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
45483      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
45484      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
45485      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
45486      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
45487      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
45488      GCOV_ENABLED="true"
45489    else
45490      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
45491    fi
45492  elif test "x$enable_native_coverage" = "xno"; then
45493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45494$as_echo_n "checking if native coverage is enabled... " >&6; }
45495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45496$as_echo "no" >&6; }
45497  elif test "x$enable_native_coverage" != "x"; then
45498    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
45499  fi
45500
45501
45502
45503
45504###############################################################################
45505#
45506# Check dependencies for external and internal libraries.
45507#
45508###############################################################################
45509
45510# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
45511
45512  # When using cygwin or msys, we need a wrapper binary that renames
45513  # /cygdrive/c/ arguments into c:/ arguments and peeks into
45514  # @files and rewrites these too! This wrapper binary is
45515  # called fixpath.
45516  FIXPATH=
45517  if test "x$OPENJDK_BUILD_OS" = xwindows; then
45518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
45519$as_echo_n "checking if fixpath can be created... " >&6; }
45520    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
45521    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
45522    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
45523    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
45524      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
45525      FIXPATH="$FIXPATH_BIN -c"
45526    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
45527      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
45528      # @ was chosen as separator to minimize risk of other tools messing around with it
45529      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
45530          | tr ' ' '\n' | grep '^/./' | sort | uniq`
45531      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
45532      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
45533    fi
45534    FIXPATH_SRC_W="$FIXPATH_SRC"
45535    FIXPATH_BIN_W="$FIXPATH_BIN"
45536
45537  unix_path="$FIXPATH_SRC_W"
45538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45539    windows_path=`$CYGPATH -m "$unix_path"`
45540    FIXPATH_SRC_W="$windows_path"
45541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45542    windows_path=`cmd //c echo $unix_path`
45543    FIXPATH_SRC_W="$windows_path"
45544  fi
45545
45546
45547  unix_path="$FIXPATH_BIN_W"
45548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45549    windows_path=`$CYGPATH -m "$unix_path"`
45550    FIXPATH_BIN_W="$windows_path"
45551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45552    windows_path=`cmd //c echo $unix_path`
45553    FIXPATH_BIN_W="$windows_path"
45554  fi
45555
45556    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
45557    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
45558    cd $FIXPATH_DIR
45559    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
45560    cd $CURDIR
45561
45562    if test ! -x $FIXPATH_BIN; then
45563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45564$as_echo "no" >&6; }
45565      cat $FIXPATH_DIR/fixpath1.log
45566      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
45567    fi
45568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45569$as_echo "yes" >&6; }
45570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
45571$as_echo_n "checking if fixpath.exe works... " >&6; }
45572    cd $FIXPATH_DIR
45573    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
45574        > $FIXPATH_DIR/fixpath2.log 2>&1
45575    cd $CURDIR
45576    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
45577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45578$as_echo "no" >&6; }
45579      cat $FIXPATH_DIR/fixpath2.log
45580      as_fn_error $? "fixpath did not work!" "$LINENO" 5
45581    fi
45582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45583$as_echo "yes" >&6; }
45584  fi
45585
45586
45587
45588
45589
45590  # Check if X11 is needed
45591  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45592    # No X11 support on windows or macosx
45593    NEEDS_LIB_X11=false
45594  else
45595    if test "x$SUPPORT_HEADFUL" = xno; then
45596      # No X11 support if building headless-only
45597      NEEDS_LIB_X11=false
45598    else
45599      # All other instances need X11
45600      NEEDS_LIB_X11=true
45601    fi
45602  fi
45603
45604  # Check if cups is needed
45605  if test "x$OPENJDK_TARGET_OS" = xwindows; then
45606    # Windows have a separate print system
45607    NEEDS_LIB_CUPS=false
45608  else
45609    NEEDS_LIB_CUPS=true
45610  fi
45611
45612  # Check if freetype is needed
45613  if test "x$OPENJDK" = "xtrue"; then
45614    NEEDS_LIB_FREETYPE=true
45615  else
45616    NEEDS_LIB_FREETYPE=false
45617  fi
45618
45619  # Check if alsa is needed
45620  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45621    NEEDS_LIB_ALSA=true
45622  else
45623    NEEDS_LIB_ALSA=false
45624  fi
45625
45626  # Check if ffi is needed
45627  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45628    NEEDS_LIB_FFI=true
45629  else
45630    NEEDS_LIB_FFI=false
45631  fi
45632
45633
45634  # statically link libstdc++ before C++ ABI is stablized on Linux unless
45635  # dynamic build is configured on command line.
45636
45637# Check whether --with-stdc++lib was given.
45638if test "${with_stdc__lib+set}" = set; then :
45639  withval=$with_stdc__lib;
45640        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45641                && test "x$with_stdc__lib" != xdefault; then
45642          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45643        fi
45644
45645else
45646  with_stdc__lib=default
45647
45648fi
45649
45650
45651  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45652    # Test if -lstdc++ works.
45653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
45654$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
45655    ac_ext=cpp
45656ac_cpp='$CXXCPP $CPPFLAGS'
45657ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45658ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45659ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45660
45661    OLD_CXXFLAGS="$CXXFLAGS"
45662    CXXFLAGS="$CXXFLAGS -lstdc++"
45663    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45664/* end confdefs.h.  */
45665
45666int
45667main ()
45668{
45669return 0;
45670  ;
45671  return 0;
45672}
45673_ACEOF
45674if ac_fn_cxx_try_link "$LINENO"; then :
45675  has_dynamic_libstdcxx=yes
45676else
45677  has_dynamic_libstdcxx=no
45678fi
45679rm -f core conftest.err conftest.$ac_objext \
45680    conftest$ac_exeext conftest.$ac_ext
45681    CXXFLAGS="$OLD_CXXFLAGS"
45682    ac_ext=cpp
45683ac_cpp='$CXXCPP $CPPFLAGS'
45684ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45685ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45686ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45687
45688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
45689$as_echo "$has_dynamic_libstdcxx" >&6; }
45690
45691    # Test if stdc++ can be linked statically.
45692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
45693$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
45694    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
45695    ac_ext=cpp
45696ac_cpp='$CXXCPP $CPPFLAGS'
45697ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45698ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45699ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45700
45701    OLD_LIBS="$LIBS"
45702    OLD_CXX="$CXX"
45703    LIBS="$STATIC_STDCXX_FLAGS"
45704    CXX="$CC"
45705    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45706/* end confdefs.h.  */
45707
45708int
45709main ()
45710{
45711return 0;
45712  ;
45713  return 0;
45714}
45715_ACEOF
45716if ac_fn_cxx_try_link "$LINENO"; then :
45717  has_static_libstdcxx=yes
45718else
45719  has_static_libstdcxx=no
45720fi
45721rm -f core conftest.err conftest.$ac_objext \
45722    conftest$ac_exeext conftest.$ac_ext
45723    LIBS="$OLD_LIBS"
45724    CXX="$OLD_CXX"
45725    ac_ext=cpp
45726ac_cpp='$CXXCPP $CPPFLAGS'
45727ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45728ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45729ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45730
45731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
45732$as_echo "$has_static_libstdcxx" >&6; }
45733
45734    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
45735      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
45736    fi
45737
45738    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
45739      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
45740    fi
45741
45742    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
45743      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
45744    fi
45745
45746    # If dynamic was requested, it's available since it would fail above otherwise.
45747    # If dynamic wasn't requested, go with static unless it isn't available.
45748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
45749$as_echo_n "checking how to link with libstdc++... " >&6; }
45750    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45751      LIBCXX="$LIBCXX -lstdc++"
45752      LDCXX="$CXX"
45753      STATIC_CXX_SETTING="STATIC_CXX=false"
45754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
45755$as_echo "dynamic" >&6; }
45756    else
45757      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
45758      LDCXX="$CC"
45759      STATIC_CXX_SETTING="STATIC_CXX=true"
45760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
45761$as_echo "static" >&6; }
45762    fi
45763  fi
45764
45765
45766  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
45767  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
45768    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
45769  fi
45770
45771  # TODO better (platform agnostic) test
45772  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
45773    LIBCXX="-lstdc++"
45774  fi
45775
45776
45777  # Setup Windows runtime dlls
45778  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
45779
45780
45781# Check whether --with-msvcr-dll was given.
45782if test "${with_msvcr_dll+set}" = set; then :
45783  withval=$with_msvcr_dll;
45784fi
45785
45786
45787  if test "x$with_msvcr_dll" != x; then
45788    # If given explicitely by user, do not probe. If not present, fail directly.
45789
45790  DLL_NAME="$MSVCR_NAME"
45791  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
45792  METHOD="--with-msvcr-dll"
45793  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45794    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45795$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45796
45797    # Need to check if the found msvcr is correct architecture
45798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45799$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45800    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45802      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45803      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45804      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45805        CORRECT_MSVCR_ARCH="PE32 executable"
45806      else
45807        CORRECT_MSVCR_ARCH="PE32+ executable"
45808      fi
45809    else
45810      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45811        CORRECT_MSVCR_ARCH=386
45812      else
45813        CORRECT_MSVCR_ARCH=x86-64
45814      fi
45815    fi
45816    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45817      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45818$as_echo "ok" >&6; }
45819      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45820
45821  # Only process if variable expands to non-empty
45822
45823  if test "x$MSVC_DLL" != x; then
45824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45825
45826  # Input might be given as Windows format, start by converting to
45827  # unix format.
45828  path="$MSVC_DLL"
45829  new_path=`$CYGPATH -u "$path"`
45830
45831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45834  # "foo.exe" is OK but "foo" is an error.
45835  #
45836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45837  # It is also a way to make sure we got the proper file name for the real test later on.
45838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45839  if test "x$test_shortpath" = x; then
45840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45841$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45842    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45843  fi
45844
45845  # Call helper function which possibly converts this using DOS-style short mode.
45846  # If so, the updated path is stored in $new_path.
45847
45848  input_path="$new_path"
45849  # Check if we need to convert this using DOS-style short mode. If the path
45850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45851  # take no chances and rewrite it.
45852  # Note: m4 eats our [], so we need to use [ and ] instead.
45853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45854  if test "x$has_forbidden_chars" != x; then
45855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45859      # Going to short mode and back again did indeed matter. Since short mode is
45860      # case insensitive, let's make it lowercase to improve readability.
45861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45862      # Now convert it back to Unix-style (cygpath)
45863      input_path=`$CYGPATH -u "$shortmode_path"`
45864      new_path="$input_path"
45865    fi
45866  fi
45867
45868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45869  if test "x$test_cygdrive_prefix" = x; then
45870    # As a simple fix, exclude /usr/bin since it's not a real path.
45871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45873      # a path prefixed by /cygdrive for fixpath to work.
45874      new_path="$CYGWIN_ROOT_PATH$input_path"
45875    fi
45876  fi
45877
45878
45879  if test "x$path" != "x$new_path"; then
45880    MSVC_DLL="$new_path"
45881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45882$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45883  fi
45884
45885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45886
45887  path="$MSVC_DLL"
45888  has_colon=`$ECHO $path | $GREP ^.:`
45889  new_path="$path"
45890  if test "x$has_colon" = x; then
45891    # Not in mixed or Windows style, start by that.
45892    new_path=`cmd //c echo $path`
45893  fi
45894
45895
45896  input_path="$new_path"
45897  # Check if we need to convert this using DOS-style short mode. If the path
45898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45899  # take no chances and rewrite it.
45900  # Note: m4 eats our [], so we need to use [ and ] instead.
45901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45902  if test "x$has_forbidden_chars" != x; then
45903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45905  fi
45906
45907
45908  windows_path="$new_path"
45909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45910    unix_path=`$CYGPATH -u "$windows_path"`
45911    new_path="$unix_path"
45912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45914    new_path="$unix_path"
45915  fi
45916
45917  if test "x$path" != "x$new_path"; then
45918    MSVC_DLL="$new_path"
45919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45920$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45921  fi
45922
45923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45925
45926    else
45927      # We're on a unix platform. Hooray! :)
45928      path="$MSVC_DLL"
45929      has_space=`$ECHO "$path" | $GREP " "`
45930      if test "x$has_space" != x; then
45931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45932$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45933        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45934      fi
45935
45936      # Use eval to expand a potential ~
45937      eval path="$path"
45938      if test ! -f "$path" && test ! -d "$path"; then
45939        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45940      fi
45941
45942      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45943    fi
45944  fi
45945
45946      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45947$as_echo_n "checking for $DLL_NAME... " >&6; }
45948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45949$as_echo "$MSVC_DLL" >&6; }
45950    else
45951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45952$as_echo "incorrect, ignoring" >&6; }
45953      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45954$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45955    fi
45956  fi
45957
45958    if test "x$MSVC_DLL" = x; then
45959      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
45960    fi
45961    MSVCR_DLL="$MSVC_DLL"
45962  elif test "x$DEVKIT_MSVCR_DLL" != x; then
45963
45964  DLL_NAME="$MSVCR_NAME"
45965  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
45966  METHOD="devkit"
45967  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45968    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45969$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45970
45971    # Need to check if the found msvcr is correct architecture
45972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45973$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45974    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45976      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45977      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45978      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45979        CORRECT_MSVCR_ARCH="PE32 executable"
45980      else
45981        CORRECT_MSVCR_ARCH="PE32+ executable"
45982      fi
45983    else
45984      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45985        CORRECT_MSVCR_ARCH=386
45986      else
45987        CORRECT_MSVCR_ARCH=x86-64
45988      fi
45989    fi
45990    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45992$as_echo "ok" >&6; }
45993      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45994
45995  # Only process if variable expands to non-empty
45996
45997  if test "x$MSVC_DLL" != x; then
45998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45999
46000  # Input might be given as Windows format, start by converting to
46001  # unix format.
46002  path="$MSVC_DLL"
46003  new_path=`$CYGPATH -u "$path"`
46004
46005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46008  # "foo.exe" is OK but "foo" is an error.
46009  #
46010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46011  # It is also a way to make sure we got the proper file name for the real test later on.
46012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46013  if test "x$test_shortpath" = x; then
46014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46015$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46016    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46017  fi
46018
46019  # Call helper function which possibly converts this using DOS-style short mode.
46020  # If so, the updated path is stored in $new_path.
46021
46022  input_path="$new_path"
46023  # Check if we need to convert this using DOS-style short mode. If the path
46024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46025  # take no chances and rewrite it.
46026  # Note: m4 eats our [], so we need to use [ and ] instead.
46027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46028  if test "x$has_forbidden_chars" != x; then
46029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46033      # Going to short mode and back again did indeed matter. Since short mode is
46034      # case insensitive, let's make it lowercase to improve readability.
46035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46036      # Now convert it back to Unix-style (cygpath)
46037      input_path=`$CYGPATH -u "$shortmode_path"`
46038      new_path="$input_path"
46039    fi
46040  fi
46041
46042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46043  if test "x$test_cygdrive_prefix" = x; then
46044    # As a simple fix, exclude /usr/bin since it's not a real path.
46045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46047      # a path prefixed by /cygdrive for fixpath to work.
46048      new_path="$CYGWIN_ROOT_PATH$input_path"
46049    fi
46050  fi
46051
46052
46053  if test "x$path" != "x$new_path"; then
46054    MSVC_DLL="$new_path"
46055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46056$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46057  fi
46058
46059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46060
46061  path="$MSVC_DLL"
46062  has_colon=`$ECHO $path | $GREP ^.:`
46063  new_path="$path"
46064  if test "x$has_colon" = x; then
46065    # Not in mixed or Windows style, start by that.
46066    new_path=`cmd //c echo $path`
46067  fi
46068
46069
46070  input_path="$new_path"
46071  # Check if we need to convert this using DOS-style short mode. If the path
46072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46073  # take no chances and rewrite it.
46074  # Note: m4 eats our [], so we need to use [ and ] instead.
46075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46076  if test "x$has_forbidden_chars" != x; then
46077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46079  fi
46080
46081
46082  windows_path="$new_path"
46083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46084    unix_path=`$CYGPATH -u "$windows_path"`
46085    new_path="$unix_path"
46086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46088    new_path="$unix_path"
46089  fi
46090
46091  if test "x$path" != "x$new_path"; then
46092    MSVC_DLL="$new_path"
46093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46094$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46095  fi
46096
46097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46099
46100    else
46101      # We're on a unix platform. Hooray! :)
46102      path="$MSVC_DLL"
46103      has_space=`$ECHO "$path" | $GREP " "`
46104      if test "x$has_space" != x; then
46105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46106$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46108      fi
46109
46110      # Use eval to expand a potential ~
46111      eval path="$path"
46112      if test ! -f "$path" && test ! -d "$path"; then
46113        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46114      fi
46115
46116      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46117    fi
46118  fi
46119
46120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46121$as_echo_n "checking for $DLL_NAME... " >&6; }
46122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46123$as_echo "$MSVC_DLL" >&6; }
46124    else
46125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46126$as_echo "incorrect, ignoring" >&6; }
46127      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46128$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46129    fi
46130  fi
46131
46132    if test "x$MSVC_DLL" = x; then
46133      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
46134    fi
46135    MSVCR_DLL="$MSVC_DLL"
46136  else
46137
46138  DLL_NAME="${MSVCR_NAME}"
46139  MSVC_DLL=
46140
46141  if test "x$MSVC_DLL" = x; then
46142    # Probe: Using well-known location from Visual Studio 10.0
46143    if test "x$VCINSTALLDIR" != x; then
46144      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
46145
46146  windows_path="$CYGWIN_VC_INSTALL_DIR"
46147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46148    unix_path=`$CYGPATH -u "$windows_path"`
46149    CYGWIN_VC_INSTALL_DIR="$unix_path"
46150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46152    CYGWIN_VC_INSTALL_DIR="$unix_path"
46153  fi
46154
46155      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46156        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46157      else
46158        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46159      fi
46160      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
46161
46162  DLL_NAME="$DLL_NAME"
46163  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46164  METHOD="well-known location in VCINSTALLDIR"
46165  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46166    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46167$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46168
46169    # Need to check if the found msvcr is correct architecture
46170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46171$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46172    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46174      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46175      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46176      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46177        CORRECT_MSVCR_ARCH="PE32 executable"
46178      else
46179        CORRECT_MSVCR_ARCH="PE32+ executable"
46180      fi
46181    else
46182      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46183        CORRECT_MSVCR_ARCH=386
46184      else
46185        CORRECT_MSVCR_ARCH=x86-64
46186      fi
46187    fi
46188    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46190$as_echo "ok" >&6; }
46191      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46192
46193  # Only process if variable expands to non-empty
46194
46195  if test "x$MSVC_DLL" != x; then
46196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46197
46198  # Input might be given as Windows format, start by converting to
46199  # unix format.
46200  path="$MSVC_DLL"
46201  new_path=`$CYGPATH -u "$path"`
46202
46203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46206  # "foo.exe" is OK but "foo" is an error.
46207  #
46208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46209  # It is also a way to make sure we got the proper file name for the real test later on.
46210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46211  if test "x$test_shortpath" = x; then
46212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46213$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46214    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46215  fi
46216
46217  # Call helper function which possibly converts this using DOS-style short mode.
46218  # If so, the updated path is stored in $new_path.
46219
46220  input_path="$new_path"
46221  # Check if we need to convert this using DOS-style short mode. If the path
46222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46223  # take no chances and rewrite it.
46224  # Note: m4 eats our [], so we need to use [ and ] instead.
46225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46226  if test "x$has_forbidden_chars" != x; then
46227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46231      # Going to short mode and back again did indeed matter. Since short mode is
46232      # case insensitive, let's make it lowercase to improve readability.
46233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46234      # Now convert it back to Unix-style (cygpath)
46235      input_path=`$CYGPATH -u "$shortmode_path"`
46236      new_path="$input_path"
46237    fi
46238  fi
46239
46240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46241  if test "x$test_cygdrive_prefix" = x; then
46242    # As a simple fix, exclude /usr/bin since it's not a real path.
46243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46245      # a path prefixed by /cygdrive for fixpath to work.
46246      new_path="$CYGWIN_ROOT_PATH$input_path"
46247    fi
46248  fi
46249
46250
46251  if test "x$path" != "x$new_path"; then
46252    MSVC_DLL="$new_path"
46253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46254$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46255  fi
46256
46257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46258
46259  path="$MSVC_DLL"
46260  has_colon=`$ECHO $path | $GREP ^.:`
46261  new_path="$path"
46262  if test "x$has_colon" = x; then
46263    # Not in mixed or Windows style, start by that.
46264    new_path=`cmd //c echo $path`
46265  fi
46266
46267
46268  input_path="$new_path"
46269  # Check if we need to convert this using DOS-style short mode. If the path
46270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46271  # take no chances and rewrite it.
46272  # Note: m4 eats our [], so we need to use [ and ] instead.
46273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46274  if test "x$has_forbidden_chars" != x; then
46275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46277  fi
46278
46279
46280  windows_path="$new_path"
46281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46282    unix_path=`$CYGPATH -u "$windows_path"`
46283    new_path="$unix_path"
46284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46286    new_path="$unix_path"
46287  fi
46288
46289  if test "x$path" != "x$new_path"; then
46290    MSVC_DLL="$new_path"
46291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46292$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46293  fi
46294
46295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46297
46298    else
46299      # We're on a unix platform. Hooray! :)
46300      path="$MSVC_DLL"
46301      has_space=`$ECHO "$path" | $GREP " "`
46302      if test "x$has_space" != x; then
46303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46304$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46306      fi
46307
46308      # Use eval to expand a potential ~
46309      eval path="$path"
46310      if test ! -f "$path" && test ! -d "$path"; then
46311        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46312      fi
46313
46314      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46315    fi
46316  fi
46317
46318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46319$as_echo_n "checking for $DLL_NAME... " >&6; }
46320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46321$as_echo "$MSVC_DLL" >&6; }
46322    else
46323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46324$as_echo "incorrect, ignoring" >&6; }
46325      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46326$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46327    fi
46328  fi
46329
46330    fi
46331  fi
46332
46333  if test "x$MSVC_DLL" = x; then
46334    # Probe: Check in the Boot JDK directory.
46335    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46336
46337  DLL_NAME="$DLL_NAME"
46338  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46339  METHOD="well-known location in Boot JDK"
46340  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46341    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46342$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46343
46344    # Need to check if the found msvcr is correct architecture
46345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46346$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46347    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46349      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46350      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46351      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46352        CORRECT_MSVCR_ARCH="PE32 executable"
46353      else
46354        CORRECT_MSVCR_ARCH="PE32+ executable"
46355      fi
46356    else
46357      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46358        CORRECT_MSVCR_ARCH=386
46359      else
46360        CORRECT_MSVCR_ARCH=x86-64
46361      fi
46362    fi
46363    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46365$as_echo "ok" >&6; }
46366      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46367
46368  # Only process if variable expands to non-empty
46369
46370  if test "x$MSVC_DLL" != x; then
46371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46372
46373  # Input might be given as Windows format, start by converting to
46374  # unix format.
46375  path="$MSVC_DLL"
46376  new_path=`$CYGPATH -u "$path"`
46377
46378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46381  # "foo.exe" is OK but "foo" is an error.
46382  #
46383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46384  # It is also a way to make sure we got the proper file name for the real test later on.
46385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46386  if test "x$test_shortpath" = x; then
46387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46388$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46389    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46390  fi
46391
46392  # Call helper function which possibly converts this using DOS-style short mode.
46393  # If so, the updated path is stored in $new_path.
46394
46395  input_path="$new_path"
46396  # Check if we need to convert this using DOS-style short mode. If the path
46397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46398  # take no chances and rewrite it.
46399  # Note: m4 eats our [], so we need to use [ and ] instead.
46400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46401  if test "x$has_forbidden_chars" != x; then
46402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46406      # Going to short mode and back again did indeed matter. Since short mode is
46407      # case insensitive, let's make it lowercase to improve readability.
46408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46409      # Now convert it back to Unix-style (cygpath)
46410      input_path=`$CYGPATH -u "$shortmode_path"`
46411      new_path="$input_path"
46412    fi
46413  fi
46414
46415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46416  if test "x$test_cygdrive_prefix" = x; then
46417    # As a simple fix, exclude /usr/bin since it's not a real path.
46418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46420      # a path prefixed by /cygdrive for fixpath to work.
46421      new_path="$CYGWIN_ROOT_PATH$input_path"
46422    fi
46423  fi
46424
46425
46426  if test "x$path" != "x$new_path"; then
46427    MSVC_DLL="$new_path"
46428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46429$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46430  fi
46431
46432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46433
46434  path="$MSVC_DLL"
46435  has_colon=`$ECHO $path | $GREP ^.:`
46436  new_path="$path"
46437  if test "x$has_colon" = x; then
46438    # Not in mixed or Windows style, start by that.
46439    new_path=`cmd //c echo $path`
46440  fi
46441
46442
46443  input_path="$new_path"
46444  # Check if we need to convert this using DOS-style short mode. If the path
46445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46446  # take no chances and rewrite it.
46447  # Note: m4 eats our [], so we need to use [ and ] instead.
46448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46449  if test "x$has_forbidden_chars" != x; then
46450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46452  fi
46453
46454
46455  windows_path="$new_path"
46456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46457    unix_path=`$CYGPATH -u "$windows_path"`
46458    new_path="$unix_path"
46459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46461    new_path="$unix_path"
46462  fi
46463
46464  if test "x$path" != "x$new_path"; then
46465    MSVC_DLL="$new_path"
46466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46467$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46468  fi
46469
46470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46472
46473    else
46474      # We're on a unix platform. Hooray! :)
46475      path="$MSVC_DLL"
46476      has_space=`$ECHO "$path" | $GREP " "`
46477      if test "x$has_space" != x; then
46478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46479$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46480        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46481      fi
46482
46483      # Use eval to expand a potential ~
46484      eval path="$path"
46485      if test ! -f "$path" && test ! -d "$path"; then
46486        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46487      fi
46488
46489      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46490    fi
46491  fi
46492
46493      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46494$as_echo_n "checking for $DLL_NAME... " >&6; }
46495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46496$as_echo "$MSVC_DLL" >&6; }
46497    else
46498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46499$as_echo "incorrect, ignoring" >&6; }
46500      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46501$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46502    fi
46503  fi
46504
46505  fi
46506
46507  if test "x$MSVC_DLL" = x; then
46508    # Probe: Look in the Windows system32 directory
46509    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46510
46511  windows_path="$CYGWIN_SYSTEMROOT"
46512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46513    unix_path=`$CYGPATH -u "$windows_path"`
46514    CYGWIN_SYSTEMROOT="$unix_path"
46515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46517    CYGWIN_SYSTEMROOT="$unix_path"
46518  fi
46519
46520    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46521
46522  DLL_NAME="$DLL_NAME"
46523  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46524  METHOD="well-known location in SYSTEMROOT"
46525  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46526    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46527$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46528
46529    # Need to check if the found msvcr is correct architecture
46530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46531$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46532    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46534      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46535      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46536      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46537        CORRECT_MSVCR_ARCH="PE32 executable"
46538      else
46539        CORRECT_MSVCR_ARCH="PE32+ executable"
46540      fi
46541    else
46542      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46543        CORRECT_MSVCR_ARCH=386
46544      else
46545        CORRECT_MSVCR_ARCH=x86-64
46546      fi
46547    fi
46548    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46550$as_echo "ok" >&6; }
46551      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46552
46553  # Only process if variable expands to non-empty
46554
46555  if test "x$MSVC_DLL" != x; then
46556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46557
46558  # Input might be given as Windows format, start by converting to
46559  # unix format.
46560  path="$MSVC_DLL"
46561  new_path=`$CYGPATH -u "$path"`
46562
46563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46566  # "foo.exe" is OK but "foo" is an error.
46567  #
46568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46569  # It is also a way to make sure we got the proper file name for the real test later on.
46570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46571  if test "x$test_shortpath" = x; then
46572    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46573$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46574    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46575  fi
46576
46577  # Call helper function which possibly converts this using DOS-style short mode.
46578  # If so, the updated path is stored in $new_path.
46579
46580  input_path="$new_path"
46581  # Check if we need to convert this using DOS-style short mode. If the path
46582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46583  # take no chances and rewrite it.
46584  # Note: m4 eats our [], so we need to use [ and ] instead.
46585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46586  if test "x$has_forbidden_chars" != x; then
46587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46591      # Going to short mode and back again did indeed matter. Since short mode is
46592      # case insensitive, let's make it lowercase to improve readability.
46593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46594      # Now convert it back to Unix-style (cygpath)
46595      input_path=`$CYGPATH -u "$shortmode_path"`
46596      new_path="$input_path"
46597    fi
46598  fi
46599
46600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46601  if test "x$test_cygdrive_prefix" = x; then
46602    # As a simple fix, exclude /usr/bin since it's not a real path.
46603    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46605      # a path prefixed by /cygdrive for fixpath to work.
46606      new_path="$CYGWIN_ROOT_PATH$input_path"
46607    fi
46608  fi
46609
46610
46611  if test "x$path" != "x$new_path"; then
46612    MSVC_DLL="$new_path"
46613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46614$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46615  fi
46616
46617    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46618
46619  path="$MSVC_DLL"
46620  has_colon=`$ECHO $path | $GREP ^.:`
46621  new_path="$path"
46622  if test "x$has_colon" = x; then
46623    # Not in mixed or Windows style, start by that.
46624    new_path=`cmd //c echo $path`
46625  fi
46626
46627
46628  input_path="$new_path"
46629  # Check if we need to convert this using DOS-style short mode. If the path
46630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46631  # take no chances and rewrite it.
46632  # Note: m4 eats our [], so we need to use [ and ] instead.
46633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46634  if test "x$has_forbidden_chars" != x; then
46635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46637  fi
46638
46639
46640  windows_path="$new_path"
46641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46642    unix_path=`$CYGPATH -u "$windows_path"`
46643    new_path="$unix_path"
46644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46646    new_path="$unix_path"
46647  fi
46648
46649  if test "x$path" != "x$new_path"; then
46650    MSVC_DLL="$new_path"
46651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46652$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46653  fi
46654
46655  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46656  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46657
46658    else
46659      # We're on a unix platform. Hooray! :)
46660      path="$MSVC_DLL"
46661      has_space=`$ECHO "$path" | $GREP " "`
46662      if test "x$has_space" != x; then
46663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46664$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46665        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46666      fi
46667
46668      # Use eval to expand a potential ~
46669      eval path="$path"
46670      if test ! -f "$path" && test ! -d "$path"; then
46671        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46672      fi
46673
46674      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46675    fi
46676  fi
46677
46678      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46679$as_echo_n "checking for $DLL_NAME... " >&6; }
46680      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46681$as_echo "$MSVC_DLL" >&6; }
46682    else
46683      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46684$as_echo "incorrect, ignoring" >&6; }
46685      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46686$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46687    fi
46688  fi
46689
46690  fi
46691
46692  if test "x$MSVC_DLL" = x; then
46693    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46694    if test "x$VS100COMNTOOLS" != x; then
46695      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46696
46697  windows_path="$CYGWIN_VS_TOOLS_DIR"
46698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46699    unix_path=`$CYGPATH -u "$windows_path"`
46700    CYGWIN_VS_TOOLS_DIR="$unix_path"
46701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46703    CYGWIN_VS_TOOLS_DIR="$unix_path"
46704  fi
46705
46706      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46707        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46708	    | $GREP -i /x64/ | $HEAD --lines 1`
46709      else
46710        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46711	    | $GREP -i /x86/ | $HEAD --lines 1`
46712      fi
46713
46714  DLL_NAME="$DLL_NAME"
46715  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46716  METHOD="search of VS100COMNTOOLS"
46717  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46718    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46719$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46720
46721    # Need to check if the found msvcr is correct architecture
46722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46723$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46724    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46726      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46727      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46728      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46729        CORRECT_MSVCR_ARCH="PE32 executable"
46730      else
46731        CORRECT_MSVCR_ARCH="PE32+ executable"
46732      fi
46733    else
46734      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46735        CORRECT_MSVCR_ARCH=386
46736      else
46737        CORRECT_MSVCR_ARCH=x86-64
46738      fi
46739    fi
46740    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46742$as_echo "ok" >&6; }
46743      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46744
46745  # Only process if variable expands to non-empty
46746
46747  if test "x$MSVC_DLL" != x; then
46748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46749
46750  # Input might be given as Windows format, start by converting to
46751  # unix format.
46752  path="$MSVC_DLL"
46753  new_path=`$CYGPATH -u "$path"`
46754
46755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46758  # "foo.exe" is OK but "foo" is an error.
46759  #
46760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46761  # It is also a way to make sure we got the proper file name for the real test later on.
46762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46763  if test "x$test_shortpath" = x; then
46764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46765$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46766    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46767  fi
46768
46769  # Call helper function which possibly converts this using DOS-style short mode.
46770  # If so, the updated path is stored in $new_path.
46771
46772  input_path="$new_path"
46773  # Check if we need to convert this using DOS-style short mode. If the path
46774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46775  # take no chances and rewrite it.
46776  # Note: m4 eats our [], so we need to use [ and ] instead.
46777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46778  if test "x$has_forbidden_chars" != x; then
46779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46783      # Going to short mode and back again did indeed matter. Since short mode is
46784      # case insensitive, let's make it lowercase to improve readability.
46785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46786      # Now convert it back to Unix-style (cygpath)
46787      input_path=`$CYGPATH -u "$shortmode_path"`
46788      new_path="$input_path"
46789    fi
46790  fi
46791
46792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46793  if test "x$test_cygdrive_prefix" = x; then
46794    # As a simple fix, exclude /usr/bin since it's not a real path.
46795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46797      # a path prefixed by /cygdrive for fixpath to work.
46798      new_path="$CYGWIN_ROOT_PATH$input_path"
46799    fi
46800  fi
46801
46802
46803  if test "x$path" != "x$new_path"; then
46804    MSVC_DLL="$new_path"
46805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46806$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46807  fi
46808
46809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46810
46811  path="$MSVC_DLL"
46812  has_colon=`$ECHO $path | $GREP ^.:`
46813  new_path="$path"
46814  if test "x$has_colon" = x; then
46815    # Not in mixed or Windows style, start by that.
46816    new_path=`cmd //c echo $path`
46817  fi
46818
46819
46820  input_path="$new_path"
46821  # Check if we need to convert this using DOS-style short mode. If the path
46822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46823  # take no chances and rewrite it.
46824  # Note: m4 eats our [], so we need to use [ and ] instead.
46825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46826  if test "x$has_forbidden_chars" != x; then
46827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46829  fi
46830
46831
46832  windows_path="$new_path"
46833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46834    unix_path=`$CYGPATH -u "$windows_path"`
46835    new_path="$unix_path"
46836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46838    new_path="$unix_path"
46839  fi
46840
46841  if test "x$path" != "x$new_path"; then
46842    MSVC_DLL="$new_path"
46843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46844$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46845  fi
46846
46847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46849
46850    else
46851      # We're on a unix platform. Hooray! :)
46852      path="$MSVC_DLL"
46853      has_space=`$ECHO "$path" | $GREP " "`
46854      if test "x$has_space" != x; then
46855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46856$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46857        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46858      fi
46859
46860      # Use eval to expand a potential ~
46861      eval path="$path"
46862      if test ! -f "$path" && test ! -d "$path"; then
46863        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46864      fi
46865
46866      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46867    fi
46868  fi
46869
46870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46871$as_echo_n "checking for $DLL_NAME... " >&6; }
46872      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46873$as_echo "$MSVC_DLL" >&6; }
46874    else
46875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46876$as_echo "incorrect, ignoring" >&6; }
46877      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46878$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46879    fi
46880  fi
46881
46882    fi
46883  fi
46884
46885  if test "x$MSVC_DLL" = x; then
46886    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46887    # (This was the original behaviour; kept since it might turn something up)
46888    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46889      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46890        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46891	    | $GREP x64 | $HEAD --lines 1`
46892      else
46893        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46894	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46895        if test "x$POSSIBLE_MSVC_DLL" = x; then
46896          # We're grasping at straws now...
46897          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46898	      | $HEAD --lines 1`
46899        fi
46900      fi
46901
46902
46903  DLL_NAME="$DLL_NAME"
46904  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46905  METHOD="search of VCINSTALLDIR"
46906  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46907    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46908$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46909
46910    # Need to check if the found msvcr is correct architecture
46911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46912$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46913    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46915      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46916      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46917      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46918        CORRECT_MSVCR_ARCH="PE32 executable"
46919      else
46920        CORRECT_MSVCR_ARCH="PE32+ executable"
46921      fi
46922    else
46923      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46924        CORRECT_MSVCR_ARCH=386
46925      else
46926        CORRECT_MSVCR_ARCH=x86-64
46927      fi
46928    fi
46929    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46931$as_echo "ok" >&6; }
46932      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46933
46934  # Only process if variable expands to non-empty
46935
46936  if test "x$MSVC_DLL" != x; then
46937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46938
46939  # Input might be given as Windows format, start by converting to
46940  # unix format.
46941  path="$MSVC_DLL"
46942  new_path=`$CYGPATH -u "$path"`
46943
46944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46947  # "foo.exe" is OK but "foo" is an error.
46948  #
46949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46950  # It is also a way to make sure we got the proper file name for the real test later on.
46951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46952  if test "x$test_shortpath" = x; then
46953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46954$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46955    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46956  fi
46957
46958  # Call helper function which possibly converts this using DOS-style short mode.
46959  # If so, the updated path is stored in $new_path.
46960
46961  input_path="$new_path"
46962  # Check if we need to convert this using DOS-style short mode. If the path
46963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46964  # take no chances and rewrite it.
46965  # Note: m4 eats our [], so we need to use [ and ] instead.
46966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46967  if test "x$has_forbidden_chars" != x; then
46968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46972      # Going to short mode and back again did indeed matter. Since short mode is
46973      # case insensitive, let's make it lowercase to improve readability.
46974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46975      # Now convert it back to Unix-style (cygpath)
46976      input_path=`$CYGPATH -u "$shortmode_path"`
46977      new_path="$input_path"
46978    fi
46979  fi
46980
46981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46982  if test "x$test_cygdrive_prefix" = x; then
46983    # As a simple fix, exclude /usr/bin since it's not a real path.
46984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46986      # a path prefixed by /cygdrive for fixpath to work.
46987      new_path="$CYGWIN_ROOT_PATH$input_path"
46988    fi
46989  fi
46990
46991
46992  if test "x$path" != "x$new_path"; then
46993    MSVC_DLL="$new_path"
46994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46995$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46996  fi
46997
46998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46999
47000  path="$MSVC_DLL"
47001  has_colon=`$ECHO $path | $GREP ^.:`
47002  new_path="$path"
47003  if test "x$has_colon" = x; then
47004    # Not in mixed or Windows style, start by that.
47005    new_path=`cmd //c echo $path`
47006  fi
47007
47008
47009  input_path="$new_path"
47010  # Check if we need to convert this using DOS-style short mode. If the path
47011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47012  # take no chances and rewrite it.
47013  # Note: m4 eats our [], so we need to use [ and ] instead.
47014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47015  if test "x$has_forbidden_chars" != x; then
47016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47018  fi
47019
47020
47021  windows_path="$new_path"
47022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47023    unix_path=`$CYGPATH -u "$windows_path"`
47024    new_path="$unix_path"
47025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47027    new_path="$unix_path"
47028  fi
47029
47030  if test "x$path" != "x$new_path"; then
47031    MSVC_DLL="$new_path"
47032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47033$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47034  fi
47035
47036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47038
47039    else
47040      # We're on a unix platform. Hooray! :)
47041      path="$MSVC_DLL"
47042      has_space=`$ECHO "$path" | $GREP " "`
47043      if test "x$has_space" != x; then
47044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47045$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47047      fi
47048
47049      # Use eval to expand a potential ~
47050      eval path="$path"
47051      if test ! -f "$path" && test ! -d "$path"; then
47052        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47053      fi
47054
47055      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47056    fi
47057  fi
47058
47059      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47060$as_echo_n "checking for $DLL_NAME... " >&6; }
47061      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47062$as_echo "$MSVC_DLL" >&6; }
47063    else
47064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47065$as_echo "incorrect, ignoring" >&6; }
47066      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47067$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47068    fi
47069  fi
47070
47071    fi
47072  fi
47073
47074  if test "x$MSVC_DLL" = x; then
47075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47076$as_echo_n "checking for $DLL_NAME... " >&6; }
47077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47078$as_echo "no" >&6; }
47079    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
47080  fi
47081
47082    MSVCR_DLL="$MSVC_DLL"
47083  fi
47084
47085
47086
47087# Check whether --with-msvcp-dll was given.
47088if test "${with_msvcp_dll+set}" = set; then :
47089  withval=$with_msvcp_dll;
47090fi
47091
47092
47093  if test "x$MSVCP_NAME" != "x"; then
47094    if test "x$with_msvcp_dll" != x; then
47095      # If given explicitely by user, do not probe. If not present, fail directly.
47096
47097  DLL_NAME="$MSVCP_NAME"
47098  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
47099  METHOD="--with-msvcp-dll"
47100  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47102$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47103
47104    # Need to check if the found msvcr is correct architecture
47105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47106$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47107    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47109      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47110      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47111      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47112        CORRECT_MSVCR_ARCH="PE32 executable"
47113      else
47114        CORRECT_MSVCR_ARCH="PE32+ executable"
47115      fi
47116    else
47117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47118        CORRECT_MSVCR_ARCH=386
47119      else
47120        CORRECT_MSVCR_ARCH=x86-64
47121      fi
47122    fi
47123    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47125$as_echo "ok" >&6; }
47126      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47127
47128  # Only process if variable expands to non-empty
47129
47130  if test "x$MSVC_DLL" != x; then
47131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47132
47133  # Input might be given as Windows format, start by converting to
47134  # unix format.
47135  path="$MSVC_DLL"
47136  new_path=`$CYGPATH -u "$path"`
47137
47138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47141  # "foo.exe" is OK but "foo" is an error.
47142  #
47143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47144  # It is also a way to make sure we got the proper file name for the real test later on.
47145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47146  if test "x$test_shortpath" = x; then
47147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47148$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47149    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47150  fi
47151
47152  # Call helper function which possibly converts this using DOS-style short mode.
47153  # If so, the updated path is stored in $new_path.
47154
47155  input_path="$new_path"
47156  # Check if we need to convert this using DOS-style short mode. If the path
47157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47158  # take no chances and rewrite it.
47159  # Note: m4 eats our [], so we need to use [ and ] instead.
47160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47161  if test "x$has_forbidden_chars" != x; then
47162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47166      # Going to short mode and back again did indeed matter. Since short mode is
47167      # case insensitive, let's make it lowercase to improve readability.
47168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47169      # Now convert it back to Unix-style (cygpath)
47170      input_path=`$CYGPATH -u "$shortmode_path"`
47171      new_path="$input_path"
47172    fi
47173  fi
47174
47175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47176  if test "x$test_cygdrive_prefix" = x; then
47177    # As a simple fix, exclude /usr/bin since it's not a real path.
47178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47180      # a path prefixed by /cygdrive for fixpath to work.
47181      new_path="$CYGWIN_ROOT_PATH$input_path"
47182    fi
47183  fi
47184
47185
47186  if test "x$path" != "x$new_path"; then
47187    MSVC_DLL="$new_path"
47188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47189$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47190  fi
47191
47192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47193
47194  path="$MSVC_DLL"
47195  has_colon=`$ECHO $path | $GREP ^.:`
47196  new_path="$path"
47197  if test "x$has_colon" = x; then
47198    # Not in mixed or Windows style, start by that.
47199    new_path=`cmd //c echo $path`
47200  fi
47201
47202
47203  input_path="$new_path"
47204  # Check if we need to convert this using DOS-style short mode. If the path
47205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47206  # take no chances and rewrite it.
47207  # Note: m4 eats our [], so we need to use [ and ] instead.
47208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47209  if test "x$has_forbidden_chars" != x; then
47210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47212  fi
47213
47214
47215  windows_path="$new_path"
47216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47217    unix_path=`$CYGPATH -u "$windows_path"`
47218    new_path="$unix_path"
47219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47221    new_path="$unix_path"
47222  fi
47223
47224  if test "x$path" != "x$new_path"; then
47225    MSVC_DLL="$new_path"
47226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47227$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47228  fi
47229
47230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47232
47233    else
47234      # We're on a unix platform. Hooray! :)
47235      path="$MSVC_DLL"
47236      has_space=`$ECHO "$path" | $GREP " "`
47237      if test "x$has_space" != x; then
47238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47239$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47241      fi
47242
47243      # Use eval to expand a potential ~
47244      eval path="$path"
47245      if test ! -f "$path" && test ! -d "$path"; then
47246        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47247      fi
47248
47249      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47250    fi
47251  fi
47252
47253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47254$as_echo_n "checking for $DLL_NAME... " >&6; }
47255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47256$as_echo "$MSVC_DLL" >&6; }
47257    else
47258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47259$as_echo "incorrect, ignoring" >&6; }
47260      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47261$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47262    fi
47263  fi
47264
47265      if test "x$MSVC_DLL" = x; then
47266        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
47267      fi
47268      MSVCP_DLL="$MSVC_DLL"
47269    elif test "x$DEVKIT_MSVCP_DLL" != x; then
47270
47271  DLL_NAME="$MSVCP_NAME"
47272  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
47273  METHOD="devkit"
47274  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47275    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47276$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47277
47278    # Need to check if the found msvcr is correct architecture
47279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47280$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47281    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47283      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47284      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47285      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47286        CORRECT_MSVCR_ARCH="PE32 executable"
47287      else
47288        CORRECT_MSVCR_ARCH="PE32+ executable"
47289      fi
47290    else
47291      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47292        CORRECT_MSVCR_ARCH=386
47293      else
47294        CORRECT_MSVCR_ARCH=x86-64
47295      fi
47296    fi
47297    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47299$as_echo "ok" >&6; }
47300      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47301
47302  # Only process if variable expands to non-empty
47303
47304  if test "x$MSVC_DLL" != x; then
47305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47306
47307  # Input might be given as Windows format, start by converting to
47308  # unix format.
47309  path="$MSVC_DLL"
47310  new_path=`$CYGPATH -u "$path"`
47311
47312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47315  # "foo.exe" is OK but "foo" is an error.
47316  #
47317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47318  # It is also a way to make sure we got the proper file name for the real test later on.
47319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47320  if test "x$test_shortpath" = x; then
47321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47322$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47323    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47324  fi
47325
47326  # Call helper function which possibly converts this using DOS-style short mode.
47327  # If so, the updated path is stored in $new_path.
47328
47329  input_path="$new_path"
47330  # Check if we need to convert this using DOS-style short mode. If the path
47331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47332  # take no chances and rewrite it.
47333  # Note: m4 eats our [], so we need to use [ and ] instead.
47334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47335  if test "x$has_forbidden_chars" != x; then
47336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47340      # Going to short mode and back again did indeed matter. Since short mode is
47341      # case insensitive, let's make it lowercase to improve readability.
47342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47343      # Now convert it back to Unix-style (cygpath)
47344      input_path=`$CYGPATH -u "$shortmode_path"`
47345      new_path="$input_path"
47346    fi
47347  fi
47348
47349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47350  if test "x$test_cygdrive_prefix" = x; then
47351    # As a simple fix, exclude /usr/bin since it's not a real path.
47352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47354      # a path prefixed by /cygdrive for fixpath to work.
47355      new_path="$CYGWIN_ROOT_PATH$input_path"
47356    fi
47357  fi
47358
47359
47360  if test "x$path" != "x$new_path"; then
47361    MSVC_DLL="$new_path"
47362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47363$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47364  fi
47365
47366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47367
47368  path="$MSVC_DLL"
47369  has_colon=`$ECHO $path | $GREP ^.:`
47370  new_path="$path"
47371  if test "x$has_colon" = x; then
47372    # Not in mixed or Windows style, start by that.
47373    new_path=`cmd //c echo $path`
47374  fi
47375
47376
47377  input_path="$new_path"
47378  # Check if we need to convert this using DOS-style short mode. If the path
47379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47380  # take no chances and rewrite it.
47381  # Note: m4 eats our [], so we need to use [ and ] instead.
47382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47383  if test "x$has_forbidden_chars" != x; then
47384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47386  fi
47387
47388
47389  windows_path="$new_path"
47390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47391    unix_path=`$CYGPATH -u "$windows_path"`
47392    new_path="$unix_path"
47393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47395    new_path="$unix_path"
47396  fi
47397
47398  if test "x$path" != "x$new_path"; then
47399    MSVC_DLL="$new_path"
47400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47401$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47402  fi
47403
47404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47406
47407    else
47408      # We're on a unix platform. Hooray! :)
47409      path="$MSVC_DLL"
47410      has_space=`$ECHO "$path" | $GREP " "`
47411      if test "x$has_space" != x; then
47412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47413$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47414        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47415      fi
47416
47417      # Use eval to expand a potential ~
47418      eval path="$path"
47419      if test ! -f "$path" && test ! -d "$path"; then
47420        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47421      fi
47422
47423      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47424    fi
47425  fi
47426
47427      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47428$as_echo_n "checking for $DLL_NAME... " >&6; }
47429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47430$as_echo "$MSVC_DLL" >&6; }
47431    else
47432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47433$as_echo "incorrect, ignoring" >&6; }
47434      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47435$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47436    fi
47437  fi
47438
47439      if test "x$MSVC_DLL" = x; then
47440        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
47441      fi
47442      MSVCP_DLL="$MSVC_DLL"
47443    else
47444
47445  DLL_NAME="${MSVCP_NAME}"
47446  MSVC_DLL=
47447
47448  if test "x$MSVC_DLL" = x; then
47449    # Probe: Using well-known location from Visual Studio 10.0
47450    if test "x$VCINSTALLDIR" != x; then
47451      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47452
47453  windows_path="$CYGWIN_VC_INSTALL_DIR"
47454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47455    unix_path=`$CYGPATH -u "$windows_path"`
47456    CYGWIN_VC_INSTALL_DIR="$unix_path"
47457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47459    CYGWIN_VC_INSTALL_DIR="$unix_path"
47460  fi
47461
47462      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47463        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47464      else
47465        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47466      fi
47467      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47468
47469  DLL_NAME="$DLL_NAME"
47470  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47471  METHOD="well-known location in VCINSTALLDIR"
47472  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47473    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47474$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47475
47476    # Need to check if the found msvcr is correct architecture
47477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47478$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47479    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47481      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47482      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47483      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47484        CORRECT_MSVCR_ARCH="PE32 executable"
47485      else
47486        CORRECT_MSVCR_ARCH="PE32+ executable"
47487      fi
47488    else
47489      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47490        CORRECT_MSVCR_ARCH=386
47491      else
47492        CORRECT_MSVCR_ARCH=x86-64
47493      fi
47494    fi
47495    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47497$as_echo "ok" >&6; }
47498      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47499
47500  # Only process if variable expands to non-empty
47501
47502  if test "x$MSVC_DLL" != x; then
47503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47504
47505  # Input might be given as Windows format, start by converting to
47506  # unix format.
47507  path="$MSVC_DLL"
47508  new_path=`$CYGPATH -u "$path"`
47509
47510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47513  # "foo.exe" is OK but "foo" is an error.
47514  #
47515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47516  # It is also a way to make sure we got the proper file name for the real test later on.
47517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47518  if test "x$test_shortpath" = x; then
47519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47520$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47521    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47522  fi
47523
47524  # Call helper function which possibly converts this using DOS-style short mode.
47525  # If so, the updated path is stored in $new_path.
47526
47527  input_path="$new_path"
47528  # Check if we need to convert this using DOS-style short mode. If the path
47529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47530  # take no chances and rewrite it.
47531  # Note: m4 eats our [], so we need to use [ and ] instead.
47532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47533  if test "x$has_forbidden_chars" != x; then
47534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47538      # Going to short mode and back again did indeed matter. Since short mode is
47539      # case insensitive, let's make it lowercase to improve readability.
47540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47541      # Now convert it back to Unix-style (cygpath)
47542      input_path=`$CYGPATH -u "$shortmode_path"`
47543      new_path="$input_path"
47544    fi
47545  fi
47546
47547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47548  if test "x$test_cygdrive_prefix" = x; then
47549    # As a simple fix, exclude /usr/bin since it's not a real path.
47550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47552      # a path prefixed by /cygdrive for fixpath to work.
47553      new_path="$CYGWIN_ROOT_PATH$input_path"
47554    fi
47555  fi
47556
47557
47558  if test "x$path" != "x$new_path"; then
47559    MSVC_DLL="$new_path"
47560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47561$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47562  fi
47563
47564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47565
47566  path="$MSVC_DLL"
47567  has_colon=`$ECHO $path | $GREP ^.:`
47568  new_path="$path"
47569  if test "x$has_colon" = x; then
47570    # Not in mixed or Windows style, start by that.
47571    new_path=`cmd //c echo $path`
47572  fi
47573
47574
47575  input_path="$new_path"
47576  # Check if we need to convert this using DOS-style short mode. If the path
47577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47578  # take no chances and rewrite it.
47579  # Note: m4 eats our [], so we need to use [ and ] instead.
47580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47581  if test "x$has_forbidden_chars" != x; then
47582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47584  fi
47585
47586
47587  windows_path="$new_path"
47588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47589    unix_path=`$CYGPATH -u "$windows_path"`
47590    new_path="$unix_path"
47591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47593    new_path="$unix_path"
47594  fi
47595
47596  if test "x$path" != "x$new_path"; then
47597    MSVC_DLL="$new_path"
47598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47599$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47600  fi
47601
47602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47604
47605    else
47606      # We're on a unix platform. Hooray! :)
47607      path="$MSVC_DLL"
47608      has_space=`$ECHO "$path" | $GREP " "`
47609      if test "x$has_space" != x; then
47610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47611$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47613      fi
47614
47615      # Use eval to expand a potential ~
47616      eval path="$path"
47617      if test ! -f "$path" && test ! -d "$path"; then
47618        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47619      fi
47620
47621      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47622    fi
47623  fi
47624
47625      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47626$as_echo_n "checking for $DLL_NAME... " >&6; }
47627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47628$as_echo "$MSVC_DLL" >&6; }
47629    else
47630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47631$as_echo "incorrect, ignoring" >&6; }
47632      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47633$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47634    fi
47635  fi
47636
47637    fi
47638  fi
47639
47640  if test "x$MSVC_DLL" = x; then
47641    # Probe: Check in the Boot JDK directory.
47642    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47643
47644  DLL_NAME="$DLL_NAME"
47645  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47646  METHOD="well-known location in Boot JDK"
47647  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47648    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47649$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47650
47651    # Need to check if the found msvcr is correct architecture
47652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47653$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47654    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47656      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47657      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47658      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47659        CORRECT_MSVCR_ARCH="PE32 executable"
47660      else
47661        CORRECT_MSVCR_ARCH="PE32+ executable"
47662      fi
47663    else
47664      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47665        CORRECT_MSVCR_ARCH=386
47666      else
47667        CORRECT_MSVCR_ARCH=x86-64
47668      fi
47669    fi
47670    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47672$as_echo "ok" >&6; }
47673      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47674
47675  # Only process if variable expands to non-empty
47676
47677  if test "x$MSVC_DLL" != x; then
47678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47679
47680  # Input might be given as Windows format, start by converting to
47681  # unix format.
47682  path="$MSVC_DLL"
47683  new_path=`$CYGPATH -u "$path"`
47684
47685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47688  # "foo.exe" is OK but "foo" is an error.
47689  #
47690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47691  # It is also a way to make sure we got the proper file name for the real test later on.
47692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47693  if test "x$test_shortpath" = x; then
47694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47695$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47696    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47697  fi
47698
47699  # Call helper function which possibly converts this using DOS-style short mode.
47700  # If so, the updated path is stored in $new_path.
47701
47702  input_path="$new_path"
47703  # Check if we need to convert this using DOS-style short mode. If the path
47704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47705  # take no chances and rewrite it.
47706  # Note: m4 eats our [], so we need to use [ and ] instead.
47707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47708  if test "x$has_forbidden_chars" != x; then
47709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47713      # Going to short mode and back again did indeed matter. Since short mode is
47714      # case insensitive, let's make it lowercase to improve readability.
47715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47716      # Now convert it back to Unix-style (cygpath)
47717      input_path=`$CYGPATH -u "$shortmode_path"`
47718      new_path="$input_path"
47719    fi
47720  fi
47721
47722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47723  if test "x$test_cygdrive_prefix" = x; then
47724    # As a simple fix, exclude /usr/bin since it's not a real path.
47725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47727      # a path prefixed by /cygdrive for fixpath to work.
47728      new_path="$CYGWIN_ROOT_PATH$input_path"
47729    fi
47730  fi
47731
47732
47733  if test "x$path" != "x$new_path"; then
47734    MSVC_DLL="$new_path"
47735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47736$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47737  fi
47738
47739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47740
47741  path="$MSVC_DLL"
47742  has_colon=`$ECHO $path | $GREP ^.:`
47743  new_path="$path"
47744  if test "x$has_colon" = x; then
47745    # Not in mixed or Windows style, start by that.
47746    new_path=`cmd //c echo $path`
47747  fi
47748
47749
47750  input_path="$new_path"
47751  # Check if we need to convert this using DOS-style short mode. If the path
47752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47753  # take no chances and rewrite it.
47754  # Note: m4 eats our [], so we need to use [ and ] instead.
47755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47756  if test "x$has_forbidden_chars" != x; then
47757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47759  fi
47760
47761
47762  windows_path="$new_path"
47763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47764    unix_path=`$CYGPATH -u "$windows_path"`
47765    new_path="$unix_path"
47766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47768    new_path="$unix_path"
47769  fi
47770
47771  if test "x$path" != "x$new_path"; then
47772    MSVC_DLL="$new_path"
47773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47774$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47775  fi
47776
47777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47779
47780    else
47781      # We're on a unix platform. Hooray! :)
47782      path="$MSVC_DLL"
47783      has_space=`$ECHO "$path" | $GREP " "`
47784      if test "x$has_space" != x; then
47785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47786$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47787        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47788      fi
47789
47790      # Use eval to expand a potential ~
47791      eval path="$path"
47792      if test ! -f "$path" && test ! -d "$path"; then
47793        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47794      fi
47795
47796      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47797    fi
47798  fi
47799
47800      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47801$as_echo_n "checking for $DLL_NAME... " >&6; }
47802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47803$as_echo "$MSVC_DLL" >&6; }
47804    else
47805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47806$as_echo "incorrect, ignoring" >&6; }
47807      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47808$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47809    fi
47810  fi
47811
47812  fi
47813
47814  if test "x$MSVC_DLL" = x; then
47815    # Probe: Look in the Windows system32 directory
47816    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47817
47818  windows_path="$CYGWIN_SYSTEMROOT"
47819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47820    unix_path=`$CYGPATH -u "$windows_path"`
47821    CYGWIN_SYSTEMROOT="$unix_path"
47822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47824    CYGWIN_SYSTEMROOT="$unix_path"
47825  fi
47826
47827    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
47828
47829  DLL_NAME="$DLL_NAME"
47830  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47831  METHOD="well-known location in SYSTEMROOT"
47832  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47833    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47834$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47835
47836    # Need to check if the found msvcr is correct architecture
47837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47838$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47839    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47841      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47842      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47843      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47844        CORRECT_MSVCR_ARCH="PE32 executable"
47845      else
47846        CORRECT_MSVCR_ARCH="PE32+ executable"
47847      fi
47848    else
47849      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47850        CORRECT_MSVCR_ARCH=386
47851      else
47852        CORRECT_MSVCR_ARCH=x86-64
47853      fi
47854    fi
47855    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47857$as_echo "ok" >&6; }
47858      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47859
47860  # Only process if variable expands to non-empty
47861
47862  if test "x$MSVC_DLL" != x; then
47863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47864
47865  # Input might be given as Windows format, start by converting to
47866  # unix format.
47867  path="$MSVC_DLL"
47868  new_path=`$CYGPATH -u "$path"`
47869
47870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47873  # "foo.exe" is OK but "foo" is an error.
47874  #
47875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47876  # It is also a way to make sure we got the proper file name for the real test later on.
47877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47878  if test "x$test_shortpath" = x; then
47879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47880$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47881    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47882  fi
47883
47884  # Call helper function which possibly converts this using DOS-style short mode.
47885  # If so, the updated path is stored in $new_path.
47886
47887  input_path="$new_path"
47888  # Check if we need to convert this using DOS-style short mode. If the path
47889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47890  # take no chances and rewrite it.
47891  # Note: m4 eats our [], so we need to use [ and ] instead.
47892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47893  if test "x$has_forbidden_chars" != x; then
47894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47898      # Going to short mode and back again did indeed matter. Since short mode is
47899      # case insensitive, let's make it lowercase to improve readability.
47900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47901      # Now convert it back to Unix-style (cygpath)
47902      input_path=`$CYGPATH -u "$shortmode_path"`
47903      new_path="$input_path"
47904    fi
47905  fi
47906
47907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47908  if test "x$test_cygdrive_prefix" = x; then
47909    # As a simple fix, exclude /usr/bin since it's not a real path.
47910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47912      # a path prefixed by /cygdrive for fixpath to work.
47913      new_path="$CYGWIN_ROOT_PATH$input_path"
47914    fi
47915  fi
47916
47917
47918  if test "x$path" != "x$new_path"; then
47919    MSVC_DLL="$new_path"
47920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47921$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47922  fi
47923
47924    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47925
47926  path="$MSVC_DLL"
47927  has_colon=`$ECHO $path | $GREP ^.:`
47928  new_path="$path"
47929  if test "x$has_colon" = x; then
47930    # Not in mixed or Windows style, start by that.
47931    new_path=`cmd //c echo $path`
47932  fi
47933
47934
47935  input_path="$new_path"
47936  # Check if we need to convert this using DOS-style short mode. If the path
47937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47938  # take no chances and rewrite it.
47939  # Note: m4 eats our [], so we need to use [ and ] instead.
47940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47941  if test "x$has_forbidden_chars" != x; then
47942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47944  fi
47945
47946
47947  windows_path="$new_path"
47948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47949    unix_path=`$CYGPATH -u "$windows_path"`
47950    new_path="$unix_path"
47951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47953    new_path="$unix_path"
47954  fi
47955
47956  if test "x$path" != "x$new_path"; then
47957    MSVC_DLL="$new_path"
47958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47959$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47960  fi
47961
47962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47964
47965    else
47966      # We're on a unix platform. Hooray! :)
47967      path="$MSVC_DLL"
47968      has_space=`$ECHO "$path" | $GREP " "`
47969      if test "x$has_space" != x; then
47970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47971$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47972        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47973      fi
47974
47975      # Use eval to expand a potential ~
47976      eval path="$path"
47977      if test ! -f "$path" && test ! -d "$path"; then
47978        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47979      fi
47980
47981      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47982    fi
47983  fi
47984
47985      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47986$as_echo_n "checking for $DLL_NAME... " >&6; }
47987      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47988$as_echo "$MSVC_DLL" >&6; }
47989    else
47990      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47991$as_echo "incorrect, ignoring" >&6; }
47992      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47993$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47994    fi
47995  fi
47996
47997  fi
47998
47999  if test "x$MSVC_DLL" = x; then
48000    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48001    if test "x$VS100COMNTOOLS" != x; then
48002      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48003
48004  windows_path="$CYGWIN_VS_TOOLS_DIR"
48005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48006    unix_path=`$CYGPATH -u "$windows_path"`
48007    CYGWIN_VS_TOOLS_DIR="$unix_path"
48008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48010    CYGWIN_VS_TOOLS_DIR="$unix_path"
48011  fi
48012
48013      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48014        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48015	    | $GREP -i /x64/ | $HEAD --lines 1`
48016      else
48017        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48018	    | $GREP -i /x86/ | $HEAD --lines 1`
48019      fi
48020
48021  DLL_NAME="$DLL_NAME"
48022  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48023  METHOD="search of VS100COMNTOOLS"
48024  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48025    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48026$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48027
48028    # Need to check if the found msvcr is correct architecture
48029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48030$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48031    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48033      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48034      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48035      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48036        CORRECT_MSVCR_ARCH="PE32 executable"
48037      else
48038        CORRECT_MSVCR_ARCH="PE32+ executable"
48039      fi
48040    else
48041      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48042        CORRECT_MSVCR_ARCH=386
48043      else
48044        CORRECT_MSVCR_ARCH=x86-64
48045      fi
48046    fi
48047    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48049$as_echo "ok" >&6; }
48050      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48051
48052  # Only process if variable expands to non-empty
48053
48054  if test "x$MSVC_DLL" != x; then
48055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48056
48057  # Input might be given as Windows format, start by converting to
48058  # unix format.
48059  path="$MSVC_DLL"
48060  new_path=`$CYGPATH -u "$path"`
48061
48062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48065  # "foo.exe" is OK but "foo" is an error.
48066  #
48067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48068  # It is also a way to make sure we got the proper file name for the real test later on.
48069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48070  if test "x$test_shortpath" = x; then
48071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48072$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48073    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48074  fi
48075
48076  # Call helper function which possibly converts this using DOS-style short mode.
48077  # If so, the updated path is stored in $new_path.
48078
48079  input_path="$new_path"
48080  # Check if we need to convert this using DOS-style short mode. If the path
48081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48082  # take no chances and rewrite it.
48083  # Note: m4 eats our [], so we need to use [ and ] instead.
48084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48085  if test "x$has_forbidden_chars" != x; then
48086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48090      # Going to short mode and back again did indeed matter. Since short mode is
48091      # case insensitive, let's make it lowercase to improve readability.
48092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48093      # Now convert it back to Unix-style (cygpath)
48094      input_path=`$CYGPATH -u "$shortmode_path"`
48095      new_path="$input_path"
48096    fi
48097  fi
48098
48099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48100  if test "x$test_cygdrive_prefix" = x; then
48101    # As a simple fix, exclude /usr/bin since it's not a real path.
48102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48104      # a path prefixed by /cygdrive for fixpath to work.
48105      new_path="$CYGWIN_ROOT_PATH$input_path"
48106    fi
48107  fi
48108
48109
48110  if test "x$path" != "x$new_path"; then
48111    MSVC_DLL="$new_path"
48112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48113$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48114  fi
48115
48116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48117
48118  path="$MSVC_DLL"
48119  has_colon=`$ECHO $path | $GREP ^.:`
48120  new_path="$path"
48121  if test "x$has_colon" = x; then
48122    # Not in mixed or Windows style, start by that.
48123    new_path=`cmd //c echo $path`
48124  fi
48125
48126
48127  input_path="$new_path"
48128  # Check if we need to convert this using DOS-style short mode. If the path
48129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48130  # take no chances and rewrite it.
48131  # Note: m4 eats our [], so we need to use [ and ] instead.
48132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48133  if test "x$has_forbidden_chars" != x; then
48134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48136  fi
48137
48138
48139  windows_path="$new_path"
48140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48141    unix_path=`$CYGPATH -u "$windows_path"`
48142    new_path="$unix_path"
48143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48145    new_path="$unix_path"
48146  fi
48147
48148  if test "x$path" != "x$new_path"; then
48149    MSVC_DLL="$new_path"
48150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48151$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48152  fi
48153
48154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48156
48157    else
48158      # We're on a unix platform. Hooray! :)
48159      path="$MSVC_DLL"
48160      has_space=`$ECHO "$path" | $GREP " "`
48161      if test "x$has_space" != x; then
48162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48163$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48164        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48165      fi
48166
48167      # Use eval to expand a potential ~
48168      eval path="$path"
48169      if test ! -f "$path" && test ! -d "$path"; then
48170        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48171      fi
48172
48173      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48174    fi
48175  fi
48176
48177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48178$as_echo_n "checking for $DLL_NAME... " >&6; }
48179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48180$as_echo "$MSVC_DLL" >&6; }
48181    else
48182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48183$as_echo "incorrect, ignoring" >&6; }
48184      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48185$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48186    fi
48187  fi
48188
48189    fi
48190  fi
48191
48192  if test "x$MSVC_DLL" = x; then
48193    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48194    # (This was the original behaviour; kept since it might turn something up)
48195    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48196      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48197        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48198	    | $GREP x64 | $HEAD --lines 1`
48199      else
48200        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48201	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48202        if test "x$POSSIBLE_MSVC_DLL" = x; then
48203          # We're grasping at straws now...
48204          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48205	      | $HEAD --lines 1`
48206        fi
48207      fi
48208
48209
48210  DLL_NAME="$DLL_NAME"
48211  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48212  METHOD="search of VCINSTALLDIR"
48213  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48214    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48215$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48216
48217    # Need to check if the found msvcr is correct architecture
48218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48219$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48220    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48222      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48223      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48224      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48225        CORRECT_MSVCR_ARCH="PE32 executable"
48226      else
48227        CORRECT_MSVCR_ARCH="PE32+ executable"
48228      fi
48229    else
48230      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48231        CORRECT_MSVCR_ARCH=386
48232      else
48233        CORRECT_MSVCR_ARCH=x86-64
48234      fi
48235    fi
48236    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48238$as_echo "ok" >&6; }
48239      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48240
48241  # Only process if variable expands to non-empty
48242
48243  if test "x$MSVC_DLL" != x; then
48244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48245
48246  # Input might be given as Windows format, start by converting to
48247  # unix format.
48248  path="$MSVC_DLL"
48249  new_path=`$CYGPATH -u "$path"`
48250
48251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48254  # "foo.exe" is OK but "foo" is an error.
48255  #
48256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48257  # It is also a way to make sure we got the proper file name for the real test later on.
48258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48259  if test "x$test_shortpath" = x; then
48260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48261$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48262    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48263  fi
48264
48265  # Call helper function which possibly converts this using DOS-style short mode.
48266  # If so, the updated path is stored in $new_path.
48267
48268  input_path="$new_path"
48269  # Check if we need to convert this using DOS-style short mode. If the path
48270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48271  # take no chances and rewrite it.
48272  # Note: m4 eats our [], so we need to use [ and ] instead.
48273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48274  if test "x$has_forbidden_chars" != x; then
48275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48279      # Going to short mode and back again did indeed matter. Since short mode is
48280      # case insensitive, let's make it lowercase to improve readability.
48281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48282      # Now convert it back to Unix-style (cygpath)
48283      input_path=`$CYGPATH -u "$shortmode_path"`
48284      new_path="$input_path"
48285    fi
48286  fi
48287
48288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48289  if test "x$test_cygdrive_prefix" = x; then
48290    # As a simple fix, exclude /usr/bin since it's not a real path.
48291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48293      # a path prefixed by /cygdrive for fixpath to work.
48294      new_path="$CYGWIN_ROOT_PATH$input_path"
48295    fi
48296  fi
48297
48298
48299  if test "x$path" != "x$new_path"; then
48300    MSVC_DLL="$new_path"
48301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48302$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48303  fi
48304
48305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48306
48307  path="$MSVC_DLL"
48308  has_colon=`$ECHO $path | $GREP ^.:`
48309  new_path="$path"
48310  if test "x$has_colon" = x; then
48311    # Not in mixed or Windows style, start by that.
48312    new_path=`cmd //c echo $path`
48313  fi
48314
48315
48316  input_path="$new_path"
48317  # Check if we need to convert this using DOS-style short mode. If the path
48318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48319  # take no chances and rewrite it.
48320  # Note: m4 eats our [], so we need to use [ and ] instead.
48321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48322  if test "x$has_forbidden_chars" != x; then
48323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48325  fi
48326
48327
48328  windows_path="$new_path"
48329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48330    unix_path=`$CYGPATH -u "$windows_path"`
48331    new_path="$unix_path"
48332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48334    new_path="$unix_path"
48335  fi
48336
48337  if test "x$path" != "x$new_path"; then
48338    MSVC_DLL="$new_path"
48339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48340$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48341  fi
48342
48343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48345
48346    else
48347      # We're on a unix platform. Hooray! :)
48348      path="$MSVC_DLL"
48349      has_space=`$ECHO "$path" | $GREP " "`
48350      if test "x$has_space" != x; then
48351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48352$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48353        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48354      fi
48355
48356      # Use eval to expand a potential ~
48357      eval path="$path"
48358      if test ! -f "$path" && test ! -d "$path"; then
48359        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48360      fi
48361
48362      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48363    fi
48364  fi
48365
48366      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48367$as_echo_n "checking for $DLL_NAME... " >&6; }
48368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48369$as_echo "$MSVC_DLL" >&6; }
48370    else
48371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48372$as_echo "incorrect, ignoring" >&6; }
48373      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48374$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48375    fi
48376  fi
48377
48378    fi
48379  fi
48380
48381  if test "x$MSVC_DLL" = x; then
48382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48383$as_echo_n "checking for $DLL_NAME... " >&6; }
48384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48385$as_echo "no" >&6; }
48386    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48387  fi
48388
48389      MSVCP_DLL="$MSVC_DLL"
48390    fi
48391
48392  fi
48393
48394  fi
48395
48396
48397  if test "x$NEEDS_LIB_X11" = xfalse; then
48398    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
48399      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
48400$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
48401    fi
48402    X_CFLAGS=
48403    X_LIBS=
48404  else
48405
48406    if test "x${with_x}" = xno; then
48407      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
48408    fi
48409
48410    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
48411      # The user has specified a X11 base directory. Use it for includes and
48412      # libraries, unless explicitely overridden.
48413      if test "x$x_includes" = xNONE; then
48414        x_includes="${with_x}/include"
48415      fi
48416      if test "x$x_libraries" = xNONE; then
48417        x_libraries="${with_x}/lib"
48418      fi
48419    else
48420      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
48421      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
48422      # --x-libraries for the sysroot, if that seems to be correct.
48423      if test "x$SYSROOT" != "x"; then
48424        if test "x$x_includes" = xNONE; then
48425          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
48426            x_includes="$SYSROOT/usr/X11R6/include"
48427          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
48428            x_includes="$SYSROOT/usr/include"
48429          fi
48430        fi
48431        if test "x$x_libraries" = xNONE; then
48432          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
48433            x_libraries="$SYSROOT/usr/X11R6/lib"
48434          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48435            x_libraries="$SYSROOT/usr/lib64"
48436          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
48437            x_libraries="$SYSROOT/usr/lib"
48438          fi
48439        fi
48440      fi
48441    fi
48442
48443    # Now let autoconf do it's magic
48444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
48445$as_echo_n "checking for X... " >&6; }
48446
48447
48448# Check whether --with-x was given.
48449if test "${with_x+set}" = set; then :
48450  withval=$with_x;
48451fi
48452
48453# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
48454if test "x$with_x" = xno; then
48455  # The user explicitly disabled X.
48456  have_x=disabled
48457else
48458  case $x_includes,$x_libraries in #(
48459    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
48460    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
48461  $as_echo_n "(cached) " >&6
48462else
48463  # One or both of the vars are not set, and there is no cached value.
48464ac_x_includes=no ac_x_libraries=no
48465rm -f -r conftest.dir
48466if mkdir conftest.dir; then
48467  cd conftest.dir
48468  cat >Imakefile <<'_ACEOF'
48469incroot:
48470	@echo incroot='${INCROOT}'
48471usrlibdir:
48472	@echo usrlibdir='${USRLIBDIR}'
48473libdir:
48474	@echo libdir='${LIBDIR}'
48475_ACEOF
48476  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
48477    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
48478    for ac_var in incroot usrlibdir libdir; do
48479      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
48480    done
48481    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
48482    for ac_extension in a so sl dylib la dll; do
48483      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
48484	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
48485	ac_im_usrlibdir=$ac_im_libdir; break
48486      fi
48487    done
48488    # Screen out bogus values from the imake configuration.  They are
48489    # bogus both because they are the default anyway, and because
48490    # using them would break gcc on systems where it needs fixed includes.
48491    case $ac_im_incroot in
48492	/usr/include) ac_x_includes= ;;
48493	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
48494    esac
48495    case $ac_im_usrlibdir in
48496	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
48497	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
48498    esac
48499  fi
48500  cd ..
48501  rm -f -r conftest.dir
48502fi
48503
48504# Standard set of common directories for X headers.
48505# Check X11 before X11Rn because it is often a symlink to the current release.
48506ac_x_header_dirs='
48507/usr/X11/include
48508/usr/X11R7/include
48509/usr/X11R6/include
48510/usr/X11R5/include
48511/usr/X11R4/include
48512
48513/usr/include/X11
48514/usr/include/X11R7
48515/usr/include/X11R6
48516/usr/include/X11R5
48517/usr/include/X11R4
48518
48519/usr/local/X11/include
48520/usr/local/X11R7/include
48521/usr/local/X11R6/include
48522/usr/local/X11R5/include
48523/usr/local/X11R4/include
48524
48525/usr/local/include/X11
48526/usr/local/include/X11R7
48527/usr/local/include/X11R6
48528/usr/local/include/X11R5
48529/usr/local/include/X11R4
48530
48531/usr/X386/include
48532/usr/x386/include
48533/usr/XFree86/include/X11
48534
48535/usr/include
48536/usr/local/include
48537/usr/unsupported/include
48538/usr/athena/include
48539/usr/local/x11r5/include
48540/usr/lpp/Xamples/include
48541
48542/usr/openwin/include
48543/usr/openwin/share/include'
48544
48545if test "$ac_x_includes" = no; then
48546  # Guess where to find include files, by looking for Xlib.h.
48547  # First, try using that file with no special directory specified.
48548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48549/* end confdefs.h.  */
48550#include <X11/Xlib.h>
48551_ACEOF
48552if ac_fn_cxx_try_cpp "$LINENO"; then :
48553  # We can compile using X headers with no special include directory.
48554ac_x_includes=
48555else
48556  for ac_dir in $ac_x_header_dirs; do
48557  if test -r "$ac_dir/X11/Xlib.h"; then
48558    ac_x_includes=$ac_dir
48559    break
48560  fi
48561done
48562fi
48563rm -f conftest.err conftest.i conftest.$ac_ext
48564fi # $ac_x_includes = no
48565
48566if test "$ac_x_libraries" = no; then
48567  # Check for the libraries.
48568  # See if we find them without any special options.
48569  # Don't add to $LIBS permanently.
48570  ac_save_LIBS=$LIBS
48571  LIBS="-lX11 $LIBS"
48572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48573/* end confdefs.h.  */
48574#include <X11/Xlib.h>
48575int
48576main ()
48577{
48578XrmInitialize ()
48579  ;
48580  return 0;
48581}
48582_ACEOF
48583if ac_fn_cxx_try_link "$LINENO"; then :
48584  LIBS=$ac_save_LIBS
48585# We can link X programs with no special library path.
48586ac_x_libraries=
48587else
48588  LIBS=$ac_save_LIBS
48589for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
48590do
48591  # Don't even attempt the hair of trying to link an X program!
48592  for ac_extension in a so sl dylib la dll; do
48593    if test -r "$ac_dir/libX11.$ac_extension"; then
48594      ac_x_libraries=$ac_dir
48595      break 2
48596    fi
48597  done
48598done
48599fi
48600rm -f core conftest.err conftest.$ac_objext \
48601    conftest$ac_exeext conftest.$ac_ext
48602fi # $ac_x_libraries = no
48603
48604case $ac_x_includes,$ac_x_libraries in #(
48605  no,* | *,no | *\'*)
48606    # Didn't find X, or a directory has "'" in its name.
48607    ac_cv_have_x="have_x=no";; #(
48608  *)
48609    # Record where we found X for the cache.
48610    ac_cv_have_x="have_x=yes\
48611	ac_x_includes='$ac_x_includes'\
48612	ac_x_libraries='$ac_x_libraries'"
48613esac
48614fi
48615;; #(
48616    *) have_x=yes;;
48617  esac
48618  eval "$ac_cv_have_x"
48619fi # $with_x != no
48620
48621if test "$have_x" != yes; then
48622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
48623$as_echo "$have_x" >&6; }
48624  no_x=yes
48625else
48626  # If each of the values was on the command line, it overrides each guess.
48627  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
48628  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
48629  # Update the cache value to reflect the command line values.
48630  ac_cv_have_x="have_x=yes\
48631	ac_x_includes='$x_includes'\
48632	ac_x_libraries='$x_libraries'"
48633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
48634$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
48635fi
48636
48637    if test "$no_x" = yes; then
48638  # Not all programs may use this symbol, but it does not hurt to define it.
48639
48640$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
48641
48642  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
48643else
48644  if test -n "$x_includes"; then
48645    X_CFLAGS="$X_CFLAGS -I$x_includes"
48646  fi
48647
48648  # It would also be nice to do this for all -L options, not just this one.
48649  if test -n "$x_libraries"; then
48650    X_LIBS="$X_LIBS -L$x_libraries"
48651    # For Solaris; some versions of Sun CC require a space after -R and
48652    # others require no space.  Words are not sufficient . . . .
48653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
48654$as_echo_n "checking whether -R must be followed by a space... " >&6; }
48655    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
48656    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
48657    ac_cxx_werror_flag=yes
48658    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48659/* end confdefs.h.  */
48660
48661int
48662main ()
48663{
48664
48665  ;
48666  return 0;
48667}
48668_ACEOF
48669if ac_fn_cxx_try_link "$LINENO"; then :
48670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48671$as_echo "no" >&6; }
48672       X_LIBS="$X_LIBS -R$x_libraries"
48673else
48674  LIBS="$ac_xsave_LIBS -R $x_libraries"
48675       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48676/* end confdefs.h.  */
48677
48678int
48679main ()
48680{
48681
48682  ;
48683  return 0;
48684}
48685_ACEOF
48686if ac_fn_cxx_try_link "$LINENO"; then :
48687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48688$as_echo "yes" >&6; }
48689	  X_LIBS="$X_LIBS -R $x_libraries"
48690else
48691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
48692$as_echo "neither works" >&6; }
48693fi
48694rm -f core conftest.err conftest.$ac_objext \
48695    conftest$ac_exeext conftest.$ac_ext
48696fi
48697rm -f core conftest.err conftest.$ac_objext \
48698    conftest$ac_exeext conftest.$ac_ext
48699    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
48700    LIBS=$ac_xsave_LIBS
48701  fi
48702
48703  # Check for system-dependent libraries X programs must link with.
48704  # Do this before checking for the system-independent R6 libraries
48705  # (-lICE), since we may need -lsocket or whatever for X linking.
48706
48707  if test "$ISC" = yes; then
48708    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
48709  else
48710    # Martyn Johnson says this is needed for Ultrix, if the X
48711    # libraries were built with DECnet support.  And Karl Berry says
48712    # the Alpha needs dnet_stub (dnet does not exist).
48713    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
48714    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48715/* end confdefs.h.  */
48716
48717/* Override any GCC internal prototype to avoid an error.
48718   Use char because int might match the return type of a GCC
48719   builtin and then its argument prototype would still apply.  */
48720#ifdef __cplusplus
48721extern "C"
48722#endif
48723char XOpenDisplay ();
48724int
48725main ()
48726{
48727return XOpenDisplay ();
48728  ;
48729  return 0;
48730}
48731_ACEOF
48732if ac_fn_cxx_try_link "$LINENO"; then :
48733
48734else
48735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
48736$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
48737if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
48738  $as_echo_n "(cached) " >&6
48739else
48740  ac_check_lib_save_LIBS=$LIBS
48741LIBS="-ldnet  $LIBS"
48742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48743/* end confdefs.h.  */
48744
48745/* Override any GCC internal prototype to avoid an error.
48746   Use char because int might match the return type of a GCC
48747   builtin and then its argument prototype would still apply.  */
48748#ifdef __cplusplus
48749extern "C"
48750#endif
48751char dnet_ntoa ();
48752int
48753main ()
48754{
48755return dnet_ntoa ();
48756  ;
48757  return 0;
48758}
48759_ACEOF
48760if ac_fn_cxx_try_link "$LINENO"; then :
48761  ac_cv_lib_dnet_dnet_ntoa=yes
48762else
48763  ac_cv_lib_dnet_dnet_ntoa=no
48764fi
48765rm -f core conftest.err conftest.$ac_objext \
48766    conftest$ac_exeext conftest.$ac_ext
48767LIBS=$ac_check_lib_save_LIBS
48768fi
48769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
48770$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
48771if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
48772  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
48773fi
48774
48775    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
48776      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
48777$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
48778if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
48779  $as_echo_n "(cached) " >&6
48780else
48781  ac_check_lib_save_LIBS=$LIBS
48782LIBS="-ldnet_stub  $LIBS"
48783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48784/* end confdefs.h.  */
48785
48786/* Override any GCC internal prototype to avoid an error.
48787   Use char because int might match the return type of a GCC
48788   builtin and then its argument prototype would still apply.  */
48789#ifdef __cplusplus
48790extern "C"
48791#endif
48792char dnet_ntoa ();
48793int
48794main ()
48795{
48796return dnet_ntoa ();
48797  ;
48798  return 0;
48799}
48800_ACEOF
48801if ac_fn_cxx_try_link "$LINENO"; then :
48802  ac_cv_lib_dnet_stub_dnet_ntoa=yes
48803else
48804  ac_cv_lib_dnet_stub_dnet_ntoa=no
48805fi
48806rm -f core conftest.err conftest.$ac_objext \
48807    conftest$ac_exeext conftest.$ac_ext
48808LIBS=$ac_check_lib_save_LIBS
48809fi
48810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
48811$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
48812if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
48813  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
48814fi
48815
48816    fi
48817fi
48818rm -f core conftest.err conftest.$ac_objext \
48819    conftest$ac_exeext conftest.$ac_ext
48820    LIBS="$ac_xsave_LIBS"
48821
48822    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
48823    # to get the SysV transport functions.
48824    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
48825    # needs -lnsl.
48826    # The nsl library prevents programs from opening the X display
48827    # on Irix 5.2, according to T.E. Dickey.
48828    # The functions gethostbyname, getservbyname, and inet_addr are
48829    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
48830    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
48831if test "x$ac_cv_func_gethostbyname" = xyes; then :
48832
48833fi
48834
48835    if test $ac_cv_func_gethostbyname = no; then
48836      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
48837$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
48838if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
48839  $as_echo_n "(cached) " >&6
48840else
48841  ac_check_lib_save_LIBS=$LIBS
48842LIBS="-lnsl  $LIBS"
48843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48844/* end confdefs.h.  */
48845
48846/* Override any GCC internal prototype to avoid an error.
48847   Use char because int might match the return type of a GCC
48848   builtin and then its argument prototype would still apply.  */
48849#ifdef __cplusplus
48850extern "C"
48851#endif
48852char gethostbyname ();
48853int
48854main ()
48855{
48856return gethostbyname ();
48857  ;
48858  return 0;
48859}
48860_ACEOF
48861if ac_fn_cxx_try_link "$LINENO"; then :
48862  ac_cv_lib_nsl_gethostbyname=yes
48863else
48864  ac_cv_lib_nsl_gethostbyname=no
48865fi
48866rm -f core conftest.err conftest.$ac_objext \
48867    conftest$ac_exeext conftest.$ac_ext
48868LIBS=$ac_check_lib_save_LIBS
48869fi
48870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
48871$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
48872if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
48873  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
48874fi
48875
48876      if test $ac_cv_lib_nsl_gethostbyname = no; then
48877	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
48878$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
48879if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
48880  $as_echo_n "(cached) " >&6
48881else
48882  ac_check_lib_save_LIBS=$LIBS
48883LIBS="-lbsd  $LIBS"
48884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48885/* end confdefs.h.  */
48886
48887/* Override any GCC internal prototype to avoid an error.
48888   Use char because int might match the return type of a GCC
48889   builtin and then its argument prototype would still apply.  */
48890#ifdef __cplusplus
48891extern "C"
48892#endif
48893char gethostbyname ();
48894int
48895main ()
48896{
48897return gethostbyname ();
48898  ;
48899  return 0;
48900}
48901_ACEOF
48902if ac_fn_cxx_try_link "$LINENO"; then :
48903  ac_cv_lib_bsd_gethostbyname=yes
48904else
48905  ac_cv_lib_bsd_gethostbyname=no
48906fi
48907rm -f core conftest.err conftest.$ac_objext \
48908    conftest$ac_exeext conftest.$ac_ext
48909LIBS=$ac_check_lib_save_LIBS
48910fi
48911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
48912$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
48913if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
48914  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
48915fi
48916
48917      fi
48918    fi
48919
48920    # lieder@skyler.mavd.honeywell.com says without -lsocket,
48921    # socket/setsockopt and other routines are undefined under SCO ODT
48922    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
48923    # on later versions), says Simon Leinen: it contains gethostby*
48924    # variants that don't use the name server (or something).  -lsocket
48925    # must be given before -lnsl if both are needed.  We assume that
48926    # if connect needs -lnsl, so does gethostbyname.
48927    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
48928if test "x$ac_cv_func_connect" = xyes; then :
48929
48930fi
48931
48932    if test $ac_cv_func_connect = no; then
48933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
48934$as_echo_n "checking for connect in -lsocket... " >&6; }
48935if ${ac_cv_lib_socket_connect+:} false; then :
48936  $as_echo_n "(cached) " >&6
48937else
48938  ac_check_lib_save_LIBS=$LIBS
48939LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
48940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48941/* end confdefs.h.  */
48942
48943/* Override any GCC internal prototype to avoid an error.
48944   Use char because int might match the return type of a GCC
48945   builtin and then its argument prototype would still apply.  */
48946#ifdef __cplusplus
48947extern "C"
48948#endif
48949char connect ();
48950int
48951main ()
48952{
48953return connect ();
48954  ;
48955  return 0;
48956}
48957_ACEOF
48958if ac_fn_cxx_try_link "$LINENO"; then :
48959  ac_cv_lib_socket_connect=yes
48960else
48961  ac_cv_lib_socket_connect=no
48962fi
48963rm -f core conftest.err conftest.$ac_objext \
48964    conftest$ac_exeext conftest.$ac_ext
48965LIBS=$ac_check_lib_save_LIBS
48966fi
48967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
48968$as_echo "$ac_cv_lib_socket_connect" >&6; }
48969if test "x$ac_cv_lib_socket_connect" = xyes; then :
48970  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
48971fi
48972
48973    fi
48974
48975    # Guillermo Gomez says -lposix is necessary on A/UX.
48976    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
48977if test "x$ac_cv_func_remove" = xyes; then :
48978
48979fi
48980
48981    if test $ac_cv_func_remove = no; then
48982      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
48983$as_echo_n "checking for remove in -lposix... " >&6; }
48984if ${ac_cv_lib_posix_remove+:} false; then :
48985  $as_echo_n "(cached) " >&6
48986else
48987  ac_check_lib_save_LIBS=$LIBS
48988LIBS="-lposix  $LIBS"
48989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48990/* end confdefs.h.  */
48991
48992/* Override any GCC internal prototype to avoid an error.
48993   Use char because int might match the return type of a GCC
48994   builtin and then its argument prototype would still apply.  */
48995#ifdef __cplusplus
48996extern "C"
48997#endif
48998char remove ();
48999int
49000main ()
49001{
49002return remove ();
49003  ;
49004  return 0;
49005}
49006_ACEOF
49007if ac_fn_cxx_try_link "$LINENO"; then :
49008  ac_cv_lib_posix_remove=yes
49009else
49010  ac_cv_lib_posix_remove=no
49011fi
49012rm -f core conftest.err conftest.$ac_objext \
49013    conftest$ac_exeext conftest.$ac_ext
49014LIBS=$ac_check_lib_save_LIBS
49015fi
49016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
49017$as_echo "$ac_cv_lib_posix_remove" >&6; }
49018if test "x$ac_cv_lib_posix_remove" = xyes; then :
49019  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
49020fi
49021
49022    fi
49023
49024    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
49025    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
49026if test "x$ac_cv_func_shmat" = xyes; then :
49027
49028fi
49029
49030    if test $ac_cv_func_shmat = no; then
49031      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
49032$as_echo_n "checking for shmat in -lipc... " >&6; }
49033if ${ac_cv_lib_ipc_shmat+:} false; then :
49034  $as_echo_n "(cached) " >&6
49035else
49036  ac_check_lib_save_LIBS=$LIBS
49037LIBS="-lipc  $LIBS"
49038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49039/* end confdefs.h.  */
49040
49041/* Override any GCC internal prototype to avoid an error.
49042   Use char because int might match the return type of a GCC
49043   builtin and then its argument prototype would still apply.  */
49044#ifdef __cplusplus
49045extern "C"
49046#endif
49047char shmat ();
49048int
49049main ()
49050{
49051return shmat ();
49052  ;
49053  return 0;
49054}
49055_ACEOF
49056if ac_fn_cxx_try_link "$LINENO"; then :
49057  ac_cv_lib_ipc_shmat=yes
49058else
49059  ac_cv_lib_ipc_shmat=no
49060fi
49061rm -f core conftest.err conftest.$ac_objext \
49062    conftest$ac_exeext conftest.$ac_ext
49063LIBS=$ac_check_lib_save_LIBS
49064fi
49065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
49066$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
49067if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
49068  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
49069fi
49070
49071    fi
49072  fi
49073
49074  # Check for libraries that X11R6 Xt/Xaw programs need.
49075  ac_save_LDFLAGS=$LDFLAGS
49076  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
49077  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
49078  # check for ICE first), but we must link in the order -lSM -lICE or
49079  # we get undefined symbols.  So assume we have SM if we have ICE.
49080  # These have to be linked with before -lX11, unlike the other
49081  # libraries we check for below, so use a different variable.
49082  # John Interrante, Karl Berry
49083  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
49084$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
49085if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
49086  $as_echo_n "(cached) " >&6
49087else
49088  ac_check_lib_save_LIBS=$LIBS
49089LIBS="-lICE $X_EXTRA_LIBS $LIBS"
49090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49091/* end confdefs.h.  */
49092
49093/* Override any GCC internal prototype to avoid an error.
49094   Use char because int might match the return type of a GCC
49095   builtin and then its argument prototype would still apply.  */
49096#ifdef __cplusplus
49097extern "C"
49098#endif
49099char IceConnectionNumber ();
49100int
49101main ()
49102{
49103return IceConnectionNumber ();
49104  ;
49105  return 0;
49106}
49107_ACEOF
49108if ac_fn_cxx_try_link "$LINENO"; then :
49109  ac_cv_lib_ICE_IceConnectionNumber=yes
49110else
49111  ac_cv_lib_ICE_IceConnectionNumber=no
49112fi
49113rm -f core conftest.err conftest.$ac_objext \
49114    conftest$ac_exeext conftest.$ac_ext
49115LIBS=$ac_check_lib_save_LIBS
49116fi
49117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
49118$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
49119if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
49120  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
49121fi
49122
49123  LDFLAGS=$ac_save_LDFLAGS
49124
49125fi
49126
49127
49128    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
49129    # this doesn't make sense so we remove it.
49130    if test "x$COMPILE_TYPE" = xcross; then
49131      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
49132    fi
49133
49134    if test "x$no_x" = xyes; then
49135
49136  # Print a helpful message on how to acquire the necessary build dependency.
49137  # x11 is the help tag: freetype, cups, alsa etc
49138  MISSING_DEPENDENCY=x11
49139
49140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49141    cygwin_help $MISSING_DEPENDENCY
49142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49143    msys_help $MISSING_DEPENDENCY
49144  else
49145    PKGHANDLER_COMMAND=
49146
49147    case $PKGHANDLER in
49148      apt-get)
49149        apt_help     $MISSING_DEPENDENCY ;;
49150      yum)
49151        yum_help     $MISSING_DEPENDENCY ;;
49152      port)
49153        port_help    $MISSING_DEPENDENCY ;;
49154      pkgutil)
49155        pkgutil_help $MISSING_DEPENDENCY ;;
49156      pkgadd)
49157        pkgadd_help  $MISSING_DEPENDENCY ;;
49158    esac
49159
49160    if test "x$PKGHANDLER_COMMAND" != x; then
49161      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49162    fi
49163  fi
49164
49165      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
49166    fi
49167
49168    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49169      OPENWIN_HOME="/usr/openwin"
49170      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
49171      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49172          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
49173          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49174          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
49175    fi
49176
49177    ac_ext=c
49178ac_cpp='$CPP $CPPFLAGS'
49179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49181ac_compiler_gnu=$ac_cv_c_compiler_gnu
49182
49183    OLD_CFLAGS="$CFLAGS"
49184    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
49185
49186    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
49187    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
49188do :
49189  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49190ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
49191          # include <X11/Xlib.h>
49192          # include <X11/Xutil.h>
49193
49194
49195"
49196if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49197  cat >>confdefs.h <<_ACEOF
49198#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49199_ACEOF
49200 X11_HEADERS_OK=yes
49201else
49202  X11_HEADERS_OK=no; break
49203fi
49204
49205done
49206
49207
49208    if test "x$X11_HEADERS_OK" = xno; then
49209
49210  # Print a helpful message on how to acquire the necessary build dependency.
49211  # x11 is the help tag: freetype, cups, alsa etc
49212  MISSING_DEPENDENCY=x11
49213
49214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49215    cygwin_help $MISSING_DEPENDENCY
49216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49217    msys_help $MISSING_DEPENDENCY
49218  else
49219    PKGHANDLER_COMMAND=
49220
49221    case $PKGHANDLER in
49222      apt-get)
49223        apt_help     $MISSING_DEPENDENCY ;;
49224      yum)
49225        yum_help     $MISSING_DEPENDENCY ;;
49226      port)
49227        port_help    $MISSING_DEPENDENCY ;;
49228      pkgutil)
49229        pkgutil_help $MISSING_DEPENDENCY ;;
49230      pkgadd)
49231        pkgadd_help  $MISSING_DEPENDENCY ;;
49232    esac
49233
49234    if test "x$PKGHANDLER_COMMAND" != x; then
49235      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49236    fi
49237  fi
49238
49239      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
49240    fi
49241
49242    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
49243    # defined in libawt_xawt.
49244    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
49245$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
49246    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49247/* end confdefs.h.  */
49248#include <X11/extensions/Xrender.h>
49249int
49250main ()
49251{
49252XLinearGradient x;
49253  ;
49254  return 0;
49255}
49256_ACEOF
49257if ac_fn_c_try_compile "$LINENO"; then :
49258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49259$as_echo "yes" >&6; }
49260else
49261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49262$as_echo "no" >&6; }
49263         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
49264fi
49265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49266
49267    CFLAGS="$OLD_CFLAGS"
49268    ac_ext=cpp
49269ac_cpp='$CXXCPP $CPPFLAGS'
49270ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49271ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49272ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49273
49274  fi # NEEDS_LIB_X11
49275
49276
49277
49278
49279
49280
49281# Check whether --with-cups was given.
49282if test "${with_cups+set}" = set; then :
49283  withval=$with_cups;
49284fi
49285
49286
49287# Check whether --with-cups-include was given.
49288if test "${with_cups_include+set}" = set; then :
49289  withval=$with_cups_include;
49290fi
49291
49292
49293  if test "x$NEEDS_LIB_CUPS" = xfalse; then
49294    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
49295        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
49296      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
49297$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
49298    fi
49299    CUPS_CFLAGS=
49300  else
49301    CUPS_FOUND=no
49302
49303    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
49304      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
49305    fi
49306
49307    if test "x${with_cups}" != x; then
49308      CUPS_CFLAGS="-I${with_cups}/include"
49309      CUPS_FOUND=yes
49310    fi
49311    if test "x${with_cups_include}" != x; then
49312      CUPS_CFLAGS="-I${with_cups_include}"
49313      CUPS_FOUND=yes
49314    fi
49315    if test "x$CUPS_FOUND" = xno; then
49316      # Are the cups headers installed in the default /usr/include location?
49317      for ac_header in cups/cups.h cups/ppd.h
49318do :
49319  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49320ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49321if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49322  cat >>confdefs.h <<_ACEOF
49323#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49324_ACEOF
49325
49326          CUPS_FOUND=yes
49327          CUPS_CFLAGS=
49328          DEFAULT_CUPS=yes
49329
49330fi
49331
49332done
49333
49334    fi
49335    if test "x$CUPS_FOUND" = xno; then
49336      # Getting nervous now? Lets poke around for standard Solaris third-party
49337      # package installation locations.
49338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
49339$as_echo_n "checking for cups headers... " >&6; }
49340      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
49341        # An SFW package seems to be installed!
49342        CUPS_FOUND=yes
49343        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
49344      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
49345        # A CSW package seems to be installed!
49346        CUPS_FOUND=yes
49347        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
49348      fi
49349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
49350$as_echo "$CUPS_FOUND" >&6; }
49351    fi
49352    if test "x$CUPS_FOUND" = xno; then
49353
49354  # Print a helpful message on how to acquire the necessary build dependency.
49355  # cups is the help tag: freetype, cups, alsa etc
49356  MISSING_DEPENDENCY=cups
49357
49358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49359    cygwin_help $MISSING_DEPENDENCY
49360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49361    msys_help $MISSING_DEPENDENCY
49362  else
49363    PKGHANDLER_COMMAND=
49364
49365    case $PKGHANDLER in
49366      apt-get)
49367        apt_help     $MISSING_DEPENDENCY ;;
49368      yum)
49369        yum_help     $MISSING_DEPENDENCY ;;
49370      port)
49371        port_help    $MISSING_DEPENDENCY ;;
49372      pkgutil)
49373        pkgutil_help $MISSING_DEPENDENCY ;;
49374      pkgadd)
49375        pkgadd_help  $MISSING_DEPENDENCY ;;
49376    esac
49377
49378    if test "x$PKGHANDLER_COMMAND" != x; then
49379      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49380    fi
49381  fi
49382
49383      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
49384    fi
49385  fi
49386
49387
49388
49389
49390
49391# Check whether --with-freetype was given.
49392if test "${with_freetype+set}" = set; then :
49393  withval=$with_freetype;
49394fi
49395
49396
49397# Check whether --with-freetype-include was given.
49398if test "${with_freetype_include+set}" = set; then :
49399  withval=$with_freetype_include;
49400fi
49401
49402
49403# Check whether --with-freetype-lib was given.
49404if test "${with_freetype_lib+set}" = set; then :
49405  withval=$with_freetype_lib;
49406fi
49407
49408
49409# Check whether --with-freetype-src was given.
49410if test "${with_freetype_src+set}" = set; then :
49411  withval=$with_freetype_src;
49412fi
49413
49414  # Check whether --enable-freetype-bundling was given.
49415if test "${enable_freetype_bundling+set}" = set; then :
49416  enableval=$enable_freetype_bundling;
49417fi
49418
49419
49420  # Need to specify explicitly since it needs to be overridden on some versions of macosx
49421  FREETYPE_BASE_NAME=freetype
49422  FREETYPE_CFLAGS=
49423  FREETYPE_LIBS=
49424  FREETYPE_BUNDLE_LIB_PATH=
49425
49426  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
49427    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
49428        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
49429        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
49430        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
49431      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
49432$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
49433    fi
49434    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
49435      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
49436$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
49437    fi
49438  else
49439    # freetype is needed to build; go get it!
49440
49441    BUNDLE_FREETYPE="$enable_freetype_bundling"
49442
49443    if  test "x$with_freetype_src" != x; then
49444      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49445        # Try to build freetype if --with-freetype-src was given on Windows
49446
49447  FREETYPE_SRC_PATH="$with_freetype_src"
49448  BUILD_FREETYPE=yes
49449
49450  # Check if the freetype sources are acessible..
49451  if ! test -d $FREETYPE_SRC_PATH; then
49452    { $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
49453$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
49454    BUILD_FREETYPE=no
49455  fi
49456  # ..and contain a vc2010 project file
49457  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
49458  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
49459    { $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
49460$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
49461    BUILD_FREETYPE=no
49462  fi
49463  # Now check if configure found a version of 'msbuild.exe'
49464  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
49465    { $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
49466$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;}
49467    BUILD_FREETYPE=no
49468  fi
49469
49470  # Ready to go..
49471  if test "x$BUILD_FREETYPE" = xyes; then
49472    # msbuild requires trailing slashes for output directories
49473    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
49474    freetype_lib_path_unix="$freetype_lib_path"
49475    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
49476
49477  unix_path="$vcxproj_path"
49478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49479    windows_path=`$CYGPATH -m "$unix_path"`
49480    vcxproj_path="$windows_path"
49481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49482    windows_path=`cmd //c echo $unix_path`
49483    vcxproj_path="$windows_path"
49484  fi
49485
49486
49487  unix_path="$freetype_lib_path"
49488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49489    windows_path=`$CYGPATH -m "$unix_path"`
49490    freetype_lib_path="$windows_path"
49491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49492    windows_path=`cmd //c echo $unix_path`
49493    freetype_lib_path="$windows_path"
49494  fi
49495
49496
49497  unix_path="$freetype_obj_path"
49498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49499    windows_path=`$CYGPATH -m "$unix_path"`
49500    freetype_obj_path="$windows_path"
49501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49502    windows_path=`cmd //c echo $unix_path`
49503    freetype_obj_path="$windows_path"
49504  fi
49505
49506    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49507      freetype_platform=x64
49508    else
49509      freetype_platform=win32
49510    fi
49511
49512    # The original freetype project file is for VS 2010 (i.e. 'v100'),
49513    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
49514    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
49515    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
49516    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
49517$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
49518
49519    # First we try to build the freetype.dll
49520    $ECHO -e "@echo off\n"\
49521        "$MSBUILD $vcxproj_path "\
49522        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49523        "/p:Configuration=\"Release Multithreaded\" "\
49524        "/p:Platform=$freetype_platform "\
49525        "/p:ConfigurationType=DynamicLibrary "\
49526        "/p:TargetName=freetype "\
49527        "/p:OutDir=\"$freetype_lib_path\" "\
49528        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
49529    cmd /c freetype.bat
49530
49531    if test -s "$freetype_lib_path_unix/freetype.dll"; then
49532      # If that succeeds we also build freetype.lib
49533      $ECHO -e "@echo off\n"\
49534          "$MSBUILD $vcxproj_path "\
49535          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49536          "/p:Configuration=\"Release Multithreaded\" "\
49537          "/p:Platform=$freetype_platform "\
49538          "/p:ConfigurationType=StaticLibrary "\
49539          "/p:TargetName=freetype "\
49540          "/p:OutDir=\"$freetype_lib_path\" "\
49541          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
49542      cmd /c freetype.bat
49543
49544      if test -s "$freetype_lib_path_unix/freetype.lib"; then
49545        # Once we build both, lib and dll, set freetype lib and include path appropriately
49546        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
49547        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
49548        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
49549$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
49550      else
49551        BUILD_FREETYPE=no
49552      fi
49553    else
49554      BUILD_FREETYPE=no
49555    fi
49556  fi
49557
49558        if test "x$BUILD_FREETYPE" = xyes; then
49559          # Okay, we built it. Check that it works.
49560
49561  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49562  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49563  METHOD="--with-freetype-src"
49564
49565  # Let's start with an optimistic view of the world :-)
49566  FOUND_FREETYPE=yes
49567
49568  # First look for the canonical freetype main include file ft2build.h.
49569  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49570    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49571    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49572    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49573      # Fail.
49574      FOUND_FREETYPE=no
49575    fi
49576  fi
49577
49578  if test "x$FOUND_FREETYPE" = xyes; then
49579    # Include file found, let's continue the sanity check.
49580    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49581$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49582
49583    # Reset to default value
49584    FREETYPE_BASE_NAME=freetype
49585    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49586    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49587      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49588          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49589        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49590        # for the .6 version explicitly.
49591        FREETYPE_BASE_NAME=freetype.6
49592        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49593        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49594$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49595      else
49596        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49597$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49598        FOUND_FREETYPE=no
49599      fi
49600    else
49601      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49602        # On Windows, we will need both .lib and .dll file.
49603        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49604          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49605$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49606          FOUND_FREETYPE=no
49607        fi
49608      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49609          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49610        # Found lib in isa dir, use that instead.
49611        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49612        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49613$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49614      fi
49615    fi
49616  fi
49617
49618  if test "x$FOUND_FREETYPE" = xyes; then
49619
49620  # Only process if variable expands to non-empty
49621
49622  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49624
49625  # Input might be given as Windows format, start by converting to
49626  # unix format.
49627  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49628  new_path=`$CYGPATH -u "$path"`
49629
49630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49633  # "foo.exe" is OK but "foo" is an error.
49634  #
49635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49636  # It is also a way to make sure we got the proper file name for the real test later on.
49637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49638  if test "x$test_shortpath" = x; then
49639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49642  fi
49643
49644  # Call helper function which possibly converts this using DOS-style short mode.
49645  # If so, the updated path is stored in $new_path.
49646
49647  input_path="$new_path"
49648  # Check if we need to convert this using DOS-style short mode. If the path
49649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49650  # take no chances and rewrite it.
49651  # Note: m4 eats our [], so we need to use [ and ] instead.
49652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49653  if test "x$has_forbidden_chars" != x; then
49654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49658      # Going to short mode and back again did indeed matter. Since short mode is
49659      # case insensitive, let's make it lowercase to improve readability.
49660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49661      # Now convert it back to Unix-style (cygpath)
49662      input_path=`$CYGPATH -u "$shortmode_path"`
49663      new_path="$input_path"
49664    fi
49665  fi
49666
49667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49668  if test "x$test_cygdrive_prefix" = x; then
49669    # As a simple fix, exclude /usr/bin since it's not a real path.
49670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49672      # a path prefixed by /cygdrive for fixpath to work.
49673      new_path="$CYGWIN_ROOT_PATH$input_path"
49674    fi
49675  fi
49676
49677
49678  if test "x$path" != "x$new_path"; then
49679    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49682  fi
49683
49684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49685
49686  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49687  has_colon=`$ECHO $path | $GREP ^.:`
49688  new_path="$path"
49689  if test "x$has_colon" = x; then
49690    # Not in mixed or Windows style, start by that.
49691    new_path=`cmd //c echo $path`
49692  fi
49693
49694
49695  input_path="$new_path"
49696  # Check if we need to convert this using DOS-style short mode. If the path
49697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49698  # take no chances and rewrite it.
49699  # Note: m4 eats our [], so we need to use [ and ] instead.
49700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49701  if test "x$has_forbidden_chars" != x; then
49702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49704  fi
49705
49706
49707  windows_path="$new_path"
49708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49709    unix_path=`$CYGPATH -u "$windows_path"`
49710    new_path="$unix_path"
49711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49713    new_path="$unix_path"
49714  fi
49715
49716  if test "x$path" != "x$new_path"; then
49717    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49720  fi
49721
49722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49724
49725    else
49726      # We're on a unix platform. Hooray! :)
49727      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49728      has_space=`$ECHO "$path" | $GREP " "`
49729      if test "x$has_space" != x; then
49730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49733      fi
49734
49735      # Use eval to expand a potential ~
49736      eval path="$path"
49737      if test ! -f "$path" && test ! -d "$path"; then
49738        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49739      fi
49740
49741      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49742    fi
49743  fi
49744
49745
49746  # Only process if variable expands to non-empty
49747
49748  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49750
49751  # Input might be given as Windows format, start by converting to
49752  # unix format.
49753  path="$POTENTIAL_FREETYPE_LIB_PATH"
49754  new_path=`$CYGPATH -u "$path"`
49755
49756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49759  # "foo.exe" is OK but "foo" is an error.
49760  #
49761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49762  # It is also a way to make sure we got the proper file name for the real test later on.
49763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49764  if test "x$test_shortpath" = x; then
49765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49767    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49768  fi
49769
49770  # Call helper function which possibly converts this using DOS-style short mode.
49771  # If so, the updated path is stored in $new_path.
49772
49773  input_path="$new_path"
49774  # Check if we need to convert this using DOS-style short mode. If the path
49775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49776  # take no chances and rewrite it.
49777  # Note: m4 eats our [], so we need to use [ and ] instead.
49778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49779  if test "x$has_forbidden_chars" != x; then
49780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49784      # Going to short mode and back again did indeed matter. Since short mode is
49785      # case insensitive, let's make it lowercase to improve readability.
49786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49787      # Now convert it back to Unix-style (cygpath)
49788      input_path=`$CYGPATH -u "$shortmode_path"`
49789      new_path="$input_path"
49790    fi
49791  fi
49792
49793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49794  if test "x$test_cygdrive_prefix" = x; then
49795    # As a simple fix, exclude /usr/bin since it's not a real path.
49796    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49798      # a path prefixed by /cygdrive for fixpath to work.
49799      new_path="$CYGWIN_ROOT_PATH$input_path"
49800    fi
49801  fi
49802
49803
49804  if test "x$path" != "x$new_path"; then
49805    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49807$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49808  fi
49809
49810    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49811
49812  path="$POTENTIAL_FREETYPE_LIB_PATH"
49813  has_colon=`$ECHO $path | $GREP ^.:`
49814  new_path="$path"
49815  if test "x$has_colon" = x; then
49816    # Not in mixed or Windows style, start by that.
49817    new_path=`cmd //c echo $path`
49818  fi
49819
49820
49821  input_path="$new_path"
49822  # Check if we need to convert this using DOS-style short mode. If the path
49823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49824  # take no chances and rewrite it.
49825  # Note: m4 eats our [], so we need to use [ and ] instead.
49826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49827  if test "x$has_forbidden_chars" != x; then
49828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49830  fi
49831
49832
49833  windows_path="$new_path"
49834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49835    unix_path=`$CYGPATH -u "$windows_path"`
49836    new_path="$unix_path"
49837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49839    new_path="$unix_path"
49840  fi
49841
49842  if test "x$path" != "x$new_path"; then
49843    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49845$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49846  fi
49847
49848  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49849  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49850
49851    else
49852      # We're on a unix platform. Hooray! :)
49853      path="$POTENTIAL_FREETYPE_LIB_PATH"
49854      has_space=`$ECHO "$path" | $GREP " "`
49855      if test "x$has_space" != x; then
49856        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49857$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49858        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49859      fi
49860
49861      # Use eval to expand a potential ~
49862      eval path="$path"
49863      if test ! -f "$path" && test ! -d "$path"; then
49864        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49865      fi
49866
49867      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49868    fi
49869  fi
49870
49871
49872    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49874$as_echo_n "checking for freetype includes... " >&6; }
49875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49876$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49877    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49879$as_echo_n "checking for freetype libraries... " >&6; }
49880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49881$as_echo "$FREETYPE_LIB_PATH" >&6; }
49882  fi
49883
49884          if test "x$FOUND_FREETYPE" != xyes; then
49885            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
49886          fi
49887        else
49888          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
49889$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
49890          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
49891        fi
49892      else
49893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
49894$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
49895      fi
49896    fi
49897
49898    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
49899      # User has specified settings
49900
49901      if test "x$BUNDLE_FREETYPE" = x; then
49902        # If not specified, default is to bundle freetype
49903        BUNDLE_FREETYPE=yes
49904      fi
49905
49906      if test "x$with_freetype" != x; then
49907        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
49908        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
49909      fi
49910
49911      # Allow --with-freetype-lib and --with-freetype-include to override
49912      if test "x$with_freetype_include" != x; then
49913        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
49914      fi
49915      if test "x$with_freetype_lib" != x; then
49916        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
49917      fi
49918
49919      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49920        # Okay, we got it. Check that it works.
49921
49922  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49923  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49924  METHOD="--with-freetype"
49925
49926  # Let's start with an optimistic view of the world :-)
49927  FOUND_FREETYPE=yes
49928
49929  # First look for the canonical freetype main include file ft2build.h.
49930  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49931    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49932    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49933    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49934      # Fail.
49935      FOUND_FREETYPE=no
49936    fi
49937  fi
49938
49939  if test "x$FOUND_FREETYPE" = xyes; then
49940    # Include file found, let's continue the sanity check.
49941    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49942$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49943
49944    # Reset to default value
49945    FREETYPE_BASE_NAME=freetype
49946    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49947    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49948      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49949          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49950        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49951        # for the .6 version explicitly.
49952        FREETYPE_BASE_NAME=freetype.6
49953        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49954        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49955$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49956      else
49957        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49958$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49959        FOUND_FREETYPE=no
49960      fi
49961    else
49962      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49963        # On Windows, we will need both .lib and .dll file.
49964        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49965          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49966$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49967          FOUND_FREETYPE=no
49968        fi
49969      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49970          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49971        # Found lib in isa dir, use that instead.
49972        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49973        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49974$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49975      fi
49976    fi
49977  fi
49978
49979  if test "x$FOUND_FREETYPE" = xyes; then
49980
49981  # Only process if variable expands to non-empty
49982
49983  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49984    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49985
49986  # Input might be given as Windows format, start by converting to
49987  # unix format.
49988  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49989  new_path=`$CYGPATH -u "$path"`
49990
49991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49994  # "foo.exe" is OK but "foo" is an error.
49995  #
49996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49997  # It is also a way to make sure we got the proper file name for the real test later on.
49998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49999  if test "x$test_shortpath" = x; then
50000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50001$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50002    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50003  fi
50004
50005  # Call helper function which possibly converts this using DOS-style short mode.
50006  # If so, the updated path is stored in $new_path.
50007
50008  input_path="$new_path"
50009  # Check if we need to convert this using DOS-style short mode. If the path
50010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50011  # take no chances and rewrite it.
50012  # Note: m4 eats our [], so we need to use [ and ] instead.
50013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50014  if test "x$has_forbidden_chars" != x; then
50015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50019      # Going to short mode and back again did indeed matter. Since short mode is
50020      # case insensitive, let's make it lowercase to improve readability.
50021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50022      # Now convert it back to Unix-style (cygpath)
50023      input_path=`$CYGPATH -u "$shortmode_path"`
50024      new_path="$input_path"
50025    fi
50026  fi
50027
50028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50029  if test "x$test_cygdrive_prefix" = x; then
50030    # As a simple fix, exclude /usr/bin since it's not a real path.
50031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50033      # a path prefixed by /cygdrive for fixpath to work.
50034      new_path="$CYGWIN_ROOT_PATH$input_path"
50035    fi
50036  fi
50037
50038
50039  if test "x$path" != "x$new_path"; then
50040    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50042$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50043  fi
50044
50045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50046
50047  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50048  has_colon=`$ECHO $path | $GREP ^.:`
50049  new_path="$path"
50050  if test "x$has_colon" = x; then
50051    # Not in mixed or Windows style, start by that.
50052    new_path=`cmd //c echo $path`
50053  fi
50054
50055
50056  input_path="$new_path"
50057  # Check if we need to convert this using DOS-style short mode. If the path
50058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50059  # take no chances and rewrite it.
50060  # Note: m4 eats our [], so we need to use [ and ] instead.
50061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50062  if test "x$has_forbidden_chars" != x; then
50063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50065  fi
50066
50067
50068  windows_path="$new_path"
50069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50070    unix_path=`$CYGPATH -u "$windows_path"`
50071    new_path="$unix_path"
50072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50074    new_path="$unix_path"
50075  fi
50076
50077  if test "x$path" != "x$new_path"; then
50078    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50080$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50081  fi
50082
50083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50085
50086    else
50087      # We're on a unix platform. Hooray! :)
50088      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50089      has_space=`$ECHO "$path" | $GREP " "`
50090      if test "x$has_space" != x; then
50091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50092$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50093        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50094      fi
50095
50096      # Use eval to expand a potential ~
50097      eval path="$path"
50098      if test ! -f "$path" && test ! -d "$path"; then
50099        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50100      fi
50101
50102      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50103    fi
50104  fi
50105
50106
50107  # Only process if variable expands to non-empty
50108
50109  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50111
50112  # Input might be given as Windows format, start by converting to
50113  # unix format.
50114  path="$POTENTIAL_FREETYPE_LIB_PATH"
50115  new_path=`$CYGPATH -u "$path"`
50116
50117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50120  # "foo.exe" is OK but "foo" is an error.
50121  #
50122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50123  # It is also a way to make sure we got the proper file name for the real test later on.
50124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50125  if test "x$test_shortpath" = x; then
50126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50127$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50128    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50129  fi
50130
50131  # Call helper function which possibly converts this using DOS-style short mode.
50132  # If so, the updated path is stored in $new_path.
50133
50134  input_path="$new_path"
50135  # Check if we need to convert this using DOS-style short mode. If the path
50136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50137  # take no chances and rewrite it.
50138  # Note: m4 eats our [], so we need to use [ and ] instead.
50139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50140  if test "x$has_forbidden_chars" != x; then
50141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50145      # Going to short mode and back again did indeed matter. Since short mode is
50146      # case insensitive, let's make it lowercase to improve readability.
50147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50148      # Now convert it back to Unix-style (cygpath)
50149      input_path=`$CYGPATH -u "$shortmode_path"`
50150      new_path="$input_path"
50151    fi
50152  fi
50153
50154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50155  if test "x$test_cygdrive_prefix" = x; then
50156    # As a simple fix, exclude /usr/bin since it's not a real path.
50157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50159      # a path prefixed by /cygdrive for fixpath to work.
50160      new_path="$CYGWIN_ROOT_PATH$input_path"
50161    fi
50162  fi
50163
50164
50165  if test "x$path" != "x$new_path"; then
50166    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50168$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50169  fi
50170
50171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50172
50173  path="$POTENTIAL_FREETYPE_LIB_PATH"
50174  has_colon=`$ECHO $path | $GREP ^.:`
50175  new_path="$path"
50176  if test "x$has_colon" = x; then
50177    # Not in mixed or Windows style, start by that.
50178    new_path=`cmd //c echo $path`
50179  fi
50180
50181
50182  input_path="$new_path"
50183  # Check if we need to convert this using DOS-style short mode. If the path
50184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50185  # take no chances and rewrite it.
50186  # Note: m4 eats our [], so we need to use [ and ] instead.
50187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50188  if test "x$has_forbidden_chars" != x; then
50189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50191  fi
50192
50193
50194  windows_path="$new_path"
50195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50196    unix_path=`$CYGPATH -u "$windows_path"`
50197    new_path="$unix_path"
50198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50200    new_path="$unix_path"
50201  fi
50202
50203  if test "x$path" != "x$new_path"; then
50204    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50206$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50207  fi
50208
50209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50211
50212    else
50213      # We're on a unix platform. Hooray! :)
50214      path="$POTENTIAL_FREETYPE_LIB_PATH"
50215      has_space=`$ECHO "$path" | $GREP " "`
50216      if test "x$has_space" != x; then
50217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50218$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50220      fi
50221
50222      # Use eval to expand a potential ~
50223      eval path="$path"
50224      if test ! -f "$path" && test ! -d "$path"; then
50225        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50226      fi
50227
50228      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50229    fi
50230  fi
50231
50232
50233    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50235$as_echo_n "checking for freetype includes... " >&6; }
50236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50237$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50238    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50240$as_echo_n "checking for freetype libraries... " >&6; }
50241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50242$as_echo "$FREETYPE_LIB_PATH" >&6; }
50243  fi
50244
50245        if test "x$FOUND_FREETYPE" != xyes; then
50246          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
50247        fi
50248      else
50249        # User specified only one of lib or include. This is an error.
50250        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
50251          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
50252$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
50253          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50254        else
50255          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
50256$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
50257          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50258        fi
50259      fi
50260    else
50261      # User did not specify settings, but we need freetype. Try to locate it.
50262
50263      if test "x$BUNDLE_FREETYPE" = x; then
50264        # If not specified, default is to bundle freetype only on windows
50265        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50266          BUNDLE_FREETYPE=yes
50267        else
50268          BUNDLE_FREETYPE=no
50269        fi
50270      fi
50271
50272      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
50273      if test "x$SYSROOT" = x; then
50274        if test "x$FOUND_FREETYPE" != xyes; then
50275          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
50276          if test "x$PKG_CONFIG" != x; then
50277
50278pkg_failed=no
50279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
50280$as_echo_n "checking for FREETYPE... " >&6; }
50281
50282if test -n "$FREETYPE_CFLAGS"; then
50283    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
50284 elif test -n "$PKG_CONFIG"; then
50285    if test -n "$PKG_CONFIG" && \
50286    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50287  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50288  ac_status=$?
50289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50290  test $ac_status = 0; }; then
50291  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
50292else
50293  pkg_failed=yes
50294fi
50295 else
50296    pkg_failed=untried
50297fi
50298if test -n "$FREETYPE_LIBS"; then
50299    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
50300 elif test -n "$PKG_CONFIG"; then
50301    if test -n "$PKG_CONFIG" && \
50302    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50303  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50304  ac_status=$?
50305  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50306  test $ac_status = 0; }; then
50307  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
50308else
50309  pkg_failed=yes
50310fi
50311 else
50312    pkg_failed=untried
50313fi
50314
50315
50316
50317if test $pkg_failed = yes; then
50318
50319if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50320        _pkg_short_errors_supported=yes
50321else
50322        _pkg_short_errors_supported=no
50323fi
50324        if test $_pkg_short_errors_supported = yes; then
50325	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
50326        else
50327	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
50328        fi
50329	# Put the nasty error message in config.log where it belongs
50330	echo "$FREETYPE_PKG_ERRORS" >&5
50331
50332	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50333$as_echo "no" >&6; }
50334                FOUND_FREETYPE=no
50335elif test $pkg_failed = untried; then
50336	FOUND_FREETYPE=no
50337else
50338	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
50339	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
50340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50341$as_echo "yes" >&6; }
50342	FOUND_FREETYPE=yes
50343fi
50344            if test "x$FOUND_FREETYPE" = xyes; then
50345              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
50346              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
50347              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
50348              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50349                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
50350              fi
50351              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
50352              if test "x$BUNDLE_FREETYPE" = xyes; then
50353                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
50354$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
50355                FOUND_FREETYPE=no
50356              else
50357                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
50358$as_echo_n "checking for freetype... " >&6; }
50359                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
50360$as_echo "yes (using pkg-config)" >&6; }
50361              fi
50362            fi
50363          fi
50364        fi
50365      fi
50366
50367      if test "x$FOUND_FREETYPE" != xyes; then
50368        # Check in well-known locations
50369        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50370          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
50371
50372  windows_path="$FREETYPE_BASE_DIR"
50373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50374    unix_path=`$CYGPATH -u "$windows_path"`
50375    FREETYPE_BASE_DIR="$unix_path"
50376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50378    FREETYPE_BASE_DIR="$unix_path"
50379  fi
50380
50381
50382  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50383  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50384  METHOD="well-known location"
50385
50386  # Let's start with an optimistic view of the world :-)
50387  FOUND_FREETYPE=yes
50388
50389  # First look for the canonical freetype main include file ft2build.h.
50390  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50391    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50392    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50393    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50394      # Fail.
50395      FOUND_FREETYPE=no
50396    fi
50397  fi
50398
50399  if test "x$FOUND_FREETYPE" = xyes; then
50400    # Include file found, let's continue the sanity check.
50401    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50402$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50403
50404    # Reset to default value
50405    FREETYPE_BASE_NAME=freetype
50406    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50407    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50408      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50409          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50410        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50411        # for the .6 version explicitly.
50412        FREETYPE_BASE_NAME=freetype.6
50413        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50414        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50415$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50416      else
50417        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50418$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50419        FOUND_FREETYPE=no
50420      fi
50421    else
50422      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50423        # On Windows, we will need both .lib and .dll file.
50424        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50425          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50426$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50427          FOUND_FREETYPE=no
50428        fi
50429      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50430          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50431        # Found lib in isa dir, use that instead.
50432        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50433        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50434$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50435      fi
50436    fi
50437  fi
50438
50439  if test "x$FOUND_FREETYPE" = xyes; then
50440
50441  # Only process if variable expands to non-empty
50442
50443  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50445
50446  # Input might be given as Windows format, start by converting to
50447  # unix format.
50448  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50449  new_path=`$CYGPATH -u "$path"`
50450
50451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50454  # "foo.exe" is OK but "foo" is an error.
50455  #
50456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50457  # It is also a way to make sure we got the proper file name for the real test later on.
50458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50459  if test "x$test_shortpath" = x; then
50460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50461$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50462    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50463  fi
50464
50465  # Call helper function which possibly converts this using DOS-style short mode.
50466  # If so, the updated path is stored in $new_path.
50467
50468  input_path="$new_path"
50469  # Check if we need to convert this using DOS-style short mode. If the path
50470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50471  # take no chances and rewrite it.
50472  # Note: m4 eats our [], so we need to use [ and ] instead.
50473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50474  if test "x$has_forbidden_chars" != x; then
50475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50479      # Going to short mode and back again did indeed matter. Since short mode is
50480      # case insensitive, let's make it lowercase to improve readability.
50481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50482      # Now convert it back to Unix-style (cygpath)
50483      input_path=`$CYGPATH -u "$shortmode_path"`
50484      new_path="$input_path"
50485    fi
50486  fi
50487
50488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50489  if test "x$test_cygdrive_prefix" = x; then
50490    # As a simple fix, exclude /usr/bin since it's not a real path.
50491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50493      # a path prefixed by /cygdrive for fixpath to work.
50494      new_path="$CYGWIN_ROOT_PATH$input_path"
50495    fi
50496  fi
50497
50498
50499  if test "x$path" != "x$new_path"; then
50500    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50502$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50503  fi
50504
50505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50506
50507  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50508  has_colon=`$ECHO $path | $GREP ^.:`
50509  new_path="$path"
50510  if test "x$has_colon" = x; then
50511    # Not in mixed or Windows style, start by that.
50512    new_path=`cmd //c echo $path`
50513  fi
50514
50515
50516  input_path="$new_path"
50517  # Check if we need to convert this using DOS-style short mode. If the path
50518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50519  # take no chances and rewrite it.
50520  # Note: m4 eats our [], so we need to use [ and ] instead.
50521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50522  if test "x$has_forbidden_chars" != x; then
50523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50525  fi
50526
50527
50528  windows_path="$new_path"
50529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50530    unix_path=`$CYGPATH -u "$windows_path"`
50531    new_path="$unix_path"
50532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50534    new_path="$unix_path"
50535  fi
50536
50537  if test "x$path" != "x$new_path"; then
50538    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50540$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50541  fi
50542
50543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50545
50546    else
50547      # We're on a unix platform. Hooray! :)
50548      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50549      has_space=`$ECHO "$path" | $GREP " "`
50550      if test "x$has_space" != x; then
50551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50554      fi
50555
50556      # Use eval to expand a potential ~
50557      eval path="$path"
50558      if test ! -f "$path" && test ! -d "$path"; then
50559        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50560      fi
50561
50562      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50563    fi
50564  fi
50565
50566
50567  # Only process if variable expands to non-empty
50568
50569  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50571
50572  # Input might be given as Windows format, start by converting to
50573  # unix format.
50574  path="$POTENTIAL_FREETYPE_LIB_PATH"
50575  new_path=`$CYGPATH -u "$path"`
50576
50577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50580  # "foo.exe" is OK but "foo" is an error.
50581  #
50582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50583  # It is also a way to make sure we got the proper file name for the real test later on.
50584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50585  if test "x$test_shortpath" = x; then
50586    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50587$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50588    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50589  fi
50590
50591  # Call helper function which possibly converts this using DOS-style short mode.
50592  # If so, the updated path is stored in $new_path.
50593
50594  input_path="$new_path"
50595  # Check if we need to convert this using DOS-style short mode. If the path
50596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50597  # take no chances and rewrite it.
50598  # Note: m4 eats our [], so we need to use [ and ] instead.
50599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50600  if test "x$has_forbidden_chars" != x; then
50601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50605      # Going to short mode and back again did indeed matter. Since short mode is
50606      # case insensitive, let's make it lowercase to improve readability.
50607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50608      # Now convert it back to Unix-style (cygpath)
50609      input_path=`$CYGPATH -u "$shortmode_path"`
50610      new_path="$input_path"
50611    fi
50612  fi
50613
50614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50615  if test "x$test_cygdrive_prefix" = x; then
50616    # As a simple fix, exclude /usr/bin since it's not a real path.
50617    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50619      # a path prefixed by /cygdrive for fixpath to work.
50620      new_path="$CYGWIN_ROOT_PATH$input_path"
50621    fi
50622  fi
50623
50624
50625  if test "x$path" != "x$new_path"; then
50626    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50628$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50629  fi
50630
50631    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50632
50633  path="$POTENTIAL_FREETYPE_LIB_PATH"
50634  has_colon=`$ECHO $path | $GREP ^.:`
50635  new_path="$path"
50636  if test "x$has_colon" = x; then
50637    # Not in mixed or Windows style, start by that.
50638    new_path=`cmd //c echo $path`
50639  fi
50640
50641
50642  input_path="$new_path"
50643  # Check if we need to convert this using DOS-style short mode. If the path
50644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50645  # take no chances and rewrite it.
50646  # Note: m4 eats our [], so we need to use [ and ] instead.
50647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50648  if test "x$has_forbidden_chars" != x; then
50649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50651  fi
50652
50653
50654  windows_path="$new_path"
50655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50656    unix_path=`$CYGPATH -u "$windows_path"`
50657    new_path="$unix_path"
50658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50660    new_path="$unix_path"
50661  fi
50662
50663  if test "x$path" != "x$new_path"; then
50664    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50666$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50667  fi
50668
50669  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50670  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50671
50672    else
50673      # We're on a unix platform. Hooray! :)
50674      path="$POTENTIAL_FREETYPE_LIB_PATH"
50675      has_space=`$ECHO "$path" | $GREP " "`
50676      if test "x$has_space" != x; then
50677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50679        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50680      fi
50681
50682      # Use eval to expand a potential ~
50683      eval path="$path"
50684      if test ! -f "$path" && test ! -d "$path"; then
50685        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50686      fi
50687
50688      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50689    fi
50690  fi
50691
50692
50693    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50695$as_echo_n "checking for freetype includes... " >&6; }
50696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50697$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50698    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50700$as_echo_n "checking for freetype libraries... " >&6; }
50701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50702$as_echo "$FREETYPE_LIB_PATH" >&6; }
50703  fi
50704
50705          if test "x$FOUND_FREETYPE" != xyes; then
50706            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
50707
50708  windows_path="$FREETYPE_BASE_DIR"
50709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50710    unix_path=`$CYGPATH -u "$windows_path"`
50711    FREETYPE_BASE_DIR="$unix_path"
50712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50714    FREETYPE_BASE_DIR="$unix_path"
50715  fi
50716
50717
50718  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50719  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50720  METHOD="well-known location"
50721
50722  # Let's start with an optimistic view of the world :-)
50723  FOUND_FREETYPE=yes
50724
50725  # First look for the canonical freetype main include file ft2build.h.
50726  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50727    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50728    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50729    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50730      # Fail.
50731      FOUND_FREETYPE=no
50732    fi
50733  fi
50734
50735  if test "x$FOUND_FREETYPE" = xyes; then
50736    # Include file found, let's continue the sanity check.
50737    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50738$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50739
50740    # Reset to default value
50741    FREETYPE_BASE_NAME=freetype
50742    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50743    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50744      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50745          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50746        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50747        # for the .6 version explicitly.
50748        FREETYPE_BASE_NAME=freetype.6
50749        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50750        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50751$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50752      else
50753        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50754$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50755        FOUND_FREETYPE=no
50756      fi
50757    else
50758      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50759        # On Windows, we will need both .lib and .dll file.
50760        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50761          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50762$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50763          FOUND_FREETYPE=no
50764        fi
50765      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50766          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50767        # Found lib in isa dir, use that instead.
50768        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50769        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50770$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50771      fi
50772    fi
50773  fi
50774
50775  if test "x$FOUND_FREETYPE" = xyes; then
50776
50777  # Only process if variable expands to non-empty
50778
50779  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50781
50782  # Input might be given as Windows format, start by converting to
50783  # unix format.
50784  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50785  new_path=`$CYGPATH -u "$path"`
50786
50787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50790  # "foo.exe" is OK but "foo" is an error.
50791  #
50792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50793  # It is also a way to make sure we got the proper file name for the real test later on.
50794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50795  if test "x$test_shortpath" = x; then
50796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50798    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50799  fi
50800
50801  # Call helper function which possibly converts this using DOS-style short mode.
50802  # If so, the updated path is stored in $new_path.
50803
50804  input_path="$new_path"
50805  # Check if we need to convert this using DOS-style short mode. If the path
50806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50807  # take no chances and rewrite it.
50808  # Note: m4 eats our [], so we need to use [ and ] instead.
50809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50810  if test "x$has_forbidden_chars" != x; then
50811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50815      # Going to short mode and back again did indeed matter. Since short mode is
50816      # case insensitive, let's make it lowercase to improve readability.
50817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50818      # Now convert it back to Unix-style (cygpath)
50819      input_path=`$CYGPATH -u "$shortmode_path"`
50820      new_path="$input_path"
50821    fi
50822  fi
50823
50824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50825  if test "x$test_cygdrive_prefix" = x; then
50826    # As a simple fix, exclude /usr/bin since it's not a real path.
50827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50829      # a path prefixed by /cygdrive for fixpath to work.
50830      new_path="$CYGWIN_ROOT_PATH$input_path"
50831    fi
50832  fi
50833
50834
50835  if test "x$path" != "x$new_path"; then
50836    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50839  fi
50840
50841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50842
50843  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50844  has_colon=`$ECHO $path | $GREP ^.:`
50845  new_path="$path"
50846  if test "x$has_colon" = x; then
50847    # Not in mixed or Windows style, start by that.
50848    new_path=`cmd //c echo $path`
50849  fi
50850
50851
50852  input_path="$new_path"
50853  # Check if we need to convert this using DOS-style short mode. If the path
50854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50855  # take no chances and rewrite it.
50856  # Note: m4 eats our [], so we need to use [ and ] instead.
50857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50858  if test "x$has_forbidden_chars" != x; then
50859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50861  fi
50862
50863
50864  windows_path="$new_path"
50865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50866    unix_path=`$CYGPATH -u "$windows_path"`
50867    new_path="$unix_path"
50868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50870    new_path="$unix_path"
50871  fi
50872
50873  if test "x$path" != "x$new_path"; then
50874    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50877  fi
50878
50879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50881
50882    else
50883      # We're on a unix platform. Hooray! :)
50884      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50885      has_space=`$ECHO "$path" | $GREP " "`
50886      if test "x$has_space" != x; then
50887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50890      fi
50891
50892      # Use eval to expand a potential ~
50893      eval path="$path"
50894      if test ! -f "$path" && test ! -d "$path"; then
50895        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50896      fi
50897
50898      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50899    fi
50900  fi
50901
50902
50903  # Only process if variable expands to non-empty
50904
50905  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50906    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50907
50908  # Input might be given as Windows format, start by converting to
50909  # unix format.
50910  path="$POTENTIAL_FREETYPE_LIB_PATH"
50911  new_path=`$CYGPATH -u "$path"`
50912
50913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50916  # "foo.exe" is OK but "foo" is an error.
50917  #
50918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50919  # It is also a way to make sure we got the proper file name for the real test later on.
50920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50921  if test "x$test_shortpath" = x; then
50922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50923$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50924    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50925  fi
50926
50927  # Call helper function which possibly converts this using DOS-style short mode.
50928  # If so, the updated path is stored in $new_path.
50929
50930  input_path="$new_path"
50931  # Check if we need to convert this using DOS-style short mode. If the path
50932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50933  # take no chances and rewrite it.
50934  # Note: m4 eats our [], so we need to use [ and ] instead.
50935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50936  if test "x$has_forbidden_chars" != x; then
50937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50941      # Going to short mode and back again did indeed matter. Since short mode is
50942      # case insensitive, let's make it lowercase to improve readability.
50943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50944      # Now convert it back to Unix-style (cygpath)
50945      input_path=`$CYGPATH -u "$shortmode_path"`
50946      new_path="$input_path"
50947    fi
50948  fi
50949
50950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50951  if test "x$test_cygdrive_prefix" = x; then
50952    # As a simple fix, exclude /usr/bin since it's not a real path.
50953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50955      # a path prefixed by /cygdrive for fixpath to work.
50956      new_path="$CYGWIN_ROOT_PATH$input_path"
50957    fi
50958  fi
50959
50960
50961  if test "x$path" != "x$new_path"; then
50962    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50964$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50965  fi
50966
50967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50968
50969  path="$POTENTIAL_FREETYPE_LIB_PATH"
50970  has_colon=`$ECHO $path | $GREP ^.:`
50971  new_path="$path"
50972  if test "x$has_colon" = x; then
50973    # Not in mixed or Windows style, start by that.
50974    new_path=`cmd //c echo $path`
50975  fi
50976
50977
50978  input_path="$new_path"
50979  # Check if we need to convert this using DOS-style short mode. If the path
50980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50981  # take no chances and rewrite it.
50982  # Note: m4 eats our [], so we need to use [ and ] instead.
50983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50984  if test "x$has_forbidden_chars" != x; then
50985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50987  fi
50988
50989
50990  windows_path="$new_path"
50991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50992    unix_path=`$CYGPATH -u "$windows_path"`
50993    new_path="$unix_path"
50994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50996    new_path="$unix_path"
50997  fi
50998
50999  if test "x$path" != "x$new_path"; then
51000    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51002$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51003  fi
51004
51005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51007
51008    else
51009      # We're on a unix platform. Hooray! :)
51010      path="$POTENTIAL_FREETYPE_LIB_PATH"
51011      has_space=`$ECHO "$path" | $GREP " "`
51012      if test "x$has_space" != x; then
51013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51014$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51015        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51016      fi
51017
51018      # Use eval to expand a potential ~
51019      eval path="$path"
51020      if test ! -f "$path" && test ! -d "$path"; then
51021        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51022      fi
51023
51024      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51025    fi
51026  fi
51027
51028
51029    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51031$as_echo_n "checking for freetype includes... " >&6; }
51032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51033$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51034    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51036$as_echo_n "checking for freetype libraries... " >&6; }
51037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51038$as_echo "$FREETYPE_LIB_PATH" >&6; }
51039  fi
51040
51041          fi
51042        else
51043          FREETYPE_BASE_DIR="$SYSROOT/usr"
51044
51045  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51046  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51047  METHOD="well-known location"
51048
51049  # Let's start with an optimistic view of the world :-)
51050  FOUND_FREETYPE=yes
51051
51052  # First look for the canonical freetype main include file ft2build.h.
51053  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51054    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51055    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51056    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51057      # Fail.
51058      FOUND_FREETYPE=no
51059    fi
51060  fi
51061
51062  if test "x$FOUND_FREETYPE" = xyes; then
51063    # Include file found, let's continue the sanity check.
51064    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51065$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51066
51067    # Reset to default value
51068    FREETYPE_BASE_NAME=freetype
51069    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51070    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51071      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51072          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51073        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51074        # for the .6 version explicitly.
51075        FREETYPE_BASE_NAME=freetype.6
51076        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51077        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51078$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51079      else
51080        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51081$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51082        FOUND_FREETYPE=no
51083      fi
51084    else
51085      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51086        # On Windows, we will need both .lib and .dll file.
51087        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51088          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51089$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51090          FOUND_FREETYPE=no
51091        fi
51092      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51093          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51094        # Found lib in isa dir, use that instead.
51095        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51096        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51097$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51098      fi
51099    fi
51100  fi
51101
51102  if test "x$FOUND_FREETYPE" = xyes; then
51103
51104  # Only process if variable expands to non-empty
51105
51106  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51108
51109  # Input might be given as Windows format, start by converting to
51110  # unix format.
51111  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51112  new_path=`$CYGPATH -u "$path"`
51113
51114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51117  # "foo.exe" is OK but "foo" is an error.
51118  #
51119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51120  # It is also a way to make sure we got the proper file name for the real test later on.
51121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51122  if test "x$test_shortpath" = x; then
51123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51124$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51125    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51126  fi
51127
51128  # Call helper function which possibly converts this using DOS-style short mode.
51129  # If so, the updated path is stored in $new_path.
51130
51131  input_path="$new_path"
51132  # Check if we need to convert this using DOS-style short mode. If the path
51133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51134  # take no chances and rewrite it.
51135  # Note: m4 eats our [], so we need to use [ and ] instead.
51136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51137  if test "x$has_forbidden_chars" != x; then
51138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51142      # Going to short mode and back again did indeed matter. Since short mode is
51143      # case insensitive, let's make it lowercase to improve readability.
51144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51145      # Now convert it back to Unix-style (cygpath)
51146      input_path=`$CYGPATH -u "$shortmode_path"`
51147      new_path="$input_path"
51148    fi
51149  fi
51150
51151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51152  if test "x$test_cygdrive_prefix" = x; then
51153    # As a simple fix, exclude /usr/bin since it's not a real path.
51154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51156      # a path prefixed by /cygdrive for fixpath to work.
51157      new_path="$CYGWIN_ROOT_PATH$input_path"
51158    fi
51159  fi
51160
51161
51162  if test "x$path" != "x$new_path"; then
51163    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51166  fi
51167
51168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51169
51170  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51171  has_colon=`$ECHO $path | $GREP ^.:`
51172  new_path="$path"
51173  if test "x$has_colon" = x; then
51174    # Not in mixed or Windows style, start by that.
51175    new_path=`cmd //c echo $path`
51176  fi
51177
51178
51179  input_path="$new_path"
51180  # Check if we need to convert this using DOS-style short mode. If the path
51181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51182  # take no chances and rewrite it.
51183  # Note: m4 eats our [], so we need to use [ and ] instead.
51184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51185  if test "x$has_forbidden_chars" != x; then
51186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51188  fi
51189
51190
51191  windows_path="$new_path"
51192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51193    unix_path=`$CYGPATH -u "$windows_path"`
51194    new_path="$unix_path"
51195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51197    new_path="$unix_path"
51198  fi
51199
51200  if test "x$path" != "x$new_path"; then
51201    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51203$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51204  fi
51205
51206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51208
51209    else
51210      # We're on a unix platform. Hooray! :)
51211      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51212      has_space=`$ECHO "$path" | $GREP " "`
51213      if test "x$has_space" != x; then
51214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51216        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51217      fi
51218
51219      # Use eval to expand a potential ~
51220      eval path="$path"
51221      if test ! -f "$path" && test ! -d "$path"; then
51222        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51223      fi
51224
51225      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51226    fi
51227  fi
51228
51229
51230  # Only process if variable expands to non-empty
51231
51232  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51234
51235  # Input might be given as Windows format, start by converting to
51236  # unix format.
51237  path="$POTENTIAL_FREETYPE_LIB_PATH"
51238  new_path=`$CYGPATH -u "$path"`
51239
51240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51243  # "foo.exe" is OK but "foo" is an error.
51244  #
51245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51246  # It is also a way to make sure we got the proper file name for the real test later on.
51247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51248  if test "x$test_shortpath" = x; then
51249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51250$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51251    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51252  fi
51253
51254  # Call helper function which possibly converts this using DOS-style short mode.
51255  # If so, the updated path is stored in $new_path.
51256
51257  input_path="$new_path"
51258  # Check if we need to convert this using DOS-style short mode. If the path
51259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51260  # take no chances and rewrite it.
51261  # Note: m4 eats our [], so we need to use [ and ] instead.
51262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51263  if test "x$has_forbidden_chars" != x; then
51264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51268      # Going to short mode and back again did indeed matter. Since short mode is
51269      # case insensitive, let's make it lowercase to improve readability.
51270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51271      # Now convert it back to Unix-style (cygpath)
51272      input_path=`$CYGPATH -u "$shortmode_path"`
51273      new_path="$input_path"
51274    fi
51275  fi
51276
51277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51278  if test "x$test_cygdrive_prefix" = x; then
51279    # As a simple fix, exclude /usr/bin since it's not a real path.
51280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51282      # a path prefixed by /cygdrive for fixpath to work.
51283      new_path="$CYGWIN_ROOT_PATH$input_path"
51284    fi
51285  fi
51286
51287
51288  if test "x$path" != "x$new_path"; then
51289    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51292  fi
51293
51294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51295
51296  path="$POTENTIAL_FREETYPE_LIB_PATH"
51297  has_colon=`$ECHO $path | $GREP ^.:`
51298  new_path="$path"
51299  if test "x$has_colon" = x; then
51300    # Not in mixed or Windows style, start by that.
51301    new_path=`cmd //c echo $path`
51302  fi
51303
51304
51305  input_path="$new_path"
51306  # Check if we need to convert this using DOS-style short mode. If the path
51307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51308  # take no chances and rewrite it.
51309  # Note: m4 eats our [], so we need to use [ and ] instead.
51310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51311  if test "x$has_forbidden_chars" != x; then
51312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51314  fi
51315
51316
51317  windows_path="$new_path"
51318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51319    unix_path=`$CYGPATH -u "$windows_path"`
51320    new_path="$unix_path"
51321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51323    new_path="$unix_path"
51324  fi
51325
51326  if test "x$path" != "x$new_path"; then
51327    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51330  fi
51331
51332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51334
51335    else
51336      # We're on a unix platform. Hooray! :)
51337      path="$POTENTIAL_FREETYPE_LIB_PATH"
51338      has_space=`$ECHO "$path" | $GREP " "`
51339      if test "x$has_space" != x; then
51340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51343      fi
51344
51345      # Use eval to expand a potential ~
51346      eval path="$path"
51347      if test ! -f "$path" && test ! -d "$path"; then
51348        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51349      fi
51350
51351      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51352    fi
51353  fi
51354
51355
51356    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51358$as_echo_n "checking for freetype includes... " >&6; }
51359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51360$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51361    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51363$as_echo_n "checking for freetype libraries... " >&6; }
51364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51365$as_echo "$FREETYPE_LIB_PATH" >&6; }
51366  fi
51367
51368
51369          if test "x$FOUND_FREETYPE" != xyes; then
51370            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
51371
51372  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51373  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51374  METHOD="well-known location"
51375
51376  # Let's start with an optimistic view of the world :-)
51377  FOUND_FREETYPE=yes
51378
51379  # First look for the canonical freetype main include file ft2build.h.
51380  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51381    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51382    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51383    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51384      # Fail.
51385      FOUND_FREETYPE=no
51386    fi
51387  fi
51388
51389  if test "x$FOUND_FREETYPE" = xyes; then
51390    # Include file found, let's continue the sanity check.
51391    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51392$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51393
51394    # Reset to default value
51395    FREETYPE_BASE_NAME=freetype
51396    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51397    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51398      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51399          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51400        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51401        # for the .6 version explicitly.
51402        FREETYPE_BASE_NAME=freetype.6
51403        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51404        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51405$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51406      else
51407        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51408$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51409        FOUND_FREETYPE=no
51410      fi
51411    else
51412      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51413        # On Windows, we will need both .lib and .dll file.
51414        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51415          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51417          FOUND_FREETYPE=no
51418        fi
51419      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51420          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51421        # Found lib in isa dir, use that instead.
51422        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51423        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51424$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51425      fi
51426    fi
51427  fi
51428
51429  if test "x$FOUND_FREETYPE" = xyes; then
51430
51431  # Only process if variable expands to non-empty
51432
51433  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51435
51436  # Input might be given as Windows format, start by converting to
51437  # unix format.
51438  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51439  new_path=`$CYGPATH -u "$path"`
51440
51441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51444  # "foo.exe" is OK but "foo" is an error.
51445  #
51446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51447  # It is also a way to make sure we got the proper file name for the real test later on.
51448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51449  if test "x$test_shortpath" = x; then
51450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51452    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51453  fi
51454
51455  # Call helper function which possibly converts this using DOS-style short mode.
51456  # If so, the updated path is stored in $new_path.
51457
51458  input_path="$new_path"
51459  # Check if we need to convert this using DOS-style short mode. If the path
51460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51461  # take no chances and rewrite it.
51462  # Note: m4 eats our [], so we need to use [ and ] instead.
51463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51464  if test "x$has_forbidden_chars" != x; then
51465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51469      # Going to short mode and back again did indeed matter. Since short mode is
51470      # case insensitive, let's make it lowercase to improve readability.
51471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51472      # Now convert it back to Unix-style (cygpath)
51473      input_path=`$CYGPATH -u "$shortmode_path"`
51474      new_path="$input_path"
51475    fi
51476  fi
51477
51478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51479  if test "x$test_cygdrive_prefix" = x; then
51480    # As a simple fix, exclude /usr/bin since it's not a real path.
51481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51483      # a path prefixed by /cygdrive for fixpath to work.
51484      new_path="$CYGWIN_ROOT_PATH$input_path"
51485    fi
51486  fi
51487
51488
51489  if test "x$path" != "x$new_path"; then
51490    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51493  fi
51494
51495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51496
51497  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51498  has_colon=`$ECHO $path | $GREP ^.:`
51499  new_path="$path"
51500  if test "x$has_colon" = x; then
51501    # Not in mixed or Windows style, start by that.
51502    new_path=`cmd //c echo $path`
51503  fi
51504
51505
51506  input_path="$new_path"
51507  # Check if we need to convert this using DOS-style short mode. If the path
51508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51509  # take no chances and rewrite it.
51510  # Note: m4 eats our [], so we need to use [ and ] instead.
51511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51512  if test "x$has_forbidden_chars" != x; then
51513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51515  fi
51516
51517
51518  windows_path="$new_path"
51519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51520    unix_path=`$CYGPATH -u "$windows_path"`
51521    new_path="$unix_path"
51522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51524    new_path="$unix_path"
51525  fi
51526
51527  if test "x$path" != "x$new_path"; then
51528    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51531  fi
51532
51533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51535
51536    else
51537      # We're on a unix platform. Hooray! :)
51538      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51539      has_space=`$ECHO "$path" | $GREP " "`
51540      if test "x$has_space" != x; then
51541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51544      fi
51545
51546      # Use eval to expand a potential ~
51547      eval path="$path"
51548      if test ! -f "$path" && test ! -d "$path"; then
51549        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51550      fi
51551
51552      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51553    fi
51554  fi
51555
51556
51557  # Only process if variable expands to non-empty
51558
51559  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51561
51562  # Input might be given as Windows format, start by converting to
51563  # unix format.
51564  path="$POTENTIAL_FREETYPE_LIB_PATH"
51565  new_path=`$CYGPATH -u "$path"`
51566
51567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51570  # "foo.exe" is OK but "foo" is an error.
51571  #
51572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51573  # It is also a way to make sure we got the proper file name for the real test later on.
51574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51575  if test "x$test_shortpath" = x; then
51576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51577$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51578    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51579  fi
51580
51581  # Call helper function which possibly converts this using DOS-style short mode.
51582  # If so, the updated path is stored in $new_path.
51583
51584  input_path="$new_path"
51585  # Check if we need to convert this using DOS-style short mode. If the path
51586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51587  # take no chances and rewrite it.
51588  # Note: m4 eats our [], so we need to use [ and ] instead.
51589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51590  if test "x$has_forbidden_chars" != x; then
51591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51595      # Going to short mode and back again did indeed matter. Since short mode is
51596      # case insensitive, let's make it lowercase to improve readability.
51597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51598      # Now convert it back to Unix-style (cygpath)
51599      input_path=`$CYGPATH -u "$shortmode_path"`
51600      new_path="$input_path"
51601    fi
51602  fi
51603
51604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51605  if test "x$test_cygdrive_prefix" = x; then
51606    # As a simple fix, exclude /usr/bin since it's not a real path.
51607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51609      # a path prefixed by /cygdrive for fixpath to work.
51610      new_path="$CYGWIN_ROOT_PATH$input_path"
51611    fi
51612  fi
51613
51614
51615  if test "x$path" != "x$new_path"; then
51616    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51618$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51619  fi
51620
51621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51622
51623  path="$POTENTIAL_FREETYPE_LIB_PATH"
51624  has_colon=`$ECHO $path | $GREP ^.:`
51625  new_path="$path"
51626  if test "x$has_colon" = x; then
51627    # Not in mixed or Windows style, start by that.
51628    new_path=`cmd //c echo $path`
51629  fi
51630
51631
51632  input_path="$new_path"
51633  # Check if we need to convert this using DOS-style short mode. If the path
51634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51635  # take no chances and rewrite it.
51636  # Note: m4 eats our [], so we need to use [ and ] instead.
51637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51638  if test "x$has_forbidden_chars" != x; then
51639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51641  fi
51642
51643
51644  windows_path="$new_path"
51645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51646    unix_path=`$CYGPATH -u "$windows_path"`
51647    new_path="$unix_path"
51648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51650    new_path="$unix_path"
51651  fi
51652
51653  if test "x$path" != "x$new_path"; then
51654    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51656$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51657  fi
51658
51659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51661
51662    else
51663      # We're on a unix platform. Hooray! :)
51664      path="$POTENTIAL_FREETYPE_LIB_PATH"
51665      has_space=`$ECHO "$path" | $GREP " "`
51666      if test "x$has_space" != x; then
51667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51668$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51669        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51670      fi
51671
51672      # Use eval to expand a potential ~
51673      eval path="$path"
51674      if test ! -f "$path" && test ! -d "$path"; then
51675        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51676      fi
51677
51678      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51679    fi
51680  fi
51681
51682
51683    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51685$as_echo_n "checking for freetype includes... " >&6; }
51686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51687$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51688    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51689    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51690$as_echo_n "checking for freetype libraries... " >&6; }
51691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51692$as_echo "$FREETYPE_LIB_PATH" >&6; }
51693  fi
51694
51695          fi
51696
51697          if test "x$FOUND_FREETYPE" != xyes; then
51698            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
51699
51700  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51701  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51702  METHOD="well-known location"
51703
51704  # Let's start with an optimistic view of the world :-)
51705  FOUND_FREETYPE=yes
51706
51707  # First look for the canonical freetype main include file ft2build.h.
51708  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51709    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51710    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51711    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51712      # Fail.
51713      FOUND_FREETYPE=no
51714    fi
51715  fi
51716
51717  if test "x$FOUND_FREETYPE" = xyes; then
51718    # Include file found, let's continue the sanity check.
51719    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51720$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51721
51722    # Reset to default value
51723    FREETYPE_BASE_NAME=freetype
51724    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51725    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51726      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51727          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51728        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51729        # for the .6 version explicitly.
51730        FREETYPE_BASE_NAME=freetype.6
51731        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51732        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51733$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51734      else
51735        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51736$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51737        FOUND_FREETYPE=no
51738      fi
51739    else
51740      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51741        # On Windows, we will need both .lib and .dll file.
51742        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51743          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51744$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51745          FOUND_FREETYPE=no
51746        fi
51747      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51748          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51749        # Found lib in isa dir, use that instead.
51750        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51751        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51752$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51753      fi
51754    fi
51755  fi
51756
51757  if test "x$FOUND_FREETYPE" = xyes; then
51758
51759  # Only process if variable expands to non-empty
51760
51761  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51763
51764  # Input might be given as Windows format, start by converting to
51765  # unix format.
51766  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51767  new_path=`$CYGPATH -u "$path"`
51768
51769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51772  # "foo.exe" is OK but "foo" is an error.
51773  #
51774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51775  # It is also a way to make sure we got the proper file name for the real test later on.
51776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51777  if test "x$test_shortpath" = x; then
51778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51779$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51780    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51781  fi
51782
51783  # Call helper function which possibly converts this using DOS-style short mode.
51784  # If so, the updated path is stored in $new_path.
51785
51786  input_path="$new_path"
51787  # Check if we need to convert this using DOS-style short mode. If the path
51788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51789  # take no chances and rewrite it.
51790  # Note: m4 eats our [], so we need to use [ and ] instead.
51791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51792  if test "x$has_forbidden_chars" != x; then
51793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51797      # Going to short mode and back again did indeed matter. Since short mode is
51798      # case insensitive, let's make it lowercase to improve readability.
51799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51800      # Now convert it back to Unix-style (cygpath)
51801      input_path=`$CYGPATH -u "$shortmode_path"`
51802      new_path="$input_path"
51803    fi
51804  fi
51805
51806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51807  if test "x$test_cygdrive_prefix" = x; then
51808    # As a simple fix, exclude /usr/bin since it's not a real path.
51809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51811      # a path prefixed by /cygdrive for fixpath to work.
51812      new_path="$CYGWIN_ROOT_PATH$input_path"
51813    fi
51814  fi
51815
51816
51817  if test "x$path" != "x$new_path"; then
51818    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51820$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51821  fi
51822
51823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51824
51825  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51826  has_colon=`$ECHO $path | $GREP ^.:`
51827  new_path="$path"
51828  if test "x$has_colon" = x; then
51829    # Not in mixed or Windows style, start by that.
51830    new_path=`cmd //c echo $path`
51831  fi
51832
51833
51834  input_path="$new_path"
51835  # Check if we need to convert this using DOS-style short mode. If the path
51836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51837  # take no chances and rewrite it.
51838  # Note: m4 eats our [], so we need to use [ and ] instead.
51839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51840  if test "x$has_forbidden_chars" != x; then
51841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51843  fi
51844
51845
51846  windows_path="$new_path"
51847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51848    unix_path=`$CYGPATH -u "$windows_path"`
51849    new_path="$unix_path"
51850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51852    new_path="$unix_path"
51853  fi
51854
51855  if test "x$path" != "x$new_path"; then
51856    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51858$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51859  fi
51860
51861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51863
51864    else
51865      # We're on a unix platform. Hooray! :)
51866      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51867      has_space=`$ECHO "$path" | $GREP " "`
51868      if test "x$has_space" != x; then
51869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51870$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51871        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51872      fi
51873
51874      # Use eval to expand a potential ~
51875      eval path="$path"
51876      if test ! -f "$path" && test ! -d "$path"; then
51877        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51878      fi
51879
51880      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51881    fi
51882  fi
51883
51884
51885  # Only process if variable expands to non-empty
51886
51887  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51889
51890  # Input might be given as Windows format, start by converting to
51891  # unix format.
51892  path="$POTENTIAL_FREETYPE_LIB_PATH"
51893  new_path=`$CYGPATH -u "$path"`
51894
51895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51898  # "foo.exe" is OK but "foo" is an error.
51899  #
51900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51901  # It is also a way to make sure we got the proper file name for the real test later on.
51902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51903  if test "x$test_shortpath" = x; then
51904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51907  fi
51908
51909  # Call helper function which possibly converts this using DOS-style short mode.
51910  # If so, the updated path is stored in $new_path.
51911
51912  input_path="$new_path"
51913  # Check if we need to convert this using DOS-style short mode. If the path
51914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51915  # take no chances and rewrite it.
51916  # Note: m4 eats our [], so we need to use [ and ] instead.
51917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51918  if test "x$has_forbidden_chars" != x; then
51919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51923      # Going to short mode and back again did indeed matter. Since short mode is
51924      # case insensitive, let's make it lowercase to improve readability.
51925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51926      # Now convert it back to Unix-style (cygpath)
51927      input_path=`$CYGPATH -u "$shortmode_path"`
51928      new_path="$input_path"
51929    fi
51930  fi
51931
51932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51933  if test "x$test_cygdrive_prefix" = x; then
51934    # As a simple fix, exclude /usr/bin since it's not a real path.
51935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51937      # a path prefixed by /cygdrive for fixpath to work.
51938      new_path="$CYGWIN_ROOT_PATH$input_path"
51939    fi
51940  fi
51941
51942
51943  if test "x$path" != "x$new_path"; then
51944    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51947  fi
51948
51949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51950
51951  path="$POTENTIAL_FREETYPE_LIB_PATH"
51952  has_colon=`$ECHO $path | $GREP ^.:`
51953  new_path="$path"
51954  if test "x$has_colon" = x; then
51955    # Not in mixed or Windows style, start by that.
51956    new_path=`cmd //c echo $path`
51957  fi
51958
51959
51960  input_path="$new_path"
51961  # Check if we need to convert this using DOS-style short mode. If the path
51962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51963  # take no chances and rewrite it.
51964  # Note: m4 eats our [], so we need to use [ and ] instead.
51965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51966  if test "x$has_forbidden_chars" != x; then
51967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51969  fi
51970
51971
51972  windows_path="$new_path"
51973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51974    unix_path=`$CYGPATH -u "$windows_path"`
51975    new_path="$unix_path"
51976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51978    new_path="$unix_path"
51979  fi
51980
51981  if test "x$path" != "x$new_path"; then
51982    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51985  fi
51986
51987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51989
51990    else
51991      # We're on a unix platform. Hooray! :)
51992      path="$POTENTIAL_FREETYPE_LIB_PATH"
51993      has_space=`$ECHO "$path" | $GREP " "`
51994      if test "x$has_space" != x; then
51995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51998      fi
51999
52000      # Use eval to expand a potential ~
52001      eval path="$path"
52002      if test ! -f "$path" && test ! -d "$path"; then
52003        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52004      fi
52005
52006      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52007    fi
52008  fi
52009
52010
52011    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52013$as_echo_n "checking for freetype includes... " >&6; }
52014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52015$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52016    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52018$as_echo_n "checking for freetype libraries... " >&6; }
52019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52020$as_echo "$FREETYPE_LIB_PATH" >&6; }
52021  fi
52022
52023          fi
52024
52025          if test "x$FOUND_FREETYPE" != xyes; then
52026            FREETYPE_BASE_DIR="$SYSROOT/usr"
52027            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52028
52029  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52030  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
52031  METHOD="well-known location"
52032
52033  # Let's start with an optimistic view of the world :-)
52034  FOUND_FREETYPE=yes
52035
52036  # First look for the canonical freetype main include file ft2build.h.
52037  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52038    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52039    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52040    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52041      # Fail.
52042      FOUND_FREETYPE=no
52043    fi
52044  fi
52045
52046  if test "x$FOUND_FREETYPE" = xyes; then
52047    # Include file found, let's continue the sanity check.
52048    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52049$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52050
52051    # Reset to default value
52052    FREETYPE_BASE_NAME=freetype
52053    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52054    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52055      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52056          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52057        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52058        # for the .6 version explicitly.
52059        FREETYPE_BASE_NAME=freetype.6
52060        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52061        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52062$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52063      else
52064        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52065$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52066        FOUND_FREETYPE=no
52067      fi
52068    else
52069      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52070        # On Windows, we will need both .lib and .dll file.
52071        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52072          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52073$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52074          FOUND_FREETYPE=no
52075        fi
52076      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52077          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52078        # Found lib in isa dir, use that instead.
52079        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52080        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52081$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52082      fi
52083    fi
52084  fi
52085
52086  if test "x$FOUND_FREETYPE" = xyes; then
52087
52088  # Only process if variable expands to non-empty
52089
52090  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52092
52093  # Input might be given as Windows format, start by converting to
52094  # unix format.
52095  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52096  new_path=`$CYGPATH -u "$path"`
52097
52098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52101  # "foo.exe" is OK but "foo" is an error.
52102  #
52103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52104  # It is also a way to make sure we got the proper file name for the real test later on.
52105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52106  if test "x$test_shortpath" = x; then
52107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52108$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52109    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52110  fi
52111
52112  # Call helper function which possibly converts this using DOS-style short mode.
52113  # If so, the updated path is stored in $new_path.
52114
52115  input_path="$new_path"
52116  # Check if we need to convert this using DOS-style short mode. If the path
52117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52118  # take no chances and rewrite it.
52119  # Note: m4 eats our [], so we need to use [ and ] instead.
52120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52121  if test "x$has_forbidden_chars" != x; then
52122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52126      # Going to short mode and back again did indeed matter. Since short mode is
52127      # case insensitive, let's make it lowercase to improve readability.
52128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52129      # Now convert it back to Unix-style (cygpath)
52130      input_path=`$CYGPATH -u "$shortmode_path"`
52131      new_path="$input_path"
52132    fi
52133  fi
52134
52135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52136  if test "x$test_cygdrive_prefix" = x; then
52137    # As a simple fix, exclude /usr/bin since it's not a real path.
52138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52140      # a path prefixed by /cygdrive for fixpath to work.
52141      new_path="$CYGWIN_ROOT_PATH$input_path"
52142    fi
52143  fi
52144
52145
52146  if test "x$path" != "x$new_path"; then
52147    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52149$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52150  fi
52151
52152    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52153
52154  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52155  has_colon=`$ECHO $path | $GREP ^.:`
52156  new_path="$path"
52157  if test "x$has_colon" = x; then
52158    # Not in mixed or Windows style, start by that.
52159    new_path=`cmd //c echo $path`
52160  fi
52161
52162
52163  input_path="$new_path"
52164  # Check if we need to convert this using DOS-style short mode. If the path
52165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52166  # take no chances and rewrite it.
52167  # Note: m4 eats our [], so we need to use [ and ] instead.
52168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52169  if test "x$has_forbidden_chars" != x; then
52170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52172  fi
52173
52174
52175  windows_path="$new_path"
52176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52177    unix_path=`$CYGPATH -u "$windows_path"`
52178    new_path="$unix_path"
52179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52181    new_path="$unix_path"
52182  fi
52183
52184  if test "x$path" != "x$new_path"; then
52185    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52187$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52188  fi
52189
52190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52192
52193    else
52194      # We're on a unix platform. Hooray! :)
52195      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52196      has_space=`$ECHO "$path" | $GREP " "`
52197      if test "x$has_space" != x; then
52198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52200        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52201      fi
52202
52203      # Use eval to expand a potential ~
52204      eval path="$path"
52205      if test ! -f "$path" && test ! -d "$path"; then
52206        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52207      fi
52208
52209      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52210    fi
52211  fi
52212
52213
52214  # Only process if variable expands to non-empty
52215
52216  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52218
52219  # Input might be given as Windows format, start by converting to
52220  # unix format.
52221  path="$POTENTIAL_FREETYPE_LIB_PATH"
52222  new_path=`$CYGPATH -u "$path"`
52223
52224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52227  # "foo.exe" is OK but "foo" is an error.
52228  #
52229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52230  # It is also a way to make sure we got the proper file name for the real test later on.
52231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52232  if test "x$test_shortpath" = x; then
52233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52235    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52236  fi
52237
52238  # Call helper function which possibly converts this using DOS-style short mode.
52239  # If so, the updated path is stored in $new_path.
52240
52241  input_path="$new_path"
52242  # Check if we need to convert this using DOS-style short mode. If the path
52243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52244  # take no chances and rewrite it.
52245  # Note: m4 eats our [], so we need to use [ and ] instead.
52246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52247  if test "x$has_forbidden_chars" != x; then
52248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52252      # Going to short mode and back again did indeed matter. Since short mode is
52253      # case insensitive, let's make it lowercase to improve readability.
52254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52255      # Now convert it back to Unix-style (cygpath)
52256      input_path=`$CYGPATH -u "$shortmode_path"`
52257      new_path="$input_path"
52258    fi
52259  fi
52260
52261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52262  if test "x$test_cygdrive_prefix" = x; then
52263    # As a simple fix, exclude /usr/bin since it's not a real path.
52264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52266      # a path prefixed by /cygdrive for fixpath to work.
52267      new_path="$CYGWIN_ROOT_PATH$input_path"
52268    fi
52269  fi
52270
52271
52272  if test "x$path" != "x$new_path"; then
52273    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52276  fi
52277
52278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52279
52280  path="$POTENTIAL_FREETYPE_LIB_PATH"
52281  has_colon=`$ECHO $path | $GREP ^.:`
52282  new_path="$path"
52283  if test "x$has_colon" = x; then
52284    # Not in mixed or Windows style, start by that.
52285    new_path=`cmd //c echo $path`
52286  fi
52287
52288
52289  input_path="$new_path"
52290  # Check if we need to convert this using DOS-style short mode. If the path
52291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52292  # take no chances and rewrite it.
52293  # Note: m4 eats our [], so we need to use [ and ] instead.
52294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52295  if test "x$has_forbidden_chars" != x; then
52296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52298  fi
52299
52300
52301  windows_path="$new_path"
52302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52303    unix_path=`$CYGPATH -u "$windows_path"`
52304    new_path="$unix_path"
52305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52307    new_path="$unix_path"
52308  fi
52309
52310  if test "x$path" != "x$new_path"; then
52311    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52314  fi
52315
52316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52318
52319    else
52320      # We're on a unix platform. Hooray! :)
52321      path="$POTENTIAL_FREETYPE_LIB_PATH"
52322      has_space=`$ECHO "$path" | $GREP " "`
52323      if test "x$has_space" != x; then
52324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52327      fi
52328
52329      # Use eval to expand a potential ~
52330      eval path="$path"
52331      if test ! -f "$path" && test ! -d "$path"; then
52332        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52333      fi
52334
52335      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52336    fi
52337  fi
52338
52339
52340    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52342$as_echo_n "checking for freetype includes... " >&6; }
52343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52344$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52345    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52347$as_echo_n "checking for freetype libraries... " >&6; }
52348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52349$as_echo "$FREETYPE_LIB_PATH" >&6; }
52350  fi
52351
52352            else
52353
52354  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52355  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
52356  METHOD="well-known location"
52357
52358  # Let's start with an optimistic view of the world :-)
52359  FOUND_FREETYPE=yes
52360
52361  # First look for the canonical freetype main include file ft2build.h.
52362  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52363    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52364    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52365    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52366      # Fail.
52367      FOUND_FREETYPE=no
52368    fi
52369  fi
52370
52371  if test "x$FOUND_FREETYPE" = xyes; then
52372    # Include file found, let's continue the sanity check.
52373    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52374$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52375
52376    # Reset to default value
52377    FREETYPE_BASE_NAME=freetype
52378    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52379    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52380      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52381          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52382        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52383        # for the .6 version explicitly.
52384        FREETYPE_BASE_NAME=freetype.6
52385        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52386        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52387$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52388      else
52389        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52390$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52391        FOUND_FREETYPE=no
52392      fi
52393    else
52394      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52395        # On Windows, we will need both .lib and .dll file.
52396        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52397          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52398$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52399          FOUND_FREETYPE=no
52400        fi
52401      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52402          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52403        # Found lib in isa dir, use that instead.
52404        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52405        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52406$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52407      fi
52408    fi
52409  fi
52410
52411  if test "x$FOUND_FREETYPE" = xyes; then
52412
52413  # Only process if variable expands to non-empty
52414
52415  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52417
52418  # Input might be given as Windows format, start by converting to
52419  # unix format.
52420  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52421  new_path=`$CYGPATH -u "$path"`
52422
52423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52426  # "foo.exe" is OK but "foo" is an error.
52427  #
52428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52429  # It is also a way to make sure we got the proper file name for the real test later on.
52430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52431  if test "x$test_shortpath" = x; then
52432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52434    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52435  fi
52436
52437  # Call helper function which possibly converts this using DOS-style short mode.
52438  # If so, the updated path is stored in $new_path.
52439
52440  input_path="$new_path"
52441  # Check if we need to convert this using DOS-style short mode. If the path
52442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52443  # take no chances and rewrite it.
52444  # Note: m4 eats our [], so we need to use [ and ] instead.
52445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52446  if test "x$has_forbidden_chars" != x; then
52447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52451      # Going to short mode and back again did indeed matter. Since short mode is
52452      # case insensitive, let's make it lowercase to improve readability.
52453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52454      # Now convert it back to Unix-style (cygpath)
52455      input_path=`$CYGPATH -u "$shortmode_path"`
52456      new_path="$input_path"
52457    fi
52458  fi
52459
52460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52461  if test "x$test_cygdrive_prefix" = x; then
52462    # As a simple fix, exclude /usr/bin since it's not a real path.
52463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52465      # a path prefixed by /cygdrive for fixpath to work.
52466      new_path="$CYGWIN_ROOT_PATH$input_path"
52467    fi
52468  fi
52469
52470
52471  if test "x$path" != "x$new_path"; then
52472    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52474$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52475  fi
52476
52477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52478
52479  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52480  has_colon=`$ECHO $path | $GREP ^.:`
52481  new_path="$path"
52482  if test "x$has_colon" = x; then
52483    # Not in mixed or Windows style, start by that.
52484    new_path=`cmd //c echo $path`
52485  fi
52486
52487
52488  input_path="$new_path"
52489  # Check if we need to convert this using DOS-style short mode. If the path
52490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52491  # take no chances and rewrite it.
52492  # Note: m4 eats our [], so we need to use [ and ] instead.
52493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52494  if test "x$has_forbidden_chars" != x; then
52495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52497  fi
52498
52499
52500  windows_path="$new_path"
52501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52502    unix_path=`$CYGPATH -u "$windows_path"`
52503    new_path="$unix_path"
52504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52506    new_path="$unix_path"
52507  fi
52508
52509  if test "x$path" != "x$new_path"; then
52510    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52513  fi
52514
52515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52517
52518    else
52519      # We're on a unix platform. Hooray! :)
52520      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52521      has_space=`$ECHO "$path" | $GREP " "`
52522      if test "x$has_space" != x; then
52523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52526      fi
52527
52528      # Use eval to expand a potential ~
52529      eval path="$path"
52530      if test ! -f "$path" && test ! -d "$path"; then
52531        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52532      fi
52533
52534      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52535    fi
52536  fi
52537
52538
52539  # Only process if variable expands to non-empty
52540
52541  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52543
52544  # Input might be given as Windows format, start by converting to
52545  # unix format.
52546  path="$POTENTIAL_FREETYPE_LIB_PATH"
52547  new_path=`$CYGPATH -u "$path"`
52548
52549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52552  # "foo.exe" is OK but "foo" is an error.
52553  #
52554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52555  # It is also a way to make sure we got the proper file name for the real test later on.
52556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52557  if test "x$test_shortpath" = x; then
52558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52560    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52561  fi
52562
52563  # Call helper function which possibly converts this using DOS-style short mode.
52564  # If so, the updated path is stored in $new_path.
52565
52566  input_path="$new_path"
52567  # Check if we need to convert this using DOS-style short mode. If the path
52568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52569  # take no chances and rewrite it.
52570  # Note: m4 eats our [], so we need to use [ and ] instead.
52571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52572  if test "x$has_forbidden_chars" != x; then
52573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52577      # Going to short mode and back again did indeed matter. Since short mode is
52578      # case insensitive, let's make it lowercase to improve readability.
52579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52580      # Now convert it back to Unix-style (cygpath)
52581      input_path=`$CYGPATH -u "$shortmode_path"`
52582      new_path="$input_path"
52583    fi
52584  fi
52585
52586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52587  if test "x$test_cygdrive_prefix" = x; then
52588    # As a simple fix, exclude /usr/bin since it's not a real path.
52589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52591      # a path prefixed by /cygdrive for fixpath to work.
52592      new_path="$CYGWIN_ROOT_PATH$input_path"
52593    fi
52594  fi
52595
52596
52597  if test "x$path" != "x$new_path"; then
52598    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52600$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52601  fi
52602
52603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52604
52605  path="$POTENTIAL_FREETYPE_LIB_PATH"
52606  has_colon=`$ECHO $path | $GREP ^.:`
52607  new_path="$path"
52608  if test "x$has_colon" = x; then
52609    # Not in mixed or Windows style, start by that.
52610    new_path=`cmd //c echo $path`
52611  fi
52612
52613
52614  input_path="$new_path"
52615  # Check if we need to convert this using DOS-style short mode. If the path
52616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52617  # take no chances and rewrite it.
52618  # Note: m4 eats our [], so we need to use [ and ] instead.
52619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52620  if test "x$has_forbidden_chars" != x; then
52621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52623  fi
52624
52625
52626  windows_path="$new_path"
52627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52628    unix_path=`$CYGPATH -u "$windows_path"`
52629    new_path="$unix_path"
52630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52632    new_path="$unix_path"
52633  fi
52634
52635  if test "x$path" != "x$new_path"; then
52636    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52638$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52639  fi
52640
52641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52643
52644    else
52645      # We're on a unix platform. Hooray! :)
52646      path="$POTENTIAL_FREETYPE_LIB_PATH"
52647      has_space=`$ECHO "$path" | $GREP " "`
52648      if test "x$has_space" != x; then
52649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52652      fi
52653
52654      # Use eval to expand a potential ~
52655      eval path="$path"
52656      if test ! -f "$path" && test ! -d "$path"; then
52657        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52658      fi
52659
52660      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52661    fi
52662  fi
52663
52664
52665    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52667$as_echo_n "checking for freetype includes... " >&6; }
52668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52669$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52670    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52672$as_echo_n "checking for freetype libraries... " >&6; }
52673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52674$as_echo "$FREETYPE_LIB_PATH" >&6; }
52675  fi
52676
52677              if test "x$FOUND_FREETYPE" != xyes; then
52678
52679  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52680  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
52681  METHOD="well-known location"
52682
52683  # Let's start with an optimistic view of the world :-)
52684  FOUND_FREETYPE=yes
52685
52686  # First look for the canonical freetype main include file ft2build.h.
52687  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52688    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52689    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52690    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52691      # Fail.
52692      FOUND_FREETYPE=no
52693    fi
52694  fi
52695
52696  if test "x$FOUND_FREETYPE" = xyes; then
52697    # Include file found, let's continue the sanity check.
52698    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52699$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52700
52701    # Reset to default value
52702    FREETYPE_BASE_NAME=freetype
52703    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52704    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52705      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52706          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52707        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52708        # for the .6 version explicitly.
52709        FREETYPE_BASE_NAME=freetype.6
52710        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52711        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52712$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52713      else
52714        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52715$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52716        FOUND_FREETYPE=no
52717      fi
52718    else
52719      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52720        # On Windows, we will need both .lib and .dll file.
52721        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52722          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52723$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52724          FOUND_FREETYPE=no
52725        fi
52726      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52727          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52728        # Found lib in isa dir, use that instead.
52729        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52730        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52731$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52732      fi
52733    fi
52734  fi
52735
52736  if test "x$FOUND_FREETYPE" = xyes; then
52737
52738  # Only process if variable expands to non-empty
52739
52740  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52742
52743  # Input might be given as Windows format, start by converting to
52744  # unix format.
52745  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52746  new_path=`$CYGPATH -u "$path"`
52747
52748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52751  # "foo.exe" is OK but "foo" is an error.
52752  #
52753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52754  # It is also a way to make sure we got the proper file name for the real test later on.
52755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52756  if test "x$test_shortpath" = x; then
52757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52759    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52760  fi
52761
52762  # Call helper function which possibly converts this using DOS-style short mode.
52763  # If so, the updated path is stored in $new_path.
52764
52765  input_path="$new_path"
52766  # Check if we need to convert this using DOS-style short mode. If the path
52767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52768  # take no chances and rewrite it.
52769  # Note: m4 eats our [], so we need to use [ and ] instead.
52770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52771  if test "x$has_forbidden_chars" != x; then
52772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52776      # Going to short mode and back again did indeed matter. Since short mode is
52777      # case insensitive, let's make it lowercase to improve readability.
52778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52779      # Now convert it back to Unix-style (cygpath)
52780      input_path=`$CYGPATH -u "$shortmode_path"`
52781      new_path="$input_path"
52782    fi
52783  fi
52784
52785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52786  if test "x$test_cygdrive_prefix" = x; then
52787    # As a simple fix, exclude /usr/bin since it's not a real path.
52788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52790      # a path prefixed by /cygdrive for fixpath to work.
52791      new_path="$CYGWIN_ROOT_PATH$input_path"
52792    fi
52793  fi
52794
52795
52796  if test "x$path" != "x$new_path"; then
52797    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52800  fi
52801
52802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52803
52804  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52805  has_colon=`$ECHO $path | $GREP ^.:`
52806  new_path="$path"
52807  if test "x$has_colon" = x; then
52808    # Not in mixed or Windows style, start by that.
52809    new_path=`cmd //c echo $path`
52810  fi
52811
52812
52813  input_path="$new_path"
52814  # Check if we need to convert this using DOS-style short mode. If the path
52815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52816  # take no chances and rewrite it.
52817  # Note: m4 eats our [], so we need to use [ and ] instead.
52818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52819  if test "x$has_forbidden_chars" != x; then
52820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52822  fi
52823
52824
52825  windows_path="$new_path"
52826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52827    unix_path=`$CYGPATH -u "$windows_path"`
52828    new_path="$unix_path"
52829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52831    new_path="$unix_path"
52832  fi
52833
52834  if test "x$path" != "x$new_path"; then
52835    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52838  fi
52839
52840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52842
52843    else
52844      # We're on a unix platform. Hooray! :)
52845      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52846      has_space=`$ECHO "$path" | $GREP " "`
52847      if test "x$has_space" != x; then
52848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52851      fi
52852
52853      # Use eval to expand a potential ~
52854      eval path="$path"
52855      if test ! -f "$path" && test ! -d "$path"; then
52856        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52857      fi
52858
52859      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52860    fi
52861  fi
52862
52863
52864  # Only process if variable expands to non-empty
52865
52866  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52868
52869  # Input might be given as Windows format, start by converting to
52870  # unix format.
52871  path="$POTENTIAL_FREETYPE_LIB_PATH"
52872  new_path=`$CYGPATH -u "$path"`
52873
52874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52877  # "foo.exe" is OK but "foo" is an error.
52878  #
52879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52880  # It is also a way to make sure we got the proper file name for the real test later on.
52881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52882  if test "x$test_shortpath" = x; then
52883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52885    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52886  fi
52887
52888  # Call helper function which possibly converts this using DOS-style short mode.
52889  # If so, the updated path is stored in $new_path.
52890
52891  input_path="$new_path"
52892  # Check if we need to convert this using DOS-style short mode. If the path
52893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52894  # take no chances and rewrite it.
52895  # Note: m4 eats our [], so we need to use [ and ] instead.
52896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52897  if test "x$has_forbidden_chars" != x; then
52898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52902      # Going to short mode and back again did indeed matter. Since short mode is
52903      # case insensitive, let's make it lowercase to improve readability.
52904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52905      # Now convert it back to Unix-style (cygpath)
52906      input_path=`$CYGPATH -u "$shortmode_path"`
52907      new_path="$input_path"
52908    fi
52909  fi
52910
52911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52912  if test "x$test_cygdrive_prefix" = x; then
52913    # As a simple fix, exclude /usr/bin since it's not a real path.
52914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52916      # a path prefixed by /cygdrive for fixpath to work.
52917      new_path="$CYGWIN_ROOT_PATH$input_path"
52918    fi
52919  fi
52920
52921
52922  if test "x$path" != "x$new_path"; then
52923    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52926  fi
52927
52928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52929
52930  path="$POTENTIAL_FREETYPE_LIB_PATH"
52931  has_colon=`$ECHO $path | $GREP ^.:`
52932  new_path="$path"
52933  if test "x$has_colon" = x; then
52934    # Not in mixed or Windows style, start by that.
52935    new_path=`cmd //c echo $path`
52936  fi
52937
52938
52939  input_path="$new_path"
52940  # Check if we need to convert this using DOS-style short mode. If the path
52941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52942  # take no chances and rewrite it.
52943  # Note: m4 eats our [], so we need to use [ and ] instead.
52944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52945  if test "x$has_forbidden_chars" != x; then
52946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52948  fi
52949
52950
52951  windows_path="$new_path"
52952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52953    unix_path=`$CYGPATH -u "$windows_path"`
52954    new_path="$unix_path"
52955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52957    new_path="$unix_path"
52958  fi
52959
52960  if test "x$path" != "x$new_path"; then
52961    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52964  fi
52965
52966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52968
52969    else
52970      # We're on a unix platform. Hooray! :)
52971      path="$POTENTIAL_FREETYPE_LIB_PATH"
52972      has_space=`$ECHO "$path" | $GREP " "`
52973      if test "x$has_space" != x; then
52974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52975$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52977      fi
52978
52979      # Use eval to expand a potential ~
52980      eval path="$path"
52981      if test ! -f "$path" && test ! -d "$path"; then
52982        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52983      fi
52984
52985      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52986    fi
52987  fi
52988
52989
52990    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52992$as_echo_n "checking for freetype includes... " >&6; }
52993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52994$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52995    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52997$as_echo_n "checking for freetype libraries... " >&6; }
52998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52999$as_echo "$FREETYPE_LIB_PATH" >&6; }
53000  fi
53001
53002              fi
53003            fi
53004          fi
53005        fi
53006      fi # end check in well-known locations
53007
53008      if test "x$FOUND_FREETYPE" != xyes; then
53009
53010  # Print a helpful message on how to acquire the necessary build dependency.
53011  # freetype is the help tag: freetype, cups, alsa etc
53012  MISSING_DEPENDENCY=freetype
53013
53014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53015    cygwin_help $MISSING_DEPENDENCY
53016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53017    msys_help $MISSING_DEPENDENCY
53018  else
53019    PKGHANDLER_COMMAND=
53020
53021    case $PKGHANDLER in
53022      apt-get)
53023        apt_help     $MISSING_DEPENDENCY ;;
53024      yum)
53025        yum_help     $MISSING_DEPENDENCY ;;
53026      port)
53027        port_help    $MISSING_DEPENDENCY ;;
53028      pkgutil)
53029        pkgutil_help $MISSING_DEPENDENCY ;;
53030      pkgadd)
53031        pkgadd_help  $MISSING_DEPENDENCY ;;
53032    esac
53033
53034    if test "x$PKGHANDLER_COMMAND" != x; then
53035      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53036    fi
53037  fi
53038
53039        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
53040      fi
53041    fi # end user specified settings
53042
53043    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
53044    if test "x$FREETYPE_CFLAGS" = x; then
53045
53046  # Only process if variable expands to non-empty
53047
53048  if test "x$FREETYPE_INCLUDE_PATH" != x; then
53049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53050
53051  # Input might be given as Windows format, start by converting to
53052  # unix format.
53053  path="$FREETYPE_INCLUDE_PATH"
53054  new_path=`$CYGPATH -u "$path"`
53055
53056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53059  # "foo.exe" is OK but "foo" is an error.
53060  #
53061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53062  # It is also a way to make sure we got the proper file name for the real test later on.
53063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53064  if test "x$test_shortpath" = x; then
53065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53066$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53067    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
53068  fi
53069
53070  # Call helper function which possibly converts this using DOS-style short mode.
53071  # If so, the updated path is stored in $new_path.
53072
53073  input_path="$new_path"
53074  # Check if we need to convert this using DOS-style short mode. If the path
53075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53076  # take no chances and rewrite it.
53077  # Note: m4 eats our [], so we need to use [ and ] instead.
53078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53079  if test "x$has_forbidden_chars" != x; then
53080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53084      # Going to short mode and back again did indeed matter. Since short mode is
53085      # case insensitive, let's make it lowercase to improve readability.
53086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53087      # Now convert it back to Unix-style (cygpath)
53088      input_path=`$CYGPATH -u "$shortmode_path"`
53089      new_path="$input_path"
53090    fi
53091  fi
53092
53093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53094  if test "x$test_cygdrive_prefix" = x; then
53095    # As a simple fix, exclude /usr/bin since it's not a real path.
53096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53098      # a path prefixed by /cygdrive for fixpath to work.
53099      new_path="$CYGWIN_ROOT_PATH$input_path"
53100    fi
53101  fi
53102
53103
53104  if test "x$path" != "x$new_path"; then
53105    FREETYPE_INCLUDE_PATH="$new_path"
53106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53107$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53108  fi
53109
53110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53111
53112  path="$FREETYPE_INCLUDE_PATH"
53113  has_colon=`$ECHO $path | $GREP ^.:`
53114  new_path="$path"
53115  if test "x$has_colon" = x; then
53116    # Not in mixed or Windows style, start by that.
53117    new_path=`cmd //c echo $path`
53118  fi
53119
53120
53121  input_path="$new_path"
53122  # Check if we need to convert this using DOS-style short mode. If the path
53123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53124  # take no chances and rewrite it.
53125  # Note: m4 eats our [], so we need to use [ and ] instead.
53126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53127  if test "x$has_forbidden_chars" != x; then
53128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53130  fi
53131
53132
53133  windows_path="$new_path"
53134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53135    unix_path=`$CYGPATH -u "$windows_path"`
53136    new_path="$unix_path"
53137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53139    new_path="$unix_path"
53140  fi
53141
53142  if test "x$path" != "x$new_path"; then
53143    FREETYPE_INCLUDE_PATH="$new_path"
53144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53145$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53146  fi
53147
53148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53150
53151    else
53152      # We're on a unix platform. Hooray! :)
53153      path="$FREETYPE_INCLUDE_PATH"
53154      has_space=`$ECHO "$path" | $GREP " "`
53155      if test "x$has_space" != x; then
53156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53157$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53159      fi
53160
53161      # Use eval to expand a potential ~
53162      eval path="$path"
53163      if test ! -f "$path" && test ! -d "$path"; then
53164        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53165      fi
53166
53167      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53168    fi
53169  fi
53170
53171      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
53172        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
53173      else
53174        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
53175      fi
53176    fi
53177
53178    if test "x$FREETYPE_LIBS" = x; then
53179
53180  # Only process if variable expands to non-empty
53181
53182  if test "x$FREETYPE_LIB_PATH" != x; then
53183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53184
53185  # Input might be given as Windows format, start by converting to
53186  # unix format.
53187  path="$FREETYPE_LIB_PATH"
53188  new_path=`$CYGPATH -u "$path"`
53189
53190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53193  # "foo.exe" is OK but "foo" is an error.
53194  #
53195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53196  # It is also a way to make sure we got the proper file name for the real test later on.
53197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53198  if test "x$test_shortpath" = x; then
53199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53200$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53201    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
53202  fi
53203
53204  # Call helper function which possibly converts this using DOS-style short mode.
53205  # If so, the updated path is stored in $new_path.
53206
53207  input_path="$new_path"
53208  # Check if we need to convert this using DOS-style short mode. If the path
53209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53210  # take no chances and rewrite it.
53211  # Note: m4 eats our [], so we need to use [ and ] instead.
53212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53213  if test "x$has_forbidden_chars" != x; then
53214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53218      # Going to short mode and back again did indeed matter. Since short mode is
53219      # case insensitive, let's make it lowercase to improve readability.
53220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53221      # Now convert it back to Unix-style (cygpath)
53222      input_path=`$CYGPATH -u "$shortmode_path"`
53223      new_path="$input_path"
53224    fi
53225  fi
53226
53227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53228  if test "x$test_cygdrive_prefix" = x; then
53229    # As a simple fix, exclude /usr/bin since it's not a real path.
53230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53232      # a path prefixed by /cygdrive for fixpath to work.
53233      new_path="$CYGWIN_ROOT_PATH$input_path"
53234    fi
53235  fi
53236
53237
53238  if test "x$path" != "x$new_path"; then
53239    FREETYPE_LIB_PATH="$new_path"
53240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53241$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53242  fi
53243
53244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53245
53246  path="$FREETYPE_LIB_PATH"
53247  has_colon=`$ECHO $path | $GREP ^.:`
53248  new_path="$path"
53249  if test "x$has_colon" = x; then
53250    # Not in mixed or Windows style, start by that.
53251    new_path=`cmd //c echo $path`
53252  fi
53253
53254
53255  input_path="$new_path"
53256  # Check if we need to convert this using DOS-style short mode. If the path
53257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53258  # take no chances and rewrite it.
53259  # Note: m4 eats our [], so we need to use [ and ] instead.
53260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53261  if test "x$has_forbidden_chars" != x; then
53262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53264  fi
53265
53266
53267  windows_path="$new_path"
53268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53269    unix_path=`$CYGPATH -u "$windows_path"`
53270    new_path="$unix_path"
53271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53273    new_path="$unix_path"
53274  fi
53275
53276  if test "x$path" != "x$new_path"; then
53277    FREETYPE_LIB_PATH="$new_path"
53278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53279$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53280  fi
53281
53282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53284
53285    else
53286      # We're on a unix platform. Hooray! :)
53287      path="$FREETYPE_LIB_PATH"
53288      has_space=`$ECHO "$path" | $GREP " "`
53289      if test "x$has_space" != x; then
53290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53291$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53292        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53293      fi
53294
53295      # Use eval to expand a potential ~
53296      eval path="$path"
53297      if test ! -f "$path" && test ! -d "$path"; then
53298        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53299      fi
53300
53301      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53302    fi
53303  fi
53304
53305      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53306        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
53307      else
53308        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
53309      fi
53310    fi
53311
53312    # Try to compile it
53313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
53314$as_echo_n "checking if we can compile and link with freetype... " >&6; }
53315    ac_ext=cpp
53316ac_cpp='$CXXCPP $CPPFLAGS'
53317ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53318ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53319ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53320
53321    PREV_CXXCFLAGS="$CXXFLAGS"
53322    PREV_LIBS="$LIBS"
53323    PREV_CXX="$CXX"
53324    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
53325    LIBS="$LIBS $FREETYPE_LIBS"
53326    CXX="$FIXPATH $CXX"
53327    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53328/* end confdefs.h.  */
53329
53330          #include<ft2build.h>
53331          #include FT_FREETYPE_H
53332          int main () {
53333            FT_Init_FreeType(NULL);
53334            return 0;
53335          }
53336
53337_ACEOF
53338if ac_fn_cxx_try_link "$LINENO"; then :
53339
53340          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53341$as_echo "yes" >&6; }
53342
53343else
53344
53345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53346$as_echo "no" >&6; }
53347          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
53348$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
53349          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
53350$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
53351
53352
53353  # Print a helpful message on how to acquire the necessary build dependency.
53354  # freetype is the help tag: freetype, cups, alsa etc
53355  MISSING_DEPENDENCY=freetype
53356
53357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53358    cygwin_help $MISSING_DEPENDENCY
53359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53360    msys_help $MISSING_DEPENDENCY
53361  else
53362    PKGHANDLER_COMMAND=
53363
53364    case $PKGHANDLER in
53365      apt-get)
53366        apt_help     $MISSING_DEPENDENCY ;;
53367      yum)
53368        yum_help     $MISSING_DEPENDENCY ;;
53369      port)
53370        port_help    $MISSING_DEPENDENCY ;;
53371      pkgutil)
53372        pkgutil_help $MISSING_DEPENDENCY ;;
53373      pkgadd)
53374        pkgadd_help  $MISSING_DEPENDENCY ;;
53375    esac
53376
53377    if test "x$PKGHANDLER_COMMAND" != x; then
53378      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53379    fi
53380  fi
53381
53382
53383          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
53384
53385
53386fi
53387rm -f core conftest.err conftest.$ac_objext \
53388    conftest$ac_exeext conftest.$ac_ext
53389    CXXCFLAGS="$PREV_CXXFLAGS"
53390    LIBS="$PREV_LIBS"
53391    CXX="$PREV_CXX"
53392    ac_ext=cpp
53393ac_cpp='$CXXCPP $CPPFLAGS'
53394ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53395ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53396ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53397
53398
53399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
53400$as_echo_n "checking if we should bundle freetype... " >&6; }
53401    if test "x$BUNDLE_FREETYPE" = xyes; then
53402      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
53403    fi
53404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
53405$as_echo "$BUNDLE_FREETYPE" >&6; }
53406
53407  fi # end freetype needed
53408
53409
53410
53411
53412
53413
53414
53415# Check whether --with-alsa was given.
53416if test "${with_alsa+set}" = set; then :
53417  withval=$with_alsa;
53418fi
53419
53420
53421# Check whether --with-alsa-include was given.
53422if test "${with_alsa_include+set}" = set; then :
53423  withval=$with_alsa_include;
53424fi
53425
53426
53427# Check whether --with-alsa-lib was given.
53428if test "${with_alsa_lib+set}" = set; then :
53429  withval=$with_alsa_lib;
53430fi
53431
53432
53433  if test "x$NEEDS_LIB_ALSA" = xfalse; then
53434    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
53435        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
53436        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
53437      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
53438$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
53439    fi
53440    ALSA_CFLAGS=
53441    ALSA_LIBS=
53442  else
53443    ALSA_FOUND=no
53444
53445    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
53446      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
53447    fi
53448
53449    if test "x${with_alsa}" != x; then
53450      ALSA_LIBS="-L${with_alsa}/lib -lasound"
53451      ALSA_CFLAGS="-I${with_alsa}/include"
53452      ALSA_FOUND=yes
53453    fi
53454    if test "x${with_alsa_include}" != x; then
53455      ALSA_CFLAGS="-I${with_alsa_include}"
53456      ALSA_FOUND=yes
53457    fi
53458    if test "x${with_alsa_lib}" != x; then
53459      ALSA_LIBS="-L${with_alsa_lib} -lasound"
53460      ALSA_FOUND=yes
53461    fi
53462    # Do not try pkg-config if we have a sysroot set.
53463    if test "x$SYSROOT" = x; then
53464      if test "x$ALSA_FOUND" = xno; then
53465
53466pkg_failed=no
53467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
53468$as_echo_n "checking for ALSA... " >&6; }
53469
53470if test -n "$ALSA_CFLAGS"; then
53471    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
53472 elif test -n "$PKG_CONFIG"; then
53473    if test -n "$PKG_CONFIG" && \
53474    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53475  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53476  ac_status=$?
53477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53478  test $ac_status = 0; }; then
53479  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
53480else
53481  pkg_failed=yes
53482fi
53483 else
53484    pkg_failed=untried
53485fi
53486if test -n "$ALSA_LIBS"; then
53487    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
53488 elif test -n "$PKG_CONFIG"; then
53489    if test -n "$PKG_CONFIG" && \
53490    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53491  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53492  ac_status=$?
53493  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53494  test $ac_status = 0; }; then
53495  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
53496else
53497  pkg_failed=yes
53498fi
53499 else
53500    pkg_failed=untried
53501fi
53502
53503
53504
53505if test $pkg_failed = yes; then
53506
53507if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53508        _pkg_short_errors_supported=yes
53509else
53510        _pkg_short_errors_supported=no
53511fi
53512        if test $_pkg_short_errors_supported = yes; then
53513	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
53514        else
53515	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
53516        fi
53517	# Put the nasty error message in config.log where it belongs
53518	echo "$ALSA_PKG_ERRORS" >&5
53519
53520	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53521$as_echo "no" >&6; }
53522                ALSA_FOUND=no
53523elif test $pkg_failed = untried; then
53524	ALSA_FOUND=no
53525else
53526	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
53527	ALSA_LIBS=$pkg_cv_ALSA_LIBS
53528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53529$as_echo "yes" >&6; }
53530	ALSA_FOUND=yes
53531fi
53532      fi
53533    fi
53534    if test "x$ALSA_FOUND" = xno; then
53535      for ac_header in alsa/asoundlib.h
53536do :
53537  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
53538if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
53539  cat >>confdefs.h <<_ACEOF
53540#define HAVE_ALSA_ASOUNDLIB_H 1
53541_ACEOF
53542
53543            ALSA_FOUND=yes
53544            ALSA_CFLAGS=-Iignoreme
53545            ALSA_LIBS=-lasound
53546            DEFAULT_ALSA=yes
53547
53548else
53549  ALSA_FOUND=no
53550
53551fi
53552
53553done
53554
53555    fi
53556    if test "x$ALSA_FOUND" = xno; then
53557
53558  # Print a helpful message on how to acquire the necessary build dependency.
53559  # alsa is the help tag: freetype, cups, alsa etc
53560  MISSING_DEPENDENCY=alsa
53561
53562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53563    cygwin_help $MISSING_DEPENDENCY
53564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53565    msys_help $MISSING_DEPENDENCY
53566  else
53567    PKGHANDLER_COMMAND=
53568
53569    case $PKGHANDLER in
53570      apt-get)
53571        apt_help     $MISSING_DEPENDENCY ;;
53572      yum)
53573        yum_help     $MISSING_DEPENDENCY ;;
53574      port)
53575        port_help    $MISSING_DEPENDENCY ;;
53576      pkgutil)
53577        pkgutil_help $MISSING_DEPENDENCY ;;
53578      pkgadd)
53579        pkgadd_help  $MISSING_DEPENDENCY ;;
53580    esac
53581
53582    if test "x$PKGHANDLER_COMMAND" != x; then
53583      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53584    fi
53585  fi
53586
53587      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
53588    fi
53589  fi
53590
53591
53592
53593
53594
53595
53596# Check whether --with-libffi was given.
53597if test "${with_libffi+set}" = set; then :
53598  withval=$with_libffi;
53599fi
53600
53601
53602# Check whether --with-libffi-include was given.
53603if test "${with_libffi_include+set}" = set; then :
53604  withval=$with_libffi_include;
53605fi
53606
53607
53608# Check whether --with-libffi-lib was given.
53609if test "${with_libffi_lib+set}" = set; then :
53610  withval=$with_libffi_lib;
53611fi
53612
53613
53614  if test "x$NEEDS_LIB_FFI" = xfalse; then
53615    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
53616        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
53617        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
53618      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
53619$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
53620    fi
53621    LIBFFI_CFLAGS=
53622    LIBFFI_LIBS=
53623  else
53624    LIBFFI_FOUND=no
53625
53626    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
53627      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
53628    fi
53629
53630    if test "x${with_libffi}" != x; then
53631      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
53632      LIBFFI_CFLAGS="-I${with_libffi}/include"
53633      LIBFFI_FOUND=yes
53634    fi
53635    if test "x${with_libffi_include}" != x; then
53636      LIBFFI_CFLAGS="-I${with_libffi_include}"
53637      LIBFFI_FOUND=yes
53638    fi
53639    if test "x${with_libffi_lib}" != x; then
53640      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
53641      LIBFFI_FOUND=yes
53642    fi
53643    # Do not try pkg-config if we have a sysroot set.
53644    if test "x$SYSROOT" = x; then
53645      if test "x$LIBFFI_FOUND" = xno; then
53646        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
53647
53648pkg_failed=no
53649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
53650$as_echo_n "checking for LIBFFI... " >&6; }
53651
53652if test -n "$LIBFFI_CFLAGS"; then
53653    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
53654 elif test -n "$PKG_CONFIG"; then
53655    if test -n "$PKG_CONFIG" && \
53656    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53657  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53658  ac_status=$?
53659  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53660  test $ac_status = 0; }; then
53661  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
53662else
53663  pkg_failed=yes
53664fi
53665 else
53666    pkg_failed=untried
53667fi
53668if test -n "$LIBFFI_LIBS"; then
53669    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
53670 elif test -n "$PKG_CONFIG"; then
53671    if test -n "$PKG_CONFIG" && \
53672    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53673  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53674  ac_status=$?
53675  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53676  test $ac_status = 0; }; then
53677  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
53678else
53679  pkg_failed=yes
53680fi
53681 else
53682    pkg_failed=untried
53683fi
53684
53685
53686
53687if test $pkg_failed = yes; then
53688
53689if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53690        _pkg_short_errors_supported=yes
53691else
53692        _pkg_short_errors_supported=no
53693fi
53694        if test $_pkg_short_errors_supported = yes; then
53695	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
53696        else
53697	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
53698        fi
53699	# Put the nasty error message in config.log where it belongs
53700	echo "$LIBFFI_PKG_ERRORS" >&5
53701
53702	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53703$as_echo "no" >&6; }
53704                LIBFFI_FOUND=no
53705elif test $pkg_failed = untried; then
53706	LIBFFI_FOUND=no
53707else
53708	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
53709	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
53710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53711$as_echo "yes" >&6; }
53712	LIBFFI_FOUND=yes
53713fi
53714      fi
53715    fi
53716    if test "x$LIBFFI_FOUND" = xno; then
53717      for ac_header in ffi.h
53718do :
53719  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
53720if test "x$ac_cv_header_ffi_h" = xyes; then :
53721  cat >>confdefs.h <<_ACEOF
53722#define HAVE_FFI_H 1
53723_ACEOF
53724
53725            LIBFFI_FOUND=yes
53726            LIBFFI_CFLAGS=
53727            LIBFFI_LIBS=-lffi
53728
53729else
53730  LIBFFI_FOUND=no
53731
53732fi
53733
53734done
53735
53736    fi
53737    if test "x$LIBFFI_FOUND" = xno; then
53738
53739  # Print a helpful message on how to acquire the necessary build dependency.
53740  # ffi is the help tag: freetype, cups, alsa etc
53741  MISSING_DEPENDENCY=ffi
53742
53743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53744    cygwin_help $MISSING_DEPENDENCY
53745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53746    msys_help $MISSING_DEPENDENCY
53747  else
53748    PKGHANDLER_COMMAND=
53749
53750    case $PKGHANDLER in
53751      apt-get)
53752        apt_help     $MISSING_DEPENDENCY ;;
53753      yum)
53754        yum_help     $MISSING_DEPENDENCY ;;
53755      port)
53756        port_help    $MISSING_DEPENDENCY ;;
53757      pkgutil)
53758        pkgutil_help $MISSING_DEPENDENCY ;;
53759      pkgadd)
53760        pkgadd_help  $MISSING_DEPENDENCY ;;
53761    esac
53762
53763    if test "x$PKGHANDLER_COMMAND" != x; then
53764      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53765    fi
53766  fi
53767
53768      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
53769    fi
53770
53771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
53772$as_echo_n "checking if libffi works... " >&6; }
53773    ac_ext=c
53774ac_cpp='$CPP $CPPFLAGS'
53775ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53776ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53777ac_compiler_gnu=$ac_cv_c_compiler_gnu
53778
53779    OLD_CFLAGS="$CFLAGS"
53780    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
53781    OLD_LIBS="$LIBS"
53782    LIBS="$LIBS $LIBFFI_LIBS"
53783    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53784/* end confdefs.h.  */
53785#include <ffi.h>
53786int
53787main ()
53788{
53789
53790          ffi_call(NULL, NULL, NULL, NULL);
53791          return 0;
53792
53793  ;
53794  return 0;
53795}
53796_ACEOF
53797if ac_fn_c_try_link "$LINENO"; then :
53798  LIBFFI_WORKS=yes
53799else
53800  LIBFFI_WORKS=no
53801
53802fi
53803rm -f core conftest.err conftest.$ac_objext \
53804    conftest$ac_exeext conftest.$ac_ext
53805    CFLAGS="$OLD_CFLAGS"
53806    LIBS="$OLD_LIBS"
53807    ac_ext=cpp
53808ac_cpp='$CXXCPP $CPPFLAGS'
53809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53812
53813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
53814$as_echo "$LIBFFI_WORKS" >&6; }
53815
53816    if test "x$LIBFFI_WORKS" = xno; then
53817
53818  # Print a helpful message on how to acquire the necessary build dependency.
53819  # ffi is the help tag: freetype, cups, alsa etc
53820  MISSING_DEPENDENCY=ffi
53821
53822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53823    cygwin_help $MISSING_DEPENDENCY
53824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53825    msys_help $MISSING_DEPENDENCY
53826  else
53827    PKGHANDLER_COMMAND=
53828
53829    case $PKGHANDLER in
53830      apt-get)
53831        apt_help     $MISSING_DEPENDENCY ;;
53832      yum)
53833        yum_help     $MISSING_DEPENDENCY ;;
53834      port)
53835        port_help    $MISSING_DEPENDENCY ;;
53836      pkgutil)
53837        pkgutil_help $MISSING_DEPENDENCY ;;
53838      pkgadd)
53839        pkgadd_help  $MISSING_DEPENDENCY ;;
53840    esac
53841
53842    if test "x$PKGHANDLER_COMMAND" != x; then
53843      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53844    fi
53845  fi
53846
53847      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
53848    fi
53849  fi
53850
53851
53852
53853
53854
53855  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
53856    # Extract the first word of "llvm-config", so it can be a program name with args.
53857set dummy llvm-config; ac_word=$2
53858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53859$as_echo_n "checking for $ac_word... " >&6; }
53860if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
53861  $as_echo_n "(cached) " >&6
53862else
53863  if test -n "$LLVM_CONFIG"; then
53864  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
53865else
53866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53867for as_dir in $PATH
53868do
53869  IFS=$as_save_IFS
53870  test -z "$as_dir" && as_dir=.
53871    for ac_exec_ext in '' $ac_executable_extensions; do
53872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53873    ac_cv_prog_LLVM_CONFIG="llvm-config"
53874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53875    break 2
53876  fi
53877done
53878  done
53879IFS=$as_save_IFS
53880
53881fi
53882fi
53883LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
53884if test -n "$LLVM_CONFIG"; then
53885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
53886$as_echo "$LLVM_CONFIG" >&6; }
53887else
53888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53889$as_echo "no" >&6; }
53890fi
53891
53892
53893
53894    if test "x$LLVM_CONFIG" != xllvm-config; then
53895      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
53896    fi
53897
53898    llvm_components="jit mcjit engine nativecodegen native"
53899    unset LLVM_CFLAGS
53900    for flag in $("$LLVM_CONFIG" --cxxflags); do
53901      if echo "${flag}" | grep -q '^-[ID]'; then
53902        if test "${flag}" != "-D_DEBUG" ; then
53903          if test "${LLVM_CFLAGS}" != "" ; then
53904            LLVM_CFLAGS="${LLVM_CFLAGS} "
53905          fi
53906          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
53907        fi
53908      fi
53909    done
53910    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
53911    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
53912
53913    unset LLVM_LDFLAGS
53914    for flag in $("${LLVM_CONFIG}" --ldflags); do
53915      if echo "${flag}" | grep -q '^-L'; then
53916        if test "${LLVM_LDFLAGS}" != ""; then
53917          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
53918        fi
53919        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
53920      fi
53921    done
53922
53923    unset LLVM_LIBS
53924    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
53925      if echo "${flag}" | grep -q '^-l'; then
53926        if test "${LLVM_LIBS}" != ""; then
53927          LLVM_LIBS="${LLVM_LIBS} "
53928        fi
53929        LLVM_LIBS="${LLVM_LIBS}${flag}"
53930      fi
53931    done
53932
53933
53934
53935
53936  fi
53937
53938
53939
53940# Check whether --with-libjpeg was given.
53941if test "${with_libjpeg+set}" = set; then :
53942  withval=$with_libjpeg;
53943fi
53944
53945
53946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
53947$as_echo_n "checking for which libjpeg to use... " >&6; }
53948  # default is bundled
53949  DEFAULT_LIBJPEG=bundled
53950  # if user didn't specify, use DEFAULT_LIBJPEG
53951  if test "x${with_libjpeg}" = "x"; then
53952    with_libjpeg=${DEFAULT_LIBJPEG}
53953  fi
53954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
53955$as_echo "${with_libjpeg}" >&6; }
53956
53957  if test "x${with_libjpeg}" = "xbundled"; then
53958    USE_EXTERNAL_LIBJPEG=false
53959  elif test "x${with_libjpeg}" = "xsystem"; then
53960    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
53961if test "x$ac_cv_header_jpeglib_h" = xyes; then :
53962
53963else
53964   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
53965fi
53966
53967
53968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
53969$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
53970if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
53971  $as_echo_n "(cached) " >&6
53972else
53973  ac_check_lib_save_LIBS=$LIBS
53974LIBS="-ljpeg  $LIBS"
53975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53976/* end confdefs.h.  */
53977
53978/* Override any GCC internal prototype to avoid an error.
53979   Use char because int might match the return type of a GCC
53980   builtin and then its argument prototype would still apply.  */
53981#ifdef __cplusplus
53982extern "C"
53983#endif
53984char jpeg_CreateDecompress ();
53985int
53986main ()
53987{
53988return jpeg_CreateDecompress ();
53989  ;
53990  return 0;
53991}
53992_ACEOF
53993if ac_fn_cxx_try_link "$LINENO"; then :
53994  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
53995else
53996  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
53997fi
53998rm -f core conftest.err conftest.$ac_objext \
53999    conftest$ac_exeext conftest.$ac_ext
54000LIBS=$ac_check_lib_save_LIBS
54001fi
54002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
54003$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
54004if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
54005  cat >>confdefs.h <<_ACEOF
54006#define HAVE_LIBJPEG 1
54007_ACEOF
54008
54009  LIBS="-ljpeg $LIBS"
54010
54011else
54012   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
54013fi
54014
54015
54016    USE_EXTERNAL_LIBJPEG=true
54017  else
54018    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
54019  fi
54020
54021
54022
54023
54024
54025# Check whether --with-giflib was given.
54026if test "${with_giflib+set}" = set; then :
54027  withval=$with_giflib;
54028fi
54029
54030
54031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
54032$as_echo_n "checking for which giflib to use... " >&6; }
54033  # default is bundled
54034  DEFAULT_GIFLIB=bundled
54035  # if user didn't specify, use DEFAULT_GIFLIB
54036  if test "x${with_giflib}" = "x"; then
54037    with_giflib=${DEFAULT_GIFLIB}
54038  fi
54039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
54040$as_echo "${with_giflib}" >&6; }
54041
54042  if test "x${with_giflib}" = "xbundled"; then
54043    USE_EXTERNAL_LIBGIF=false
54044  elif test "x${with_giflib}" = "xsystem"; then
54045    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
54046if test "x$ac_cv_header_gif_lib_h" = xyes; then :
54047
54048else
54049   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
54050fi
54051
54052
54053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
54054$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
54055if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
54056  $as_echo_n "(cached) " >&6
54057else
54058  ac_check_lib_save_LIBS=$LIBS
54059LIBS="-lgif  $LIBS"
54060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54061/* end confdefs.h.  */
54062
54063/* Override any GCC internal prototype to avoid an error.
54064   Use char because int might match the return type of a GCC
54065   builtin and then its argument prototype would still apply.  */
54066#ifdef __cplusplus
54067extern "C"
54068#endif
54069char DGifGetCode ();
54070int
54071main ()
54072{
54073return DGifGetCode ();
54074  ;
54075  return 0;
54076}
54077_ACEOF
54078if ac_fn_cxx_try_link "$LINENO"; then :
54079  ac_cv_lib_gif_DGifGetCode=yes
54080else
54081  ac_cv_lib_gif_DGifGetCode=no
54082fi
54083rm -f core conftest.err conftest.$ac_objext \
54084    conftest$ac_exeext conftest.$ac_ext
54085LIBS=$ac_check_lib_save_LIBS
54086fi
54087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
54088$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
54089if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
54090  cat >>confdefs.h <<_ACEOF
54091#define HAVE_LIBGIF 1
54092_ACEOF
54093
54094  LIBS="-lgif $LIBS"
54095
54096else
54097   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
54098fi
54099
54100
54101    USE_EXTERNAL_LIBGIF=true
54102  else
54103    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
54104  fi
54105
54106
54107
54108
54109
54110# Check whether --with-libpng was given.
54111if test "${with_libpng+set}" = set; then :
54112  withval=$with_libpng;
54113fi
54114
54115
54116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
54117$as_echo_n "checking for which libpng to use... " >&6; }
54118
54119  # default is bundled
54120  DEFAULT_LIBPNG=bundled
54121  # if user didn't specify, use DEFAULT_LIBPNG
54122  if test "x${with_libpng}" = "x"; then
54123      with_libpng=${DEFAULT_LIBPNG}
54124  fi
54125
54126  if test "x${with_libpng}" = "xbundled"; then
54127      USE_EXTERNAL_LIBPNG=false
54128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54129$as_echo "bundled" >&6; }
54130  elif test "x${with_libpng}" = "xsystem"; then
54131
54132pkg_failed=no
54133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
54134$as_echo_n "checking for PNG... " >&6; }
54135
54136if test -n "$PNG_CFLAGS"; then
54137    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
54138 elif test -n "$PKG_CONFIG"; then
54139    if test -n "$PKG_CONFIG" && \
54140    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54141  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54142  ac_status=$?
54143  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54144  test $ac_status = 0; }; then
54145  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
54146else
54147  pkg_failed=yes
54148fi
54149 else
54150    pkg_failed=untried
54151fi
54152if test -n "$PNG_LIBS"; then
54153    pkg_cv_PNG_LIBS="$PNG_LIBS"
54154 elif test -n "$PKG_CONFIG"; then
54155    if test -n "$PKG_CONFIG" && \
54156    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54157  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54158  ac_status=$?
54159  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54160  test $ac_status = 0; }; then
54161  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
54162else
54163  pkg_failed=yes
54164fi
54165 else
54166    pkg_failed=untried
54167fi
54168
54169
54170
54171if test $pkg_failed = yes; then
54172
54173if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54174        _pkg_short_errors_supported=yes
54175else
54176        _pkg_short_errors_supported=no
54177fi
54178        if test $_pkg_short_errors_supported = yes; then
54179	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
54180        else
54181	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
54182        fi
54183	# Put the nasty error message in config.log where it belongs
54184	echo "$PNG_PKG_ERRORS" >&5
54185
54186	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54187$as_echo "no" >&6; }
54188                 LIBPNG_FOUND=no
54189elif test $pkg_failed = untried; then
54190	 LIBPNG_FOUND=no
54191else
54192	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
54193	PNG_LIBS=$pkg_cv_PNG_LIBS
54194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54195$as_echo "yes" >&6; }
54196	 LIBPNG_FOUND=yes
54197fi
54198      if test "x${LIBPNG_FOUND}" = "xyes"; then
54199          USE_EXTERNAL_LIBPNG=true
54200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54201$as_echo "system" >&6; }
54202      else
54203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54204$as_echo "system not found" >&6; }
54205          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
54206      fi
54207  else
54208      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
54209  fi
54210
54211
54212
54213
54214
54215# Check whether --with-zlib was given.
54216if test "${with_zlib+set}" = set; then :
54217  withval=$with_zlib;
54218fi
54219
54220
54221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
54222$as_echo_n "checking for compress in -lz... " >&6; }
54223if ${ac_cv_lib_z_compress+:} false; then :
54224  $as_echo_n "(cached) " >&6
54225else
54226  ac_check_lib_save_LIBS=$LIBS
54227LIBS="-lz  $LIBS"
54228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54229/* end confdefs.h.  */
54230
54231/* Override any GCC internal prototype to avoid an error.
54232   Use char because int might match the return type of a GCC
54233   builtin and then its argument prototype would still apply.  */
54234#ifdef __cplusplus
54235extern "C"
54236#endif
54237char compress ();
54238int
54239main ()
54240{
54241return compress ();
54242  ;
54243  return 0;
54244}
54245_ACEOF
54246if ac_fn_cxx_try_link "$LINENO"; then :
54247  ac_cv_lib_z_compress=yes
54248else
54249  ac_cv_lib_z_compress=no
54250fi
54251rm -f core conftest.err conftest.$ac_objext \
54252    conftest$ac_exeext conftest.$ac_ext
54253LIBS=$ac_check_lib_save_LIBS
54254fi
54255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
54256$as_echo "$ac_cv_lib_z_compress" >&6; }
54257if test "x$ac_cv_lib_z_compress" = xyes; then :
54258   ZLIB_FOUND=yes
54259else
54260   ZLIB_FOUND=no
54261fi
54262
54263
54264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
54265$as_echo_n "checking for which zlib to use... " >&6; }
54266
54267  DEFAULT_ZLIB=bundled
54268  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
54269    # On macosx default is system...on others default is bundled
54270    DEFAULT_ZLIB=system
54271  fi
54272
54273  if test "x${ZLIB_FOUND}" != "xyes"; then
54274    # If we don't find any system...set default to bundled
54275    DEFAULT_ZLIB=bundled
54276  fi
54277
54278  # If user didn't specify, use DEFAULT_ZLIB
54279  if test "x${with_zlib}" = "x"; then
54280    with_zlib=${DEFAULT_ZLIB}
54281  fi
54282
54283  if test "x${with_zlib}" = "xbundled"; then
54284    USE_EXTERNAL_LIBZ=false
54285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54286$as_echo "bundled" >&6; }
54287  elif test "x${with_zlib}" = "xsystem"; then
54288    if test "x${ZLIB_FOUND}" = "xyes"; then
54289      USE_EXTERNAL_LIBZ=true
54290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54291$as_echo "system" >&6; }
54292    else
54293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54294$as_echo "system not found" >&6; }
54295      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
54296    fi
54297  else
54298    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
54299  fi
54300
54301
54302
54303
54304
54305# Check whether --with-lcms was given.
54306if test "${with_lcms+set}" = set; then :
54307  withval=$with_lcms;
54308fi
54309
54310
54311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
54312$as_echo_n "checking for which lcms to use... " >&6; }
54313
54314  DEFAULT_LCMS=bundled
54315  # If user didn't specify, use DEFAULT_LCMS
54316  if test "x${with_lcms}" = "x"; then
54317      with_lcms=${DEFAULT_LCMS}
54318  fi
54319
54320  if test "x${with_lcms}" = "xbundled"; then
54321    USE_EXTERNAL_LCMS=false
54322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54323$as_echo "bundled" >&6; }
54324  elif test "x${with_lcms}" = "xsystem"; then
54325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54326$as_echo "system" >&6; }
54327
54328pkg_failed=no
54329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
54330$as_echo_n "checking for LCMS... " >&6; }
54331
54332if test -n "$LCMS_CFLAGS"; then
54333    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
54334 elif test -n "$PKG_CONFIG"; then
54335    if test -n "$PKG_CONFIG" && \
54336    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54337  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54338  ac_status=$?
54339  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54340  test $ac_status = 0; }; then
54341  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
54342else
54343  pkg_failed=yes
54344fi
54345 else
54346    pkg_failed=untried
54347fi
54348if test -n "$LCMS_LIBS"; then
54349    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
54350 elif test -n "$PKG_CONFIG"; then
54351    if test -n "$PKG_CONFIG" && \
54352    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54353  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54354  ac_status=$?
54355  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54356  test $ac_status = 0; }; then
54357  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
54358else
54359  pkg_failed=yes
54360fi
54361 else
54362    pkg_failed=untried
54363fi
54364
54365
54366
54367if test $pkg_failed = yes; then
54368
54369if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54370        _pkg_short_errors_supported=yes
54371else
54372        _pkg_short_errors_supported=no
54373fi
54374        if test $_pkg_short_errors_supported = yes; then
54375	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
54376        else
54377	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
54378        fi
54379	# Put the nasty error message in config.log where it belongs
54380	echo "$LCMS_PKG_ERRORS" >&5
54381
54382	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54383$as_echo "no" >&6; }
54384                LCMS_FOUND=no
54385elif test $pkg_failed = untried; then
54386	LCMS_FOUND=no
54387else
54388	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
54389	LCMS_LIBS=$pkg_cv_LCMS_LIBS
54390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54391$as_echo "yes" >&6; }
54392	LCMS_FOUND=yes
54393fi
54394    if test "x${LCMS_FOUND}" = "xyes"; then
54395      USE_EXTERNAL_LCMS=true
54396    else
54397      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
54398    fi
54399  else
54400    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
54401  fi
54402
54403
54404
54405
54406
54407
54408
54409
54410
54411
54412
54413  # Setup libm (the maths library)
54414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
54415$as_echo_n "checking for cos in -lm... " >&6; }
54416if ${ac_cv_lib_m_cos+:} false; then :
54417  $as_echo_n "(cached) " >&6
54418else
54419  ac_check_lib_save_LIBS=$LIBS
54420LIBS="-lm  $LIBS"
54421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54422/* end confdefs.h.  */
54423
54424/* Override any GCC internal prototype to avoid an error.
54425   Use char because int might match the return type of a GCC
54426   builtin and then its argument prototype would still apply.  */
54427#ifdef __cplusplus
54428extern "C"
54429#endif
54430char cos ();
54431int
54432main ()
54433{
54434return cos ();
54435  ;
54436  return 0;
54437}
54438_ACEOF
54439if ac_fn_cxx_try_link "$LINENO"; then :
54440  ac_cv_lib_m_cos=yes
54441else
54442  ac_cv_lib_m_cos=no
54443fi
54444rm -f core conftest.err conftest.$ac_objext \
54445    conftest$ac_exeext conftest.$ac_ext
54446LIBS=$ac_check_lib_save_LIBS
54447fi
54448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
54449$as_echo "$ac_cv_lib_m_cos" >&6; }
54450if test "x$ac_cv_lib_m_cos" = xyes; then :
54451  cat >>confdefs.h <<_ACEOF
54452#define HAVE_LIBM 1
54453_ACEOF
54454
54455  LIBS="-lm $LIBS"
54456
54457else
54458
54459      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
54460$as_echo "$as_me: Maths library was not found" >&6;}
54461
54462fi
54463
54464  LIBM=-lm
54465
54466
54467  # Setup libdl (for dynamic library loading)
54468  save_LIBS="$LIBS"
54469  LIBS=""
54470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54471$as_echo_n "checking for dlopen in -ldl... " >&6; }
54472if ${ac_cv_lib_dl_dlopen+:} false; then :
54473  $as_echo_n "(cached) " >&6
54474else
54475  ac_check_lib_save_LIBS=$LIBS
54476LIBS="-ldl  $LIBS"
54477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54478/* end confdefs.h.  */
54479
54480/* Override any GCC internal prototype to avoid an error.
54481   Use char because int might match the return type of a GCC
54482   builtin and then its argument prototype would still apply.  */
54483#ifdef __cplusplus
54484extern "C"
54485#endif
54486char dlopen ();
54487int
54488main ()
54489{
54490return dlopen ();
54491  ;
54492  return 0;
54493}
54494_ACEOF
54495if ac_fn_cxx_try_link "$LINENO"; then :
54496  ac_cv_lib_dl_dlopen=yes
54497else
54498  ac_cv_lib_dl_dlopen=no
54499fi
54500rm -f core conftest.err conftest.$ac_objext \
54501    conftest$ac_exeext conftest.$ac_ext
54502LIBS=$ac_check_lib_save_LIBS
54503fi
54504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54505$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
54506if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
54507  cat >>confdefs.h <<_ACEOF
54508#define HAVE_LIBDL 1
54509_ACEOF
54510
54511  LIBS="-ldl $LIBS"
54512
54513fi
54514
54515  LIBDL="$LIBS"
54516
54517  LIBS="$save_LIBS"
54518
54519  # Deprecated libraries, keep the flags for backwards compatibility
54520  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54521
54522
54523# Check whether --with-dxsdk was given.
54524if test "${with_dxsdk+set}" = set; then :
54525  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
54526$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
54527fi
54528
54529
54530
54531
54532# Check whether --with-dxsdk-lib was given.
54533if test "${with_dxsdk_lib+set}" = set; then :
54534  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
54535$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
54536fi
54537
54538
54539
54540
54541# Check whether --with-dxsdk-include was given.
54542if test "${with_dxsdk_include+set}" = set; then :
54543  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
54544$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
54545fi
54546
54547
54548  fi
54549
54550  # Control if libzip can use mmap. Available for purposes of overriding.
54551  LIBZIP_CAN_USE_MMAP=true
54552
54553
54554
54555
54556
54557
54558
54559
54560
54561
54562
54563
54564
54565
54566###############################################################################
54567#
54568# We need to do some final tweaking, when everything else is done.
54569#
54570###############################################################################
54571
54572
54573  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
54574
54575
54576  # The name of the Service Agent jar.
54577  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
54578  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54579    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
54580  fi
54581
54582
54583
54584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
54585$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
54586
54587    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
54588      ENABLE_INTREE_EC=yes
54589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54590$as_echo "yes" >&6; }
54591    else
54592      ENABLE_INTREE_EC=no
54593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54594$as_echo "no" >&6; }
54595    fi
54596
54597
54598
54599
54600###############################################################################
54601#
54602# Configure parts of the build that only affect the build performance,
54603# not the result.
54604#
54605###############################################################################
54606
54607
54608  # How many cores do we have on this build system?
54609
54610# Check whether --with-num-cores was given.
54611if test "${with_num_cores+set}" = set; then :
54612  withval=$with_num_cores;
54613fi
54614
54615  if test "x$with_num_cores" = x; then
54616    # The number of cores were not specified, try to probe them.
54617
54618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
54619$as_echo_n "checking for number of cores... " >&6; }
54620  NUM_CORES=1
54621  FOUND_CORES=no
54622
54623  if test -f /proc/cpuinfo; then
54624    # Looks like a Linux (or cygwin) system
54625    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
54626    FOUND_CORES=yes
54627  elif test -x /usr/sbin/psrinfo; then
54628    # Looks like a Solaris system
54629    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
54630    FOUND_CORES=yes
54631  elif test -x /usr/sbin/system_profiler; then
54632    # Looks like a MacOSX system
54633    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
54634    FOUND_CORES=yes
54635  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
54636    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
54637    FOUND_CORES=yes
54638  elif test -n "$NUMBER_OF_PROCESSORS"; then
54639    # On windows, look in the env
54640    NUM_CORES=$NUMBER_OF_PROCESSORS
54641    FOUND_CORES=yes
54642  fi
54643
54644  if test "x$FOUND_CORES" = xyes; then
54645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
54646$as_echo "$NUM_CORES" >&6; }
54647  else
54648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
54649$as_echo "could not detect number of cores, defaulting to 1" >&6; }
54650    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
54651$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
54652  fi
54653
54654  else
54655    NUM_CORES=$with_num_cores
54656  fi
54657
54658
54659
54660  # How much memory do we have on this build system?
54661
54662# Check whether --with-memory-size was given.
54663if test "${with_memory_size+set}" = set; then :
54664  withval=$with_memory_size;
54665fi
54666
54667  if test "x$with_memory_size" = x; then
54668    # The memory size was not specified, try to probe it.
54669
54670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
54671$as_echo_n "checking for memory size... " >&6; }
54672  # Default to 1024 MB
54673  MEMORY_SIZE=1024
54674  FOUND_MEM=no
54675
54676  if test -f /proc/meminfo; then
54677    # Looks like a Linux (or cygwin) system
54678    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
54679    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
54680    FOUND_MEM=yes
54681  elif test -x /usr/sbin/prtconf; then
54682    # Looks like a Solaris or AIX system
54683    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
54684    FOUND_MEM=yes
54685  elif test -x /usr/sbin/system_profiler; then
54686    # Looks like a MacOSX system
54687    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
54688    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
54689    FOUND_MEM=yes
54690  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
54691    # Windows, but without cygwin
54692    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
54693    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
54694    FOUND_MEM=yes
54695  fi
54696
54697  if test "x$FOUND_MEM" = xyes; then
54698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
54699$as_echo "$MEMORY_SIZE MB" >&6; }
54700  else
54701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
54702$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
54703    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
54704$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
54705  fi
54706
54707  else
54708    MEMORY_SIZE=$with_memory_size
54709  fi
54710
54711
54712
54713  # Provide a decent default number of parallel jobs for make depending on
54714  # number of cores, amount of memory and machine architecture.
54715
54716# Check whether --with-jobs was given.
54717if test "${with_jobs+set}" = set; then :
54718  withval=$with_jobs;
54719fi
54720
54721  if test "x$with_jobs" = x; then
54722    # Number of jobs was not specified, calculate.
54723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
54724$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
54725    # Approximate memory in GB.
54726    memory_gb=`expr $MEMORY_SIZE / 1024`
54727    # Pick the lowest of memory in gb and number of cores.
54728    if test "$memory_gb" -lt "$NUM_CORES"; then
54729      JOBS="$memory_gb"
54730    else
54731      JOBS="$NUM_CORES"
54732      # On bigger machines, leave some room for other processes to run
54733      if test "$JOBS" -gt "4"; then
54734        JOBS=`expr $JOBS '*' 90 / 100`
54735      fi
54736    fi
54737    # Cap number of jobs to 16
54738    if test "$JOBS" -gt "16"; then
54739      JOBS=16
54740    fi
54741    if test "$JOBS" -eq "0"; then
54742      JOBS=1
54743    fi
54744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
54745$as_echo "$JOBS" >&6; }
54746  else
54747    JOBS=$with_jobs
54748  fi
54749
54750
54751
54752# Setup arguments for the boot jdk (after cores and memory have been setup)
54753
54754  ##############################################################################
54755  #
54756  # Specify jvm options for anything that is run with the Boot JDK.
54757  # Not all JVM:s accept the same arguments on the command line.
54758  #
54759
54760# Check whether --with-boot-jdk-jvmargs was given.
54761if test "${with_boot_jdk_jvmargs+set}" = set; then :
54762  withval=$with_boot_jdk_jvmargs;
54763fi
54764
54765
54766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
54767$as_echo_n "checking flags for boot jdk java command ... " >&6; }
54768
54769  # Disable special log output when a debug build is used as Boot JDK...
54770
54771  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
54772  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
54773  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
54774  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54775  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54776  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54777    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
54778    JVM_ARG_OK=true
54779  else
54780    $ECHO "Arg failed:" >&5
54781    $ECHO "$OUTPUT" >&5
54782    JVM_ARG_OK=false
54783  fi
54784
54785
54786  # Apply user provided options.
54787
54788  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
54789  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
54790  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
54791  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54792  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54793  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54794    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
54795    JVM_ARG_OK=true
54796  else
54797    $ECHO "Arg failed:" >&5
54798    $ECHO "$OUTPUT" >&5
54799    JVM_ARG_OK=false
54800  fi
54801
54802
54803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
54804$as_echo "$boot_jdk_jvmargs" >&6; }
54805
54806  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
54807  JAVA_FLAGS=$boot_jdk_jvmargs
54808
54809
54810
54811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
54812$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
54813
54814  # Starting amount of heap memory.
54815
54816  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
54817  $ECHO "Command: $JAVA -Xms64M -version" >&5
54818  OUTPUT=`$JAVA -Xms64M -version 2>&1`
54819  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54820  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54821  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54822    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
54823    JVM_ARG_OK=true
54824  else
54825    $ECHO "Arg failed:" >&5
54826    $ECHO "$OUTPUT" >&5
54827    JVM_ARG_OK=false
54828  fi
54829
54830
54831  # Maximum amount of heap memory.
54832  # Maximum stack size.
54833  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
54834  if test "x$BOOT_JDK_BITS" = "x32"; then
54835    if test "$JVM_MAX_HEAP" -gt "1100"; then
54836      JVM_MAX_HEAP=1100
54837    elif test "$JVM_MAX_HEAP" -lt "512"; then
54838      JVM_MAX_HEAP=512
54839    fi
54840    STACK_SIZE=768
54841  else
54842    # Running a 64 bit JVM allows for and requires a bigger heap
54843    if test "$JVM_MAX_HEAP" -gt "1600"; then
54844      JVM_MAX_HEAP=1600
54845    elif test "$JVM_MAX_HEAP" -lt "512"; then
54846      JVM_MAX_HEAP=512
54847    fi
54848    STACK_SIZE=1536
54849  fi
54850
54851  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
54852  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
54853  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
54854  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54855  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54856  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54857    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
54858    JVM_ARG_OK=true
54859  else
54860    $ECHO "Arg failed:" >&5
54861    $ECHO "$OUTPUT" >&5
54862    JVM_ARG_OK=false
54863  fi
54864
54865
54866  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
54867  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
54868  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
54869  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54870  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54871  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54872    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
54873    JVM_ARG_OK=true
54874  else
54875    $ECHO "Arg failed:" >&5
54876    $ECHO "$OUTPUT" >&5
54877    JVM_ARG_OK=false
54878  fi
54879
54880
54881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
54882$as_echo "$boot_jdk_jvmargs_big" >&6; }
54883
54884  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
54885
54886
54887
54888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
54889$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
54890
54891  # Use serial gc for small short lived tools if possible
54892
54893  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
54894  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
54895  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
54896  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54897  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54898  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54899    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
54900    JVM_ARG_OK=true
54901  else
54902    $ECHO "Arg failed:" >&5
54903    $ECHO "$OUTPUT" >&5
54904    JVM_ARG_OK=false
54905  fi
54906
54907
54908  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
54909  $ECHO "Command: $JAVA -Xms32M -version" >&5
54910  OUTPUT=`$JAVA -Xms32M -version 2>&1`
54911  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54912  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54913  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54914    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
54915    JVM_ARG_OK=true
54916  else
54917    $ECHO "Arg failed:" >&5
54918    $ECHO "$OUTPUT" >&5
54919    JVM_ARG_OK=false
54920  fi
54921
54922
54923  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
54924  $ECHO "Command: $JAVA -Xmx512M -version" >&5
54925  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
54926  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54927  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54928  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54929    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
54930    JVM_ARG_OK=true
54931  else
54932    $ECHO "Arg failed:" >&5
54933    $ECHO "$OUTPUT" >&5
54934    JVM_ARG_OK=false
54935  fi
54936
54937
54938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
54939$as_echo "$boot_jdk_jvmargs_small" >&6; }
54940
54941  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
54942
54943
54944  JAVA_TOOL_FLAGS_SMALL=""
54945  for f in $JAVA_FLAGS_SMALL; do
54946    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
54947  done
54948
54949
54950
54951# Setup smart javac (after cores and memory have been setup)
54952
54953
54954# Check whether --with-sjavac-server-java was given.
54955if test "${with_sjavac_server_java+set}" = set; then :
54956  withval=$with_sjavac_server_java;
54957fi
54958
54959
54960  if test "x$with_sjavac_server_java" != x; then
54961    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
54962    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
54963    if test "x$FOUND_VERSION" = x; then
54964      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
54965    fi
54966  else
54967    SJAVAC_SERVER_JAVA="$JAVA"
54968  fi
54969
54970
54971  if test "$MEMORY_SIZE" -gt "3000"; then
54972
54973  $ECHO "Check if jvm arg is ok: -d64" >&5
54974  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
54975  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
54976  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54977  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54978  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54979    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
54980    JVM_ARG_OK=true
54981  else
54982    $ECHO "Arg failed:" >&5
54983    $ECHO "$OUTPUT" >&5
54984    JVM_ARG_OK=false
54985  fi
54986
54987    if test "$JVM_ARG_OK" = true; then
54988      JVM_64BIT=true
54989      JVM_ARG_OK=false
54990    fi
54991  fi
54992
54993  MX_VALUE=`expr $MEMORY_SIZE / 2`
54994  if test "$JVM_64BIT" = true; then
54995    # Set ms lower than mx since more than one instance of the server might
54996    # get launched at the same time before they figure out which instance won.
54997    MS_VALUE=512
54998    if test "$MX_VALUE" -gt "2048"; then
54999      MX_VALUE=2048
55000    fi
55001  else
55002    MS_VALUE=256
55003    if test "$MX_VALUE" -gt "1500"; then
55004      MX_VALUE=1500
55005    fi
55006  fi
55007  if test "$MX_VALUE" -lt "512"; then
55008    MX_VALUE=512
55009  fi
55010
55011  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
55012  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
55013  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
55014  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55015  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55016  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55017    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
55018    JVM_ARG_OK=true
55019  else
55020    $ECHO "Arg failed:" >&5
55021    $ECHO "$OUTPUT" >&5
55022    JVM_ARG_OK=false
55023  fi
55024
55025
55026
55027  # Check whether --enable-sjavac was given.
55028if test "${enable_sjavac+set}" = set; then :
55029  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
55030else
55031  ENABLE_SJAVAC="no"
55032fi
55033
55034  if test "x$JVM_ARG_OK" = "xfalse"; then
55035    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
55036$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
55037    ENABLE_SJAVAC="no"
55038  fi
55039  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
55040$as_echo_n "checking whether to use sjavac... " >&6; }
55041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
55042$as_echo "$ENABLE_SJAVAC" >&6; }
55043
55044
55045  # Check whether --enable-javac-server was given.
55046if test "${enable_javac_server+set}" = set; then :
55047  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
55048else
55049  ENABLE_JAVAC_SERVER="no"
55050fi
55051
55052  if test "x$JVM_ARG_OK" = "xfalse"; then
55053    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
55054$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
55055    ENABLE_JAVAC_SERVER="no"
55056  fi
55057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
55058$as_echo_n "checking whether to use javac server... " >&6; }
55059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
55060$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
55061
55062
55063
55064# Can the C/C++ compiler use precompiled headers?
55065
55066
55067  ###############################################################################
55068  #
55069  # Can the C/C++ compiler use precompiled headers?
55070  #
55071  # Check whether --enable-precompiled-headers was given.
55072if test "${enable_precompiled_headers+set}" = set; then :
55073  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
55074else
55075  ENABLE_PRECOMPH=yes
55076fi
55077
55078
55079  USE_PRECOMPILED_HEADER=1
55080  if test "x$ENABLE_PRECOMPH" = xno; then
55081    USE_PRECOMPILED_HEADER=0
55082  fi
55083
55084  if test "x$ENABLE_PRECOMPH" = xyes; then
55085    # Check that the compiler actually supports precomp headers.
55086    if test "x$TOOLCHAIN_TYPE" = xgcc; then
55087      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
55088$as_echo_n "checking that precompiled headers work... " >&6; }
55089      echo "int alfa();" > conftest.h
55090      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
55091      if test ! -f conftest.hpp.gch; then
55092        USE_PRECOMPILED_HEADER=0
55093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55094$as_echo "no" >&6; }
55095      else
55096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55097$as_echo "yes" >&6; }
55098      fi
55099      rm -f conftest.h conftest.hpp.gch
55100    fi
55101  fi
55102
55103
55104
55105
55106# Setup use of ccache, if available
55107
55108  # Check whether --enable-ccache was given.
55109if test "${enable_ccache+set}" = set; then :
55110  enableval=$enable_ccache;
55111fi
55112
55113
55114  CCACHE=
55115  CCACHE_STATUS=
55116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
55117$as_echo_n "checking is ccache enabled... " >&6; }
55118  if test "x$enable_ccache" = xyes; then
55119    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
55120      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55121$as_echo "yes" >&6; }
55122      OLD_PATH="$PATH"
55123      if test "x$TOOLCHAIN_PATH" != x; then
55124        PATH=$TOOLCHAIN_PATH:$PATH
55125      fi
55126
55127
55128
55129  # Publish this variable in the help.
55130
55131
55132  if [ -z "${CCACHE+x}" ]; then
55133    # The variable is not set by user, try to locate tool using the code snippet
55134    for ac_prog in ccache
55135do
55136  # Extract the first word of "$ac_prog", so it can be a program name with args.
55137set dummy $ac_prog; ac_word=$2
55138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55139$as_echo_n "checking for $ac_word... " >&6; }
55140if ${ac_cv_path_CCACHE+:} false; then :
55141  $as_echo_n "(cached) " >&6
55142else
55143  case $CCACHE in
55144  [\\/]* | ?:[\\/]*)
55145  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55146  ;;
55147  *)
55148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55149for as_dir in $PATH
55150do
55151  IFS=$as_save_IFS
55152  test -z "$as_dir" && as_dir=.
55153    for ac_exec_ext in '' $ac_executable_extensions; do
55154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55155    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55157    break 2
55158  fi
55159done
55160  done
55161IFS=$as_save_IFS
55162
55163  ;;
55164esac
55165fi
55166CCACHE=$ac_cv_path_CCACHE
55167if test -n "$CCACHE"; then
55168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55169$as_echo "$CCACHE" >&6; }
55170else
55171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55172$as_echo "no" >&6; }
55173fi
55174
55175
55176  test -n "$CCACHE" && break
55177done
55178
55179  else
55180    # The variable is set, but is it from the command line or the environment?
55181
55182    # Try to remove the string !CCACHE! from our list.
55183    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
55184    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
55185      # If it failed, the variable was not from the command line. Ignore it,
55186      # but warn the user (except for BASH, which is always set by the calling BASH).
55187      if test "xCCACHE" != xBASH; then
55188        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
55189$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
55190      fi
55191      # Try to locate tool using the code snippet
55192      for ac_prog in ccache
55193do
55194  # Extract the first word of "$ac_prog", so it can be a program name with args.
55195set dummy $ac_prog; ac_word=$2
55196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55197$as_echo_n "checking for $ac_word... " >&6; }
55198if ${ac_cv_path_CCACHE+:} false; then :
55199  $as_echo_n "(cached) " >&6
55200else
55201  case $CCACHE in
55202  [\\/]* | ?:[\\/]*)
55203  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55204  ;;
55205  *)
55206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55207for as_dir in $PATH
55208do
55209  IFS=$as_save_IFS
55210  test -z "$as_dir" && as_dir=.
55211    for ac_exec_ext in '' $ac_executable_extensions; do
55212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55213    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55215    break 2
55216  fi
55217done
55218  done
55219IFS=$as_save_IFS
55220
55221  ;;
55222esac
55223fi
55224CCACHE=$ac_cv_path_CCACHE
55225if test -n "$CCACHE"; then
55226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55227$as_echo "$CCACHE" >&6; }
55228else
55229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55230$as_echo "no" >&6; }
55231fi
55232
55233
55234  test -n "$CCACHE" && break
55235done
55236
55237    else
55238      # If it succeeded, then it was overridden by the user. We will use it
55239      # for the tool.
55240
55241      # First remove it from the list of overridden variables, so we can test
55242      # for unknown variables in the end.
55243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
55244
55245      # Check if we try to supply an empty value
55246      if test "x$CCACHE" = x; then
55247        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
55248$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
55249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55250$as_echo_n "checking for CCACHE... " >&6; }
55251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
55252$as_echo "disabled" >&6; }
55253      else
55254        # Check if the provided tool contains a complete path.
55255        tool_specified="$CCACHE"
55256        tool_basename="${tool_specified##*/}"
55257        if test "x$tool_basename" = "x$tool_specified"; then
55258          # A command without a complete path is provided, search $PATH.
55259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
55260$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
55261          # Extract the first word of "$tool_basename", so it can be a program name with args.
55262set dummy $tool_basename; ac_word=$2
55263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55264$as_echo_n "checking for $ac_word... " >&6; }
55265if ${ac_cv_path_CCACHE+:} false; then :
55266  $as_echo_n "(cached) " >&6
55267else
55268  case $CCACHE in
55269  [\\/]* | ?:[\\/]*)
55270  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55271  ;;
55272  *)
55273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55274for as_dir in $PATH
55275do
55276  IFS=$as_save_IFS
55277  test -z "$as_dir" && as_dir=.
55278    for ac_exec_ext in '' $ac_executable_extensions; do
55279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55280    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55282    break 2
55283  fi
55284done
55285  done
55286IFS=$as_save_IFS
55287
55288  ;;
55289esac
55290fi
55291CCACHE=$ac_cv_path_CCACHE
55292if test -n "$CCACHE"; then
55293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55294$as_echo "$CCACHE" >&6; }
55295else
55296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55297$as_echo "no" >&6; }
55298fi
55299
55300
55301          if test "x$CCACHE" = x; then
55302            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
55303          fi
55304        else
55305          # Otherwise we believe it is a complete path. Use it as it is.
55306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
55307$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
55308          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55309$as_echo_n "checking for CCACHE... " >&6; }
55310          if test ! -x "$tool_specified"; then
55311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
55312$as_echo "not found" >&6; }
55313            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
55314          fi
55315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
55316$as_echo "$tool_specified" >&6; }
55317        fi
55318      fi
55319    fi
55320
55321  fi
55322
55323
55324
55325  if test "x$CCACHE" = x; then
55326    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
55327  fi
55328
55329
55330      PATH="$OLD_PATH"
55331      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
55332      CCACHE_STATUS="Active ($CCACHE_VERSION)"
55333    else
55334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55335$as_echo "no" >&6; }
55336      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
55337$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
55338    fi
55339  elif test "x$enable_ccache" = xno; then
55340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
55341$as_echo "no, explicitly disabled" >&6; }
55342    CCACHE_STATUS="Disabled"
55343  elif test "x$enable_ccache" = x; then
55344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55345$as_echo "no" >&6; }
55346  else
55347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
55348$as_echo "unknown" >&6; }
55349    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
55350  fi
55351
55352
55353
55354# Check whether --with-ccache-dir was given.
55355if test "${with_ccache_dir+set}" = set; then :
55356  withval=$with_ccache_dir;
55357fi
55358
55359
55360  if test "x$with_ccache_dir" != x; then
55361    # When using a non home ccache directory, assume the use is to share ccache files
55362    # with other users. Thus change the umask.
55363    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
55364    if test "x$CCACHE" = x; then
55365      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
55366$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
55367    fi
55368  fi
55369
55370  if test "x$CCACHE" != x; then
55371
55372  if test "x$CCACHE" != x; then
55373    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
55374      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
55375          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
55376      if test "x$HAS_BAD_CCACHE" != "x"; then
55377        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
55378      fi
55379      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
55380$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
55381      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
55382      PUSHED_FLAGS="$CXXFLAGS"
55383      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
55384      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55385/* end confdefs.h.  */
55386
55387int
55388main ()
55389{
55390
55391  ;
55392  return 0;
55393}
55394_ACEOF
55395if ac_fn_cxx_try_compile "$LINENO"; then :
55396  CC_KNOWS_CCACHE_TRICK=yes
55397else
55398  CC_KNOWS_CCACHE_TRICK=no
55399fi
55400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55401      CXXFLAGS="$PUSHED_FLAGS"
55402      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
55403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55404$as_echo "yes" >&6; }
55405        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
55406
55407        CCACHE_SLOPPINESS=pch_defines,time_macros
55408      else
55409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55410$as_echo "no" >&6; }
55411        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
55412      fi
55413    fi
55414
55415    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
55416        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
55417
55418    if test "x$SET_CCACHE_DIR" != x; then
55419      mkdir -p $CCACHE_DIR > /dev/null 2>&1
55420      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
55421    fi
55422  fi
55423
55424  fi
55425
55426
55427###############################################################################
55428#
55429# And now the finish...
55430#
55431###############################################################################
55432
55433# Check for some common pitfalls
55434
55435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55436    file_to_test="$SRC_ROOT/LICENSE"
55437    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
55438      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
55439    fi
55440  fi
55441
55442
55443  # Did user specify any unknown variables?
55444
55445  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
55446    # Replace the separating ! with spaces before presenting for end user.
55447    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
55448    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
55449$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
55450  fi
55451
55452
55453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
55454$as_echo_n "checking if build directory is on local disk... " >&6; }
55455
55456  # df -l lists only local disks; if the given directory is not found then
55457  # a non-zero exit code is given
55458  if test "x$DF" = x; then
55459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55460      # msys does not have df; use Windows "net use" instead.
55461      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
55462      if test "x$IS_NETWORK_DISK" = x; then
55463        OUTPUT_DIR_IS_LOCAL="yes"
55464      else
55465        OUTPUT_DIR_IS_LOCAL="no"
55466      fi
55467    else
55468      # No df here, say it's local
55469      OUTPUT_DIR_IS_LOCAL="yes"
55470    fi
55471  else
55472    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
55473      OUTPUT_DIR_IS_LOCAL="yes"
55474    else
55475      OUTPUT_DIR_IS_LOCAL="no"
55476    fi
55477  fi
55478
55479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
55480$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
55481
55482
55483
55484  # Check if the user has any old-style ALT_ variables set.
55485  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
55486
55487  # Before generating output files, test if they exist. If they do, this is a reconfigure.
55488  # Since we can't properly handle the dependencies for this, warn the user about the situation
55489  if test -e $OUTPUT_ROOT/spec.gmk; then
55490    IS_RECONFIGURE=yes
55491  else
55492    IS_RECONFIGURE=no
55493  fi
55494
55495
55496# At the end, call the custom hook. (Dummy macro if no custom sources available)
55497
55498
55499# We're messing a bit with internal autoconf variables to put the config.status
55500# in the output directory instead of the current directory.
55501CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
55502
55503# Create the actual output files. Now the main work of configure is done.
55504cat >confcache <<\_ACEOF
55505# This file is a shell script that caches the results of configure
55506# tests run on this system so they can be shared between configure
55507# scripts and configure runs, see configure's option --config-cache.
55508# It is not useful on other systems.  If it contains results you don't
55509# want to keep, you may remove or edit it.
55510#
55511# config.status only pays attention to the cache file if you give it
55512# the --recheck option to rerun configure.
55513#
55514# `ac_cv_env_foo' variables (set or unset) will be overridden when
55515# loading this file, other *unset* `ac_cv_foo' will be assigned the
55516# following values.
55517
55518_ACEOF
55519
55520# The following way of writing the cache mishandles newlines in values,
55521# but we know of no workaround that is simple, portable, and efficient.
55522# So, we kill variables containing newlines.
55523# Ultrix sh set writes to stderr and can't be redirected directly,
55524# and sets the high bit in the cache file unless we assign to the vars.
55525(
55526  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
55527    eval ac_val=\$$ac_var
55528    case $ac_val in #(
55529    *${as_nl}*)
55530      case $ac_var in #(
55531      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
55532$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
55533      esac
55534      case $ac_var in #(
55535      _ | IFS | as_nl) ;; #(
55536      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
55537      *) { eval $ac_var=; unset $ac_var;} ;;
55538      esac ;;
55539    esac
55540  done
55541
55542  (set) 2>&1 |
55543    case $as_nl`(ac_space=' '; set) 2>&1` in #(
55544    *${as_nl}ac_space=\ *)
55545      # `set' does not quote correctly, so add quotes: double-quote
55546      # substitution turns \\\\ into \\, and sed turns \\ into \.
55547      sed -n \
55548	"s/'/'\\\\''/g;
55549	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
55550      ;; #(
55551    *)
55552      # `set' quotes correctly as required by POSIX, so do not add quotes.
55553      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
55554      ;;
55555    esac |
55556    sort
55557) |
55558  sed '
55559     /^ac_cv_env_/b end
55560     t clear
55561     :clear
55562     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
55563     t end
55564     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
55565     :end' >>confcache
55566if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
55567  if test -w "$cache_file"; then
55568    if test "x$cache_file" != "x/dev/null"; then
55569      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
55570$as_echo "$as_me: updating cache $cache_file" >&6;}
55571      if test ! -f "$cache_file" || test -h "$cache_file"; then
55572	cat confcache >"$cache_file"
55573      else
55574        case $cache_file in #(
55575        */* | ?:*)
55576	  mv -f confcache "$cache_file"$$ &&
55577	  mv -f "$cache_file"$$ "$cache_file" ;; #(
55578        *)
55579	  mv -f confcache "$cache_file" ;;
55580	esac
55581      fi
55582    fi
55583  else
55584    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
55585$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
55586  fi
55587fi
55588rm -f confcache
55589
55590test "x$prefix" = xNONE && prefix=$ac_default_prefix
55591# Let make expand exec_prefix.
55592test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
55593
55594# Transform confdefs.h into DEFS.
55595# Protect against shell expansion while executing Makefile rules.
55596# Protect against Makefile macro expansion.
55597#
55598# If the first sed substitution is executed (which looks for macros that
55599# take arguments), then branch to the quote section.  Otherwise,
55600# look for a macro that doesn't take arguments.
55601ac_script='
55602:mline
55603/\\$/{
55604 N
55605 s,\\\n,,
55606 b mline
55607}
55608t clear
55609:clear
55610s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
55611t quote
55612s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
55613t quote
55614b any
55615:quote
55616s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
55617s/\[/\\&/g
55618s/\]/\\&/g
55619s/\$/$$/g
55620H
55621:any
55622${
55623	g
55624	s/^\n//
55625	s/\n/ /g
55626	p
55627}
55628'
55629DEFS=`sed -n "$ac_script" confdefs.h`
55630
55631
55632ac_libobjs=
55633ac_ltlibobjs=
55634U=
55635for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
55636  # 1. Remove the extension, and $U if already installed.
55637  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
55638  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
55639  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
55640  #    will be set to the directory where LIBOBJS objects are built.
55641  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
55642  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
55643done
55644LIBOBJS=$ac_libobjs
55645
55646LTLIBOBJS=$ac_ltlibobjs
55647
55648
55649
55650: "${CONFIG_STATUS=./config.status}"
55651ac_write_fail=0
55652ac_clean_files_save=$ac_clean_files
55653ac_clean_files="$ac_clean_files $CONFIG_STATUS"
55654{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
55655$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
55656as_write_fail=0
55657cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
55658#! $SHELL
55659# Generated by $as_me.
55660# Run this file to recreate the current configuration.
55661# Compiler output produced by configure, useful for debugging
55662# configure, is in config.log if it exists.
55663
55664debug=false
55665ac_cs_recheck=false
55666ac_cs_silent=false
55667
55668SHELL=\${CONFIG_SHELL-$SHELL}
55669export SHELL
55670_ASEOF
55671cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
55672## -------------------- ##
55673## M4sh Initialization. ##
55674## -------------------- ##
55675
55676# Be more Bourne compatible
55677DUALCASE=1; export DUALCASE # for MKS sh
55678if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
55679  emulate sh
55680  NULLCMD=:
55681  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
55682  # is contrary to our usage.  Disable this feature.
55683  alias -g '${1+"$@"}'='"$@"'
55684  setopt NO_GLOB_SUBST
55685else
55686  case `(set -o) 2>/dev/null` in #(
55687  *posix*) :
55688    set -o posix ;; #(
55689  *) :
55690     ;;
55691esac
55692fi
55693
55694
55695as_nl='
55696'
55697export as_nl
55698# Printing a long string crashes Solaris 7 /usr/bin/printf.
55699as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
55700as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
55701as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
55702# Prefer a ksh shell builtin over an external printf program on Solaris,
55703# but without wasting forks for bash or zsh.
55704if test -z "$BASH_VERSION$ZSH_VERSION" \
55705    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
55706  as_echo='print -r --'
55707  as_echo_n='print -rn --'
55708elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
55709  as_echo='printf %s\n'
55710  as_echo_n='printf %s'
55711else
55712  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55713    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55714    as_echo_n='/usr/ucb/echo -n'
55715  else
55716    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55717    as_echo_n_body='eval
55718      arg=$1;
55719      case $arg in #(
55720      *"$as_nl"*)
55721	expr "X$arg" : "X\\(.*\\)$as_nl";
55722	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
55723      esac;
55724      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
55725    '
55726    export as_echo_n_body
55727    as_echo_n='sh -c $as_echo_n_body as_echo'
55728  fi
55729  export as_echo_body
55730  as_echo='sh -c $as_echo_body as_echo'
55731fi
55732
55733# The user is always right.
55734if test "${PATH_SEPARATOR+set}" != set; then
55735  PATH_SEPARATOR=:
55736  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
55737    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
55738      PATH_SEPARATOR=';'
55739  }
55740fi
55741
55742
55743# IFS
55744# We need space, tab and new line, in precisely that order.  Quoting is
55745# there to prevent editors from complaining about space-tab.
55746# (If _AS_PATH_WALK were called with IFS unset, it would disable word
55747# splitting by setting IFS to empty value.)
55748IFS=" ""	$as_nl"
55749
55750# Find who we are.  Look in the path if we contain no directory separator.
55751as_myself=
55752case $0 in #((
55753  *[\\/]* ) as_myself=$0 ;;
55754  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55755for as_dir in $PATH
55756do
55757  IFS=$as_save_IFS
55758  test -z "$as_dir" && as_dir=.
55759    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
55760  done
55761IFS=$as_save_IFS
55762
55763     ;;
55764esac
55765# We did not find ourselves, most probably we were run as `sh COMMAND'
55766# in which case we are not to be found in the path.
55767if test "x$as_myself" = x; then
55768  as_myself=$0
55769fi
55770if test ! -f "$as_myself"; then
55771  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
55772  exit 1
55773fi
55774
55775# Unset variables that we do not need and which cause bugs (e.g. in
55776# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
55777# suppresses any "Segmentation fault" message there.  '((' could
55778# trigger a bug in pdksh 5.2.14.
55779for as_var in BASH_ENV ENV MAIL MAILPATH
55780do eval test x\${$as_var+set} = xset \
55781  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
55782done
55783PS1='$ '
55784PS2='> '
55785PS4='+ '
55786
55787# NLS nuisances.
55788LC_ALL=C
55789export LC_ALL
55790LANGUAGE=C
55791export LANGUAGE
55792
55793# CDPATH.
55794(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
55795
55796
55797# as_fn_error STATUS ERROR [LINENO LOG_FD]
55798# ----------------------------------------
55799# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
55800# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
55801# script with STATUS, using 1 if that was 0.
55802as_fn_error ()
55803{
55804  as_status=$1; test $as_status -eq 0 && as_status=1
55805  if test "$4"; then
55806    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
55807    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
55808  fi
55809  $as_echo "$as_me: error: $2" >&2
55810  as_fn_exit $as_status
55811} # as_fn_error
55812
55813
55814# as_fn_set_status STATUS
55815# -----------------------
55816# Set $? to STATUS, without forking.
55817as_fn_set_status ()
55818{
55819  return $1
55820} # as_fn_set_status
55821
55822# as_fn_exit STATUS
55823# -----------------
55824# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
55825as_fn_exit ()
55826{
55827  set +e
55828  as_fn_set_status $1
55829  exit $1
55830} # as_fn_exit
55831
55832# as_fn_unset VAR
55833# ---------------
55834# Portably unset VAR.
55835as_fn_unset ()
55836{
55837  { eval $1=; unset $1;}
55838}
55839as_unset=as_fn_unset
55840# as_fn_append VAR VALUE
55841# ----------------------
55842# Append the text in VALUE to the end of the definition contained in VAR. Take
55843# advantage of any shell optimizations that allow amortized linear growth over
55844# repeated appends, instead of the typical quadratic growth present in naive
55845# implementations.
55846if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
55847  eval 'as_fn_append ()
55848  {
55849    eval $1+=\$2
55850  }'
55851else
55852  as_fn_append ()
55853  {
55854    eval $1=\$$1\$2
55855  }
55856fi # as_fn_append
55857
55858# as_fn_arith ARG...
55859# ------------------
55860# Perform arithmetic evaluation on the ARGs, and store the result in the
55861# global $as_val. Take advantage of shells that can avoid forks. The arguments
55862# must be portable across $(()) and expr.
55863if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
55864  eval 'as_fn_arith ()
55865  {
55866    as_val=$(( $* ))
55867  }'
55868else
55869  as_fn_arith ()
55870  {
55871    as_val=`expr "$@" || test $? -eq 1`
55872  }
55873fi # as_fn_arith
55874
55875
55876if expr a : '\(a\)' >/dev/null 2>&1 &&
55877   test "X`expr 00001 : '.*\(...\)'`" = X001; then
55878  as_expr=expr
55879else
55880  as_expr=false
55881fi
55882
55883if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
55884  as_basename=basename
55885else
55886  as_basename=false
55887fi
55888
55889if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
55890  as_dirname=dirname
55891else
55892  as_dirname=false
55893fi
55894
55895as_me=`$as_basename -- "$0" ||
55896$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
55897	 X"$0" : 'X\(//\)$' \| \
55898	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
55899$as_echo X/"$0" |
55900    sed '/^.*\/\([^/][^/]*\)\/*$/{
55901	    s//\1/
55902	    q
55903	  }
55904	  /^X\/\(\/\/\)$/{
55905	    s//\1/
55906	    q
55907	  }
55908	  /^X\/\(\/\).*/{
55909	    s//\1/
55910	    q
55911	  }
55912	  s/.*/./; q'`
55913
55914# Avoid depending upon Character Ranges.
55915as_cr_letters='abcdefghijklmnopqrstuvwxyz'
55916as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
55917as_cr_Letters=$as_cr_letters$as_cr_LETTERS
55918as_cr_digits='0123456789'
55919as_cr_alnum=$as_cr_Letters$as_cr_digits
55920
55921ECHO_C= ECHO_N= ECHO_T=
55922case `echo -n x` in #(((((
55923-n*)
55924  case `echo 'xy\c'` in
55925  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
55926  xy)  ECHO_C='\c';;
55927  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
55928       ECHO_T='	';;
55929  esac;;
55930*)
55931  ECHO_N='-n';;
55932esac
55933
55934rm -f conf$$ conf$$.exe conf$$.file
55935if test -d conf$$.dir; then
55936  rm -f conf$$.dir/conf$$.file
55937else
55938  rm -f conf$$.dir
55939  mkdir conf$$.dir 2>/dev/null
55940fi
55941if (echo >conf$$.file) 2>/dev/null; then
55942  if ln -s conf$$.file conf$$ 2>/dev/null; then
55943    as_ln_s='ln -s'
55944    # ... but there are two gotchas:
55945    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
55946    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
55947    # In both cases, we have to default to `cp -pR'.
55948    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
55949      as_ln_s='cp -pR'
55950  elif ln conf$$.file conf$$ 2>/dev/null; then
55951    as_ln_s=ln
55952  else
55953    as_ln_s='cp -pR'
55954  fi
55955else
55956  as_ln_s='cp -pR'
55957fi
55958rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
55959rmdir conf$$.dir 2>/dev/null
55960
55961
55962# as_fn_mkdir_p
55963# -------------
55964# Create "$as_dir" as a directory, including parents if necessary.
55965as_fn_mkdir_p ()
55966{
55967
55968  case $as_dir in #(
55969  -*) as_dir=./$as_dir;;
55970  esac
55971  test -d "$as_dir" || eval $as_mkdir_p || {
55972    as_dirs=
55973    while :; do
55974      case $as_dir in #(
55975      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
55976      *) as_qdir=$as_dir;;
55977      esac
55978      as_dirs="'$as_qdir' $as_dirs"
55979      as_dir=`$as_dirname -- "$as_dir" ||
55980$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
55981	 X"$as_dir" : 'X\(//\)[^/]' \| \
55982	 X"$as_dir" : 'X\(//\)$' \| \
55983	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
55984$as_echo X"$as_dir" |
55985    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
55986	    s//\1/
55987	    q
55988	  }
55989	  /^X\(\/\/\)[^/].*/{
55990	    s//\1/
55991	    q
55992	  }
55993	  /^X\(\/\/\)$/{
55994	    s//\1/
55995	    q
55996	  }
55997	  /^X\(\/\).*/{
55998	    s//\1/
55999	    q
56000	  }
56001	  s/.*/./; q'`
56002      test -d "$as_dir" && break
56003    done
56004    test -z "$as_dirs" || eval "mkdir $as_dirs"
56005  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
56006
56007
56008} # as_fn_mkdir_p
56009if mkdir -p . 2>/dev/null; then
56010  as_mkdir_p='mkdir -p "$as_dir"'
56011else
56012  test -d ./-p && rmdir ./-p
56013  as_mkdir_p=false
56014fi
56015
56016
56017# as_fn_executable_p FILE
56018# -----------------------
56019# Test if FILE is an executable regular file.
56020as_fn_executable_p ()
56021{
56022  test -f "$1" && test -x "$1"
56023} # as_fn_executable_p
56024as_test_x='test -x'
56025as_executable_p=as_fn_executable_p
56026
56027# Sed expression to map a string onto a valid CPP name.
56028as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
56029
56030# Sed expression to map a string onto a valid variable name.
56031as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
56032
56033
56034exec 6>&1
56035## ----------------------------------- ##
56036## Main body of $CONFIG_STATUS script. ##
56037## ----------------------------------- ##
56038_ASEOF
56039test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
56040
56041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56042# Save the log message, to keep $0 and so on meaningful, and to
56043# report actual input values of CONFIG_FILES etc. instead of their
56044# values after options handling.
56045ac_log="
56046This file was extended by OpenJDK $as_me jdk9, which was
56047generated by GNU Autoconf 2.69.  Invocation command line was
56048
56049  CONFIG_FILES    = $CONFIG_FILES
56050  CONFIG_HEADERS  = $CONFIG_HEADERS
56051  CONFIG_LINKS    = $CONFIG_LINKS
56052  CONFIG_COMMANDS = $CONFIG_COMMANDS
56053  $ $0 $@
56054
56055on `(hostname || uname -n) 2>/dev/null | sed 1q`
56056"
56057
56058_ACEOF
56059
56060case $ac_config_files in *"
56061"*) set x $ac_config_files; shift; ac_config_files=$*;;
56062esac
56063
56064
56065
56066cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56067# Files that config.status was made for.
56068config_files="$ac_config_files"
56069
56070_ACEOF
56071
56072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56073ac_cs_usage="\
56074\`$as_me' instantiates files and other configuration actions
56075from templates according to the current configuration.  Unless the files
56076and actions are specified as TAGs, all are instantiated by default.
56077
56078Usage: $0 [OPTION]... [TAG]...
56079
56080  -h, --help       print this help, then exit
56081  -V, --version    print version number and configuration settings, then exit
56082      --config     print configuration, then exit
56083  -q, --quiet, --silent
56084                   do not print progress messages
56085  -d, --debug      don't remove temporary files
56086      --recheck    update $as_me by reconfiguring in the same conditions
56087      --file=FILE[:TEMPLATE]
56088                   instantiate the configuration file FILE
56089
56090Configuration files:
56091$config_files
56092
56093Report bugs to <build-dev@openjdk.java.net>.
56094OpenJDK home page: <http://openjdk.java.net>."
56095
56096_ACEOF
56097cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56098ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
56099ac_cs_version="\\
56100OpenJDK config.status jdk9
56101configured by $0, generated by GNU Autoconf 2.69,
56102  with options \\"\$ac_cs_config\\"
56103
56104Copyright (C) 2012 Free Software Foundation, Inc.
56105This config.status script is free software; the Free Software Foundation
56106gives unlimited permission to copy, distribute and modify it."
56107
56108ac_pwd='$ac_pwd'
56109srcdir='$srcdir'
56110AWK='$AWK'
56111test -n "\$AWK" || AWK=awk
56112_ACEOF
56113
56114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56115# The default lists apply if the user does not specify any file.
56116ac_need_defaults=:
56117while test $# != 0
56118do
56119  case $1 in
56120  --*=?*)
56121    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56122    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
56123    ac_shift=:
56124    ;;
56125  --*=)
56126    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56127    ac_optarg=
56128    ac_shift=:
56129    ;;
56130  *)
56131    ac_option=$1
56132    ac_optarg=$2
56133    ac_shift=shift
56134    ;;
56135  esac
56136
56137  case $ac_option in
56138  # Handling of the options.
56139  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
56140    ac_cs_recheck=: ;;
56141  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
56142    $as_echo "$ac_cs_version"; exit ;;
56143  --config | --confi | --conf | --con | --co | --c )
56144    $as_echo "$ac_cs_config"; exit ;;
56145  --debug | --debu | --deb | --de | --d | -d )
56146    debug=: ;;
56147  --file | --fil | --fi | --f )
56148    $ac_shift
56149    case $ac_optarg in
56150    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
56151    '') as_fn_error $? "missing file argument" ;;
56152    esac
56153    as_fn_append CONFIG_FILES " '$ac_optarg'"
56154    ac_need_defaults=false;;
56155  --he | --h |  --help | --hel | -h )
56156    $as_echo "$ac_cs_usage"; exit ;;
56157  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
56158  | -silent | --silent | --silen | --sile | --sil | --si | --s)
56159    ac_cs_silent=: ;;
56160
56161  # This is an error.
56162  -*) as_fn_error $? "unrecognized option: \`$1'
56163Try \`$0 --help' for more information." ;;
56164
56165  *) as_fn_append ac_config_targets " $1"
56166     ac_need_defaults=false ;;
56167
56168  esac
56169  shift
56170done
56171
56172ac_configure_extra_args=
56173
56174if $ac_cs_silent; then
56175  exec 6>/dev/null
56176  ac_configure_extra_args="$ac_configure_extra_args --silent"
56177fi
56178
56179_ACEOF
56180cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56181if \$ac_cs_recheck; then
56182  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
56183  shift
56184  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
56185  CONFIG_SHELL='$SHELL'
56186  export CONFIG_SHELL
56187  exec "\$@"
56188fi
56189
56190_ACEOF
56191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56192exec 5>>config.log
56193{
56194  echo
56195  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
56196## Running $as_me. ##
56197_ASBOX
56198  $as_echo "$ac_log"
56199} >&5
56200
56201_ACEOF
56202cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56203_ACEOF
56204
56205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56206
56207# Handling of arguments.
56208for ac_config_target in $ac_config_targets
56209do
56210  case $ac_config_target in
56211    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
56212    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
56213    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
56214    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
56215    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
56216
56217  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
56218  esac
56219done
56220
56221
56222# If the user did not use the arguments to specify the items to instantiate,
56223# then the envvar interface is used.  Set only those that are not.
56224# We use the long form for the default assignment because of an extremely
56225# bizarre bug on SunOS 4.1.3.
56226if $ac_need_defaults; then
56227  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
56228fi
56229
56230# Have a temporary directory for convenience.  Make it in the build tree
56231# simply because there is no reason against having it here, and in addition,
56232# creating and moving files from /tmp can sometimes cause problems.
56233# Hook for its removal unless debugging.
56234# Note that there is a small window in which the directory will not be cleaned:
56235# after its creation but before its name has been assigned to `$tmp'.
56236$debug ||
56237{
56238  tmp= ac_tmp=
56239  trap 'exit_status=$?
56240  : "${ac_tmp:=$tmp}"
56241  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
56242' 0
56243  trap 'as_fn_exit 1' 1 2 13 15
56244}
56245# Create a (secure) tmp directory for tmp files.
56246
56247{
56248  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
56249  test -d "$tmp"
56250}  ||
56251{
56252  tmp=./conf$$-$RANDOM
56253  (umask 077 && mkdir "$tmp")
56254} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
56255ac_tmp=$tmp
56256
56257# Set up the scripts for CONFIG_FILES section.
56258# No need to generate them if there are no CONFIG_FILES.
56259# This happens for instance with `./config.status config.h'.
56260if test -n "$CONFIG_FILES"; then
56261
56262
56263ac_cr=`echo X | tr X '\015'`
56264# On cygwin, bash can eat \r inside `` if the user requested igncr.
56265# But we know of no other shell where ac_cr would be empty at this
56266# point, so we can use a bashism as a fallback.
56267if test "x$ac_cr" = x; then
56268  eval ac_cr=\$\'\\r\'
56269fi
56270ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
56271if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
56272  ac_cs_awk_cr='\\r'
56273else
56274  ac_cs_awk_cr=$ac_cr
56275fi
56276
56277echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
56278_ACEOF
56279
56280
56281{
56282  echo "cat >conf$$subs.awk <<_ACEOF" &&
56283  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
56284  echo "_ACEOF"
56285} >conf$$subs.sh ||
56286  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56287ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
56288ac_delim='%!_!# '
56289for ac_last_try in false false false false false :; do
56290  . ./conf$$subs.sh ||
56291    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56292
56293  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
56294  if test $ac_delim_n = $ac_delim_num; then
56295    break
56296  elif $ac_last_try; then
56297    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56298  else
56299    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
56300  fi
56301done
56302rm -f conf$$subs.sh
56303
56304cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56305cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
56306_ACEOF
56307sed -n '
56308h
56309s/^/S["/; s/!.*/"]=/
56310p
56311g
56312s/^[^!]*!//
56313:repl
56314t repl
56315s/'"$ac_delim"'$//
56316t delim
56317:nl
56318h
56319s/\(.\{148\}\)..*/\1/
56320t more1
56321s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
56322p
56323n
56324b repl
56325:more1
56326s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56327p
56328g
56329s/.\{148\}//
56330t nl
56331:delim
56332h
56333s/\(.\{148\}\)..*/\1/
56334t more2
56335s/["\\]/\\&/g; s/^/"/; s/$/"/
56336p
56337b
56338:more2
56339s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56340p
56341g
56342s/.\{148\}//
56343t delim
56344' <conf$$subs.awk | sed '
56345/^[^""]/{
56346  N
56347  s/\n//
56348}
56349' >>$CONFIG_STATUS || ac_write_fail=1
56350rm -f conf$$subs.awk
56351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56352_ACAWK
56353cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
56354  for (key in S) S_is_set[key] = 1
56355  FS = ""
56356
56357}
56358{
56359  line = $ 0
56360  nfields = split(line, field, "@")
56361  substed = 0
56362  len = length(field[1])
56363  for (i = 2; i < nfields; i++) {
56364    key = field[i]
56365    keylen = length(key)
56366    if (S_is_set[key]) {
56367      value = S[key]
56368      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
56369      len += length(value) + length(field[++i])
56370      substed = 1
56371    } else
56372      len += 1 + keylen
56373  }
56374
56375  print line
56376}
56377
56378_ACAWK
56379_ACEOF
56380cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56381if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
56382  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
56383else
56384  cat
56385fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
56386  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
56387_ACEOF
56388
56389# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
56390# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
56391# trailing colons and then remove the whole line if VPATH becomes empty
56392# (actually we leave an empty line to preserve line numbers).
56393if test "x$srcdir" = x.; then
56394  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
56395h
56396s///
56397s/^/:/
56398s/[	 ]*$/:/
56399s/:\$(srcdir):/:/g
56400s/:\${srcdir}:/:/g
56401s/:@srcdir@:/:/g
56402s/^:*//
56403s/:*$//
56404x
56405s/\(=[	 ]*\).*/\1/
56406G
56407s/\n//
56408s/^[^=]*=[	 ]*$//
56409}'
56410fi
56411
56412cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56413fi # test -n "$CONFIG_FILES"
56414
56415
56416eval set X "  :F $CONFIG_FILES      "
56417shift
56418for ac_tag
56419do
56420  case $ac_tag in
56421  :[FHLC]) ac_mode=$ac_tag; continue;;
56422  esac
56423  case $ac_mode$ac_tag in
56424  :[FHL]*:*);;
56425  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
56426  :[FH]-) ac_tag=-:-;;
56427  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
56428  esac
56429  ac_save_IFS=$IFS
56430  IFS=:
56431  set x $ac_tag
56432  IFS=$ac_save_IFS
56433  shift
56434  ac_file=$1
56435  shift
56436
56437  case $ac_mode in
56438  :L) ac_source=$1;;
56439  :[FH])
56440    ac_file_inputs=
56441    for ac_f
56442    do
56443      case $ac_f in
56444      -) ac_f="$ac_tmp/stdin";;
56445      *) # Look for the file first in the build tree, then in the source tree
56446	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
56447	 # because $ac_f cannot contain `:'.
56448	 test -f "$ac_f" ||
56449	   case $ac_f in
56450	   [\\/$]*) false;;
56451	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
56452	   esac ||
56453	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
56454      esac
56455      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
56456      as_fn_append ac_file_inputs " '$ac_f'"
56457    done
56458
56459    # Let's still pretend it is `configure' which instantiates (i.e., don't
56460    # use $as_me), people would be surprised to read:
56461    #    /* config.h.  Generated by config.status.  */
56462    configure_input='Generated from '`
56463	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
56464	`' by configure.'
56465    if test x"$ac_file" != x-; then
56466      configure_input="$ac_file.  $configure_input"
56467      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
56468$as_echo "$as_me: creating $ac_file" >&6;}
56469    fi
56470    # Neutralize special characters interpreted by sed in replacement strings.
56471    case $configure_input in #(
56472    *\&* | *\|* | *\\* )
56473       ac_sed_conf_input=`$as_echo "$configure_input" |
56474       sed 's/[\\\\&|]/\\\\&/g'`;; #(
56475    *) ac_sed_conf_input=$configure_input;;
56476    esac
56477
56478    case $ac_tag in
56479    *:-:* | *:-) cat >"$ac_tmp/stdin" \
56480      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
56481    esac
56482    ;;
56483  esac
56484
56485  ac_dir=`$as_dirname -- "$ac_file" ||
56486$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56487	 X"$ac_file" : 'X\(//\)[^/]' \| \
56488	 X"$ac_file" : 'X\(//\)$' \| \
56489	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
56490$as_echo X"$ac_file" |
56491    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56492	    s//\1/
56493	    q
56494	  }
56495	  /^X\(\/\/\)[^/].*/{
56496	    s//\1/
56497	    q
56498	  }
56499	  /^X\(\/\/\)$/{
56500	    s//\1/
56501	    q
56502	  }
56503	  /^X\(\/\).*/{
56504	    s//\1/
56505	    q
56506	  }
56507	  s/.*/./; q'`
56508  as_dir="$ac_dir"; as_fn_mkdir_p
56509  ac_builddir=.
56510
56511case "$ac_dir" in
56512.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
56513*)
56514  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
56515  # A ".." for each directory in $ac_dir_suffix.
56516  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
56517  case $ac_top_builddir_sub in
56518  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
56519  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
56520  esac ;;
56521esac
56522ac_abs_top_builddir=$ac_pwd
56523ac_abs_builddir=$ac_pwd$ac_dir_suffix
56524# for backward compatibility:
56525ac_top_builddir=$ac_top_build_prefix
56526
56527case $srcdir in
56528  .)  # We are building in place.
56529    ac_srcdir=.
56530    ac_top_srcdir=$ac_top_builddir_sub
56531    ac_abs_top_srcdir=$ac_pwd ;;
56532  [\\/]* | ?:[\\/]* )  # Absolute name.
56533    ac_srcdir=$srcdir$ac_dir_suffix;
56534    ac_top_srcdir=$srcdir
56535    ac_abs_top_srcdir=$srcdir ;;
56536  *) # Relative name.
56537    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
56538    ac_top_srcdir=$ac_top_build_prefix$srcdir
56539    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
56540esac
56541ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
56542
56543
56544  case $ac_mode in
56545  :F)
56546  #
56547  # CONFIG_FILE
56548  #
56549
56550_ACEOF
56551
56552cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56553# If the template does not know about datarootdir, expand it.
56554# FIXME: This hack should be removed a few years after 2.60.
56555ac_datarootdir_hack=; ac_datarootdir_seen=
56556ac_sed_dataroot='
56557/datarootdir/ {
56558  p
56559  q
56560}
56561/@datadir@/p
56562/@docdir@/p
56563/@infodir@/p
56564/@localedir@/p
56565/@mandir@/p'
56566case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
56567*datarootdir*) ac_datarootdir_seen=yes;;
56568*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
56569  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
56570$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
56571_ACEOF
56572cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56573  ac_datarootdir_hack='
56574  s&@datadir@&$datadir&g
56575  s&@docdir@&$docdir&g
56576  s&@infodir@&$infodir&g
56577  s&@localedir@&$localedir&g
56578  s&@mandir@&$mandir&g
56579  s&\\\${datarootdir}&$datarootdir&g' ;;
56580esac
56581_ACEOF
56582
56583# Neutralize VPATH when `$srcdir' = `.'.
56584# Shell code in configure.ac might set extrasub.
56585# FIXME: do we really want to maintain this feature?
56586cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56587ac_sed_extra="$ac_vpsub
56588$extrasub
56589_ACEOF
56590cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56591:t
56592/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
56593s|@configure_input@|$ac_sed_conf_input|;t t
56594s&@top_builddir@&$ac_top_builddir_sub&;t t
56595s&@top_build_prefix@&$ac_top_build_prefix&;t t
56596s&@srcdir@&$ac_srcdir&;t t
56597s&@abs_srcdir@&$ac_abs_srcdir&;t t
56598s&@top_srcdir@&$ac_top_srcdir&;t t
56599s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
56600s&@builddir@&$ac_builddir&;t t
56601s&@abs_builddir@&$ac_abs_builddir&;t t
56602s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
56603$ac_datarootdir_hack
56604"
56605eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
56606  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56607
56608test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
56609  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
56610  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
56611      "$ac_tmp/out"`; test -z "$ac_out"; } &&
56612  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56613which seems to be undefined.  Please make sure it is defined" >&5
56614$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56615which seems to be undefined.  Please make sure it is defined" >&2;}
56616
56617  rm -f "$ac_tmp/stdin"
56618  case $ac_file in
56619  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
56620  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
56621  esac \
56622  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56623 ;;
56624
56625
56626
56627  esac
56628
56629done # for ac_tag
56630
56631
56632as_fn_exit 0
56633_ACEOF
56634ac_clean_files=$ac_clean_files_save
56635
56636test $ac_write_fail = 0 ||
56637  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
56638
56639
56640# configure is writing to config.log, and then calls config.status.
56641# config.status does its own redirection, appending to config.log.
56642# Unfortunately, on DOS this fails, as config.log is still kept open
56643# by configure, so config.status won't be able to write to it; its
56644# output is simply discarded.  So we exec the FD to /dev/null,
56645# effectively closing config.log, so it can be properly (re)opened and
56646# appended to by config.status.  When coming back to configure, we
56647# need to make the FD available again.
56648if test "$no_create" != yes; then
56649  ac_cs_success=:
56650  ac_config_status_args=
56651  test "$silent" = yes &&
56652    ac_config_status_args="$ac_config_status_args --quiet"
56653  exec 5>/dev/null
56654  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
56655  exec 5>>config.log
56656  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
56657  # would make configure fail if this is the last instruction.
56658  $ac_cs_success || as_fn_exit 1
56659fi
56660if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
56661  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
56662$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
56663fi
56664
56665
56666# After AC_OUTPUT, we need to do final work
56667
56668
56669  # Try to move config.log (generated by autoconf) to the configure-support directory.
56670  if test -e ./config.log; then
56671    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
56672  fi
56673
56674  # Rotate our log file (configure.log)
56675  if test -e "$OUTPUT_ROOT/configure.log.old"; then
56676    $RM -f "$OUTPUT_ROOT/configure.log.old"
56677  fi
56678  if test -e "$OUTPUT_ROOT/configure.log"; then
56679    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
56680  fi
56681
56682  # Move configure.log from current directory to the build output root
56683  if test -e ./configure.log; then
56684    echo found it
56685    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
56686  fi
56687
56688  # Make the compare script executable
56689  $CHMOD +x $OUTPUT_ROOT/compare.sh
56690
56691
56692# Finally output some useful information to the user
56693
56694  # Finally output some useful information to the user
56695
56696  printf "\n"
56697  printf "====================================================\n"
56698  if test "x$no_create" != "xyes"; then
56699    if test "x$IS_RECONFIGURE" != "xyes"; then
56700      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
56701    else
56702      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
56703    fi
56704  else
56705    if test "x$IS_RECONFIGURE" != "xyes"; then
56706      printf "A configuration has been successfully checked but not created\n"
56707    else
56708      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
56709    fi
56710  fi
56711  if test "x$CONFIGURE_COMMAND_LINE" != x; then
56712    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
56713  else
56714    printf "using default settings.\n"
56715  fi
56716
56717  printf "\n"
56718  printf "Configuration summary:\n"
56719  printf "* Debug level:    $DEBUG_LEVEL\n"
56720  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
56721  printf "* JDK variant:    $JDK_VARIANT\n"
56722  printf "* JVM variants:   $with_jvm_variants\n"
56723  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
56724
56725  printf "\n"
56726  printf "Tools summary:\n"
56727  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
56728    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
56729  fi
56730  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
56731  if test "x$TOOLCHAIN_VERSION" != "x"; then
56732    print_version=" $TOOLCHAIN_VERSION"
56733  fi
56734  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
56735  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
56736  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
56737
56738  printf "\n"
56739  printf "Build performance summary:\n"
56740  printf "* Cores to use:   $JOBS\n"
56741  printf "* Memory limit:   $MEMORY_SIZE MB\n"
56742  if test "x$CCACHE_STATUS" != "x"; then
56743    printf "* ccache status:  $CCACHE_STATUS\n"
56744  fi
56745  printf "\n"
56746
56747  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
56748    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
56749    printf "will result in longer build times.\n"
56750    printf "\n"
56751  fi
56752
56753  if test "x$FOUND_ALT_VARIABLES" != "x"; then
56754    printf "WARNING: You have old-style ALT_ environment variables set.\n"
56755    printf "These are not respected, and will be ignored. It is recommended\n"
56756    printf "that you clean your environment. The following variables are set:\n"
56757    printf "$FOUND_ALT_VARIABLES\n"
56758    printf "\n"
56759  fi
56760
56761  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
56762    printf "WARNING: Your build output directory is not on a local disk.\n"
56763    printf "This will severely degrade build performance!\n"
56764    printf "It is recommended that you create an output directory on a local disk,\n"
56765    printf "and run the configure script again from that directory.\n"
56766    printf "\n"
56767  fi
56768
56769  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
56770    printf "WARNING: The result of this configuration has overridden an older\n"
56771    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
56772    printf "proper build. Failure to do so might result in strange build problems.\n"
56773    printf "\n"
56774  fi
56775
56776  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
56777    printf "WARNING: The result of this configuration was not saved.\n"
56778    printf "You should run without '--no-create | -n' to create the configuration.\n"
56779    printf "\n"
56780  fi
56781
56782
56783
56784  # Locate config.log.
56785  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
56786    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
56787  elif test -e "./config.log"; then
56788    CONFIG_LOG_PATH="."
56789  fi
56790
56791  if test -e "$CONFIG_LOG_PATH/config.log"; then
56792    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
56793    if test $? -eq 0; then
56794      printf "The following warnings were produced. Repeated here for convenience:\n"
56795      # We must quote sed expression (using []) to stop m4 from eating the [].
56796      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
56797      printf "\n"
56798    fi
56799  fi
56800
56801