generated-configure.sh revision 1784:fed781527153
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
688HOTSPOT_SET_WARNINGS_AS_ERRORS
689WARNINGS_AS_ERRORS
690COMPILER_SUPPORTS_TARGET_BITS_FLAG
691ZERO_ARCHFLAG
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695JDKEXE_LIBS
696JDKLIB_LIBS
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708CXX_O_FLAG_NONE
709CXX_O_FLAG_DEBUG
710CXX_O_FLAG_NORM
711CXX_O_FLAG_HI
712CXX_O_FLAG_HIGHEST
713C_O_FLAG_NONE
714C_O_FLAG_DEBUG
715C_O_FLAG_NORM
716C_O_FLAG_HI
717C_O_FLAG_HIGHEST
718CXXFLAGS_DEBUG_SYMBOLS
719CFLAGS_DEBUG_SYMBOLS
720CXX_FLAG_DEPS
721C_FLAG_DEPS
722SET_SHARED_LIBRARY_MAPFILE
723SET_SHARED_LIBRARY_NAME
724SET_SHARED_LIBRARY_ORIGIN
725SET_EXECUTABLE_ORIGIN
726CXX_FLAG_REORDER
727C_FLAG_REORDER
728RC_FLAGS
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733STRIPFLAGS
734ARFLAGS
735COMPILER_TARGET_BITS_FLAG
736JT_HOME
737JTREGEXE
738USING_BROKEN_SUSE_LD
739PACKAGE_PATH
740USE_CLANG
741HOTSPOT_LD
742HOTSPOT_CXX
743HOTSPOT_RC
744HOTSPOT_MT
745BUILD_LD
746BUILD_CXX
747BUILD_CC
748BUILD_SYSROOT_LDFLAGS
749BUILD_SYSROOT_CFLAGS
750ac_ct_OBJDUMP
751OBJDUMP
752ac_ct_OBJCOPY
753OBJCOPY
754ac_ct_NM
755ac_ct_STRIP
756GNM
757NM
758STRIP
759MSBUILD
760DUMPBIN
761RC
762MT
763LIPO
764ac_ct_AR
765AR
766AS
767LDCXX
768LD
769CXXCPP
770CPP
771ac_ct_CXX
772CXXFLAGS
773CXX
774ac_ct_PROPER_COMPILER_CXX
775PROPER_COMPILER_CXX
776TOOLCHAIN_PATH_CXX
777POTENTIAL_CXX
778OBJEXT
779EXEEXT
780ac_ct_CC
781CPPFLAGS
782LDFLAGS
783CFLAGS
784CC
785ac_ct_PROPER_COMPILER_CC
786PROPER_COMPILER_CC
787TOOLCHAIN_PATH_CC
788POTENTIAL_CC
789VS_LIB
790VS_INCLUDE
791VS_PATH
792CYGWIN_LINK
793SYSROOT_LDFLAGS
794SYSROOT_CFLAGS
795LEGACY_EXTRA_LDFLAGS
796LEGACY_EXTRA_CXXFLAGS
797LEGACY_EXTRA_CFLAGS
798EXE_SUFFIX
799OBJ_SUFFIX
800STATIC_LIBRARY
801SHARED_LIBRARY
802STATIC_LIBRARY_SUFFIX
803SHARED_LIBRARY_SUFFIX
804LIBRARY_PREFIX
805TOOLCHAIN_TYPE
806STATIC_BUILD
807BUILD_HOTSPOT
808HOTSPOT_DIST
809BUILD_OUTPUT
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
828VERSION_IS_GA
829VERSION_SHORT
830VERSION_STRING
831VERSION_NUMBER_FOUR_POSITIONS
832VERSION_NUMBER
833VERSION_OPT
834VERSION_BUILD
835VERSION_PRE
836VERSION_PATCH
837VERSION_SECURITY
838VERSION_MINOR
839VERSION_MAJOR
840MACOSX_BUNDLE_ID_BASE
841MACOSX_BUNDLE_NAME_BASE
842COMPANY_NAME
843JDK_RC_PLATFORM_NAME
844PRODUCT_SUFFIX
845PRODUCT_NAME
846LAUNCHER_NAME
847COPYRIGHT_YEAR
848COMPRESS_JARS
849UNLIMITED_CRYPTO
850CACERTS_FILE
851TEST_IN_BUILD
852BUILD_HEADLESS
853SUPPORT_HEADFUL
854SUPPORT_HEADLESS
855OS_VERSION_MICRO
856OS_VERSION_MINOR
857OS_VERSION_MAJOR
858PKG_CONFIG
859BASH_ARGS
860SETFILE
861CODESIGN
862XATTR
863DSYMUTIL
864IS_GNU_TIME
865PATCH
866TIME
867STAT
868HG
869READELF
870OTOOL
871LDD
872ZIP
873UNZIP
874FIND_DELETE
875OUTPUT_SYNC
876OUTPUT_SYNC_SUPPORTED
877CHECK_TOOLSDIR_MAKE
878CHECK_TOOLSDIR_GMAKE
879CHECK_MAKE
880CHECK_GMAKE
881MAKE
882PKGHANDLER
883CONFIGURESUPPORT_OUTPUTDIR
884OUTPUT_ROOT
885CONF_NAME
886SPEC
887SDKROOT
888XCODEBUILD
889BUILD_VARIANT_RELEASE
890DEBUG_CLASSFILES
891FASTDEBUG
892VARIANT
893DEBUG_LEVEL
894MACOSX_UNIVERSAL
895INCLUDE_SA
896JVM_VARIANT_CORE
897JVM_VARIANT_ZEROSHARK
898JVM_VARIANT_ZERO
899JVM_VARIANT_KERNEL
900JVM_VARIANT_MINIMAL1
901JVM_VARIANT_CLIENT
902JVM_VARIANT_SERVER
903JVM_VARIANTS
904JVM_INTERPRETER
905JDK_VARIANT
906SET_OPENJDK
907CANONICAL_TOPDIR
908ORIGINAL_TOPDIR
909TOPDIR
910PATH_SEP
911ZERO_ARCHDEF
912DEFINE_CROSS_COMPILE_ARCH
913LP64
914OPENJDK_TARGET_OS_EXPORT_DIR
915OPENJDK_TARGET_CPU_JLI_CFLAGS
916OPENJDK_TARGET_CPU_OSARCH
917OPENJDK_TARGET_CPU_ISADIR
918OPENJDK_TARGET_CPU_LIBDIR
919OPENJDK_TARGET_CPU_LEGACY_LIB
920OPENJDK_TARGET_CPU_LEGACY
921REQUIRED_OS_VERSION
922REQUIRED_OS_NAME
923COMPILE_TYPE
924OPENJDK_TARGET_CPU_ENDIAN
925OPENJDK_TARGET_CPU_BITS
926OPENJDK_TARGET_CPU_ARCH
927OPENJDK_TARGET_CPU
928OPENJDK_TARGET_OS_ENV
929OPENJDK_TARGET_OS_TYPE
930OPENJDK_TARGET_OS
931OPENJDK_BUILD_CPU_ENDIAN
932OPENJDK_BUILD_CPU_BITS
933OPENJDK_BUILD_CPU_ARCH
934OPENJDK_BUILD_CPU
935OPENJDK_BUILD_OS_ENV
936OPENJDK_BUILD_OS_TYPE
937OPENJDK_BUILD_OS
938OPENJDK_BUILD_AUTOCONF_NAME
939OPENJDK_TARGET_AUTOCONF_NAME
940target_os
941target_vendor
942target_cpu
943target
944host_os
945host_vendor
946host_cpu
947host
948build_os
949build_vendor
950build_cpu
951build
952NICE
953CPIO
954DF
955READLINK
956CYGPATH
957SED
958FGREP
959EGREP
960GREP
961AWK
962XARGS
963WHICH
964WC
965UNIQ
966UNAME
967TR
968TOUCH
969TEE
970TAR
971TAIL
972SORT
973SH
974RMDIR
975RM
976PRINTF
977NAWK
978MV
979MKTEMP
980MKDIR
981LS
982LN
983HEAD
984FIND
985FILE
986EXPR
987ECHO
988DIRNAME
989DIFF
990DATE
991CUT
992CP
993COMM
994CMP
995CHMOD
996CAT
997BASH
998BASENAME
999DATE_WHEN_CONFIGURED
1000ORIGINAL_PATH
1001CONFIGURE_COMMAND_LINE
1002target_alias
1003host_alias
1004build_alias
1005LIBS
1006ECHO_T
1007ECHO_N
1008ECHO_C
1009DEFS
1010mandir
1011localedir
1012libdir
1013psdir
1014pdfdir
1015dvidir
1016htmldir
1017infodir
1018docdir
1019oldincludedir
1020includedir
1021localstatedir
1022sharedstatedir
1023sysconfdir
1024datadir
1025datarootdir
1026libexecdir
1027sbindir
1028bindir
1029program_transform_name
1030prefix
1031exec_prefix
1032PACKAGE_URL
1033PACKAGE_BUGREPORT
1034PACKAGE_STRING
1035PACKAGE_VERSION
1036PACKAGE_TARNAME
1037PACKAGE_NAME
1038PATH_SEPARATOR
1039SHELL'
1040ac_subst_files=''
1041ac_user_opts='
1042enable_option_checking
1043with_target_bits
1044enable_openjdk_only
1045with_custom_make_dir
1046with_jdk_variant
1047with_jvm_interpreter
1048with_jvm_variants
1049enable_debug
1050with_debug_level
1051with_devkit
1052with_sys_root
1053with_sysroot
1054with_tools_dir
1055with_toolchain_path
1056with_extra_path
1057with_sdk_name
1058with_conf_name
1059with_output_sync
1060enable_headful
1061enable_hotspot_test_in_build
1062with_cacerts_file
1063enable_unlimited_crypto
1064with_copyright_year
1065with_milestone
1066with_update_version
1067with_user_release_suffix
1068with_build_number
1069with_version_string
1070with_version_pre
1071with_version_opt
1072with_version_build
1073with_version_major
1074with_version_minor
1075with_version_security
1076with_version_patch
1077with_boot_jdk
1078with_add_source_root
1079with_override_source_root
1080with_adds_and_overrides
1081with_override_langtools
1082with_override_corba
1083with_override_jaxp
1084with_override_jaxws
1085with_override_hotspot
1086with_override_nashorn
1087with_override_jdk
1088with_import_hotspot
1089enable_static_build
1090with_toolchain_type
1091with_extra_cflags
1092with_extra_cxxflags
1093with_extra_ldflags
1094with_toolchain_version
1095with_build_devkit
1096with_jtreg
1097enable_warnings_as_errors
1098enable_debug_symbols
1099enable_zip_debug_info
1100enable_native_coverage
1101with_stdc__lib
1102with_msvcr_dll
1103with_msvcp_dll
1104with_x
1105with_cups
1106with_cups_include
1107with_freetype
1108with_freetype_include
1109with_freetype_lib
1110with_freetype_src
1111enable_freetype_bundling
1112with_alsa
1113with_alsa_include
1114with_alsa_lib
1115with_libffi
1116with_libffi_include
1117with_libffi_lib
1118with_libjpeg
1119with_giflib
1120with_libpng
1121with_zlib
1122with_lcms
1123with_dxsdk
1124with_dxsdk_lib
1125with_dxsdk_include
1126with_num_cores
1127with_memory_size
1128with_jobs
1129with_boot_jdk_jvmargs
1130with_sjavac_server_java
1131enable_sjavac
1132enable_javac_server
1133enable_precompiled_headers
1134enable_ccache
1135with_ccache_dir
1136'
1137      ac_precious_vars='build_alias
1138host_alias
1139target_alias
1140BASENAME
1141BASH
1142CAT
1143CHMOD
1144CMP
1145COMM
1146CP
1147CUT
1148DATE
1149DIFF
1150DIRNAME
1151ECHO
1152EXPR
1153FILE
1154FIND
1155HEAD
1156LN
1157LS
1158MKDIR
1159MKTEMP
1160MV
1161NAWK
1162PRINTF
1163RM
1164RMDIR
1165SH
1166SORT
1167TAIL
1168TAR
1169TEE
1170TOUCH
1171TR
1172UNAME
1173UNIQ
1174WC
1175WHICH
1176XARGS
1177AWK
1178GREP
1179EGREP
1180FGREP
1181SED
1182CYGPATH
1183READLINK
1184DF
1185CPIO
1186NICE
1187MAKE
1188UNZIP
1189ZIP
1190LDD
1191OTOOL
1192READELF
1193HG
1194STAT
1195TIME
1196PATCH
1197DSYMUTIL
1198XATTR
1199CODESIGN
1200SETFILE
1201PKG_CONFIG
1202JAVA
1203JAVAC
1204JAVAH
1205JAR
1206JARSIGNER
1207CC
1208CFLAGS
1209LDFLAGS
1210LIBS
1211CPPFLAGS
1212CXX
1213CXXFLAGS
1214CCC
1215CPP
1216CXXCPP
1217AS
1218AR
1219LIPO
1220STRIP
1221NM
1222GNM
1223OBJCOPY
1224OBJDUMP
1225BUILD_CC
1226BUILD_CXX
1227JTREGEXE
1228XMKMF
1229FREETYPE_CFLAGS
1230FREETYPE_LIBS
1231ALSA_CFLAGS
1232ALSA_LIBS
1233LIBFFI_CFLAGS
1234LIBFFI_LIBS
1235PNG_CFLAGS
1236PNG_LIBS
1237LCMS_CFLAGS
1238LCMS_LIBS
1239CCACHE'
1240
1241
1242# Initialize some variables set by options.
1243ac_init_help=
1244ac_init_version=false
1245ac_unrecognized_opts=
1246ac_unrecognized_sep=
1247# The variables have the same names as the options, with
1248# dashes changed to underlines.
1249cache_file=/dev/null
1250exec_prefix=NONE
1251no_create=
1252no_recursion=
1253prefix=NONE
1254program_prefix=NONE
1255program_suffix=NONE
1256program_transform_name=s,x,x,
1257silent=
1258site=
1259srcdir=
1260verbose=
1261x_includes=NONE
1262x_libraries=NONE
1263
1264# Installation directory options.
1265# These are left unexpanded so users can "make install exec_prefix=/foo"
1266# and all the variables that are supposed to be based on exec_prefix
1267# by default will actually change.
1268# Use braces instead of parens because sh, perl, etc. also accept them.
1269# (The list follows the same order as the GNU Coding Standards.)
1270bindir='${exec_prefix}/bin'
1271sbindir='${exec_prefix}/sbin'
1272libexecdir='${exec_prefix}/libexec'
1273datarootdir='${prefix}/share'
1274datadir='${datarootdir}'
1275sysconfdir='${prefix}/etc'
1276sharedstatedir='${prefix}/com'
1277localstatedir='${prefix}/var'
1278includedir='${prefix}/include'
1279oldincludedir='/usr/include'
1280docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1281infodir='${datarootdir}/info'
1282htmldir='${docdir}'
1283dvidir='${docdir}'
1284pdfdir='${docdir}'
1285psdir='${docdir}'
1286libdir='${exec_prefix}/lib'
1287localedir='${datarootdir}/locale'
1288mandir='${datarootdir}/man'
1289
1290ac_prev=
1291ac_dashdash=
1292for ac_option
1293do
1294  # If the previous option needs an argument, assign it.
1295  if test -n "$ac_prev"; then
1296    eval $ac_prev=\$ac_option
1297    ac_prev=
1298    continue
1299  fi
1300
1301  case $ac_option in
1302  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1303  *=)   ac_optarg= ;;
1304  *)    ac_optarg=yes ;;
1305  esac
1306
1307  # Accept the important Cygnus configure options, so we can diagnose typos.
1308
1309  case $ac_dashdash$ac_option in
1310  --)
1311    ac_dashdash=yes ;;
1312
1313  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1314    ac_prev=bindir ;;
1315  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1316    bindir=$ac_optarg ;;
1317
1318  -build | --build | --buil | --bui | --bu)
1319    ac_prev=build_alias ;;
1320  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1321    build_alias=$ac_optarg ;;
1322
1323  -cache-file | --cache-file | --cache-fil | --cache-fi \
1324  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1325    ac_prev=cache_file ;;
1326  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1327  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1328    cache_file=$ac_optarg ;;
1329
1330  --config-cache | -C)
1331    cache_file=config.cache ;;
1332
1333  -datadir | --datadir | --datadi | --datad)
1334    ac_prev=datadir ;;
1335  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1336    datadir=$ac_optarg ;;
1337
1338  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1339  | --dataroo | --dataro | --datar)
1340    ac_prev=datarootdir ;;
1341  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1342  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1343    datarootdir=$ac_optarg ;;
1344
1345  -disable-* | --disable-*)
1346    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1347    # Reject names that are not valid shell variable names.
1348    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1349      as_fn_error $? "invalid feature name: $ac_useropt"
1350    ac_useropt_orig=$ac_useropt
1351    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1352    case $ac_user_opts in
1353      *"
1354"enable_$ac_useropt"
1355"*) ;;
1356      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1357	 ac_unrecognized_sep=', ';;
1358    esac
1359    eval enable_$ac_useropt=no ;;
1360
1361  -docdir | --docdir | --docdi | --doc | --do)
1362    ac_prev=docdir ;;
1363  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1364    docdir=$ac_optarg ;;
1365
1366  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1367    ac_prev=dvidir ;;
1368  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1369    dvidir=$ac_optarg ;;
1370
1371  -enable-* | --enable-*)
1372    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1373    # Reject names that are not valid shell variable names.
1374    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1375      as_fn_error $? "invalid feature name: $ac_useropt"
1376    ac_useropt_orig=$ac_useropt
1377    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1378    case $ac_user_opts in
1379      *"
1380"enable_$ac_useropt"
1381"*) ;;
1382      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1383	 ac_unrecognized_sep=', ';;
1384    esac
1385    eval enable_$ac_useropt=\$ac_optarg ;;
1386
1387  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1388  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1389  | --exec | --exe | --ex)
1390    ac_prev=exec_prefix ;;
1391  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1392  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1393  | --exec=* | --exe=* | --ex=*)
1394    exec_prefix=$ac_optarg ;;
1395
1396  -gas | --gas | --ga | --g)
1397    # Obsolete; use --with-gas.
1398    with_gas=yes ;;
1399
1400  -help | --help | --hel | --he | -h)
1401    ac_init_help=long ;;
1402  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1403    ac_init_help=recursive ;;
1404  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1405    ac_init_help=short ;;
1406
1407  -host | --host | --hos | --ho)
1408    ac_prev=host_alias ;;
1409  -host=* | --host=* | --hos=* | --ho=*)
1410    host_alias=$ac_optarg ;;
1411
1412  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1413    ac_prev=htmldir ;;
1414  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1415  | --ht=*)
1416    htmldir=$ac_optarg ;;
1417
1418  -includedir | --includedir | --includedi | --included | --include \
1419  | --includ | --inclu | --incl | --inc)
1420    ac_prev=includedir ;;
1421  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1422  | --includ=* | --inclu=* | --incl=* | --inc=*)
1423    includedir=$ac_optarg ;;
1424
1425  -infodir | --infodir | --infodi | --infod | --info | --inf)
1426    ac_prev=infodir ;;
1427  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1428    infodir=$ac_optarg ;;
1429
1430  -libdir | --libdir | --libdi | --libd)
1431    ac_prev=libdir ;;
1432  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1433    libdir=$ac_optarg ;;
1434
1435  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1436  | --libexe | --libex | --libe)
1437    ac_prev=libexecdir ;;
1438  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1439  | --libexe=* | --libex=* | --libe=*)
1440    libexecdir=$ac_optarg ;;
1441
1442  -localedir | --localedir | --localedi | --localed | --locale)
1443    ac_prev=localedir ;;
1444  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1445    localedir=$ac_optarg ;;
1446
1447  -localstatedir | --localstatedir | --localstatedi | --localstated \
1448  | --localstate | --localstat | --localsta | --localst | --locals)
1449    ac_prev=localstatedir ;;
1450  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1451  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1452    localstatedir=$ac_optarg ;;
1453
1454  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1455    ac_prev=mandir ;;
1456  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1457    mandir=$ac_optarg ;;
1458
1459  -nfp | --nfp | --nf)
1460    # Obsolete; use --without-fp.
1461    with_fp=no ;;
1462
1463  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1464  | --no-cr | --no-c | -n)
1465    no_create=yes ;;
1466
1467  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1468  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1469    no_recursion=yes ;;
1470
1471  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1472  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1473  | --oldin | --oldi | --old | --ol | --o)
1474    ac_prev=oldincludedir ;;
1475  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1476  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1477  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1478    oldincludedir=$ac_optarg ;;
1479
1480  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1481    ac_prev=prefix ;;
1482  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1483    prefix=$ac_optarg ;;
1484
1485  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1486  | --program-pre | --program-pr | --program-p)
1487    ac_prev=program_prefix ;;
1488  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1489  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1490    program_prefix=$ac_optarg ;;
1491
1492  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1493  | --program-suf | --program-su | --program-s)
1494    ac_prev=program_suffix ;;
1495  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1496  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1497    program_suffix=$ac_optarg ;;
1498
1499  -program-transform-name | --program-transform-name \
1500  | --program-transform-nam | --program-transform-na \
1501  | --program-transform-n | --program-transform- \
1502  | --program-transform | --program-transfor \
1503  | --program-transfo | --program-transf \
1504  | --program-trans | --program-tran \
1505  | --progr-tra | --program-tr | --program-t)
1506    ac_prev=program_transform_name ;;
1507  -program-transform-name=* | --program-transform-name=* \
1508  | --program-transform-nam=* | --program-transform-na=* \
1509  | --program-transform-n=* | --program-transform-=* \
1510  | --program-transform=* | --program-transfor=* \
1511  | --program-transfo=* | --program-transf=* \
1512  | --program-trans=* | --program-tran=* \
1513  | --progr-tra=* | --program-tr=* | --program-t=*)
1514    program_transform_name=$ac_optarg ;;
1515
1516  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1517    ac_prev=pdfdir ;;
1518  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1519    pdfdir=$ac_optarg ;;
1520
1521  -psdir | --psdir | --psdi | --psd | --ps)
1522    ac_prev=psdir ;;
1523  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1524    psdir=$ac_optarg ;;
1525
1526  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527  | -silent | --silent | --silen | --sile | --sil)
1528    silent=yes ;;
1529
1530  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1531    ac_prev=sbindir ;;
1532  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1533  | --sbi=* | --sb=*)
1534    sbindir=$ac_optarg ;;
1535
1536  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1537  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1538  | --sharedst | --shareds | --shared | --share | --shar \
1539  | --sha | --sh)
1540    ac_prev=sharedstatedir ;;
1541  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1542  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1543  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1544  | --sha=* | --sh=*)
1545    sharedstatedir=$ac_optarg ;;
1546
1547  -site | --site | --sit)
1548    ac_prev=site ;;
1549  -site=* | --site=* | --sit=*)
1550    site=$ac_optarg ;;
1551
1552  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1553    ac_prev=srcdir ;;
1554  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1555    srcdir=$ac_optarg ;;
1556
1557  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1558  | --syscon | --sysco | --sysc | --sys | --sy)
1559    ac_prev=sysconfdir ;;
1560  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1561  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1562    sysconfdir=$ac_optarg ;;
1563
1564  -target | --target | --targe | --targ | --tar | --ta | --t)
1565    ac_prev=target_alias ;;
1566  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1567    target_alias=$ac_optarg ;;
1568
1569  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1570    verbose=yes ;;
1571
1572  -version | --version | --versio | --versi | --vers | -V)
1573    ac_init_version=: ;;
1574
1575  -with-* | --with-*)
1576    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1577    # Reject names that are not valid shell variable names.
1578    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1579      as_fn_error $? "invalid package name: $ac_useropt"
1580    ac_useropt_orig=$ac_useropt
1581    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1582    case $ac_user_opts in
1583      *"
1584"with_$ac_useropt"
1585"*) ;;
1586      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1587	 ac_unrecognized_sep=', ';;
1588    esac
1589    eval with_$ac_useropt=\$ac_optarg ;;
1590
1591  -without-* | --without-*)
1592    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1593    # Reject names that are not valid shell variable names.
1594    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1595      as_fn_error $? "invalid package name: $ac_useropt"
1596    ac_useropt_orig=$ac_useropt
1597    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1598    case $ac_user_opts in
1599      *"
1600"with_$ac_useropt"
1601"*) ;;
1602      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1603	 ac_unrecognized_sep=', ';;
1604    esac
1605    eval with_$ac_useropt=no ;;
1606
1607  --x)
1608    # Obsolete; use --with-x.
1609    with_x=yes ;;
1610
1611  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1612  | --x-incl | --x-inc | --x-in | --x-i)
1613    ac_prev=x_includes ;;
1614  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1615  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1616    x_includes=$ac_optarg ;;
1617
1618  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1619  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1620    ac_prev=x_libraries ;;
1621  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1622  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1623    x_libraries=$ac_optarg ;;
1624
1625  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1626Try \`$0 --help' for more information"
1627    ;;
1628
1629  *=*)
1630    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1631    # Reject names that are not valid shell variable names.
1632    case $ac_envvar in #(
1633      '' | [0-9]* | *[!_$as_cr_alnum]* )
1634      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1635    esac
1636    eval $ac_envvar=\$ac_optarg
1637    export $ac_envvar ;;
1638
1639  *)
1640    # FIXME: should be removed in autoconf 3.0.
1641    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1642    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1643      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1644    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1645    ;;
1646
1647  esac
1648done
1649
1650if test -n "$ac_prev"; then
1651  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1652  as_fn_error $? "missing argument to $ac_option"
1653fi
1654
1655if test -n "$ac_unrecognized_opts"; then
1656  case $enable_option_checking in
1657    no) ;;
1658    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1659    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1660  esac
1661fi
1662
1663# Check all directory arguments for consistency.
1664for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1665		datadir sysconfdir sharedstatedir localstatedir includedir \
1666		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1667		libdir localedir mandir
1668do
1669  eval ac_val=\$$ac_var
1670  # Remove trailing slashes.
1671  case $ac_val in
1672    */ )
1673      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1674      eval $ac_var=\$ac_val;;
1675  esac
1676  # Be sure to have absolute directory names.
1677  case $ac_val in
1678    [\\/$]* | ?:[\\/]* )  continue;;
1679    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1680  esac
1681  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1682done
1683
1684# There might be people who depend on the old broken behavior: `$host'
1685# used to hold the argument of --host etc.
1686# FIXME: To remove some day.
1687build=$build_alias
1688host=$host_alias
1689target=$target_alias
1690
1691# FIXME: To remove some day.
1692if test "x$host_alias" != x; then
1693  if test "x$build_alias" = x; then
1694    cross_compiling=maybe
1695  elif test "x$build_alias" != "x$host_alias"; then
1696    cross_compiling=yes
1697  fi
1698fi
1699
1700ac_tool_prefix=
1701test -n "$host_alias" && ac_tool_prefix=$host_alias-
1702
1703test "$silent" = yes && exec 6>/dev/null
1704
1705
1706ac_pwd=`pwd` && test -n "$ac_pwd" &&
1707ac_ls_di=`ls -di .` &&
1708ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1709  as_fn_error $? "working directory cannot be determined"
1710test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1711  as_fn_error $? "pwd does not report name of working directory"
1712
1713
1714# Find the source files, if location was not specified.
1715if test -z "$srcdir"; then
1716  ac_srcdir_defaulted=yes
1717  # Try the directory containing this script, then the parent directory.
1718  ac_confdir=`$as_dirname -- "$as_myself" ||
1719$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1720	 X"$as_myself" : 'X\(//\)[^/]' \| \
1721	 X"$as_myself" : 'X\(//\)$' \| \
1722	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1723$as_echo X"$as_myself" |
1724    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1725	    s//\1/
1726	    q
1727	  }
1728	  /^X\(\/\/\)[^/].*/{
1729	    s//\1/
1730	    q
1731	  }
1732	  /^X\(\/\/\)$/{
1733	    s//\1/
1734	    q
1735	  }
1736	  /^X\(\/\).*/{
1737	    s//\1/
1738	    q
1739	  }
1740	  s/.*/./; q'`
1741  srcdir=$ac_confdir
1742  if test ! -r "$srcdir/$ac_unique_file"; then
1743    srcdir=..
1744  fi
1745else
1746  ac_srcdir_defaulted=no
1747fi
1748if test ! -r "$srcdir/$ac_unique_file"; then
1749  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1750  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1751fi
1752ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1753ac_abs_confdir=`(
1754	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1755	pwd)`
1756# When building in place, set srcdir=.
1757if test "$ac_abs_confdir" = "$ac_pwd"; then
1758  srcdir=.
1759fi
1760# Remove unnecessary trailing slashes from srcdir.
1761# Double slashes in file names in object file debugging info
1762# mess up M-x gdb in Emacs.
1763case $srcdir in
1764*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1765esac
1766for ac_var in $ac_precious_vars; do
1767  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1768  eval ac_env_${ac_var}_value=\$${ac_var}
1769  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1770  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1771done
1772
1773#
1774# Report the --help message.
1775#
1776if test "$ac_init_help" = "long"; then
1777  # Omit some internal or obsolete options to make the list less imposing.
1778  # This message is too long to be a string in the A/UX 3.1 sh.
1779  cat <<_ACEOF
1780\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1781
1782Usage: $0 [OPTION]... [VAR=VALUE]...
1783
1784To assign environment variables (e.g., CC, CFLAGS...), specify them as
1785VAR=VALUE.  See below for descriptions of some of the useful variables.
1786
1787Defaults for the options are specified in brackets.
1788
1789Configuration:
1790  -h, --help              display this help and exit
1791      --help=short        display options specific to this package
1792      --help=recursive    display the short help of all the included packages
1793  -V, --version           display version information and exit
1794  -q, --quiet, --silent   do not print \`checking ...' messages
1795      --cache-file=FILE   cache test results in FILE [disabled]
1796  -C, --config-cache      alias for \`--cache-file=config.cache'
1797  -n, --no-create         do not create output files
1798      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1799
1800Installation directories:
1801  --prefix=PREFIX         install architecture-independent files in PREFIX
1802                          [$ac_default_prefix]
1803  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1804                          [PREFIX]
1805
1806By default, \`make install' will install all the files in
1807\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1808an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1809for instance \`--prefix=\$HOME'.
1810
1811For better control, use the options below.
1812
1813Fine tuning of the installation directories:
1814  --bindir=DIR            user executables [EPREFIX/bin]
1815  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1816  --libexecdir=DIR        program executables [EPREFIX/libexec]
1817  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1818  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1819  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1820  --libdir=DIR            object code libraries [EPREFIX/lib]
1821  --includedir=DIR        C header files [PREFIX/include]
1822  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1823  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1824  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1825  --infodir=DIR           info documentation [DATAROOTDIR/info]
1826  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1827  --mandir=DIR            man documentation [DATAROOTDIR/man]
1828  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1829  --htmldir=DIR           html documentation [DOCDIR]
1830  --dvidir=DIR            dvi documentation [DOCDIR]
1831  --pdfdir=DIR            pdf documentation [DOCDIR]
1832  --psdir=DIR             ps documentation [DOCDIR]
1833_ACEOF
1834
1835  cat <<\_ACEOF
1836
1837X features:
1838  --x-includes=DIR    X include files are in DIR
1839  --x-libraries=DIR   X library files are in DIR
1840
1841System types:
1842  --build=BUILD     configure for building on BUILD [guessed]
1843  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1844  --target=TARGET   configure for building compilers for TARGET [HOST]
1845_ACEOF
1846fi
1847
1848if test -n "$ac_init_help"; then
1849  case $ac_init_help in
1850     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1851   esac
1852  cat <<\_ACEOF
1853
1854Optional Features:
1855  --disable-option-checking  ignore unrecognized --enable/--with options
1856  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1857  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1858  --enable-openjdk-only   suppress building custom source even if present
1859                          [disabled]
1860  --enable-debug          set the debug level to fastdebug (shorthand for
1861                          --with-debug-level=fastdebug) [disabled]
1862  --disable-headful       disable building headful support (graphical UI
1863                          support) [enabled]
1864  --enable-hotspot-test-in-build
1865                          run the Queens test after Hotspot build [disabled]
1866  --enable-unlimited-crypto
1867                          Enable unlimited crypto policy [disabled]
1868  --enable-static-build   enable static library build [disabled]
1869  --disable-warnings-as-errors
1870                          do not consider native warnings to be an error
1871                          [enabled]
1872  --disable-debug-symbols disable generation of debug symbols [enabled]
1873  --disable-zip-debug-info
1874                          disable zipping of debug-info files [enabled]
1875  --enable-native-coverage
1876                          enable native compilation with code coverage
1877                          data[disabled]
1878  --disable-freetype-bundling
1879                          disable bundling of the freetype library with the
1880                          build result [enabled on Windows or when using
1881                          --with-freetype, disabled otherwise]
1882  --enable-sjavac         use sjavac to do fast incremental compiles
1883                          [disabled]
1884  --enable-javac-server   use only the server part of sjavac for faster javac
1885                          compiles [disabled]
1886  --disable-precompiled-headers
1887                          disable using precompiled headers when compiling C++
1888                          [enabled]
1889  --enable-ccache         enable using ccache to speed up recompilations
1890                          [disabled]
1891
1892Optional Packages:
1893  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1894  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1895  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1896                          support it), e.g. --with-target-bits=32 [guessed]
1897  --with-custom-make-dir  Deprecated. Option is kept for backwards
1898                          compatibility and is ignored
1899  --with-jdk-variant      JDK variant to build (normal) [normal]
1900  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1901  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1902                          client, minimal1, kernel, zero, zeroshark, core)
1903                          [server]
1904  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1905                          optimized (HotSpot build only)) [release]
1906  --with-devkit           use this devkit for compilers, tools and resources
1907  --with-sys-root         alias for --with-sysroot for backwards compatability
1908  --with-sysroot          use this directory as sysroot
1909  --with-tools-dir        alias for --with-toolchain-path for backwards
1910                          compatibility
1911  --with-toolchain-path   prepend these directories when searching for
1912                          toolchain binaries (compilers etc)
1913  --with-extra-path       prepend these directories to the default path
1914  --with-sdk-name         use the platform SDK of the given name. [macosx]
1915  --with-conf-name        use this as the name of the configuration [generated
1916                          from important configuration options]
1917  --with-output-sync      set make output sync type if supported by make.
1918                          [recurse]
1919  --with-cacerts-file     specify alternative cacerts file
1920  --with-copyright-year   Set copyright year value for build [current year]
1921  --with-milestone        Deprecated. Option is kept for backwards
1922                          compatibility and is ignored
1923  --with-update-version   Deprecated. Option is kept for backwards
1924                          compatibility and is ignored
1925  --with-user-release-suffix
1926                          Deprecated. Option is kept for backwards
1927                          compatibility and is ignored
1928  --with-build-number     Deprecated. Option is kept for backwards
1929                          compatibility and is ignored
1930  --with-version-string   Set version string [calculated]
1931  --with-version-pre      Set the base part of the version 'PRE' field
1932                          (pre-release identifier) ['internal']
1933  --with-version-opt      Set version 'OPT' field (build metadata)
1934                          [<timestamp>.<user>.<dirname>]
1935  --with-version-build    Set version 'BUILD' field (build number) [not
1936                          specified]
1937  --with-version-major    Set version 'MAJOR' field (first number) [current
1938                          source value]
1939  --with-version-minor    Set version 'MINOR' field (second number) [current
1940                          source value]
1941  --with-version-security Set version 'SECURITY' field (third number) [current
1942                          source value]
1943  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1944                          specified]
1945  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1946  --with-add-source-root  Deprecated. Option is kept for backwards
1947                          compatibility and is ignored
1948  --with-override-source-root
1949                          Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-adds-and-overrides
1952                          Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-override-langtools
1955                          Deprecated. Option is kept for backwards
1956                          compatibility and is ignored
1957  --with-override-corba   Deprecated. Option is kept for backwards
1958                          compatibility and is ignored
1959  --with-override-jaxp    Deprecated. Option is kept for backwards
1960                          compatibility and is ignored
1961  --with-override-jaxws   Deprecated. Option is kept for backwards
1962                          compatibility and is ignored
1963  --with-override-hotspot Deprecated. Option is kept for backwards
1964                          compatibility and is ignored
1965  --with-override-nashorn Deprecated. Option is kept for backwards
1966                          compatibility and is ignored
1967  --with-override-jdk     Deprecated. Option is kept for backwards
1968                          compatibility and is ignored
1969  --with-import-hotspot   import hotspot binaries from this jdk image or
1970                          hotspot build dist dir instead of building from
1971                          source
1972  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1973                          to show possible values [platform dependent]
1974  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1975  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1976  --with-extra-ldflags    extra flags to be used when linking jdk
1977  --with-toolchain-version
1978                          the version of the toolchain to look for, use
1979                          '--help' to show possible values [platform
1980                          dependent]
1981  --with-build-devkit     Devkit to use for the build platform toolchain
1982  --with-jtreg            Regression Test Harness [probed]
1983  --with-stdc++lib=<static>,<dynamic>,<default>
1984                          force linking of the C++ runtime on Linux to either
1985                          static or dynamic, default is static with dynamic as
1986                          fallback
1987  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1988                          (Windows only) [probed]
1989  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1990                          (Windows only) [probed]
1991  --with-x                use the X Window System
1992  --with-cups             specify prefix directory for the cups package
1993                          (expecting the headers under PATH/include)
1994  --with-cups-include     specify directory for the cups include files
1995  --with-freetype         specify prefix directory for the freetype package
1996                          (expecting the libraries under PATH/lib and the
1997                          headers under PATH/include)
1998  --with-freetype-include specify directory for the freetype include files
1999  --with-freetype-lib     specify directory for the freetype library
2000  --with-freetype-src     specify directory with freetype sources to
2001                          automatically build the library (experimental,
2002                          Windows-only)
2003  --with-alsa             specify prefix directory for the alsa package
2004                          (expecting the libraries under PATH/lib and the
2005                          headers under PATH/include)
2006  --with-alsa-include     specify directory for the alsa include files
2007  --with-alsa-lib         specify directory for the alsa library
2008  --with-libffi           specify prefix directory for the libffi package
2009                          (expecting the libraries under PATH/lib and the
2010                          headers under PATH/include)
2011  --with-libffi-include   specify directory for the libffi include files
2012  --with-libffi-lib       specify directory for the libffi library
2013  --with-libjpeg          use libjpeg from build system or OpenJDK source
2014                          (system, bundled) [bundled]
2015  --with-giflib           use giflib from build system or OpenJDK source
2016                          (system, bundled) [bundled]
2017  --with-libpng           use libpng from build system or OpenJDK source
2018                          (system, bundled) [bundled]
2019  --with-zlib             use zlib from build system or OpenJDK source
2020                          (system, bundled) [bundled]
2021  --with-lcms             use lcms2 from build system or OpenJDK source
2022                          (system, bundled) [bundled]
2023  --with-dxsdk            Deprecated. Option is kept for backwards
2024                          compatibility and is ignored
2025  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2026                          compatibility and is ignored
2027  --with-dxsdk-include    Deprecated. Option is kept for backwards
2028                          compatibility and is ignored
2029  --with-num-cores        number of cores in the build system, e.g.
2030                          --with-num-cores=8 [probed]
2031  --with-memory-size      memory (in MB) available in the build system, e.g.
2032                          --with-memory-size=1024 [probed]
2033  --with-jobs             number of parallel jobs to let make run [calculated
2034                          based on cores and memory]
2035  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2036                          invocations of boot JDK, overriding the default
2037                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2038                          -enableassertions"
2039  --with-sjavac-server-java
2040                          use this java binary for running the sjavac
2041                          background server [Boot JDK java]
2042  --with-ccache-dir       where to store ccache files [~/.ccache]
2043
2044Some influential environment variables:
2045  BASENAME    Override default value for BASENAME
2046  BASH        Override default value for BASH
2047  CAT         Override default value for CAT
2048  CHMOD       Override default value for CHMOD
2049  CMP         Override default value for CMP
2050  COMM        Override default value for COMM
2051  CP          Override default value for CP
2052  CUT         Override default value for CUT
2053  DATE        Override default value for DATE
2054  DIFF        Override default value for DIFF
2055  DIRNAME     Override default value for DIRNAME
2056  ECHO        Override default value for ECHO
2057  EXPR        Override default value for EXPR
2058  FILE        Override default value for FILE
2059  FIND        Override default value for FIND
2060  HEAD        Override default value for HEAD
2061  LN          Override default value for LN
2062  LS          Override default value for LS
2063  MKDIR       Override default value for MKDIR
2064  MKTEMP      Override default value for MKTEMP
2065  MV          Override default value for MV
2066  NAWK        Override default value for NAWK
2067  PRINTF      Override default value for PRINTF
2068  RM          Override default value for RM
2069  RMDIR       Override default value for RMDIR
2070  SH          Override default value for SH
2071  SORT        Override default value for SORT
2072  TAIL        Override default value for TAIL
2073  TAR         Override default value for TAR
2074  TEE         Override default value for TEE
2075  TOUCH       Override default value for TOUCH
2076  TR          Override default value for TR
2077  UNAME       Override default value for UNAME
2078  UNIQ        Override default value for UNIQ
2079  WC          Override default value for WC
2080  WHICH       Override default value for WHICH
2081  XARGS       Override default value for XARGS
2082  AWK         Override default value for AWK
2083  GREP        Override default value for GREP
2084  EGREP       Override default value for EGREP
2085  FGREP       Override default value for FGREP
2086  SED         Override default value for SED
2087  CYGPATH     Override default value for CYGPATH
2088  READLINK    Override default value for READLINK
2089  DF          Override default value for DF
2090  CPIO        Override default value for CPIO
2091  NICE        Override default value for NICE
2092  MAKE        Override default value for MAKE
2093  UNZIP       Override default value for UNZIP
2094  ZIP         Override default value for ZIP
2095  LDD         Override default value for LDD
2096  OTOOL       Override default value for OTOOL
2097  READELF     Override default value for READELF
2098  HG          Override default value for HG
2099  STAT        Override default value for STAT
2100  TIME        Override default value for TIME
2101  PATCH       Override default value for PATCH
2102  DSYMUTIL    Override default value for DSYMUTIL
2103  XATTR       Override default value for XATTR
2104  CODESIGN    Override default value for CODESIGN
2105  SETFILE     Override default value for SETFILE
2106  PKG_CONFIG  path to pkg-config utility
2107  JAVA        Override default value for JAVA
2108  JAVAC       Override default value for JAVAC
2109  JAVAH       Override default value for JAVAH
2110  JAR         Override default value for JAR
2111  JARSIGNER   Override default value for JARSIGNER
2112  CC          C compiler command
2113  CFLAGS      C compiler flags
2114  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2115              nonstandard directory <lib dir>
2116  LIBS        libraries to pass to the linker, e.g. -l<library>
2117  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2118              you have headers in a nonstandard directory <include dir>
2119  CXX         C++ compiler command
2120  CXXFLAGS    C++ compiler flags
2121  CPP         C preprocessor
2122  CXXCPP      C++ preprocessor
2123  AS          Override default value for AS
2124  AR          Override default value for AR
2125  LIPO        Override default value for LIPO
2126  STRIP       Override default value for STRIP
2127  NM          Override default value for NM
2128  GNM         Override default value for GNM
2129  OBJCOPY     Override default value for OBJCOPY
2130  OBJDUMP     Override default value for OBJDUMP
2131  BUILD_CC    Override default value for BUILD_CC
2132  BUILD_CXX   Override default value for BUILD_CXX
2133  JTREGEXE    Override default value for JTREGEXE
2134  XMKMF       Path to xmkmf, Makefile generator for X Window System
2135  FREETYPE_CFLAGS
2136              C compiler flags for FREETYPE, overriding pkg-config
2137  FREETYPE_LIBS
2138              linker flags for FREETYPE, overriding pkg-config
2139  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2140  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2141  LIBFFI_CFLAGS
2142              C compiler flags for LIBFFI, overriding pkg-config
2143  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2144  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2145  PNG_LIBS    linker flags for PNG, overriding pkg-config
2146  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2147  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2148  CCACHE      Override default value for CCACHE
2149
2150Use these variables to override the choices made by `configure' or to help
2151it to find libraries and programs with nonstandard names/locations.
2152
2153Report bugs to <build-dev@openjdk.java.net>.
2154OpenJDK home page: <http://openjdk.java.net>.
2155_ACEOF
2156ac_status=$?
2157fi
2158
2159if test "$ac_init_help" = "recursive"; then
2160  # If there are subdirs, report their specific --help.
2161  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2162    test -d "$ac_dir" ||
2163      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2164      continue
2165    ac_builddir=.
2166
2167case "$ac_dir" in
2168.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2169*)
2170  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2171  # A ".." for each directory in $ac_dir_suffix.
2172  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2173  case $ac_top_builddir_sub in
2174  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2175  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2176  esac ;;
2177esac
2178ac_abs_top_builddir=$ac_pwd
2179ac_abs_builddir=$ac_pwd$ac_dir_suffix
2180# for backward compatibility:
2181ac_top_builddir=$ac_top_build_prefix
2182
2183case $srcdir in
2184  .)  # We are building in place.
2185    ac_srcdir=.
2186    ac_top_srcdir=$ac_top_builddir_sub
2187    ac_abs_top_srcdir=$ac_pwd ;;
2188  [\\/]* | ?:[\\/]* )  # Absolute name.
2189    ac_srcdir=$srcdir$ac_dir_suffix;
2190    ac_top_srcdir=$srcdir
2191    ac_abs_top_srcdir=$srcdir ;;
2192  *) # Relative name.
2193    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2194    ac_top_srcdir=$ac_top_build_prefix$srcdir
2195    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2196esac
2197ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2198
2199    cd "$ac_dir" || { ac_status=$?; continue; }
2200    # Check for guested configure.
2201    if test -f "$ac_srcdir/configure.gnu"; then
2202      echo &&
2203      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2204    elif test -f "$ac_srcdir/configure"; then
2205      echo &&
2206      $SHELL "$ac_srcdir/configure" --help=recursive
2207    else
2208      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2209    fi || ac_status=$?
2210    cd "$ac_pwd" || { ac_status=$?; break; }
2211  done
2212fi
2213
2214test -n "$ac_init_help" && exit $ac_status
2215if $ac_init_version; then
2216  cat <<\_ACEOF
2217OpenJDK configure jdk9
2218generated by GNU Autoconf 2.69
2219
2220Copyright (C) 2012 Free Software Foundation, Inc.
2221This configure script is free software; the Free Software Foundation
2222gives unlimited permission to copy, distribute and modify it.
2223_ACEOF
2224  exit
2225fi
2226
2227## ------------------------ ##
2228## Autoconf initialization. ##
2229## ------------------------ ##
2230
2231# ac_fn_c_try_compile LINENO
2232# --------------------------
2233# Try to compile conftest.$ac_ext, and return whether this succeeded.
2234ac_fn_c_try_compile ()
2235{
2236  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237  rm -f conftest.$ac_objext
2238  if { { ac_try="$ac_compile"
2239case "(($ac_try" in
2240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2241  *) ac_try_echo=$ac_try;;
2242esac
2243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2244$as_echo "$ac_try_echo"; } >&5
2245  (eval "$ac_compile") 2>conftest.err
2246  ac_status=$?
2247  if test -s conftest.err; then
2248    grep -v '^ *+' conftest.err >conftest.er1
2249    cat conftest.er1 >&5
2250    mv -f conftest.er1 conftest.err
2251  fi
2252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2253  test $ac_status = 0; } && {
2254	 test -z "$ac_c_werror_flag" ||
2255	 test ! -s conftest.err
2256       } && test -s conftest.$ac_objext; then :
2257  ac_retval=0
2258else
2259  $as_echo "$as_me: failed program was:" >&5
2260sed 's/^/| /' conftest.$ac_ext >&5
2261
2262	ac_retval=1
2263fi
2264  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2265  as_fn_set_status $ac_retval
2266
2267} # ac_fn_c_try_compile
2268
2269# ac_fn_cxx_try_compile LINENO
2270# ----------------------------
2271# Try to compile conftest.$ac_ext, and return whether this succeeded.
2272ac_fn_cxx_try_compile ()
2273{
2274  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275  rm -f conftest.$ac_objext
2276  if { { ac_try="$ac_compile"
2277case "(($ac_try" in
2278  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2279  *) ac_try_echo=$ac_try;;
2280esac
2281eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2282$as_echo "$ac_try_echo"; } >&5
2283  (eval "$ac_compile") 2>conftest.err
2284  ac_status=$?
2285  if test -s conftest.err; then
2286    grep -v '^ *+' conftest.err >conftest.er1
2287    cat conftest.er1 >&5
2288    mv -f conftest.er1 conftest.err
2289  fi
2290  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2291  test $ac_status = 0; } && {
2292	 test -z "$ac_cxx_werror_flag" ||
2293	 test ! -s conftest.err
2294       } && test -s conftest.$ac_objext; then :
2295  ac_retval=0
2296else
2297  $as_echo "$as_me: failed program was:" >&5
2298sed 's/^/| /' conftest.$ac_ext >&5
2299
2300	ac_retval=1
2301fi
2302  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2303  as_fn_set_status $ac_retval
2304
2305} # ac_fn_cxx_try_compile
2306
2307# ac_fn_c_try_cpp LINENO
2308# ----------------------
2309# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2310ac_fn_c_try_cpp ()
2311{
2312  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2313  if { { ac_try="$ac_cpp conftest.$ac_ext"
2314case "(($ac_try" in
2315  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2316  *) ac_try_echo=$ac_try;;
2317esac
2318eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2319$as_echo "$ac_try_echo"; } >&5
2320  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2321  ac_status=$?
2322  if test -s conftest.err; then
2323    grep -v '^ *+' conftest.err >conftest.er1
2324    cat conftest.er1 >&5
2325    mv -f conftest.er1 conftest.err
2326  fi
2327  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2328  test $ac_status = 0; } > conftest.i && {
2329	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2330	 test ! -s conftest.err
2331       }; then :
2332  ac_retval=0
2333else
2334  $as_echo "$as_me: failed program was:" >&5
2335sed 's/^/| /' conftest.$ac_ext >&5
2336
2337    ac_retval=1
2338fi
2339  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2340  as_fn_set_status $ac_retval
2341
2342} # ac_fn_c_try_cpp
2343
2344# ac_fn_cxx_try_cpp LINENO
2345# ------------------------
2346# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2347ac_fn_cxx_try_cpp ()
2348{
2349  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2350  if { { ac_try="$ac_cpp conftest.$ac_ext"
2351case "(($ac_try" in
2352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2353  *) ac_try_echo=$ac_try;;
2354esac
2355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2356$as_echo "$ac_try_echo"; } >&5
2357  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2358  ac_status=$?
2359  if test -s conftest.err; then
2360    grep -v '^ *+' conftest.err >conftest.er1
2361    cat conftest.er1 >&5
2362    mv -f conftest.er1 conftest.err
2363  fi
2364  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2365  test $ac_status = 0; } > conftest.i && {
2366	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2367	 test ! -s conftest.err
2368       }; then :
2369  ac_retval=0
2370else
2371  $as_echo "$as_me: failed program was:" >&5
2372sed 's/^/| /' conftest.$ac_ext >&5
2373
2374    ac_retval=1
2375fi
2376  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2377  as_fn_set_status $ac_retval
2378
2379} # ac_fn_cxx_try_cpp
2380
2381# ac_fn_c_try_link LINENO
2382# -----------------------
2383# Try to link conftest.$ac_ext, and return whether this succeeded.
2384ac_fn_c_try_link ()
2385{
2386  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2387  rm -f conftest.$ac_objext conftest$ac_exeext
2388  if { { ac_try="$ac_link"
2389case "(($ac_try" in
2390  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2391  *) ac_try_echo=$ac_try;;
2392esac
2393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2394$as_echo "$ac_try_echo"; } >&5
2395  (eval "$ac_link") 2>conftest.err
2396  ac_status=$?
2397  if test -s conftest.err; then
2398    grep -v '^ *+' conftest.err >conftest.er1
2399    cat conftest.er1 >&5
2400    mv -f conftest.er1 conftest.err
2401  fi
2402  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2403  test $ac_status = 0; } && {
2404	 test -z "$ac_c_werror_flag" ||
2405	 test ! -s conftest.err
2406       } && test -s conftest$ac_exeext && {
2407	 test "$cross_compiling" = yes ||
2408	 test -x conftest$ac_exeext
2409       }; then :
2410  ac_retval=0
2411else
2412  $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415	ac_retval=1
2416fi
2417  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2418  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2419  # interfere with the next link command; also delete a directory that is
2420  # left behind by Apple's compiler.  We do this before executing the actions.
2421  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2422  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423  as_fn_set_status $ac_retval
2424
2425} # ac_fn_c_try_link
2426
2427# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2428# ---------------------------------------------------------
2429# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2430# the include files in INCLUDES and setting the cache variable VAR
2431# accordingly.
2432ac_fn_cxx_check_header_mongrel ()
2433{
2434  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435  if eval \${$3+:} false; then :
2436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2437$as_echo_n "checking for $2... " >&6; }
2438if eval \${$3+:} false; then :
2439  $as_echo_n "(cached) " >&6
2440fi
2441eval ac_res=\$$3
2442	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2443$as_echo "$ac_res" >&6; }
2444else
2445  # Is the header compilable?
2446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2447$as_echo_n "checking $2 usability... " >&6; }
2448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2449/* end confdefs.h.  */
2450$4
2451#include <$2>
2452_ACEOF
2453if ac_fn_cxx_try_compile "$LINENO"; then :
2454  ac_header_compiler=yes
2455else
2456  ac_header_compiler=no
2457fi
2458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2460$as_echo "$ac_header_compiler" >&6; }
2461
2462# Is the header present?
2463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2464$as_echo_n "checking $2 presence... " >&6; }
2465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2466/* end confdefs.h.  */
2467#include <$2>
2468_ACEOF
2469if ac_fn_cxx_try_cpp "$LINENO"; then :
2470  ac_header_preproc=yes
2471else
2472  ac_header_preproc=no
2473fi
2474rm -f conftest.err conftest.i conftest.$ac_ext
2475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2476$as_echo "$ac_header_preproc" >&6; }
2477
2478# So?  What about this header?
2479case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2480  yes:no: )
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2482$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2484$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2485    ;;
2486  no:yes:* )
2487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2488$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2490$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2491    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2492$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2493    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2494$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2495    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2496$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2497( $as_echo "## ----------------------------------------- ##
2498## Report this to build-dev@openjdk.java.net ##
2499## ----------------------------------------- ##"
2500     ) | sed "s/^/$as_me: WARNING:     /" >&2
2501    ;;
2502esac
2503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2504$as_echo_n "checking for $2... " >&6; }
2505if eval \${$3+:} false; then :
2506  $as_echo_n "(cached) " >&6
2507else
2508  eval "$3=\$ac_header_compiler"
2509fi
2510eval ac_res=\$$3
2511	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2512$as_echo "$ac_res" >&6; }
2513fi
2514  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515
2516} # ac_fn_cxx_check_header_mongrel
2517
2518# ac_fn_cxx_try_run LINENO
2519# ------------------------
2520# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2521# that executables *can* be run.
2522ac_fn_cxx_try_run ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  if { { ac_try="$ac_link"
2526case "(($ac_try" in
2527  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528  *) ac_try_echo=$ac_try;;
2529esac
2530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531$as_echo "$ac_try_echo"; } >&5
2532  (eval "$ac_link") 2>&5
2533  ac_status=$?
2534  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2535  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2536  { { case "(($ac_try" in
2537  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2538  *) ac_try_echo=$ac_try;;
2539esac
2540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2541$as_echo "$ac_try_echo"; } >&5
2542  (eval "$ac_try") 2>&5
2543  ac_status=$?
2544  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2545  test $ac_status = 0; }; }; then :
2546  ac_retval=0
2547else
2548  $as_echo "$as_me: program exited with status $ac_status" >&5
2549       $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552       ac_retval=$ac_status
2553fi
2554  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556  as_fn_set_status $ac_retval
2557
2558} # ac_fn_cxx_try_run
2559
2560# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2561# ---------------------------------------------------------
2562# Tests whether HEADER exists and can be compiled using the include files in
2563# INCLUDES, setting the cache variable VAR accordingly.
2564ac_fn_cxx_check_header_compile ()
2565{
2566  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2568$as_echo_n "checking for $2... " >&6; }
2569if eval \${$3+:} false; then :
2570  $as_echo_n "(cached) " >&6
2571else
2572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2573/* end confdefs.h.  */
2574$4
2575#include <$2>
2576_ACEOF
2577if ac_fn_cxx_try_compile "$LINENO"; then :
2578  eval "$3=yes"
2579else
2580  eval "$3=no"
2581fi
2582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2583fi
2584eval ac_res=\$$3
2585	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2586$as_echo "$ac_res" >&6; }
2587  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2588
2589} # ac_fn_cxx_check_header_compile
2590
2591# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2592# ----------------------------------------------
2593# Tries to find the compile-time value of EXPR in a program that includes
2594# INCLUDES, setting VAR accordingly. Returns whether the value could be
2595# computed
2596ac_fn_cxx_compute_int ()
2597{
2598  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2599  if test "$cross_compiling" = yes; then
2600    # Depending upon the size, compute the lo and hi bounds.
2601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604int
2605main ()
2606{
2607static int test_array [1 - 2 * !(($2) >= 0)];
2608test_array [0] = 0;
2609return test_array [0];
2610
2611  ;
2612  return 0;
2613}
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_lo=0 ac_mid=0
2617  while :; do
2618    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619/* end confdefs.h.  */
2620$4
2621int
2622main ()
2623{
2624static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2625test_array [0] = 0;
2626return test_array [0];
2627
2628  ;
2629  return 0;
2630}
2631_ACEOF
2632if ac_fn_cxx_try_compile "$LINENO"; then :
2633  ac_hi=$ac_mid; break
2634else
2635  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2636			if test $ac_lo -le $ac_mid; then
2637			  ac_lo= ac_hi=
2638			  break
2639			fi
2640			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2641fi
2642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2643  done
2644else
2645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2646/* end confdefs.h.  */
2647$4
2648int
2649main ()
2650{
2651static int test_array [1 - 2 * !(($2) < 0)];
2652test_array [0] = 0;
2653return test_array [0];
2654
2655  ;
2656  return 0;
2657}
2658_ACEOF
2659if ac_fn_cxx_try_compile "$LINENO"; then :
2660  ac_hi=-1 ac_mid=-1
2661  while :; do
2662    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2663/* end confdefs.h.  */
2664$4
2665int
2666main ()
2667{
2668static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2669test_array [0] = 0;
2670return test_array [0];
2671
2672  ;
2673  return 0;
2674}
2675_ACEOF
2676if ac_fn_cxx_try_compile "$LINENO"; then :
2677  ac_lo=$ac_mid; break
2678else
2679  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2680			if test $ac_mid -le $ac_hi; then
2681			  ac_lo= ac_hi=
2682			  break
2683			fi
2684			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2685fi
2686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2687  done
2688else
2689  ac_lo= ac_hi=
2690fi
2691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692fi
2693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2694# Binary search between lo and hi bounds.
2695while test "x$ac_lo" != "x$ac_hi"; do
2696  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2698/* end confdefs.h.  */
2699$4
2700int
2701main ()
2702{
2703static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2704test_array [0] = 0;
2705return test_array [0];
2706
2707  ;
2708  return 0;
2709}
2710_ACEOF
2711if ac_fn_cxx_try_compile "$LINENO"; then :
2712  ac_hi=$ac_mid
2713else
2714  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2715fi
2716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2717done
2718case $ac_lo in #((
2719?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2720'') ac_retval=1 ;;
2721esac
2722  else
2723    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2724/* end confdefs.h.  */
2725$4
2726static long int longval () { return $2; }
2727static unsigned long int ulongval () { return $2; }
2728#include <stdio.h>
2729#include <stdlib.h>
2730int
2731main ()
2732{
2733
2734  FILE *f = fopen ("conftest.val", "w");
2735  if (! f)
2736    return 1;
2737  if (($2) < 0)
2738    {
2739      long int i = longval ();
2740      if (i != ($2))
2741	return 1;
2742      fprintf (f, "%ld", i);
2743    }
2744  else
2745    {
2746      unsigned long int i = ulongval ();
2747      if (i != ($2))
2748	return 1;
2749      fprintf (f, "%lu", i);
2750    }
2751  /* Do not output a trailing newline, as this causes \r\n confusion
2752     on some platforms.  */
2753  return ferror (f) || fclose (f) != 0;
2754
2755  ;
2756  return 0;
2757}
2758_ACEOF
2759if ac_fn_cxx_try_run "$LINENO"; then :
2760  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2761else
2762  ac_retval=1
2763fi
2764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2765  conftest.$ac_objext conftest.beam conftest.$ac_ext
2766rm -f conftest.val
2767
2768  fi
2769  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2770  as_fn_set_status $ac_retval
2771
2772} # ac_fn_cxx_compute_int
2773
2774# ac_fn_cxx_try_link LINENO
2775# -------------------------
2776# Try to link conftest.$ac_ext, and return whether this succeeded.
2777ac_fn_cxx_try_link ()
2778{
2779  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2780  rm -f conftest.$ac_objext conftest$ac_exeext
2781  if { { ac_try="$ac_link"
2782case "(($ac_try" in
2783  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2784  *) ac_try_echo=$ac_try;;
2785esac
2786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2787$as_echo "$ac_try_echo"; } >&5
2788  (eval "$ac_link") 2>conftest.err
2789  ac_status=$?
2790  if test -s conftest.err; then
2791    grep -v '^ *+' conftest.err >conftest.er1
2792    cat conftest.er1 >&5
2793    mv -f conftest.er1 conftest.err
2794  fi
2795  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2796  test $ac_status = 0; } && {
2797	 test -z "$ac_cxx_werror_flag" ||
2798	 test ! -s conftest.err
2799       } && test -s conftest$ac_exeext && {
2800	 test "$cross_compiling" = yes ||
2801	 test -x conftest$ac_exeext
2802       }; then :
2803  ac_retval=0
2804else
2805  $as_echo "$as_me: failed program was:" >&5
2806sed 's/^/| /' conftest.$ac_ext >&5
2807
2808	ac_retval=1
2809fi
2810  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2811  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2812  # interfere with the next link command; also delete a directory that is
2813  # left behind by Apple's compiler.  We do this before executing the actions.
2814  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2815  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2816  as_fn_set_status $ac_retval
2817
2818} # ac_fn_cxx_try_link
2819
2820# ac_fn_cxx_check_func LINENO FUNC VAR
2821# ------------------------------------
2822# Tests whether FUNC exists, setting the cache variable VAR accordingly
2823ac_fn_cxx_check_func ()
2824{
2825  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2827$as_echo_n "checking for $2... " >&6; }
2828if eval \${$3+:} false; then :
2829  $as_echo_n "(cached) " >&6
2830else
2831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2832/* end confdefs.h.  */
2833/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2834   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2835#define $2 innocuous_$2
2836
2837/* System header to define __stub macros and hopefully few prototypes,
2838    which can conflict with char $2 (); below.
2839    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2840    <limits.h> exists even on freestanding compilers.  */
2841
2842#ifdef __STDC__
2843# include <limits.h>
2844#else
2845# include <assert.h>
2846#endif
2847
2848#undef $2
2849
2850/* Override any GCC internal prototype to avoid an error.
2851   Use char because int might match the return type of a GCC
2852   builtin and then its argument prototype would still apply.  */
2853#ifdef __cplusplus
2854extern "C"
2855#endif
2856char $2 ();
2857/* The GNU C library defines this for functions which it implements
2858    to always fail with ENOSYS.  Some functions are actually named
2859    something starting with __ and the normal name is an alias.  */
2860#if defined __stub_$2 || defined __stub___$2
2861choke me
2862#endif
2863
2864int
2865main ()
2866{
2867return $2 ();
2868  ;
2869  return 0;
2870}
2871_ACEOF
2872if ac_fn_cxx_try_link "$LINENO"; then :
2873  eval "$3=yes"
2874else
2875  eval "$3=no"
2876fi
2877rm -f core conftest.err conftest.$ac_objext \
2878    conftest$ac_exeext conftest.$ac_ext
2879fi
2880eval ac_res=\$$3
2881	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2882$as_echo "$ac_res" >&6; }
2883  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2884
2885} # ac_fn_cxx_check_func
2886
2887# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2888# -------------------------------------------------------
2889# Tests whether HEADER exists and can be compiled using the include files in
2890# INCLUDES, setting the cache variable VAR accordingly.
2891ac_fn_c_check_header_compile ()
2892{
2893  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2895$as_echo_n "checking for $2... " >&6; }
2896if eval \${$3+:} false; then :
2897  $as_echo_n "(cached) " >&6
2898else
2899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2900/* end confdefs.h.  */
2901$4
2902#include <$2>
2903_ACEOF
2904if ac_fn_c_try_compile "$LINENO"; then :
2905  eval "$3=yes"
2906else
2907  eval "$3=no"
2908fi
2909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2910fi
2911eval ac_res=\$$3
2912	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2913$as_echo "$ac_res" >&6; }
2914  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2915
2916} # ac_fn_c_check_header_compile
2917cat >config.log <<_ACEOF
2918This file contains any messages produced by compilers while
2919running configure, to aid debugging if configure makes a mistake.
2920
2921It was created by OpenJDK $as_me jdk9, which was
2922generated by GNU Autoconf 2.69.  Invocation command line was
2923
2924  $ $0 $@
2925
2926_ACEOF
2927exec 5>>config.log
2928{
2929cat <<_ASUNAME
2930## --------- ##
2931## Platform. ##
2932## --------- ##
2933
2934hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2935uname -m = `(uname -m) 2>/dev/null || echo unknown`
2936uname -r = `(uname -r) 2>/dev/null || echo unknown`
2937uname -s = `(uname -s) 2>/dev/null || echo unknown`
2938uname -v = `(uname -v) 2>/dev/null || echo unknown`
2939
2940/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2941/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2942
2943/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2944/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2945/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2946/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2947/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2948/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2949/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2950
2951_ASUNAME
2952
2953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2954for as_dir in $PATH
2955do
2956  IFS=$as_save_IFS
2957  test -z "$as_dir" && as_dir=.
2958    $as_echo "PATH: $as_dir"
2959  done
2960IFS=$as_save_IFS
2961
2962} >&5
2963
2964cat >&5 <<_ACEOF
2965
2966
2967## ----------- ##
2968## Core tests. ##
2969## ----------- ##
2970
2971_ACEOF
2972
2973
2974# Keep a trace of the command line.
2975# Strip out --no-create and --no-recursion so they do not pile up.
2976# Strip out --silent because we don't want to record it for future runs.
2977# Also quote any args containing shell meta-characters.
2978# Make two passes to allow for proper duplicate-argument suppression.
2979ac_configure_args=
2980ac_configure_args0=
2981ac_configure_args1=
2982ac_must_keep_next=false
2983for ac_pass in 1 2
2984do
2985  for ac_arg
2986  do
2987    case $ac_arg in
2988    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2989    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2990    | -silent | --silent | --silen | --sile | --sil)
2991      continue ;;
2992    *\'*)
2993      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2994    esac
2995    case $ac_pass in
2996    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2997    2)
2998      as_fn_append ac_configure_args1 " '$ac_arg'"
2999      if test $ac_must_keep_next = true; then
3000	ac_must_keep_next=false # Got value, back to normal.
3001      else
3002	case $ac_arg in
3003	  *=* | --config-cache | -C | -disable-* | --disable-* \
3004	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3005	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3006	  | -with-* | --with-* | -without-* | --without-* | --x)
3007	    case "$ac_configure_args0 " in
3008	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3009	    esac
3010	    ;;
3011	  -* ) ac_must_keep_next=true ;;
3012	esac
3013      fi
3014      as_fn_append ac_configure_args " '$ac_arg'"
3015      ;;
3016    esac
3017  done
3018done
3019{ ac_configure_args0=; unset ac_configure_args0;}
3020{ ac_configure_args1=; unset ac_configure_args1;}
3021
3022# When interrupted or exit'd, cleanup temporary files, and complete
3023# config.log.  We remove comments because anyway the quotes in there
3024# would cause problems or look ugly.
3025# WARNING: Use '\'' to represent an apostrophe within the trap.
3026# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3027trap 'exit_status=$?
3028  # Save into config.log some information that might help in debugging.
3029  {
3030    echo
3031
3032    $as_echo "## ---------------- ##
3033## Cache variables. ##
3034## ---------------- ##"
3035    echo
3036    # The following way of writing the cache mishandles newlines in values,
3037(
3038  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3039    eval ac_val=\$$ac_var
3040    case $ac_val in #(
3041    *${as_nl}*)
3042      case $ac_var in #(
3043      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3044$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3045      esac
3046      case $ac_var in #(
3047      _ | IFS | as_nl) ;; #(
3048      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3049      *) { eval $ac_var=; unset $ac_var;} ;;
3050      esac ;;
3051    esac
3052  done
3053  (set) 2>&1 |
3054    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3055    *${as_nl}ac_space=\ *)
3056      sed -n \
3057	"s/'\''/'\''\\\\'\'''\''/g;
3058	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3059      ;; #(
3060    *)
3061      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3062      ;;
3063    esac |
3064    sort
3065)
3066    echo
3067
3068    $as_echo "## ----------------- ##
3069## Output variables. ##
3070## ----------------- ##"
3071    echo
3072    for ac_var in $ac_subst_vars
3073    do
3074      eval ac_val=\$$ac_var
3075      case $ac_val in
3076      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3077      esac
3078      $as_echo "$ac_var='\''$ac_val'\''"
3079    done | sort
3080    echo
3081
3082    if test -n "$ac_subst_files"; then
3083      $as_echo "## ------------------- ##
3084## File substitutions. ##
3085## ------------------- ##"
3086      echo
3087      for ac_var in $ac_subst_files
3088      do
3089	eval ac_val=\$$ac_var
3090	case $ac_val in
3091	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3092	esac
3093	$as_echo "$ac_var='\''$ac_val'\''"
3094      done | sort
3095      echo
3096    fi
3097
3098    if test -s confdefs.h; then
3099      $as_echo "## ----------- ##
3100## confdefs.h. ##
3101## ----------- ##"
3102      echo
3103      cat confdefs.h
3104      echo
3105    fi
3106    test "$ac_signal" != 0 &&
3107      $as_echo "$as_me: caught signal $ac_signal"
3108    $as_echo "$as_me: exit $exit_status"
3109  } >&5
3110  rm -f core *.core core.conftest.* &&
3111    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3112    exit $exit_status
3113' 0
3114for ac_signal in 1 2 13 15; do
3115  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3116done
3117ac_signal=0
3118
3119# confdefs.h avoids OS command line length limits that DEFS can exceed.
3120rm -f -r conftest* confdefs.h
3121
3122$as_echo "/* confdefs.h */" > confdefs.h
3123
3124# Predefined preprocessor variables.
3125
3126cat >>confdefs.h <<_ACEOF
3127#define PACKAGE_NAME "$PACKAGE_NAME"
3128_ACEOF
3129
3130cat >>confdefs.h <<_ACEOF
3131#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3132_ACEOF
3133
3134cat >>confdefs.h <<_ACEOF
3135#define PACKAGE_VERSION "$PACKAGE_VERSION"
3136_ACEOF
3137
3138cat >>confdefs.h <<_ACEOF
3139#define PACKAGE_STRING "$PACKAGE_STRING"
3140_ACEOF
3141
3142cat >>confdefs.h <<_ACEOF
3143#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3144_ACEOF
3145
3146cat >>confdefs.h <<_ACEOF
3147#define PACKAGE_URL "$PACKAGE_URL"
3148_ACEOF
3149
3150
3151# Let the site file select an alternate cache file if it wants to.
3152# Prefer an explicitly selected file to automatically selected ones.
3153ac_site_file1=NONE
3154ac_site_file2=NONE
3155if test -n "$CONFIG_SITE"; then
3156  # We do not want a PATH search for config.site.
3157  case $CONFIG_SITE in #((
3158    -*)  ac_site_file1=./$CONFIG_SITE;;
3159    */*) ac_site_file1=$CONFIG_SITE;;
3160    *)   ac_site_file1=./$CONFIG_SITE;;
3161  esac
3162elif test "x$prefix" != xNONE; then
3163  ac_site_file1=$prefix/share/config.site
3164  ac_site_file2=$prefix/etc/config.site
3165else
3166  ac_site_file1=$ac_default_prefix/share/config.site
3167  ac_site_file2=$ac_default_prefix/etc/config.site
3168fi
3169for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3170do
3171  test "x$ac_site_file" = xNONE && continue
3172  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3173    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3174$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3175    sed 's/^/| /' "$ac_site_file" >&5
3176    . "$ac_site_file" \
3177      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3179as_fn_error $? "failed to load site script $ac_site_file
3180See \`config.log' for more details" "$LINENO" 5; }
3181  fi
3182done
3183
3184if test -r "$cache_file"; then
3185  # Some versions of bash will fail to source /dev/null (special files
3186  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3187  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3188    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3189$as_echo "$as_me: loading cache $cache_file" >&6;}
3190    case $cache_file in
3191      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3192      *)                      . "./$cache_file";;
3193    esac
3194  fi
3195else
3196  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3197$as_echo "$as_me: creating cache $cache_file" >&6;}
3198  >$cache_file
3199fi
3200
3201# Check that the precious variables saved in the cache have kept the same
3202# value.
3203ac_cache_corrupted=false
3204for ac_var in $ac_precious_vars; do
3205  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3206  eval ac_new_set=\$ac_env_${ac_var}_set
3207  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3208  eval ac_new_val=\$ac_env_${ac_var}_value
3209  case $ac_old_set,$ac_new_set in
3210    set,)
3211      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3212$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3213      ac_cache_corrupted=: ;;
3214    ,set)
3215      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3216$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3217      ac_cache_corrupted=: ;;
3218    ,);;
3219    *)
3220      if test "x$ac_old_val" != "x$ac_new_val"; then
3221	# differences in whitespace do not lead to failure.
3222	ac_old_val_w=`echo x $ac_old_val`
3223	ac_new_val_w=`echo x $ac_new_val`
3224	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3225	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3226$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3227	  ac_cache_corrupted=:
3228	else
3229	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3230$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3231	  eval $ac_var=\$ac_old_val
3232	fi
3233	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3234$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3235	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3236$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3237      fi;;
3238  esac
3239  # Pass precious variables to config.status.
3240  if test "$ac_new_set" = set; then
3241    case $ac_new_val in
3242    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3243    *) ac_arg=$ac_var=$ac_new_val ;;
3244    esac
3245    case " $ac_configure_args " in
3246      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3247      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3248    esac
3249  fi
3250done
3251if $ac_cache_corrupted; then
3252  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3254  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3255$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3256  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3257fi
3258## -------------------- ##
3259## Main body of script. ##
3260## -------------------- ##
3261
3262ac_ext=c
3263ac_cpp='$CPP $CPPFLAGS'
3264ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3265ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3266ac_compiler_gnu=$ac_cv_c_compiler_gnu
3267
3268
3269
3270ac_aux_dir=
3271for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3272  if test -f "$ac_dir/install-sh"; then
3273    ac_aux_dir=$ac_dir
3274    ac_install_sh="$ac_aux_dir/install-sh -c"
3275    break
3276  elif test -f "$ac_dir/install.sh"; then
3277    ac_aux_dir=$ac_dir
3278    ac_install_sh="$ac_aux_dir/install.sh -c"
3279    break
3280  elif test -f "$ac_dir/shtool"; then
3281    ac_aux_dir=$ac_dir
3282    ac_install_sh="$ac_aux_dir/shtool install -c"
3283    break
3284  fi
3285done
3286if test -z "$ac_aux_dir"; then
3287  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
3288fi
3289
3290# These three variables are undocumented and unsupported,
3291# and are intended to be withdrawn in a future Autoconf release.
3292# They can cause serious problems if a builder's source tree is in a directory
3293# whose full name contains unusual characters.
3294ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3295ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3296ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3297
3298
3299# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3300
3301#
3302# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3303# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3304#
3305# This code is free software; you can redistribute it and/or modify it
3306# under the terms of the GNU General Public License version 2 only, as
3307# published by the Free Software Foundation.  Oracle designates this
3308# particular file as subject to the "Classpath" exception as provided
3309# by Oracle in the LICENSE file that accompanied this code.
3310#
3311# This code is distributed in the hope that it will be useful, but WITHOUT
3312# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3313# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3314# version 2 for more details (a copy is included in the LICENSE file that
3315# accompanied this code).
3316#
3317# You should have received a copy of the GNU General Public License version
3318# 2 along with this work; if not, write to the Free Software Foundation,
3319# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3320#
3321# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3322# or visit www.oracle.com if you need additional information or have any
3323# questions.
3324#
3325
3326#
3327# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3328#
3329# This program is free software; you can redistribute it and/or modify
3330# it under the terms of the GNU General Public License as published by
3331# the Free Software Foundation; either version 2 of the License, or
3332# (at your option) any later version.
3333#
3334# This program is distributed in the hope that it will be useful, but
3335# WITHOUT ANY WARRANTY; without even the implied warranty of
3336# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3337# General Public License for more details.
3338#
3339# You should have received a copy of the GNU General Public License
3340# along with this program; if not, write to the Free Software
3341# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3342#
3343# As a special exception to the GNU General Public License, if you
3344# distribute this file as part of a program that contains a
3345# configuration script generated by Autoconf, you may include it under
3346# the same distribution terms that you use for the rest of that program.
3347
3348# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3349# ----------------------------------
3350# PKG_PROG_PKG_CONFIG
3351
3352# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3353#
3354# Check to see whether a particular set of modules exists.  Similar
3355# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3356#
3357#
3358# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3359# this or PKG_CHECK_MODULES is called, or make sure to call
3360# PKG_CHECK_EXISTS manually
3361# --------------------------------------------------------------
3362
3363
3364
3365# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3366# ---------------------------------------------
3367# _PKG_CONFIG
3368
3369# _PKG_SHORT_ERRORS_SUPPORTED
3370# -----------------------------
3371# _PKG_SHORT_ERRORS_SUPPORTED
3372
3373
3374# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3375# [ACTION-IF-NOT-FOUND])
3376#
3377#
3378# Note that if there is a possibility the first call to
3379# PKG_CHECK_MODULES might not happen, you should be sure to include an
3380# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3381#
3382#
3383# --------------------------------------------------------------
3384# PKG_CHECK_MODULES
3385
3386
3387# Include these first...
3388#
3389# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3390# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3391#
3392# This code is free software; you can redistribute it and/or modify it
3393# under the terms of the GNU General Public License version 2 only, as
3394# published by the Free Software Foundation.  Oracle designates this
3395# particular file as subject to the "Classpath" exception as provided
3396# by Oracle in the LICENSE file that accompanied this code.
3397#
3398# This code is distributed in the hope that it will be useful, but WITHOUT
3399# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3400# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3401# version 2 for more details (a copy is included in the LICENSE file that
3402# accompanied this code).
3403#
3404# You should have received a copy of the GNU General Public License version
3405# 2 along with this work; if not, write to the Free Software Foundation,
3406# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3407#
3408# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3409# or visit www.oracle.com if you need additional information or have any
3410# questions.
3411#
3412
3413# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3414# If so, then append $1 to $2 \
3415# Also set JVM_ARG_OK to true/false depending on outcome.
3416
3417
3418# Appends a string to a path variable, only adding the : when needed.
3419
3420
3421# Prepends a string to a path variable, only adding the : when needed.
3422
3423
3424# This will make sure the given variable points to a full and proper
3425# path. This means:
3426# 1) There will be no spaces in the path. On unix platforms,
3427#    spaces in the path will result in an error. On Windows,
3428#    the path will be rewritten using short-style to be space-free.
3429# 2) The path will be absolute, and it will be in unix-style (on
3430#     cygwin).
3431# $1: The name of the variable to fix
3432
3433
3434# This will make sure the given variable points to a executable
3435# with a full and proper path. This means:
3436# 1) There will be no spaces in the path. On unix platforms,
3437#    spaces in the path will result in an error. On Windows,
3438#    the path will be rewritten using short-style to be space-free.
3439# 2) The path will be absolute, and it will be in unix-style (on
3440#     cygwin).
3441# Any arguments given to the executable is preserved.
3442# If the input variable does not have a directory specification, then
3443# it need to be in the PATH.
3444# $1: The name of the variable to fix
3445
3446
3447
3448
3449# Register a --with argument but mark it as deprecated
3450# $1: The name of the with argument to deprecate, not including --with-
3451
3452
3453# Register a --enable argument but mark it as deprecated
3454# $1: The name of the with argument to deprecate, not including --enable-
3455# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3456
3457
3458
3459
3460# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3461# $1: variable to check
3462
3463
3464# Check that there are no unprocessed overridden variables left.
3465# If so, they are an incorrect argument and we will exit with an error.
3466
3467
3468# Setup a tool for the given variable. If correctly specified by the user,
3469# use that value, otherwise search for the tool using the supplied code snippet.
3470# $1: variable to set
3471# $2: code snippet to call to look for the tool
3472# $3: code snippet to call if variable was used to find tool
3473
3474
3475# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3476# $1: variable to set
3477# $2: executable name (or list of names) to look for
3478
3479
3480# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3481# $1: variable to set
3482# $2: executable name (or list of names) to look for
3483
3484
3485# Like BASIC_PATH_PROGS but fails if no tool was found.
3486# $1: variable to set
3487# $2: executable name (or list of names) to look for
3488
3489
3490# Like BASIC_SETUP_TOOL but fails if no tool was found.
3491# $1: variable to set
3492# $2: autoconf macro to call to look for the special tool
3493
3494
3495# Setup the most fundamental tools that relies on not much else to set up,
3496# but is used by much of the early bootstrap code.
3497
3498
3499# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3500
3501
3502# Evaluates platform specific overrides for devkit variables.
3503# $1: Name of variable
3504
3505
3506
3507
3508
3509
3510#%%% Simple tools %%%
3511
3512# Check if we have found a usable version of make
3513# $1: the path to a potential make binary (or empty)
3514# $2: the description on how we found this
3515
3516
3517
3518
3519# Goes looking for a usable version of GNU make.
3520
3521
3522
3523
3524
3525
3526# Check if build directory is on local disk. If not possible to determine,
3527# we prefer to claim it's local.
3528# Argument 1: directory to test
3529# Argument 2: what to do if it is on local disk
3530# Argument 3: what to do otherwise (remote disk or failure)
3531
3532
3533# Check that source files have basic read permissions set. This might
3534# not be the case in cygwin in certain conditions.
3535
3536
3537
3538
3539# Check for support for specific options in bash
3540
3541
3542# Code to run after AC_OUTPUT
3543
3544
3545#
3546# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3547# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3548#
3549# This code is free software; you can redistribute it and/or modify it
3550# under the terms of the GNU General Public License version 2 only, as
3551# published by the Free Software Foundation.  Oracle designates this
3552# particular file as subject to the "Classpath" exception as provided
3553# by Oracle in the LICENSE file that accompanied this code.
3554#
3555# This code is distributed in the hope that it will be useful, but WITHOUT
3556# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3557# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3558# version 2 for more details (a copy is included in the LICENSE file that
3559# accompanied this code).
3560#
3561# You should have received a copy of the GNU General Public License version
3562# 2 along with this work; if not, write to the Free Software Foundation,
3563# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3564#
3565# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3566# or visit www.oracle.com if you need additional information or have any
3567# questions.
3568#
3569
3570
3571
3572
3573
3574# Helper function which possibly converts a path using DOS-style short mode.
3575# If so, the updated path is stored in $new_path.
3576# $1: The path to check
3577
3578
3579# Helper function which possibly converts a path using DOS-style short mode.
3580# If so, the updated path is stored in $new_path.
3581# $1: The path to check
3582
3583
3584# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3585# and could probably be heavily simplified. However, all changes in this
3586# area tend to need lot of testing in different scenarios, and in lack of
3587# proper unit testing, cleaning this up has not been deemed worth the effort
3588# at the moment.
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3599
3600
3601
3602
3603# ... then the rest
3604#
3605# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3606# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3607#
3608# This code is free software; you can redistribute it and/or modify it
3609# under the terms of the GNU General Public License version 2 only, as
3610# published by the Free Software Foundation.  Oracle designates this
3611# particular file as subject to the "Classpath" exception as provided
3612# by Oracle in the LICENSE file that accompanied this code.
3613#
3614# This code is distributed in the hope that it will be useful, but WITHOUT
3615# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3616# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3617# version 2 for more details (a copy is included in the LICENSE file that
3618# accompanied this code).
3619#
3620# You should have received a copy of the GNU General Public License version
3621# 2 along with this work; if not, write to the Free Software Foundation,
3622# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3623#
3624# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3625# or visit www.oracle.com if you need additional information or have any
3626# questions.
3627#
3628
3629########################################################################
3630# This file handles detection of the Boot JDK. The Boot JDK detection
3631# process has been developed as a response to solve a complex real-world
3632# problem. Initially, it was simple, but it has grown as platform after
3633# platform, idiosyncracy after idiosyncracy has been supported.
3634#
3635# The basic idea is this:
3636# 1) You need an acceptable *) JDK to use as a Boot JDK
3637# 2) There are several ways to locate a JDK, that are mostly platform
3638#    dependent **)
3639# 3) You can have multiple JDKs installed
3640# 4) If possible, configure should try to dig out an acceptable JDK
3641#    automatically, without having to resort to command-line options
3642#
3643# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3644#     javac) and not a JRE, etc.
3645#
3646# **) On Windows we typically use a well-known path.
3647#     On MacOSX we typically use the tool java_home.
3648#     On Linux we typically find javac in the $PATH, and then follow a
3649#     chain of symlinks that often ends up in a real JDK.
3650#
3651# This leads to the code where we check in different ways to locate a
3652# JDK, and if one is found, check if it is acceptable. If not, we print
3653# our reasons for rejecting it (useful when debugging non-working
3654# configure situations) and continue checking the next one.
3655########################################################################
3656
3657# Execute the check given as argument, and verify the result
3658# If the Boot JDK was previously found, do nothing
3659# $1 A command line (typically autoconf macro) to execute
3660
3661
3662# Test: Is bootjdk explicitely set by command line arguments?
3663
3664
3665# Test: Is $JAVA_HOME set?
3666
3667
3668# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3669
3670
3671# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3672# $1: Argument to the java_home binary (optional)
3673
3674
3675# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3676
3677
3678# Look for a jdk in the given path. If there are multiple, try to select the newest.
3679# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3680# $1 = Path to directory containing jdk installations.
3681# $2 = String to append to the found JDK directory to get the proper JDK home
3682
3683
3684# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3685# environmental variable as base for where to look.
3686# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3687
3688
3689# Test: Is there a JDK installed in default, well-known locations?
3690
3691
3692# Check that a command-line tool in the Boot JDK is correct
3693# $1 = name of variable to assign
3694# $2 = name of binary
3695
3696
3697###############################################################################
3698#
3699# We need a Boot JDK to bootstrap the build.
3700#
3701
3702
3703
3704
3705
3706#
3707# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3708# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3709#
3710# This code is free software; you can redistribute it and/or modify it
3711# under the terms of the GNU General Public License version 2 only, as
3712# published by the Free Software Foundation.  Oracle designates this
3713# particular file as subject to the "Classpath" exception as provided
3714# by Oracle in the LICENSE file that accompanied this code.
3715#
3716# This code is distributed in the hope that it will be useful, but WITHOUT
3717# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3718# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3719# version 2 for more details (a copy is included in the LICENSE file that
3720# accompanied this code).
3721#
3722# You should have received a copy of the GNU General Public License version
3723# 2 along with this work; if not, write to the Free Software Foundation,
3724# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3725#
3726# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3727# or visit www.oracle.com if you need additional information or have any
3728# questions.
3729#
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750#
3751# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3752# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3753#
3754# This code is free software; you can redistribute it and/or modify it
3755# under the terms of the GNU General Public License version 2 only, as
3756# published by the Free Software Foundation.  Oracle designates this
3757# particular file as subject to the "Classpath" exception as provided
3758# by Oracle in the LICENSE file that accompanied this code.
3759#
3760# This code is distributed in the hope that it will be useful, but WITHOUT
3761# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3762# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3763# version 2 for more details (a copy is included in the LICENSE file that
3764# accompanied this code).
3765#
3766# You should have received a copy of the GNU General Public License version
3767# 2 along with this work; if not, write to the Free Software Foundation,
3768# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3769#
3770# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3771# or visit www.oracle.com if you need additional information or have any
3772# questions.
3773#
3774
3775# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3776# corresponding configure arguments instead
3777
3778
3779# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3780# that configure can use them while detecting compilers.
3781# TOOLCHAIN_TYPE is available here.
3782# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3783
3784
3785
3786
3787
3788
3789# Documentation on common flags used for solstudio in HIGHEST.
3790#
3791# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3792#          done with care, there are some assumptions below that need to
3793#          be understood about the use of pointers, and IEEE behavior.
3794#
3795# -fns: Use non-standard floating point mode (not IEEE 754)
3796# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3797# -fsingle: Use single precision floating point with 'float'
3798# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3799#   (Source with excessing pointer casting and data access with mixed
3800#    pointer types are not recommended)
3801# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3802#   (If you expect perfect errno behavior, do not use this)
3803# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3804# -xrestrict: Pointer parameters to functions do not overlap
3805#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3806#    If you pass in multiple pointers to the same data, do not use this)
3807# -xlibmil: Inline some library routines
3808#   (If you expect perfect errno behavior, do not use this)
3809# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3810#   (If you expect perfect errno behavior, do not use this)
3811#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3812
3813    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3814    # Bug?
3815    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3816    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3817    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3818    #fi
3819
3820
3821
3822
3823
3824# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3825#                                   [RUN-IF-FALSE])
3826# ------------------------------------------------------------
3827# Check that the c and c++ compilers support an argument
3828
3829
3830# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3831#                                    [RUN-IF-FALSE])
3832# ------------------------------------------------------------
3833# Check that the linker support an argument
3834
3835
3836
3837
3838#
3839# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3840# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3841#
3842# This code is free software; you can redistribute it and/or modify it
3843# under the terms of the GNU General Public License version 2 only, as
3844# published by the Free Software Foundation.  Oracle designates this
3845# particular file as subject to the "Classpath" exception as provided
3846# by Oracle in the LICENSE file that accompanied this code.
3847#
3848# This code is distributed in the hope that it will be useful, but WITHOUT
3849# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3850# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3851# version 2 for more details (a copy is included in the LICENSE file that
3852# accompanied this code).
3853#
3854# You should have received a copy of the GNU General Public License version
3855# 2 along with this work; if not, write to the Free Software Foundation,
3856# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3857#
3858# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3859# or visit www.oracle.com if you need additional information or have any
3860# questions.
3861#
3862
3863
3864
3865
3866
3867cygwin_help() {
3868  case $1 in
3869    unzip)
3870      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3871      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3872      ;;
3873    zip)
3874      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3875      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3876      ;;
3877    make)
3878      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3879      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3880      ;;
3881    freetype)
3882      HELP_MSG="
3883The freetype library can now be build during the configure process.
3884Download the freetype sources and unpack them into an arbitrary directory:
3885
3886wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3887tar -xzf freetype-2.5.3.tar.gz
3888
3889Then run configure with '--with-freetype-src=<freetype_src>'. This will
3890automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3891builds or into '<freetype_src>/lib32' for 32-bit builds.
3892Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3893and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3894      ;;
3895  esac
3896}
3897
3898msys_help() {
3899  PKGHANDLER_COMMAND=""
3900}
3901
3902apt_help() {
3903  case $1 in
3904    reduced)
3905      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3906    devkit)
3907      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3908    openjdk)
3909      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3910    alsa)
3911      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3912    cups)
3913      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3914    freetype)
3915      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3916    ffi)
3917      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3918    x11)
3919      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3920    ccache)
3921      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3922  esac
3923}
3924
3925yum_help() {
3926  case $1 in
3927    devkit)
3928      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3929    openjdk)
3930      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3931    alsa)
3932      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3933    cups)
3934      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3935    freetype)
3936      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3937    x11)
3938      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3939    ccache)
3940      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3941  esac
3942}
3943
3944port_help() {
3945  PKGHANDLER_COMMAND=""
3946}
3947
3948pkgutil_help() {
3949  PKGHANDLER_COMMAND=""
3950}
3951
3952pkgadd_help() {
3953  PKGHANDLER_COMMAND=""
3954}
3955
3956# This function will check if we're called from the "configure" wrapper while
3957# printing --help. If so, we will print out additional information that can
3958# only be extracted within the autoconf script, and then exit. This must be
3959# called at the very beginning in configure.ac.
3960
3961
3962
3963
3964
3965
3966#
3967# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3968# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3969#
3970# This code is free software; you can redistribute it and/or modify it
3971# under the terms of the GNU General Public License version 2 only, as
3972# published by the Free Software Foundation.  Oracle designates this
3973# particular file as subject to the "Classpath" exception as provided
3974# by Oracle in the LICENSE file that accompanied this code.
3975#
3976# This code is distributed in the hope that it will be useful, but WITHOUT
3977# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3978# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3979# version 2 for more details (a copy is included in the LICENSE file that
3980# accompanied this code).
3981#
3982# You should have received a copy of the GNU General Public License version
3983# 2 along with this work; if not, write to the Free Software Foundation,
3984# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3985#
3986# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3987# or visit www.oracle.com if you need additional information or have any
3988# questions.
3989#
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000###############################################################################
4001#
4002# Should we build only OpenJDK even if closed sources are present?
4003#
4004
4005
4006
4007
4008
4009
4010###############################################################################
4011#
4012# Enable or disable the elliptic curve crypto implementation
4013#
4014
4015
4016
4017
4018
4019################################################################################
4020#
4021# Gcov coverage data for hotspot
4022#
4023
4024
4025#
4026# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4027# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4028#
4029# This code is free software; you can redistribute it and/or modify it
4030# under the terms of the GNU General Public License version 2 only, as
4031# published by the Free Software Foundation.  Oracle designates this
4032# particular file as subject to the "Classpath" exception as provided
4033# by Oracle in the LICENSE file that accompanied this code.
4034#
4035# This code is distributed in the hope that it will be useful, but WITHOUT
4036# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4037# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4038# version 2 for more details (a copy is included in the LICENSE file that
4039# accompanied this code).
4040#
4041# You should have received a copy of the GNU General Public License version
4042# 2 along with this work; if not, write to the Free Software Foundation,
4043# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4044#
4045# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4046# or visit www.oracle.com if you need additional information or have any
4047# questions.
4048#
4049
4050###############################################################################
4051#
4052# Setup version numbers
4053#
4054
4055# Verify that a given string represents a valid version number, and assign it
4056# to a variable.
4057
4058# Argument 1: the variable to assign to
4059# Argument 2: the value given by the user
4060
4061
4062
4063
4064################################################################################
4065#
4066# Static build support.  When enabled will generate static
4067# libraries instead of shared libraries for all JDK libs.
4068#
4069
4070
4071
4072
4073#
4074# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4075# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4076#
4077# This code is free software; you can redistribute it and/or modify it
4078# under the terms of the GNU General Public License version 2 only, as
4079# published by the Free Software Foundation.  Oracle designates this
4080# particular file as subject to the "Classpath" exception as provided
4081# by Oracle in the LICENSE file that accompanied this code.
4082#
4083# This code is distributed in the hope that it will be useful, but WITHOUT
4084# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4085# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4086# version 2 for more details (a copy is included in the LICENSE file that
4087# accompanied this code).
4088#
4089# You should have received a copy of the GNU General Public License version
4090# 2 along with this work; if not, write to the Free Software Foundation,
4091# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4092#
4093# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4094# or visit www.oracle.com if you need additional information or have any
4095# questions.
4096#
4097
4098# Major library component reside in separate files.
4099#
4100# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4101# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4102#
4103# This code is free software; you can redistribute it and/or modify it
4104# under the terms of the GNU General Public License version 2 only, as
4105# published by the Free Software Foundation.  Oracle designates this
4106# particular file as subject to the "Classpath" exception as provided
4107# by Oracle in the LICENSE file that accompanied this code.
4108#
4109# This code is distributed in the hope that it will be useful, but WITHOUT
4110# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4111# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4112# version 2 for more details (a copy is included in the LICENSE file that
4113# accompanied this code).
4114#
4115# You should have received a copy of the GNU General Public License version
4116# 2 along with this work; if not, write to the Free Software Foundation,
4117# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4118#
4119# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4120# or visit www.oracle.com if you need additional information or have any
4121# questions.
4122#
4123
4124################################################################################
4125# Setup alsa (Advanced Linux Sound Architecture)
4126################################################################################
4127
4128
4129#
4130# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4131# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4132#
4133# This code is free software; you can redistribute it and/or modify it
4134# under the terms of the GNU General Public License version 2 only, as
4135# published by the Free Software Foundation.  Oracle designates this
4136# particular file as subject to the "Classpath" exception as provided
4137# by Oracle in the LICENSE file that accompanied this code.
4138#
4139# This code is distributed in the hope that it will be useful, but WITHOUT
4140# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4141# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4142# version 2 for more details (a copy is included in the LICENSE file that
4143# accompanied this code).
4144#
4145# You should have received a copy of the GNU General Public License version
4146# 2 along with this work; if not, write to the Free Software Foundation,
4147# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4148#
4149# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4150# or visit www.oracle.com if you need additional information or have any
4151# questions.
4152#
4153
4154################################################################################
4155# Setup bundled libraries.
4156#
4157# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4158# OpenJDK repository. Default is to use these libraries as bundled, but they
4159# might be replaced by en external version by the user.
4160################################################################################
4161
4162
4163################################################################################
4164# Setup libjpeg
4165################################################################################
4166
4167
4168################################################################################
4169# Setup giflib
4170################################################################################
4171
4172
4173################################################################################
4174# Setup libpng
4175################################################################################
4176
4177
4178################################################################################
4179# Setup zlib
4180################################################################################
4181
4182
4183################################################################################
4184# Setup lcms (Little CMS)
4185################################################################################
4186
4187
4188#
4189# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4190# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4191#
4192# This code is free software; you can redistribute it and/or modify it
4193# under the terms of the GNU General Public License version 2 only, as
4194# published by the Free Software Foundation.  Oracle designates this
4195# particular file as subject to the "Classpath" exception as provided
4196# by Oracle in the LICENSE file that accompanied this code.
4197#
4198# This code is distributed in the hope that it will be useful, but WITHOUT
4199# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4200# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4201# version 2 for more details (a copy is included in the LICENSE file that
4202# accompanied this code).
4203#
4204# You should have received a copy of the GNU General Public License version
4205# 2 along with this work; if not, write to the Free Software Foundation,
4206# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4207#
4208# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4209# or visit www.oracle.com if you need additional information or have any
4210# questions.
4211#
4212
4213################################################################################
4214# Setup cups (Common Unix Printing System)
4215################################################################################
4216
4217
4218#
4219# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4220# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4221#
4222# This code is free software; you can redistribute it and/or modify it
4223# under the terms of the GNU General Public License version 2 only, as
4224# published by the Free Software Foundation.  Oracle designates this
4225# particular file as subject to the "Classpath" exception as provided
4226# by Oracle in the LICENSE file that accompanied this code.
4227#
4228# This code is distributed in the hope that it will be useful, but WITHOUT
4229# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4230# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4231# version 2 for more details (a copy is included in the LICENSE file that
4232# accompanied this code).
4233#
4234# You should have received a copy of the GNU General Public License version
4235# 2 along with this work; if not, write to the Free Software Foundation,
4236# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4237#
4238# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4239# or visit www.oracle.com if you need additional information or have any
4240# questions.
4241#
4242
4243################################################################################
4244# Setup libffi (Foreign Function Interface)
4245################################################################################
4246
4247
4248#
4249# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4250# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4251#
4252# This code is free software; you can redistribute it and/or modify it
4253# under the terms of the GNU General Public License version 2 only, as
4254# published by the Free Software Foundation.  Oracle designates this
4255# particular file as subject to the "Classpath" exception as provided
4256# by Oracle in the LICENSE file that accompanied this code.
4257#
4258# This code is distributed in the hope that it will be useful, but WITHOUT
4259# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4260# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4261# version 2 for more details (a copy is included in the LICENSE file that
4262# accompanied this code).
4263#
4264# You should have received a copy of the GNU General Public License version
4265# 2 along with this work; if not, write to the Free Software Foundation,
4266# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4267#
4268# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4269# or visit www.oracle.com if you need additional information or have any
4270# questions.
4271#
4272
4273################################################################################
4274# Build the freetype lib from source
4275################################################################################
4276
4277
4278################################################################################
4279# Check if a potential freeype library match is correct and usable
4280################################################################################
4281
4282
4283################################################################################
4284# Setup freetype (The FreeType2 font rendering library)
4285################################################################################
4286
4287
4288#
4289# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4290# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4291#
4292# This code is free software; you can redistribute it and/or modify it
4293# under the terms of the GNU General Public License version 2 only, as
4294# published by the Free Software Foundation.  Oracle designates this
4295# particular file as subject to the "Classpath" exception as provided
4296# by Oracle in the LICENSE file that accompanied this code.
4297#
4298# This code is distributed in the hope that it will be useful, but WITHOUT
4299# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4300# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4301# version 2 for more details (a copy is included in the LICENSE file that
4302# accompanied this code).
4303#
4304# You should have received a copy of the GNU General Public License version
4305# 2 along with this work; if not, write to the Free Software Foundation,
4306# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4307#
4308# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4309# or visit www.oracle.com if you need additional information or have any
4310# questions.
4311#
4312
4313################################################################################
4314# Setup the standard C/C++ runtime libraries.
4315#
4316# Most importantly, determine if stdc++ should be linked statically or
4317# dynamically.
4318################################################################################
4319
4320
4321#
4322# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4323# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4324#
4325# This code is free software; you can redistribute it and/or modify it
4326# under the terms of the GNU General Public License version 2 only, as
4327# published by the Free Software Foundation.  Oracle designates this
4328# particular file as subject to the "Classpath" exception as provided
4329# by Oracle in the LICENSE file that accompanied this code.
4330#
4331# This code is distributed in the hope that it will be useful, but WITHOUT
4332# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4333# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4334# version 2 for more details (a copy is included in the LICENSE file that
4335# accompanied this code).
4336#
4337# You should have received a copy of the GNU General Public License version
4338# 2 along with this work; if not, write to the Free Software Foundation,
4339# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4340#
4341# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4342# or visit www.oracle.com if you need additional information or have any
4343# questions.
4344#
4345
4346################################################################################
4347# Setup X11 Windows system
4348################################################################################
4349
4350
4351
4352################################################################################
4353# Determine which libraries are needed for this configuration
4354################################################################################
4355
4356
4357################################################################################
4358# Parse library options, and setup needed libraries
4359################################################################################
4360
4361
4362################################################################################
4363# Setup llvm (Low-Level VM)
4364################################################################################
4365
4366
4367################################################################################
4368# Setup various libraries, typically small system libraries
4369################################################################################
4370
4371
4372#
4373# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4374# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4375#
4376# This code is free software; you can redistribute it and/or modify it
4377# under the terms of the GNU General Public License version 2 only, as
4378# published by the Free Software Foundation.  Oracle designates this
4379# particular file as subject to the "Classpath" exception as provided
4380# by Oracle in the LICENSE file that accompanied this code.
4381#
4382# This code is distributed in the hope that it will be useful, but WITHOUT
4383# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4384# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4385# version 2 for more details (a copy is included in the LICENSE file that
4386# accompanied this code).
4387#
4388# You should have received a copy of the GNU General Public License version
4389# 2 along with this work; if not, write to the Free Software Foundation,
4390# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4391#
4392# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4393# or visit www.oracle.com if you need additional information or have any
4394# questions.
4395#
4396
4397# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4398# Converts autoconf style CPU name to OpenJDK style, into
4399# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4400
4401
4402# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4403# Converts autoconf style OS name to OpenJDK style, into
4404# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4405
4406
4407# Expects $host_os $host_cpu $build_os and $build_cpu
4408# and $with_target_bits to have been setup!
4409#
4410# Translate the standard triplet(quadruplet) definition
4411# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4412# OPENJDK_BUILD_OS, etc.
4413
4414
4415# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4416# accordingly. Must be done after setting up build and target system, but before
4417# doing anything else with these values.
4418
4419
4420# Setup the legacy variables, for controlling the old makefiles.
4421#
4422
4423
4424
4425
4426#%%% Build and target systems %%%
4427
4428
4429
4430
4431# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4432# Add -mX to various FLAGS variables.
4433
4434
4435
4436
4437
4438
4439#
4440# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4441# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4442#
4443# This code is free software; you can redistribute it and/or modify it
4444# under the terms of the GNU General Public License version 2 only, as
4445# published by the Free Software Foundation.  Oracle designates this
4446# particular file as subject to the "Classpath" exception as provided
4447# by Oracle in the LICENSE file that accompanied this code.
4448#
4449# This code is distributed in the hope that it will be useful, but WITHOUT
4450# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4451# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4452# version 2 for more details (a copy is included in the LICENSE file that
4453# accompanied this code).
4454#
4455# You should have received a copy of the GNU General Public License version
4456# 2 along with this work; if not, write to the Free Software Foundation,
4457# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4458#
4459# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4460# or visit www.oracle.com if you need additional information or have any
4461# questions.
4462#
4463
4464
4465
4466
4467
4468
4469
4470#
4471# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4472# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4473#
4474# This code is free software; you can redistribute it and/or modify it
4475# under the terms of the GNU General Public License version 2 only, as
4476# published by the Free Software Foundation.  Oracle designates this
4477# particular file as subject to the "Classpath" exception as provided
4478# by Oracle in the LICENSE file that accompanied this code.
4479#
4480# This code is distributed in the hope that it will be useful, but WITHOUT
4481# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4482# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4483# version 2 for more details (a copy is included in the LICENSE file that
4484# accompanied this code).
4485#
4486# You should have received a copy of the GNU General Public License version
4487# 2 along with this work; if not, write to the Free Software Foundation,
4488# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4489#
4490# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4491# or visit www.oracle.com if you need additional information or have any
4492# questions.
4493#
4494
4495########################################################################
4496# This file is responsible for detecting, verifying and setting up the
4497# toolchain, i.e. the compiler, linker and related utilities. It will setup
4498# proper paths to the binaries, but it will not setup any flags.
4499#
4500# The binaries used is determined by the toolchain type, which is the family of
4501# compilers and related tools that are used.
4502########################################################################
4503
4504
4505# All valid toolchains, regardless of platform (used by help.m4)
4506VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4507
4508# These toolchains are valid on different platforms
4509VALID_TOOLCHAINS_linux="gcc clang"
4510VALID_TOOLCHAINS_solaris="solstudio"
4511VALID_TOOLCHAINS_macosx="gcc clang"
4512VALID_TOOLCHAINS_aix="xlc"
4513VALID_TOOLCHAINS_windows="microsoft"
4514
4515# Toolchain descriptions
4516TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4517TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4518TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4519TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4520TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4521
4522# Setup a number of variables describing how native output files are
4523# named on this platform/toolchain.
4524
4525
4526# Determine which toolchain type to use, and make sure it is valid for this
4527# platform. Setup various information about the selected toolchain.
4528
4529
4530# Before we start detecting the toolchain executables, we might need some
4531# special setup, e.g. additional paths etc.
4532
4533
4534# Restore path, etc
4535
4536
4537# Check if a compiler is of the toolchain type we expect, and save the version
4538# information from it. If the compiler does not match the expected type,
4539# this function will abort using AC_MSG_ERROR. If it matches, the version will
4540# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4541# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4542#
4543# $1 = compiler to test (CC or CXX)
4544# $2 = human readable name of compiler (C or C++)
4545
4546
4547# Try to locate the given C or C++ compiler in the path, or otherwise.
4548#
4549# $1 = compiler to test (CC or CXX)
4550# $2 = human readable name of compiler (C or C++)
4551# $3 = list of compiler names to search for
4552
4553
4554# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4555# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4556# archiver (AR). Verify that the compilers are correct according to the
4557# toolchain type.
4558
4559
4560# Setup additional tools that is considered a part of the toolchain, but not the
4561# core part. Many of these are highly platform-specific and do not exist,
4562# and/or are not needed on all platforms.
4563
4564
4565# Setup the build tools (i.e, the compiler and linker used to build programs
4566# that should be run on the build platform, not the target platform, as a build
4567# helper). Since the non-cross-compile case uses the normal, target compilers
4568# for this, we can only do this after these have been setup.
4569
4570
4571# Setup legacy variables that are still needed as alternative ways to refer to
4572# parts of the toolchain.
4573
4574
4575# Do some additional checks on the detected tools.
4576
4577
4578# Setup the JTReg Regression Test Harness.
4579
4580
4581#
4582# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4583# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4584#
4585# This code is free software; you can redistribute it and/or modify it
4586# under the terms of the GNU General Public License version 2 only, as
4587# published by the Free Software Foundation.  Oracle designates this
4588# particular file as subject to the "Classpath" exception as provided
4589# by Oracle in the LICENSE file that accompanied this code.
4590#
4591# This code is distributed in the hope that it will be useful, but WITHOUT
4592# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4593# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4594# version 2 for more details (a copy is included in the LICENSE file that
4595# accompanied this code).
4596#
4597# You should have received a copy of the GNU General Public License version
4598# 2 along with this work; if not, write to the Free Software Foundation,
4599# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4600#
4601# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4602# or visit www.oracle.com if you need additional information or have any
4603# questions.
4604#
4605
4606################################################################################
4607# The order of these defines the priority by which we try to find them.
4608VALID_VS_VERSIONS="2013 2012 2010"
4609
4610VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4611VS_VERSION_INTERNAL_2010=100
4612VS_MSVCR_2010=msvcr100.dll
4613# We don't use msvcp on Visual Studio 2010
4614#VS_MSVCP_2010=msvcp100.dll
4615VS_ENVVAR_2010="VS100COMNTOOLS"
4616VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4617VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4618VS_VS_PLATFORM_NAME_2010="v100"
4619VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4620
4621VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4622VS_VERSION_INTERNAL_2012=110
4623VS_MSVCR_2012=msvcr110.dll
4624VS_MSVCP_2012=msvcp110.dll
4625VS_ENVVAR_2012="VS110COMNTOOLS"
4626VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4627VS_SDK_INSTALLDIR_2012=
4628VS_VS_PLATFORM_NAME_2012="v110"
4629VS_SDK_PLATFORM_NAME_2012=
4630
4631VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4632VS_VERSION_INTERNAL_2013=120
4633VS_MSVCR_2013=msvcr120.dll
4634VS_MSVCP_2013=msvcp120.dll
4635VS_ENVVAR_2013="VS120COMNTOOLS"
4636VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4637VS_SDK_INSTALLDIR_2013=
4638VS_VS_PLATFORM_NAME_2013="v120"
4639VS_SDK_PLATFORM_NAME_2013=
4640
4641################################################################################
4642
4643
4644
4645################################################################################
4646
4647
4648
4649################################################################################
4650# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4651# build environment and assigns it to VS_ENV_CMD
4652
4653
4654################################################################################
4655
4656
4657
4658################################################################################
4659# Check if the VS env variables were setup prior to running configure.
4660# If not, then find vcvarsall.bat and run it automatically, and integrate
4661# the set env variables into the spec file.
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676# This line needs to be here, verbatim, after all includes and the dummy hook
4677# definitions. It is replaced with custom functionality when building
4678# custom sources.
4679#CUSTOM_AUTOCONF_INCLUDE
4680
4681# Do not change or remove the following line, it is needed for consistency checks:
4682DATE_WHEN_GENERATED=1447737510
4683
4684###############################################################################
4685#
4686# Initialization / Boot-strapping
4687#
4688# The bootstrapping process needs to solve the "chicken or the egg" problem,
4689# thus it jumps back and forth, each time gaining something needed later on.
4690#
4691###############################################################################
4692
4693# If we are requested to print additional help, do that and then exit.
4694# This must be the very first call.
4695
4696  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4697    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4698    $PRINTF "Which are valid to use depends on the build platform.\n"
4699    for toolchain in $VALID_TOOLCHAINS_all; do
4700      # Use indirect variable referencing
4701      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4702      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4703      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4704    done
4705
4706    # And now exit directly
4707    exit 0
4708  fi
4709
4710
4711# Basic initialization that must happen first of all in the normal process.
4712
4713  # Save the original command line. This is passed to us by the wrapper configure script.
4714
4715  # Save the path variable before it gets changed
4716  ORIGINAL_PATH="$PATH"
4717
4718  DATE_WHEN_CONFIGURED=`LANG=C date`
4719
4720  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4721$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4722  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4723$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4724
4725
4726  # Start with tools that do not need have cross compilation support
4727  # and can be expected to be found in the default PATH. These tools are
4728  # used by configure.
4729
4730  # First are all the simple required tools.
4731
4732
4733
4734  # Publish this variable in the help.
4735
4736
4737  if [ -z "${BASENAME+x}" ]; then
4738    # The variable is not set by user, try to locate tool using the code snippet
4739    for ac_prog in basename
4740do
4741  # Extract the first word of "$ac_prog", so it can be a program name with args.
4742set dummy $ac_prog; ac_word=$2
4743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
4745if ${ac_cv_path_BASENAME+:} false; then :
4746  $as_echo_n "(cached) " >&6
4747else
4748  case $BASENAME in
4749  [\\/]* | ?:[\\/]*)
4750  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4751  ;;
4752  *)
4753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in $PATH
4755do
4756  IFS=$as_save_IFS
4757  test -z "$as_dir" && as_dir=.
4758    for ac_exec_ext in '' $ac_executable_extensions; do
4759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4760    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4762    break 2
4763  fi
4764done
4765  done
4766IFS=$as_save_IFS
4767
4768  ;;
4769esac
4770fi
4771BASENAME=$ac_cv_path_BASENAME
4772if test -n "$BASENAME"; then
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4774$as_echo "$BASENAME" >&6; }
4775else
4776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
4778fi
4779
4780
4781  test -n "$BASENAME" && break
4782done
4783
4784  else
4785    # The variable is set, but is it from the command line or the environment?
4786
4787    # Try to remove the string !BASENAME! from our list.
4788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4790      # If it failed, the variable was not from the command line. Ignore it,
4791      # but warn the user (except for BASH, which is always set by the calling BASH).
4792      if test "xBASENAME" != xBASH; then
4793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4794$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4795      fi
4796      # Try to locate tool using the code snippet
4797      for ac_prog in basename
4798do
4799  # Extract the first word of "$ac_prog", so it can be a program name with args.
4800set dummy $ac_prog; ac_word=$2
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802$as_echo_n "checking for $ac_word... " >&6; }
4803if ${ac_cv_path_BASENAME+:} false; then :
4804  $as_echo_n "(cached) " >&6
4805else
4806  case $BASENAME in
4807  [\\/]* | ?:[\\/]*)
4808  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4809  ;;
4810  *)
4811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812for as_dir in $PATH
4813do
4814  IFS=$as_save_IFS
4815  test -z "$as_dir" && as_dir=.
4816    for ac_exec_ext in '' $ac_executable_extensions; do
4817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4818    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4820    break 2
4821  fi
4822done
4823  done
4824IFS=$as_save_IFS
4825
4826  ;;
4827esac
4828fi
4829BASENAME=$ac_cv_path_BASENAME
4830if test -n "$BASENAME"; then
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4832$as_echo "$BASENAME" >&6; }
4833else
4834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835$as_echo "no" >&6; }
4836fi
4837
4838
4839  test -n "$BASENAME" && break
4840done
4841
4842    else
4843      # If it succeeded, then it was overridden by the user. We will use it
4844      # for the tool.
4845
4846      # First remove it from the list of overridden variables, so we can test
4847      # for unknown variables in the end.
4848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4849
4850      # Check if we try to supply an empty value
4851      if test "x$BASENAME" = x; then
4852        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4853$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4855$as_echo_n "checking for BASENAME... " >&6; }
4856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4857$as_echo "disabled" >&6; }
4858      else
4859        # Check if the provided tool contains a complete path.
4860        tool_specified="$BASENAME"
4861        tool_basename="${tool_specified##*/}"
4862        if test "x$tool_basename" = "x$tool_specified"; then
4863          # A command without a complete path is provided, search $PATH.
4864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4865$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4866          # Extract the first word of "$tool_basename", so it can be a program name with args.
4867set dummy $tool_basename; ac_word=$2
4868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4869$as_echo_n "checking for $ac_word... " >&6; }
4870if ${ac_cv_path_BASENAME+:} false; then :
4871  $as_echo_n "(cached) " >&6
4872else
4873  case $BASENAME in
4874  [\\/]* | ?:[\\/]*)
4875  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4876  ;;
4877  *)
4878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4879for as_dir in $PATH
4880do
4881  IFS=$as_save_IFS
4882  test -z "$as_dir" && as_dir=.
4883    for ac_exec_ext in '' $ac_executable_extensions; do
4884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4885    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4887    break 2
4888  fi
4889done
4890  done
4891IFS=$as_save_IFS
4892
4893  ;;
4894esac
4895fi
4896BASENAME=$ac_cv_path_BASENAME
4897if test -n "$BASENAME"; then
4898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4899$as_echo "$BASENAME" >&6; }
4900else
4901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902$as_echo "no" >&6; }
4903fi
4904
4905
4906          if test "x$BASENAME" = x; then
4907            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4908          fi
4909        else
4910          # Otherwise we believe it is a complete path. Use it as it is.
4911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4912$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4913          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4914$as_echo_n "checking for BASENAME... " >&6; }
4915          if test ! -x "$tool_specified"; then
4916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4917$as_echo "not found" >&6; }
4918            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4919          fi
4920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4921$as_echo "$tool_specified" >&6; }
4922        fi
4923      fi
4924    fi
4925
4926  fi
4927
4928
4929
4930  if test "x$BASENAME" = x; then
4931    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4932  fi
4933
4934
4935
4936
4937
4938  # Publish this variable in the help.
4939
4940
4941  if [ -z "${BASH+x}" ]; then
4942    # The variable is not set by user, try to locate tool using the code snippet
4943    for ac_prog in bash
4944do
4945  # Extract the first word of "$ac_prog", so it can be a program name with args.
4946set dummy $ac_prog; ac_word=$2
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4948$as_echo_n "checking for $ac_word... " >&6; }
4949if ${ac_cv_path_BASH+:} false; then :
4950  $as_echo_n "(cached) " >&6
4951else
4952  case $BASH in
4953  [\\/]* | ?:[\\/]*)
4954  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4955  ;;
4956  *)
4957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958for as_dir in $PATH
4959do
4960  IFS=$as_save_IFS
4961  test -z "$as_dir" && as_dir=.
4962    for ac_exec_ext in '' $ac_executable_extensions; do
4963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4964    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4966    break 2
4967  fi
4968done
4969  done
4970IFS=$as_save_IFS
4971
4972  ;;
4973esac
4974fi
4975BASH=$ac_cv_path_BASH
4976if test -n "$BASH"; then
4977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4978$as_echo "$BASH" >&6; }
4979else
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981$as_echo "no" >&6; }
4982fi
4983
4984
4985  test -n "$BASH" && break
4986done
4987
4988  else
4989    # The variable is set, but is it from the command line or the environment?
4990
4991    # Try to remove the string !BASH! from our list.
4992    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4993    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4994      # If it failed, the variable was not from the command line. Ignore it,
4995      # but warn the user (except for BASH, which is always set by the calling BASH).
4996      if test "xBASH" != xBASH; then
4997        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4998$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4999      fi
5000      # Try to locate tool using the code snippet
5001      for ac_prog in bash
5002do
5003  # Extract the first word of "$ac_prog", so it can be a program name with args.
5004set dummy $ac_prog; ac_word=$2
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006$as_echo_n "checking for $ac_word... " >&6; }
5007if ${ac_cv_path_BASH+:} false; then :
5008  $as_echo_n "(cached) " >&6
5009else
5010  case $BASH in
5011  [\\/]* | ?:[\\/]*)
5012  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5013  ;;
5014  *)
5015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in $PATH
5017do
5018  IFS=$as_save_IFS
5019  test -z "$as_dir" && as_dir=.
5020    for ac_exec_ext in '' $ac_executable_extensions; do
5021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5022    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024    break 2
5025  fi
5026done
5027  done
5028IFS=$as_save_IFS
5029
5030  ;;
5031esac
5032fi
5033BASH=$ac_cv_path_BASH
5034if test -n "$BASH"; then
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5036$as_echo "$BASH" >&6; }
5037else
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
5040fi
5041
5042
5043  test -n "$BASH" && break
5044done
5045
5046    else
5047      # If it succeeded, then it was overridden by the user. We will use it
5048      # for the tool.
5049
5050      # First remove it from the list of overridden variables, so we can test
5051      # for unknown variables in the end.
5052      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5053
5054      # Check if we try to supply an empty value
5055      if test "x$BASH" = x; then
5056        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5057$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5058        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5059$as_echo_n "checking for BASH... " >&6; }
5060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5061$as_echo "disabled" >&6; }
5062      else
5063        # Check if the provided tool contains a complete path.
5064        tool_specified="$BASH"
5065        tool_basename="${tool_specified##*/}"
5066        if test "x$tool_basename" = "x$tool_specified"; then
5067          # A command without a complete path is provided, search $PATH.
5068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5069$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5070          # Extract the first word of "$tool_basename", so it can be a program name with args.
5071set dummy $tool_basename; ac_word=$2
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
5074if ${ac_cv_path_BASH+:} false; then :
5075  $as_echo_n "(cached) " >&6
5076else
5077  case $BASH in
5078  [\\/]* | ?:[\\/]*)
5079  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5080  ;;
5081  *)
5082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083for as_dir in $PATH
5084do
5085  IFS=$as_save_IFS
5086  test -z "$as_dir" && as_dir=.
5087    for ac_exec_ext in '' $ac_executable_extensions; do
5088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5089    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091    break 2
5092  fi
5093done
5094  done
5095IFS=$as_save_IFS
5096
5097  ;;
5098esac
5099fi
5100BASH=$ac_cv_path_BASH
5101if test -n "$BASH"; then
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5103$as_echo "$BASH" >&6; }
5104else
5105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
5107fi
5108
5109
5110          if test "x$BASH" = x; then
5111            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5112          fi
5113        else
5114          # Otherwise we believe it is a complete path. Use it as it is.
5115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5116$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5117          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5118$as_echo_n "checking for BASH... " >&6; }
5119          if test ! -x "$tool_specified"; then
5120            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5121$as_echo "not found" >&6; }
5122            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5123          fi
5124          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5125$as_echo "$tool_specified" >&6; }
5126        fi
5127      fi
5128    fi
5129
5130  fi
5131
5132
5133
5134  if test "x$BASH" = x; then
5135    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5136  fi
5137
5138
5139
5140
5141
5142  # Publish this variable in the help.
5143
5144
5145  if [ -z "${CAT+x}" ]; then
5146    # The variable is not set by user, try to locate tool using the code snippet
5147    for ac_prog in cat
5148do
5149  # Extract the first word of "$ac_prog", so it can be a program name with args.
5150set dummy $ac_prog; ac_word=$2
5151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5152$as_echo_n "checking for $ac_word... " >&6; }
5153if ${ac_cv_path_CAT+:} false; then :
5154  $as_echo_n "(cached) " >&6
5155else
5156  case $CAT in
5157  [\\/]* | ?:[\\/]*)
5158  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5159  ;;
5160  *)
5161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5162for as_dir in $PATH
5163do
5164  IFS=$as_save_IFS
5165  test -z "$as_dir" && as_dir=.
5166    for ac_exec_ext in '' $ac_executable_extensions; do
5167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5168    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5170    break 2
5171  fi
5172done
5173  done
5174IFS=$as_save_IFS
5175
5176  ;;
5177esac
5178fi
5179CAT=$ac_cv_path_CAT
5180if test -n "$CAT"; then
5181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5182$as_echo "$CAT" >&6; }
5183else
5184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5185$as_echo "no" >&6; }
5186fi
5187
5188
5189  test -n "$CAT" && break
5190done
5191
5192  else
5193    # The variable is set, but is it from the command line or the environment?
5194
5195    # Try to remove the string !CAT! from our list.
5196    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5197    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5198      # If it failed, the variable was not from the command line. Ignore it,
5199      # but warn the user (except for BASH, which is always set by the calling BASH).
5200      if test "xCAT" != xBASH; then
5201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5202$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5203      fi
5204      # Try to locate tool using the code snippet
5205      for ac_prog in cat
5206do
5207  # Extract the first word of "$ac_prog", so it can be a program name with args.
5208set dummy $ac_prog; ac_word=$2
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5210$as_echo_n "checking for $ac_word... " >&6; }
5211if ${ac_cv_path_CAT+:} false; then :
5212  $as_echo_n "(cached) " >&6
5213else
5214  case $CAT in
5215  [\\/]* | ?:[\\/]*)
5216  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5217  ;;
5218  *)
5219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5220for as_dir in $PATH
5221do
5222  IFS=$as_save_IFS
5223  test -z "$as_dir" && as_dir=.
5224    for ac_exec_ext in '' $ac_executable_extensions; do
5225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5226    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5228    break 2
5229  fi
5230done
5231  done
5232IFS=$as_save_IFS
5233
5234  ;;
5235esac
5236fi
5237CAT=$ac_cv_path_CAT
5238if test -n "$CAT"; then
5239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5240$as_echo "$CAT" >&6; }
5241else
5242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243$as_echo "no" >&6; }
5244fi
5245
5246
5247  test -n "$CAT" && break
5248done
5249
5250    else
5251      # If it succeeded, then it was overridden by the user. We will use it
5252      # for the tool.
5253
5254      # First remove it from the list of overridden variables, so we can test
5255      # for unknown variables in the end.
5256      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5257
5258      # Check if we try to supply an empty value
5259      if test "x$CAT" = x; then
5260        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5261$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5263$as_echo_n "checking for CAT... " >&6; }
5264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5265$as_echo "disabled" >&6; }
5266      else
5267        # Check if the provided tool contains a complete path.
5268        tool_specified="$CAT"
5269        tool_basename="${tool_specified##*/}"
5270        if test "x$tool_basename" = "x$tool_specified"; then
5271          # A command without a complete path is provided, search $PATH.
5272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5273$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5274          # Extract the first word of "$tool_basename", so it can be a program name with args.
5275set dummy $tool_basename; ac_word=$2
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5277$as_echo_n "checking for $ac_word... " >&6; }
5278if ${ac_cv_path_CAT+:} false; then :
5279  $as_echo_n "(cached) " >&6
5280else
5281  case $CAT in
5282  [\\/]* | ?:[\\/]*)
5283  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5284  ;;
5285  *)
5286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287for as_dir in $PATH
5288do
5289  IFS=$as_save_IFS
5290  test -z "$as_dir" && as_dir=.
5291    for ac_exec_ext in '' $ac_executable_extensions; do
5292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5293    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5295    break 2
5296  fi
5297done
5298  done
5299IFS=$as_save_IFS
5300
5301  ;;
5302esac
5303fi
5304CAT=$ac_cv_path_CAT
5305if test -n "$CAT"; then
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5307$as_echo "$CAT" >&6; }
5308else
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310$as_echo "no" >&6; }
5311fi
5312
5313
5314          if test "x$CAT" = x; then
5315            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5316          fi
5317        else
5318          # Otherwise we believe it is a complete path. Use it as it is.
5319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5320$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5321          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5322$as_echo_n "checking for CAT... " >&6; }
5323          if test ! -x "$tool_specified"; then
5324            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5325$as_echo "not found" >&6; }
5326            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5327          fi
5328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5329$as_echo "$tool_specified" >&6; }
5330        fi
5331      fi
5332    fi
5333
5334  fi
5335
5336
5337
5338  if test "x$CAT" = x; then
5339    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5340  fi
5341
5342
5343
5344
5345
5346  # Publish this variable in the help.
5347
5348
5349  if [ -z "${CHMOD+x}" ]; then
5350    # The variable is not set by user, try to locate tool using the code snippet
5351    for ac_prog in chmod
5352do
5353  # Extract the first word of "$ac_prog", so it can be a program name with args.
5354set dummy $ac_prog; ac_word=$2
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356$as_echo_n "checking for $ac_word... " >&6; }
5357if ${ac_cv_path_CHMOD+:} false; then :
5358  $as_echo_n "(cached) " >&6
5359else
5360  case $CHMOD in
5361  [\\/]* | ?:[\\/]*)
5362  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5363  ;;
5364  *)
5365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366for as_dir in $PATH
5367do
5368  IFS=$as_save_IFS
5369  test -z "$as_dir" && as_dir=.
5370    for ac_exec_ext in '' $ac_executable_extensions; do
5371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5372    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374    break 2
5375  fi
5376done
5377  done
5378IFS=$as_save_IFS
5379
5380  ;;
5381esac
5382fi
5383CHMOD=$ac_cv_path_CHMOD
5384if test -n "$CHMOD"; then
5385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5386$as_echo "$CHMOD" >&6; }
5387else
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391
5392
5393  test -n "$CHMOD" && break
5394done
5395
5396  else
5397    # The variable is set, but is it from the command line or the environment?
5398
5399    # Try to remove the string !CHMOD! from our list.
5400    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5401    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5402      # If it failed, the variable was not from the command line. Ignore it,
5403      # but warn the user (except for BASH, which is always set by the calling BASH).
5404      if test "xCHMOD" != xBASH; then
5405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5406$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5407      fi
5408      # Try to locate tool using the code snippet
5409      for ac_prog in chmod
5410do
5411  # Extract the first word of "$ac_prog", so it can be a program name with args.
5412set dummy $ac_prog; ac_word=$2
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5414$as_echo_n "checking for $ac_word... " >&6; }
5415if ${ac_cv_path_CHMOD+:} false; then :
5416  $as_echo_n "(cached) " >&6
5417else
5418  case $CHMOD in
5419  [\\/]* | ?:[\\/]*)
5420  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5421  ;;
5422  *)
5423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5424for as_dir in $PATH
5425do
5426  IFS=$as_save_IFS
5427  test -z "$as_dir" && as_dir=.
5428    for ac_exec_ext in '' $ac_executable_extensions; do
5429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5430    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5432    break 2
5433  fi
5434done
5435  done
5436IFS=$as_save_IFS
5437
5438  ;;
5439esac
5440fi
5441CHMOD=$ac_cv_path_CHMOD
5442if test -n "$CHMOD"; then
5443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5444$as_echo "$CHMOD" >&6; }
5445else
5446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5447$as_echo "no" >&6; }
5448fi
5449
5450
5451  test -n "$CHMOD" && break
5452done
5453
5454    else
5455      # If it succeeded, then it was overridden by the user. We will use it
5456      # for the tool.
5457
5458      # First remove it from the list of overridden variables, so we can test
5459      # for unknown variables in the end.
5460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5461
5462      # Check if we try to supply an empty value
5463      if test "x$CHMOD" = x; then
5464        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5465$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5467$as_echo_n "checking for CHMOD... " >&6; }
5468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5469$as_echo "disabled" >&6; }
5470      else
5471        # Check if the provided tool contains a complete path.
5472        tool_specified="$CHMOD"
5473        tool_basename="${tool_specified##*/}"
5474        if test "x$tool_basename" = "x$tool_specified"; then
5475          # A command without a complete path is provided, search $PATH.
5476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5477$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5478          # Extract the first word of "$tool_basename", so it can be a program name with args.
5479set dummy $tool_basename; ac_word=$2
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5481$as_echo_n "checking for $ac_word... " >&6; }
5482if ${ac_cv_path_CHMOD+:} false; then :
5483  $as_echo_n "(cached) " >&6
5484else
5485  case $CHMOD in
5486  [\\/]* | ?:[\\/]*)
5487  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5488  ;;
5489  *)
5490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5491for as_dir in $PATH
5492do
5493  IFS=$as_save_IFS
5494  test -z "$as_dir" && as_dir=.
5495    for ac_exec_ext in '' $ac_executable_extensions; do
5496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5497    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5499    break 2
5500  fi
5501done
5502  done
5503IFS=$as_save_IFS
5504
5505  ;;
5506esac
5507fi
5508CHMOD=$ac_cv_path_CHMOD
5509if test -n "$CHMOD"; then
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5511$as_echo "$CHMOD" >&6; }
5512else
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5514$as_echo "no" >&6; }
5515fi
5516
5517
5518          if test "x$CHMOD" = x; then
5519            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5520          fi
5521        else
5522          # Otherwise we believe it is a complete path. Use it as it is.
5523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5524$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5525          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5526$as_echo_n "checking for CHMOD... " >&6; }
5527          if test ! -x "$tool_specified"; then
5528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5529$as_echo "not found" >&6; }
5530            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5531          fi
5532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5533$as_echo "$tool_specified" >&6; }
5534        fi
5535      fi
5536    fi
5537
5538  fi
5539
5540
5541
5542  if test "x$CHMOD" = x; then
5543    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5544  fi
5545
5546
5547
5548
5549
5550  # Publish this variable in the help.
5551
5552
5553  if [ -z "${CMP+x}" ]; then
5554    # The variable is not set by user, try to locate tool using the code snippet
5555    for ac_prog in cmp
5556do
5557  # Extract the first word of "$ac_prog", so it can be a program name with args.
5558set dummy $ac_prog; ac_word=$2
5559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5560$as_echo_n "checking for $ac_word... " >&6; }
5561if ${ac_cv_path_CMP+:} false; then :
5562  $as_echo_n "(cached) " >&6
5563else
5564  case $CMP in
5565  [\\/]* | ?:[\\/]*)
5566  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5567  ;;
5568  *)
5569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5570for as_dir in $PATH
5571do
5572  IFS=$as_save_IFS
5573  test -z "$as_dir" && as_dir=.
5574    for ac_exec_ext in '' $ac_executable_extensions; do
5575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5576    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5578    break 2
5579  fi
5580done
5581  done
5582IFS=$as_save_IFS
5583
5584  ;;
5585esac
5586fi
5587CMP=$ac_cv_path_CMP
5588if test -n "$CMP"; then
5589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5590$as_echo "$CMP" >&6; }
5591else
5592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5593$as_echo "no" >&6; }
5594fi
5595
5596
5597  test -n "$CMP" && break
5598done
5599
5600  else
5601    # The variable is set, but is it from the command line or the environment?
5602
5603    # Try to remove the string !CMP! from our list.
5604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5606      # If it failed, the variable was not from the command line. Ignore it,
5607      # but warn the user (except for BASH, which is always set by the calling BASH).
5608      if test "xCMP" != xBASH; then
5609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5610$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5611      fi
5612      # Try to locate tool using the code snippet
5613      for ac_prog in cmp
5614do
5615  # Extract the first word of "$ac_prog", so it can be a program name with args.
5616set dummy $ac_prog; ac_word=$2
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618$as_echo_n "checking for $ac_word... " >&6; }
5619if ${ac_cv_path_CMP+:} false; then :
5620  $as_echo_n "(cached) " >&6
5621else
5622  case $CMP in
5623  [\\/]* | ?:[\\/]*)
5624  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5625  ;;
5626  *)
5627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628for as_dir in $PATH
5629do
5630  IFS=$as_save_IFS
5631  test -z "$as_dir" && as_dir=.
5632    for ac_exec_ext in '' $ac_executable_extensions; do
5633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5634    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5636    break 2
5637  fi
5638done
5639  done
5640IFS=$as_save_IFS
5641
5642  ;;
5643esac
5644fi
5645CMP=$ac_cv_path_CMP
5646if test -n "$CMP"; then
5647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5648$as_echo "$CMP" >&6; }
5649else
5650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651$as_echo "no" >&6; }
5652fi
5653
5654
5655  test -n "$CMP" && break
5656done
5657
5658    else
5659      # If it succeeded, then it was overridden by the user. We will use it
5660      # for the tool.
5661
5662      # First remove it from the list of overridden variables, so we can test
5663      # for unknown variables in the end.
5664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5665
5666      # Check if we try to supply an empty value
5667      if test "x$CMP" = x; then
5668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5669$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5671$as_echo_n "checking for CMP... " >&6; }
5672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5673$as_echo "disabled" >&6; }
5674      else
5675        # Check if the provided tool contains a complete path.
5676        tool_specified="$CMP"
5677        tool_basename="${tool_specified##*/}"
5678        if test "x$tool_basename" = "x$tool_specified"; then
5679          # A command without a complete path is provided, search $PATH.
5680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5681$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5682          # Extract the first word of "$tool_basename", so it can be a program name with args.
5683set dummy $tool_basename; ac_word=$2
5684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5685$as_echo_n "checking for $ac_word... " >&6; }
5686if ${ac_cv_path_CMP+:} false; then :
5687  $as_echo_n "(cached) " >&6
5688else
5689  case $CMP in
5690  [\\/]* | ?:[\\/]*)
5691  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5692  ;;
5693  *)
5694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5695for as_dir in $PATH
5696do
5697  IFS=$as_save_IFS
5698  test -z "$as_dir" && as_dir=.
5699    for ac_exec_ext in '' $ac_executable_extensions; do
5700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5701    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5703    break 2
5704  fi
5705done
5706  done
5707IFS=$as_save_IFS
5708
5709  ;;
5710esac
5711fi
5712CMP=$ac_cv_path_CMP
5713if test -n "$CMP"; then
5714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5715$as_echo "$CMP" >&6; }
5716else
5717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5718$as_echo "no" >&6; }
5719fi
5720
5721
5722          if test "x$CMP" = x; then
5723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5724          fi
5725        else
5726          # Otherwise we believe it is a complete path. Use it as it is.
5727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5728$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5730$as_echo_n "checking for CMP... " >&6; }
5731          if test ! -x "$tool_specified"; then
5732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5733$as_echo "not found" >&6; }
5734            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5735          fi
5736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5737$as_echo "$tool_specified" >&6; }
5738        fi
5739      fi
5740    fi
5741
5742  fi
5743
5744
5745
5746  if test "x$CMP" = x; then
5747    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5748  fi
5749
5750
5751
5752
5753
5754  # Publish this variable in the help.
5755
5756
5757  if [ -z "${COMM+x}" ]; then
5758    # The variable is not set by user, try to locate tool using the code snippet
5759    for ac_prog in comm
5760do
5761  # Extract the first word of "$ac_prog", so it can be a program name with args.
5762set dummy $ac_prog; ac_word=$2
5763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5764$as_echo_n "checking for $ac_word... " >&6; }
5765if ${ac_cv_path_COMM+:} false; then :
5766  $as_echo_n "(cached) " >&6
5767else
5768  case $COMM in
5769  [\\/]* | ?:[\\/]*)
5770  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5771  ;;
5772  *)
5773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5774for as_dir in $PATH
5775do
5776  IFS=$as_save_IFS
5777  test -z "$as_dir" && as_dir=.
5778    for ac_exec_ext in '' $ac_executable_extensions; do
5779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5780    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5782    break 2
5783  fi
5784done
5785  done
5786IFS=$as_save_IFS
5787
5788  ;;
5789esac
5790fi
5791COMM=$ac_cv_path_COMM
5792if test -n "$COMM"; then
5793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5794$as_echo "$COMM" >&6; }
5795else
5796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5797$as_echo "no" >&6; }
5798fi
5799
5800
5801  test -n "$COMM" && break
5802done
5803
5804  else
5805    # The variable is set, but is it from the command line or the environment?
5806
5807    # Try to remove the string !COMM! from our list.
5808    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5809    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5810      # If it failed, the variable was not from the command line. Ignore it,
5811      # but warn the user (except for BASH, which is always set by the calling BASH).
5812      if test "xCOMM" != xBASH; then
5813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5814$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5815      fi
5816      # Try to locate tool using the code snippet
5817      for ac_prog in comm
5818do
5819  # Extract the first word of "$ac_prog", so it can be a program name with args.
5820set dummy $ac_prog; ac_word=$2
5821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5822$as_echo_n "checking for $ac_word... " >&6; }
5823if ${ac_cv_path_COMM+:} false; then :
5824  $as_echo_n "(cached) " >&6
5825else
5826  case $COMM in
5827  [\\/]* | ?:[\\/]*)
5828  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5829  ;;
5830  *)
5831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5832for as_dir in $PATH
5833do
5834  IFS=$as_save_IFS
5835  test -z "$as_dir" && as_dir=.
5836    for ac_exec_ext in '' $ac_executable_extensions; do
5837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5838    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5840    break 2
5841  fi
5842done
5843  done
5844IFS=$as_save_IFS
5845
5846  ;;
5847esac
5848fi
5849COMM=$ac_cv_path_COMM
5850if test -n "$COMM"; then
5851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5852$as_echo "$COMM" >&6; }
5853else
5854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5855$as_echo "no" >&6; }
5856fi
5857
5858
5859  test -n "$COMM" && break
5860done
5861
5862    else
5863      # If it succeeded, then it was overridden by the user. We will use it
5864      # for the tool.
5865
5866      # First remove it from the list of overridden variables, so we can test
5867      # for unknown variables in the end.
5868      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5869
5870      # Check if we try to supply an empty value
5871      if test "x$COMM" = x; then
5872        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5873$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5874        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5875$as_echo_n "checking for COMM... " >&6; }
5876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5877$as_echo "disabled" >&6; }
5878      else
5879        # Check if the provided tool contains a complete path.
5880        tool_specified="$COMM"
5881        tool_basename="${tool_specified##*/}"
5882        if test "x$tool_basename" = "x$tool_specified"; then
5883          # A command without a complete path is provided, search $PATH.
5884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5885$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5886          # Extract the first word of "$tool_basename", so it can be a program name with args.
5887set dummy $tool_basename; ac_word=$2
5888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5889$as_echo_n "checking for $ac_word... " >&6; }
5890if ${ac_cv_path_COMM+:} false; then :
5891  $as_echo_n "(cached) " >&6
5892else
5893  case $COMM in
5894  [\\/]* | ?:[\\/]*)
5895  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5896  ;;
5897  *)
5898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5899for as_dir in $PATH
5900do
5901  IFS=$as_save_IFS
5902  test -z "$as_dir" && as_dir=.
5903    for ac_exec_ext in '' $ac_executable_extensions; do
5904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5905    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5907    break 2
5908  fi
5909done
5910  done
5911IFS=$as_save_IFS
5912
5913  ;;
5914esac
5915fi
5916COMM=$ac_cv_path_COMM
5917if test -n "$COMM"; then
5918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5919$as_echo "$COMM" >&6; }
5920else
5921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5922$as_echo "no" >&6; }
5923fi
5924
5925
5926          if test "x$COMM" = x; then
5927            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5928          fi
5929        else
5930          # Otherwise we believe it is a complete path. Use it as it is.
5931          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5932$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5933          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5934$as_echo_n "checking for COMM... " >&6; }
5935          if test ! -x "$tool_specified"; then
5936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5937$as_echo "not found" >&6; }
5938            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5939          fi
5940          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5941$as_echo "$tool_specified" >&6; }
5942        fi
5943      fi
5944    fi
5945
5946  fi
5947
5948
5949
5950  if test "x$COMM" = x; then
5951    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5952  fi
5953
5954
5955
5956
5957
5958  # Publish this variable in the help.
5959
5960
5961  if [ -z "${CP+x}" ]; then
5962    # The variable is not set by user, try to locate tool using the code snippet
5963    for ac_prog in cp
5964do
5965  # Extract the first word of "$ac_prog", so it can be a program name with args.
5966set dummy $ac_prog; ac_word=$2
5967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5968$as_echo_n "checking for $ac_word... " >&6; }
5969if ${ac_cv_path_CP+:} false; then :
5970  $as_echo_n "(cached) " >&6
5971else
5972  case $CP in
5973  [\\/]* | ?:[\\/]*)
5974  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5975  ;;
5976  *)
5977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5978for as_dir in $PATH
5979do
5980  IFS=$as_save_IFS
5981  test -z "$as_dir" && as_dir=.
5982    for ac_exec_ext in '' $ac_executable_extensions; do
5983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5984    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5986    break 2
5987  fi
5988done
5989  done
5990IFS=$as_save_IFS
5991
5992  ;;
5993esac
5994fi
5995CP=$ac_cv_path_CP
5996if test -n "$CP"; then
5997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5998$as_echo "$CP" >&6; }
5999else
6000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001$as_echo "no" >&6; }
6002fi
6003
6004
6005  test -n "$CP" && break
6006done
6007
6008  else
6009    # The variable is set, but is it from the command line or the environment?
6010
6011    # Try to remove the string !CP! from our list.
6012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6014      # If it failed, the variable was not from the command line. Ignore it,
6015      # but warn the user (except for BASH, which is always set by the calling BASH).
6016      if test "xCP" != xBASH; then
6017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6018$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6019      fi
6020      # Try to locate tool using the code snippet
6021      for ac_prog in cp
6022do
6023  # Extract the first word of "$ac_prog", so it can be a program name with args.
6024set dummy $ac_prog; ac_word=$2
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026$as_echo_n "checking for $ac_word... " >&6; }
6027if ${ac_cv_path_CP+:} false; then :
6028  $as_echo_n "(cached) " >&6
6029else
6030  case $CP in
6031  [\\/]* | ?:[\\/]*)
6032  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6033  ;;
6034  *)
6035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036for as_dir in $PATH
6037do
6038  IFS=$as_save_IFS
6039  test -z "$as_dir" && as_dir=.
6040    for ac_exec_ext in '' $ac_executable_extensions; do
6041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6042    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6044    break 2
6045  fi
6046done
6047  done
6048IFS=$as_save_IFS
6049
6050  ;;
6051esac
6052fi
6053CP=$ac_cv_path_CP
6054if test -n "$CP"; then
6055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6056$as_echo "$CP" >&6; }
6057else
6058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059$as_echo "no" >&6; }
6060fi
6061
6062
6063  test -n "$CP" && break
6064done
6065
6066    else
6067      # If it succeeded, then it was overridden by the user. We will use it
6068      # for the tool.
6069
6070      # First remove it from the list of overridden variables, so we can test
6071      # for unknown variables in the end.
6072      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6073
6074      # Check if we try to supply an empty value
6075      if test "x$CP" = x; then
6076        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6077$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6079$as_echo_n "checking for CP... " >&6; }
6080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6081$as_echo "disabled" >&6; }
6082      else
6083        # Check if the provided tool contains a complete path.
6084        tool_specified="$CP"
6085        tool_basename="${tool_specified##*/}"
6086        if test "x$tool_basename" = "x$tool_specified"; then
6087          # A command without a complete path is provided, search $PATH.
6088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6089$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6090          # Extract the first word of "$tool_basename", so it can be a program name with args.
6091set dummy $tool_basename; ac_word=$2
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6093$as_echo_n "checking for $ac_word... " >&6; }
6094if ${ac_cv_path_CP+:} false; then :
6095  $as_echo_n "(cached) " >&6
6096else
6097  case $CP in
6098  [\\/]* | ?:[\\/]*)
6099  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6100  ;;
6101  *)
6102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6103for as_dir in $PATH
6104do
6105  IFS=$as_save_IFS
6106  test -z "$as_dir" && as_dir=.
6107    for ac_exec_ext in '' $ac_executable_extensions; do
6108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6109    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6111    break 2
6112  fi
6113done
6114  done
6115IFS=$as_save_IFS
6116
6117  ;;
6118esac
6119fi
6120CP=$ac_cv_path_CP
6121if test -n "$CP"; then
6122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6123$as_echo "$CP" >&6; }
6124else
6125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6126$as_echo "no" >&6; }
6127fi
6128
6129
6130          if test "x$CP" = x; then
6131            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6132          fi
6133        else
6134          # Otherwise we believe it is a complete path. Use it as it is.
6135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6136$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6137          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6138$as_echo_n "checking for CP... " >&6; }
6139          if test ! -x "$tool_specified"; then
6140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6141$as_echo "not found" >&6; }
6142            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6143          fi
6144          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6145$as_echo "$tool_specified" >&6; }
6146        fi
6147      fi
6148    fi
6149
6150  fi
6151
6152
6153
6154  if test "x$CP" = x; then
6155    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6156  fi
6157
6158
6159
6160
6161
6162  # Publish this variable in the help.
6163
6164
6165  if [ -z "${CUT+x}" ]; then
6166    # The variable is not set by user, try to locate tool using the code snippet
6167    for ac_prog in cut
6168do
6169  # Extract the first word of "$ac_prog", so it can be a program name with args.
6170set dummy $ac_prog; ac_word=$2
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172$as_echo_n "checking for $ac_word... " >&6; }
6173if ${ac_cv_path_CUT+:} false; then :
6174  $as_echo_n "(cached) " >&6
6175else
6176  case $CUT in
6177  [\\/]* | ?:[\\/]*)
6178  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6179  ;;
6180  *)
6181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182for as_dir in $PATH
6183do
6184  IFS=$as_save_IFS
6185  test -z "$as_dir" && as_dir=.
6186    for ac_exec_ext in '' $ac_executable_extensions; do
6187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6188    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6190    break 2
6191  fi
6192done
6193  done
6194IFS=$as_save_IFS
6195
6196  ;;
6197esac
6198fi
6199CUT=$ac_cv_path_CUT
6200if test -n "$CUT"; then
6201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6202$as_echo "$CUT" >&6; }
6203else
6204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205$as_echo "no" >&6; }
6206fi
6207
6208
6209  test -n "$CUT" && break
6210done
6211
6212  else
6213    # The variable is set, but is it from the command line or the environment?
6214
6215    # Try to remove the string !CUT! from our list.
6216    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6217    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6218      # If it failed, the variable was not from the command line. Ignore it,
6219      # but warn the user (except for BASH, which is always set by the calling BASH).
6220      if test "xCUT" != xBASH; then
6221        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6222$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6223      fi
6224      # Try to locate tool using the code snippet
6225      for ac_prog in cut
6226do
6227  # Extract the first word of "$ac_prog", so it can be a program name with args.
6228set dummy $ac_prog; ac_word=$2
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230$as_echo_n "checking for $ac_word... " >&6; }
6231if ${ac_cv_path_CUT+:} false; then :
6232  $as_echo_n "(cached) " >&6
6233else
6234  case $CUT in
6235  [\\/]* | ?:[\\/]*)
6236  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6237  ;;
6238  *)
6239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240for as_dir in $PATH
6241do
6242  IFS=$as_save_IFS
6243  test -z "$as_dir" && as_dir=.
6244    for ac_exec_ext in '' $ac_executable_extensions; do
6245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6246    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6248    break 2
6249  fi
6250done
6251  done
6252IFS=$as_save_IFS
6253
6254  ;;
6255esac
6256fi
6257CUT=$ac_cv_path_CUT
6258if test -n "$CUT"; then
6259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6260$as_echo "$CUT" >&6; }
6261else
6262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263$as_echo "no" >&6; }
6264fi
6265
6266
6267  test -n "$CUT" && break
6268done
6269
6270    else
6271      # If it succeeded, then it was overridden by the user. We will use it
6272      # for the tool.
6273
6274      # First remove it from the list of overridden variables, so we can test
6275      # for unknown variables in the end.
6276      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6277
6278      # Check if we try to supply an empty value
6279      if test "x$CUT" = x; then
6280        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6281$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6283$as_echo_n "checking for CUT... " >&6; }
6284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6285$as_echo "disabled" >&6; }
6286      else
6287        # Check if the provided tool contains a complete path.
6288        tool_specified="$CUT"
6289        tool_basename="${tool_specified##*/}"
6290        if test "x$tool_basename" = "x$tool_specified"; then
6291          # A command without a complete path is provided, search $PATH.
6292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6293$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6294          # Extract the first word of "$tool_basename", so it can be a program name with args.
6295set dummy $tool_basename; ac_word=$2
6296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6297$as_echo_n "checking for $ac_word... " >&6; }
6298if ${ac_cv_path_CUT+:} false; then :
6299  $as_echo_n "(cached) " >&6
6300else
6301  case $CUT in
6302  [\\/]* | ?:[\\/]*)
6303  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6304  ;;
6305  *)
6306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6307for as_dir in $PATH
6308do
6309  IFS=$as_save_IFS
6310  test -z "$as_dir" && as_dir=.
6311    for ac_exec_ext in '' $ac_executable_extensions; do
6312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6313    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6315    break 2
6316  fi
6317done
6318  done
6319IFS=$as_save_IFS
6320
6321  ;;
6322esac
6323fi
6324CUT=$ac_cv_path_CUT
6325if test -n "$CUT"; then
6326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6327$as_echo "$CUT" >&6; }
6328else
6329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330$as_echo "no" >&6; }
6331fi
6332
6333
6334          if test "x$CUT" = x; then
6335            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6336          fi
6337        else
6338          # Otherwise we believe it is a complete path. Use it as it is.
6339          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6340$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6341          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6342$as_echo_n "checking for CUT... " >&6; }
6343          if test ! -x "$tool_specified"; then
6344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6345$as_echo "not found" >&6; }
6346            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6347          fi
6348          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6349$as_echo "$tool_specified" >&6; }
6350        fi
6351      fi
6352    fi
6353
6354  fi
6355
6356
6357
6358  if test "x$CUT" = x; then
6359    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6360  fi
6361
6362
6363
6364
6365
6366  # Publish this variable in the help.
6367
6368
6369  if [ -z "${DATE+x}" ]; then
6370    # The variable is not set by user, try to locate tool using the code snippet
6371    for ac_prog in date
6372do
6373  # Extract the first word of "$ac_prog", so it can be a program name with args.
6374set dummy $ac_prog; ac_word=$2
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6376$as_echo_n "checking for $ac_word... " >&6; }
6377if ${ac_cv_path_DATE+:} false; then :
6378  $as_echo_n "(cached) " >&6
6379else
6380  case $DATE in
6381  [\\/]* | ?:[\\/]*)
6382  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6383  ;;
6384  *)
6385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6386for as_dir in $PATH
6387do
6388  IFS=$as_save_IFS
6389  test -z "$as_dir" && as_dir=.
6390    for ac_exec_ext in '' $ac_executable_extensions; do
6391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6392    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6394    break 2
6395  fi
6396done
6397  done
6398IFS=$as_save_IFS
6399
6400  ;;
6401esac
6402fi
6403DATE=$ac_cv_path_DATE
6404if test -n "$DATE"; then
6405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6406$as_echo "$DATE" >&6; }
6407else
6408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
6412
6413  test -n "$DATE" && break
6414done
6415
6416  else
6417    # The variable is set, but is it from the command line or the environment?
6418
6419    # Try to remove the string !DATE! from our list.
6420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6422      # If it failed, the variable was not from the command line. Ignore it,
6423      # but warn the user (except for BASH, which is always set by the calling BASH).
6424      if test "xDATE" != xBASH; then
6425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6426$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6427      fi
6428      # Try to locate tool using the code snippet
6429      for ac_prog in date
6430do
6431  # Extract the first word of "$ac_prog", so it can be a program name with args.
6432set dummy $ac_prog; ac_word=$2
6433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6434$as_echo_n "checking for $ac_word... " >&6; }
6435if ${ac_cv_path_DATE+:} false; then :
6436  $as_echo_n "(cached) " >&6
6437else
6438  case $DATE in
6439  [\\/]* | ?:[\\/]*)
6440  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6441  ;;
6442  *)
6443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6444for as_dir in $PATH
6445do
6446  IFS=$as_save_IFS
6447  test -z "$as_dir" && as_dir=.
6448    for ac_exec_ext in '' $ac_executable_extensions; do
6449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6450    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6452    break 2
6453  fi
6454done
6455  done
6456IFS=$as_save_IFS
6457
6458  ;;
6459esac
6460fi
6461DATE=$ac_cv_path_DATE
6462if test -n "$DATE"; then
6463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6464$as_echo "$DATE" >&6; }
6465else
6466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6467$as_echo "no" >&6; }
6468fi
6469
6470
6471  test -n "$DATE" && break
6472done
6473
6474    else
6475      # If it succeeded, then it was overridden by the user. We will use it
6476      # for the tool.
6477
6478      # First remove it from the list of overridden variables, so we can test
6479      # for unknown variables in the end.
6480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6481
6482      # Check if we try to supply an empty value
6483      if test "x$DATE" = x; then
6484        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6485$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6487$as_echo_n "checking for DATE... " >&6; }
6488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6489$as_echo "disabled" >&6; }
6490      else
6491        # Check if the provided tool contains a complete path.
6492        tool_specified="$DATE"
6493        tool_basename="${tool_specified##*/}"
6494        if test "x$tool_basename" = "x$tool_specified"; then
6495          # A command without a complete path is provided, search $PATH.
6496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6497$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6498          # Extract the first word of "$tool_basename", so it can be a program name with args.
6499set dummy $tool_basename; ac_word=$2
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6501$as_echo_n "checking for $ac_word... " >&6; }
6502if ${ac_cv_path_DATE+:} false; then :
6503  $as_echo_n "(cached) " >&6
6504else
6505  case $DATE in
6506  [\\/]* | ?:[\\/]*)
6507  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6508  ;;
6509  *)
6510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6511for as_dir in $PATH
6512do
6513  IFS=$as_save_IFS
6514  test -z "$as_dir" && as_dir=.
6515    for ac_exec_ext in '' $ac_executable_extensions; do
6516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6517    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6519    break 2
6520  fi
6521done
6522  done
6523IFS=$as_save_IFS
6524
6525  ;;
6526esac
6527fi
6528DATE=$ac_cv_path_DATE
6529if test -n "$DATE"; then
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6531$as_echo "$DATE" >&6; }
6532else
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }
6535fi
6536
6537
6538          if test "x$DATE" = x; then
6539            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6540          fi
6541        else
6542          # Otherwise we believe it is a complete path. Use it as it is.
6543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6544$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6545          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6546$as_echo_n "checking for DATE... " >&6; }
6547          if test ! -x "$tool_specified"; then
6548            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6549$as_echo "not found" >&6; }
6550            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6551          fi
6552          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6553$as_echo "$tool_specified" >&6; }
6554        fi
6555      fi
6556    fi
6557
6558  fi
6559
6560
6561
6562  if test "x$DATE" = x; then
6563    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6564  fi
6565
6566
6567
6568
6569
6570  # Publish this variable in the help.
6571
6572
6573  if [ -z "${DIFF+x}" ]; then
6574    # The variable is not set by user, try to locate tool using the code snippet
6575    for ac_prog in gdiff diff
6576do
6577  # Extract the first word of "$ac_prog", so it can be a program name with args.
6578set dummy $ac_prog; ac_word=$2
6579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6580$as_echo_n "checking for $ac_word... " >&6; }
6581if ${ac_cv_path_DIFF+:} false; then :
6582  $as_echo_n "(cached) " >&6
6583else
6584  case $DIFF in
6585  [\\/]* | ?:[\\/]*)
6586  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6587  ;;
6588  *)
6589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6590for as_dir in $PATH
6591do
6592  IFS=$as_save_IFS
6593  test -z "$as_dir" && as_dir=.
6594    for ac_exec_ext in '' $ac_executable_extensions; do
6595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6596    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6598    break 2
6599  fi
6600done
6601  done
6602IFS=$as_save_IFS
6603
6604  ;;
6605esac
6606fi
6607DIFF=$ac_cv_path_DIFF
6608if test -n "$DIFF"; then
6609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6610$as_echo "$DIFF" >&6; }
6611else
6612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6613$as_echo "no" >&6; }
6614fi
6615
6616
6617  test -n "$DIFF" && break
6618done
6619
6620  else
6621    # The variable is set, but is it from the command line or the environment?
6622
6623    # Try to remove the string !DIFF! from our list.
6624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6626      # If it failed, the variable was not from the command line. Ignore it,
6627      # but warn the user (except for BASH, which is always set by the calling BASH).
6628      if test "xDIFF" != xBASH; then
6629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6630$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6631      fi
6632      # Try to locate tool using the code snippet
6633      for ac_prog in gdiff diff
6634do
6635  # Extract the first word of "$ac_prog", so it can be a program name with args.
6636set dummy $ac_prog; ac_word=$2
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6638$as_echo_n "checking for $ac_word... " >&6; }
6639if ${ac_cv_path_DIFF+:} false; then :
6640  $as_echo_n "(cached) " >&6
6641else
6642  case $DIFF in
6643  [\\/]* | ?:[\\/]*)
6644  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6645  ;;
6646  *)
6647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6648for as_dir in $PATH
6649do
6650  IFS=$as_save_IFS
6651  test -z "$as_dir" && as_dir=.
6652    for ac_exec_ext in '' $ac_executable_extensions; do
6653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6654    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6656    break 2
6657  fi
6658done
6659  done
6660IFS=$as_save_IFS
6661
6662  ;;
6663esac
6664fi
6665DIFF=$ac_cv_path_DIFF
6666if test -n "$DIFF"; then
6667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6668$as_echo "$DIFF" >&6; }
6669else
6670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671$as_echo "no" >&6; }
6672fi
6673
6674
6675  test -n "$DIFF" && break
6676done
6677
6678    else
6679      # If it succeeded, then it was overridden by the user. We will use it
6680      # for the tool.
6681
6682      # First remove it from the list of overridden variables, so we can test
6683      # for unknown variables in the end.
6684      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6685
6686      # Check if we try to supply an empty value
6687      if test "x$DIFF" = x; then
6688        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6689$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6691$as_echo_n "checking for DIFF... " >&6; }
6692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6693$as_echo "disabled" >&6; }
6694      else
6695        # Check if the provided tool contains a complete path.
6696        tool_specified="$DIFF"
6697        tool_basename="${tool_specified##*/}"
6698        if test "x$tool_basename" = "x$tool_specified"; then
6699          # A command without a complete path is provided, search $PATH.
6700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6701$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6702          # Extract the first word of "$tool_basename", so it can be a program name with args.
6703set dummy $tool_basename; ac_word=$2
6704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6705$as_echo_n "checking for $ac_word... " >&6; }
6706if ${ac_cv_path_DIFF+:} false; then :
6707  $as_echo_n "(cached) " >&6
6708else
6709  case $DIFF in
6710  [\\/]* | ?:[\\/]*)
6711  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6712  ;;
6713  *)
6714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6715for as_dir in $PATH
6716do
6717  IFS=$as_save_IFS
6718  test -z "$as_dir" && as_dir=.
6719    for ac_exec_ext in '' $ac_executable_extensions; do
6720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6721    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6723    break 2
6724  fi
6725done
6726  done
6727IFS=$as_save_IFS
6728
6729  ;;
6730esac
6731fi
6732DIFF=$ac_cv_path_DIFF
6733if test -n "$DIFF"; then
6734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6735$as_echo "$DIFF" >&6; }
6736else
6737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6738$as_echo "no" >&6; }
6739fi
6740
6741
6742          if test "x$DIFF" = x; then
6743            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6744          fi
6745        else
6746          # Otherwise we believe it is a complete path. Use it as it is.
6747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6748$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6749          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6750$as_echo_n "checking for DIFF... " >&6; }
6751          if test ! -x "$tool_specified"; then
6752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6753$as_echo "not found" >&6; }
6754            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6755          fi
6756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6757$as_echo "$tool_specified" >&6; }
6758        fi
6759      fi
6760    fi
6761
6762  fi
6763
6764
6765
6766  if test "x$DIFF" = x; then
6767    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6768  fi
6769
6770
6771
6772
6773
6774  # Publish this variable in the help.
6775
6776
6777  if [ -z "${DIRNAME+x}" ]; then
6778    # The variable is not set by user, try to locate tool using the code snippet
6779    for ac_prog in dirname
6780do
6781  # Extract the first word of "$ac_prog", so it can be a program name with args.
6782set dummy $ac_prog; ac_word=$2
6783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6784$as_echo_n "checking for $ac_word... " >&6; }
6785if ${ac_cv_path_DIRNAME+:} false; then :
6786  $as_echo_n "(cached) " >&6
6787else
6788  case $DIRNAME in
6789  [\\/]* | ?:[\\/]*)
6790  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6791  ;;
6792  *)
6793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6794for as_dir in $PATH
6795do
6796  IFS=$as_save_IFS
6797  test -z "$as_dir" && as_dir=.
6798    for ac_exec_ext in '' $ac_executable_extensions; do
6799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6800    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6802    break 2
6803  fi
6804done
6805  done
6806IFS=$as_save_IFS
6807
6808  ;;
6809esac
6810fi
6811DIRNAME=$ac_cv_path_DIRNAME
6812if test -n "$DIRNAME"; then
6813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6814$as_echo "$DIRNAME" >&6; }
6815else
6816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6817$as_echo "no" >&6; }
6818fi
6819
6820
6821  test -n "$DIRNAME" && break
6822done
6823
6824  else
6825    # The variable is set, but is it from the command line or the environment?
6826
6827    # Try to remove the string !DIRNAME! from our list.
6828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6830      # If it failed, the variable was not from the command line. Ignore it,
6831      # but warn the user (except for BASH, which is always set by the calling BASH).
6832      if test "xDIRNAME" != xBASH; then
6833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6834$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6835      fi
6836      # Try to locate tool using the code snippet
6837      for ac_prog in dirname
6838do
6839  # Extract the first word of "$ac_prog", so it can be a program name with args.
6840set dummy $ac_prog; ac_word=$2
6841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6842$as_echo_n "checking for $ac_word... " >&6; }
6843if ${ac_cv_path_DIRNAME+:} false; then :
6844  $as_echo_n "(cached) " >&6
6845else
6846  case $DIRNAME in
6847  [\\/]* | ?:[\\/]*)
6848  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6849  ;;
6850  *)
6851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6852for as_dir in $PATH
6853do
6854  IFS=$as_save_IFS
6855  test -z "$as_dir" && as_dir=.
6856    for ac_exec_ext in '' $ac_executable_extensions; do
6857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6858    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6860    break 2
6861  fi
6862done
6863  done
6864IFS=$as_save_IFS
6865
6866  ;;
6867esac
6868fi
6869DIRNAME=$ac_cv_path_DIRNAME
6870if test -n "$DIRNAME"; then
6871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6872$as_echo "$DIRNAME" >&6; }
6873else
6874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6875$as_echo "no" >&6; }
6876fi
6877
6878
6879  test -n "$DIRNAME" && break
6880done
6881
6882    else
6883      # If it succeeded, then it was overridden by the user. We will use it
6884      # for the tool.
6885
6886      # First remove it from the list of overridden variables, so we can test
6887      # for unknown variables in the end.
6888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6889
6890      # Check if we try to supply an empty value
6891      if test "x$DIRNAME" = x; then
6892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6893$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6895$as_echo_n "checking for DIRNAME... " >&6; }
6896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6897$as_echo "disabled" >&6; }
6898      else
6899        # Check if the provided tool contains a complete path.
6900        tool_specified="$DIRNAME"
6901        tool_basename="${tool_specified##*/}"
6902        if test "x$tool_basename" = "x$tool_specified"; then
6903          # A command without a complete path is provided, search $PATH.
6904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6905$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6906          # Extract the first word of "$tool_basename", so it can be a program name with args.
6907set dummy $tool_basename; ac_word=$2
6908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6909$as_echo_n "checking for $ac_word... " >&6; }
6910if ${ac_cv_path_DIRNAME+:} false; then :
6911  $as_echo_n "(cached) " >&6
6912else
6913  case $DIRNAME in
6914  [\\/]* | ?:[\\/]*)
6915  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6916  ;;
6917  *)
6918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6919for as_dir in $PATH
6920do
6921  IFS=$as_save_IFS
6922  test -z "$as_dir" && as_dir=.
6923    for ac_exec_ext in '' $ac_executable_extensions; do
6924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6925    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6927    break 2
6928  fi
6929done
6930  done
6931IFS=$as_save_IFS
6932
6933  ;;
6934esac
6935fi
6936DIRNAME=$ac_cv_path_DIRNAME
6937if test -n "$DIRNAME"; then
6938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6939$as_echo "$DIRNAME" >&6; }
6940else
6941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6942$as_echo "no" >&6; }
6943fi
6944
6945
6946          if test "x$DIRNAME" = x; then
6947            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6948          fi
6949        else
6950          # Otherwise we believe it is a complete path. Use it as it is.
6951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6952$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6954$as_echo_n "checking for DIRNAME... " >&6; }
6955          if test ! -x "$tool_specified"; then
6956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6957$as_echo "not found" >&6; }
6958            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6959          fi
6960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6961$as_echo "$tool_specified" >&6; }
6962        fi
6963      fi
6964    fi
6965
6966  fi
6967
6968
6969
6970  if test "x$DIRNAME" = x; then
6971    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6972  fi
6973
6974
6975
6976
6977
6978  # Publish this variable in the help.
6979
6980
6981  if [ -z "${ECHO+x}" ]; then
6982    # The variable is not set by user, try to locate tool using the code snippet
6983    for ac_prog in echo
6984do
6985  # Extract the first word of "$ac_prog", so it can be a program name with args.
6986set dummy $ac_prog; ac_word=$2
6987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6988$as_echo_n "checking for $ac_word... " >&6; }
6989if ${ac_cv_path_ECHO+:} false; then :
6990  $as_echo_n "(cached) " >&6
6991else
6992  case $ECHO in
6993  [\\/]* | ?:[\\/]*)
6994  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6995  ;;
6996  *)
6997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6998for as_dir in $PATH
6999do
7000  IFS=$as_save_IFS
7001  test -z "$as_dir" && as_dir=.
7002    for ac_exec_ext in '' $ac_executable_extensions; do
7003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7004    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7006    break 2
7007  fi
7008done
7009  done
7010IFS=$as_save_IFS
7011
7012  ;;
7013esac
7014fi
7015ECHO=$ac_cv_path_ECHO
7016if test -n "$ECHO"; then
7017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7018$as_echo "$ECHO" >&6; }
7019else
7020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7021$as_echo "no" >&6; }
7022fi
7023
7024
7025  test -n "$ECHO" && break
7026done
7027
7028  else
7029    # The variable is set, but is it from the command line or the environment?
7030
7031    # Try to remove the string !ECHO! from our list.
7032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7034      # If it failed, the variable was not from the command line. Ignore it,
7035      # but warn the user (except for BASH, which is always set by the calling BASH).
7036      if test "xECHO" != xBASH; then
7037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7038$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7039      fi
7040      # Try to locate tool using the code snippet
7041      for ac_prog in echo
7042do
7043  # Extract the first word of "$ac_prog", so it can be a program name with args.
7044set dummy $ac_prog; ac_word=$2
7045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7046$as_echo_n "checking for $ac_word... " >&6; }
7047if ${ac_cv_path_ECHO+:} false; then :
7048  $as_echo_n "(cached) " >&6
7049else
7050  case $ECHO in
7051  [\\/]* | ?:[\\/]*)
7052  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7053  ;;
7054  *)
7055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7056for as_dir in $PATH
7057do
7058  IFS=$as_save_IFS
7059  test -z "$as_dir" && as_dir=.
7060    for ac_exec_ext in '' $ac_executable_extensions; do
7061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7062    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7064    break 2
7065  fi
7066done
7067  done
7068IFS=$as_save_IFS
7069
7070  ;;
7071esac
7072fi
7073ECHO=$ac_cv_path_ECHO
7074if test -n "$ECHO"; then
7075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7076$as_echo "$ECHO" >&6; }
7077else
7078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7079$as_echo "no" >&6; }
7080fi
7081
7082
7083  test -n "$ECHO" && break
7084done
7085
7086    else
7087      # If it succeeded, then it was overridden by the user. We will use it
7088      # for the tool.
7089
7090      # First remove it from the list of overridden variables, so we can test
7091      # for unknown variables in the end.
7092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7093
7094      # Check if we try to supply an empty value
7095      if test "x$ECHO" = x; then
7096        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7097$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7099$as_echo_n "checking for ECHO... " >&6; }
7100        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7101$as_echo "disabled" >&6; }
7102      else
7103        # Check if the provided tool contains a complete path.
7104        tool_specified="$ECHO"
7105        tool_basename="${tool_specified##*/}"
7106        if test "x$tool_basename" = "x$tool_specified"; then
7107          # A command without a complete path is provided, search $PATH.
7108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7109$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7110          # Extract the first word of "$tool_basename", so it can be a program name with args.
7111set dummy $tool_basename; ac_word=$2
7112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7113$as_echo_n "checking for $ac_word... " >&6; }
7114if ${ac_cv_path_ECHO+:} false; then :
7115  $as_echo_n "(cached) " >&6
7116else
7117  case $ECHO in
7118  [\\/]* | ?:[\\/]*)
7119  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7120  ;;
7121  *)
7122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7123for as_dir in $PATH
7124do
7125  IFS=$as_save_IFS
7126  test -z "$as_dir" && as_dir=.
7127    for ac_exec_ext in '' $ac_executable_extensions; do
7128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7129    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7131    break 2
7132  fi
7133done
7134  done
7135IFS=$as_save_IFS
7136
7137  ;;
7138esac
7139fi
7140ECHO=$ac_cv_path_ECHO
7141if test -n "$ECHO"; then
7142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7143$as_echo "$ECHO" >&6; }
7144else
7145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7146$as_echo "no" >&6; }
7147fi
7148
7149
7150          if test "x$ECHO" = x; then
7151            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7152          fi
7153        else
7154          # Otherwise we believe it is a complete path. Use it as it is.
7155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7156$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7157          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7158$as_echo_n "checking for ECHO... " >&6; }
7159          if test ! -x "$tool_specified"; then
7160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7161$as_echo "not found" >&6; }
7162            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7163          fi
7164          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7165$as_echo "$tool_specified" >&6; }
7166        fi
7167      fi
7168    fi
7169
7170  fi
7171
7172
7173
7174  if test "x$ECHO" = x; then
7175    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7176  fi
7177
7178
7179
7180
7181
7182  # Publish this variable in the help.
7183
7184
7185  if [ -z "${EXPR+x}" ]; then
7186    # The variable is not set by user, try to locate tool using the code snippet
7187    for ac_prog in expr
7188do
7189  # Extract the first word of "$ac_prog", so it can be a program name with args.
7190set dummy $ac_prog; ac_word=$2
7191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7192$as_echo_n "checking for $ac_word... " >&6; }
7193if ${ac_cv_path_EXPR+:} false; then :
7194  $as_echo_n "(cached) " >&6
7195else
7196  case $EXPR in
7197  [\\/]* | ?:[\\/]*)
7198  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7199  ;;
7200  *)
7201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7202for as_dir in $PATH
7203do
7204  IFS=$as_save_IFS
7205  test -z "$as_dir" && as_dir=.
7206    for ac_exec_ext in '' $ac_executable_extensions; do
7207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7208    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7210    break 2
7211  fi
7212done
7213  done
7214IFS=$as_save_IFS
7215
7216  ;;
7217esac
7218fi
7219EXPR=$ac_cv_path_EXPR
7220if test -n "$EXPR"; then
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7222$as_echo "$EXPR" >&6; }
7223else
7224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7225$as_echo "no" >&6; }
7226fi
7227
7228
7229  test -n "$EXPR" && break
7230done
7231
7232  else
7233    # The variable is set, but is it from the command line or the environment?
7234
7235    # Try to remove the string !EXPR! from our list.
7236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7238      # If it failed, the variable was not from the command line. Ignore it,
7239      # but warn the user (except for BASH, which is always set by the calling BASH).
7240      if test "xEXPR" != xBASH; then
7241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7242$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7243      fi
7244      # Try to locate tool using the code snippet
7245      for ac_prog in expr
7246do
7247  # Extract the first word of "$ac_prog", so it can be a program name with args.
7248set dummy $ac_prog; ac_word=$2
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250$as_echo_n "checking for $ac_word... " >&6; }
7251if ${ac_cv_path_EXPR+:} false; then :
7252  $as_echo_n "(cached) " >&6
7253else
7254  case $EXPR in
7255  [\\/]* | ?:[\\/]*)
7256  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7257  ;;
7258  *)
7259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260for as_dir in $PATH
7261do
7262  IFS=$as_save_IFS
7263  test -z "$as_dir" && as_dir=.
7264    for ac_exec_ext in '' $ac_executable_extensions; do
7265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7268    break 2
7269  fi
7270done
7271  done
7272IFS=$as_save_IFS
7273
7274  ;;
7275esac
7276fi
7277EXPR=$ac_cv_path_EXPR
7278if test -n "$EXPR"; then
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7280$as_echo "$EXPR" >&6; }
7281else
7282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283$as_echo "no" >&6; }
7284fi
7285
7286
7287  test -n "$EXPR" && break
7288done
7289
7290    else
7291      # If it succeeded, then it was overridden by the user. We will use it
7292      # for the tool.
7293
7294      # First remove it from the list of overridden variables, so we can test
7295      # for unknown variables in the end.
7296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7297
7298      # Check if we try to supply an empty value
7299      if test "x$EXPR" = x; then
7300        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7301$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7303$as_echo_n "checking for EXPR... " >&6; }
7304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7305$as_echo "disabled" >&6; }
7306      else
7307        # Check if the provided tool contains a complete path.
7308        tool_specified="$EXPR"
7309        tool_basename="${tool_specified##*/}"
7310        if test "x$tool_basename" = "x$tool_specified"; then
7311          # A command without a complete path is provided, search $PATH.
7312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7313$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7314          # Extract the first word of "$tool_basename", so it can be a program name with args.
7315set dummy $tool_basename; ac_word=$2
7316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7317$as_echo_n "checking for $ac_word... " >&6; }
7318if ${ac_cv_path_EXPR+:} false; then :
7319  $as_echo_n "(cached) " >&6
7320else
7321  case $EXPR in
7322  [\\/]* | ?:[\\/]*)
7323  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7324  ;;
7325  *)
7326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7327for as_dir in $PATH
7328do
7329  IFS=$as_save_IFS
7330  test -z "$as_dir" && as_dir=.
7331    for ac_exec_ext in '' $ac_executable_extensions; do
7332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7333    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7335    break 2
7336  fi
7337done
7338  done
7339IFS=$as_save_IFS
7340
7341  ;;
7342esac
7343fi
7344EXPR=$ac_cv_path_EXPR
7345if test -n "$EXPR"; then
7346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7347$as_echo "$EXPR" >&6; }
7348else
7349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7350$as_echo "no" >&6; }
7351fi
7352
7353
7354          if test "x$EXPR" = x; then
7355            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7356          fi
7357        else
7358          # Otherwise we believe it is a complete path. Use it as it is.
7359          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7360$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7361          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7362$as_echo_n "checking for EXPR... " >&6; }
7363          if test ! -x "$tool_specified"; then
7364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7365$as_echo "not found" >&6; }
7366            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7367          fi
7368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7369$as_echo "$tool_specified" >&6; }
7370        fi
7371      fi
7372    fi
7373
7374  fi
7375
7376
7377
7378  if test "x$EXPR" = x; then
7379    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7380  fi
7381
7382
7383
7384
7385
7386  # Publish this variable in the help.
7387
7388
7389  if [ -z "${FILE+x}" ]; then
7390    # The variable is not set by user, try to locate tool using the code snippet
7391    for ac_prog in file
7392do
7393  # Extract the first word of "$ac_prog", so it can be a program name with args.
7394set dummy $ac_prog; ac_word=$2
7395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7396$as_echo_n "checking for $ac_word... " >&6; }
7397if ${ac_cv_path_FILE+:} false; then :
7398  $as_echo_n "(cached) " >&6
7399else
7400  case $FILE in
7401  [\\/]* | ?:[\\/]*)
7402  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7403  ;;
7404  *)
7405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7406for as_dir in $PATH
7407do
7408  IFS=$as_save_IFS
7409  test -z "$as_dir" && as_dir=.
7410    for ac_exec_ext in '' $ac_executable_extensions; do
7411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7412    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7414    break 2
7415  fi
7416done
7417  done
7418IFS=$as_save_IFS
7419
7420  ;;
7421esac
7422fi
7423FILE=$ac_cv_path_FILE
7424if test -n "$FILE"; then
7425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7426$as_echo "$FILE" >&6; }
7427else
7428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7429$as_echo "no" >&6; }
7430fi
7431
7432
7433  test -n "$FILE" && break
7434done
7435
7436  else
7437    # The variable is set, but is it from the command line or the environment?
7438
7439    # Try to remove the string !FILE! from our list.
7440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7442      # If it failed, the variable was not from the command line. Ignore it,
7443      # but warn the user (except for BASH, which is always set by the calling BASH).
7444      if test "xFILE" != xBASH; then
7445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7446$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7447      fi
7448      # Try to locate tool using the code snippet
7449      for ac_prog in file
7450do
7451  # Extract the first word of "$ac_prog", so it can be a program name with args.
7452set dummy $ac_prog; ac_word=$2
7453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7454$as_echo_n "checking for $ac_word... " >&6; }
7455if ${ac_cv_path_FILE+:} false; then :
7456  $as_echo_n "(cached) " >&6
7457else
7458  case $FILE in
7459  [\\/]* | ?:[\\/]*)
7460  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7461  ;;
7462  *)
7463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7464for as_dir in $PATH
7465do
7466  IFS=$as_save_IFS
7467  test -z "$as_dir" && as_dir=.
7468    for ac_exec_ext in '' $ac_executable_extensions; do
7469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7470    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7472    break 2
7473  fi
7474done
7475  done
7476IFS=$as_save_IFS
7477
7478  ;;
7479esac
7480fi
7481FILE=$ac_cv_path_FILE
7482if test -n "$FILE"; then
7483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7484$as_echo "$FILE" >&6; }
7485else
7486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7487$as_echo "no" >&6; }
7488fi
7489
7490
7491  test -n "$FILE" && break
7492done
7493
7494    else
7495      # If it succeeded, then it was overridden by the user. We will use it
7496      # for the tool.
7497
7498      # First remove it from the list of overridden variables, so we can test
7499      # for unknown variables in the end.
7500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7501
7502      # Check if we try to supply an empty value
7503      if test "x$FILE" = x; then
7504        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7505$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7507$as_echo_n "checking for FILE... " >&6; }
7508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7509$as_echo "disabled" >&6; }
7510      else
7511        # Check if the provided tool contains a complete path.
7512        tool_specified="$FILE"
7513        tool_basename="${tool_specified##*/}"
7514        if test "x$tool_basename" = "x$tool_specified"; then
7515          # A command without a complete path is provided, search $PATH.
7516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7517$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7518          # Extract the first word of "$tool_basename", so it can be a program name with args.
7519set dummy $tool_basename; ac_word=$2
7520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7521$as_echo_n "checking for $ac_word... " >&6; }
7522if ${ac_cv_path_FILE+:} false; then :
7523  $as_echo_n "(cached) " >&6
7524else
7525  case $FILE in
7526  [\\/]* | ?:[\\/]*)
7527  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7528  ;;
7529  *)
7530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7531for as_dir in $PATH
7532do
7533  IFS=$as_save_IFS
7534  test -z "$as_dir" && as_dir=.
7535    for ac_exec_ext in '' $ac_executable_extensions; do
7536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7537    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7539    break 2
7540  fi
7541done
7542  done
7543IFS=$as_save_IFS
7544
7545  ;;
7546esac
7547fi
7548FILE=$ac_cv_path_FILE
7549if test -n "$FILE"; then
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7551$as_echo "$FILE" >&6; }
7552else
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
7555fi
7556
7557
7558          if test "x$FILE" = x; then
7559            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7560          fi
7561        else
7562          # Otherwise we believe it is a complete path. Use it as it is.
7563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7564$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7565          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7566$as_echo_n "checking for FILE... " >&6; }
7567          if test ! -x "$tool_specified"; then
7568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7569$as_echo "not found" >&6; }
7570            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7571          fi
7572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7573$as_echo "$tool_specified" >&6; }
7574        fi
7575      fi
7576    fi
7577
7578  fi
7579
7580
7581
7582  if test "x$FILE" = x; then
7583    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7584  fi
7585
7586
7587
7588
7589
7590  # Publish this variable in the help.
7591
7592
7593  if [ -z "${FIND+x}" ]; then
7594    # The variable is not set by user, try to locate tool using the code snippet
7595    for ac_prog in find
7596do
7597  # Extract the first word of "$ac_prog", so it can be a program name with args.
7598set dummy $ac_prog; ac_word=$2
7599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7600$as_echo_n "checking for $ac_word... " >&6; }
7601if ${ac_cv_path_FIND+:} false; then :
7602  $as_echo_n "(cached) " >&6
7603else
7604  case $FIND in
7605  [\\/]* | ?:[\\/]*)
7606  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7607  ;;
7608  *)
7609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7610for as_dir in $PATH
7611do
7612  IFS=$as_save_IFS
7613  test -z "$as_dir" && as_dir=.
7614    for ac_exec_ext in '' $ac_executable_extensions; do
7615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7616    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7618    break 2
7619  fi
7620done
7621  done
7622IFS=$as_save_IFS
7623
7624  ;;
7625esac
7626fi
7627FIND=$ac_cv_path_FIND
7628if test -n "$FIND"; then
7629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7630$as_echo "$FIND" >&6; }
7631else
7632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633$as_echo "no" >&6; }
7634fi
7635
7636
7637  test -n "$FIND" && break
7638done
7639
7640  else
7641    # The variable is set, but is it from the command line or the environment?
7642
7643    # Try to remove the string !FIND! from our list.
7644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7646      # If it failed, the variable was not from the command line. Ignore it,
7647      # but warn the user (except for BASH, which is always set by the calling BASH).
7648      if test "xFIND" != xBASH; then
7649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7650$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7651      fi
7652      # Try to locate tool using the code snippet
7653      for ac_prog in find
7654do
7655  # Extract the first word of "$ac_prog", so it can be a program name with args.
7656set dummy $ac_prog; ac_word=$2
7657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7658$as_echo_n "checking for $ac_word... " >&6; }
7659if ${ac_cv_path_FIND+:} false; then :
7660  $as_echo_n "(cached) " >&6
7661else
7662  case $FIND in
7663  [\\/]* | ?:[\\/]*)
7664  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7665  ;;
7666  *)
7667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7668for as_dir in $PATH
7669do
7670  IFS=$as_save_IFS
7671  test -z "$as_dir" && as_dir=.
7672    for ac_exec_ext in '' $ac_executable_extensions; do
7673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7674    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7676    break 2
7677  fi
7678done
7679  done
7680IFS=$as_save_IFS
7681
7682  ;;
7683esac
7684fi
7685FIND=$ac_cv_path_FIND
7686if test -n "$FIND"; then
7687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7688$as_echo "$FIND" >&6; }
7689else
7690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691$as_echo "no" >&6; }
7692fi
7693
7694
7695  test -n "$FIND" && break
7696done
7697
7698    else
7699      # If it succeeded, then it was overridden by the user. We will use it
7700      # for the tool.
7701
7702      # First remove it from the list of overridden variables, so we can test
7703      # for unknown variables in the end.
7704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7705
7706      # Check if we try to supply an empty value
7707      if test "x$FIND" = x; then
7708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7709$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7711$as_echo_n "checking for FIND... " >&6; }
7712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7713$as_echo "disabled" >&6; }
7714      else
7715        # Check if the provided tool contains a complete path.
7716        tool_specified="$FIND"
7717        tool_basename="${tool_specified##*/}"
7718        if test "x$tool_basename" = "x$tool_specified"; then
7719          # A command without a complete path is provided, search $PATH.
7720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7721$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7722          # Extract the first word of "$tool_basename", so it can be a program name with args.
7723set dummy $tool_basename; ac_word=$2
7724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7725$as_echo_n "checking for $ac_word... " >&6; }
7726if ${ac_cv_path_FIND+:} false; then :
7727  $as_echo_n "(cached) " >&6
7728else
7729  case $FIND in
7730  [\\/]* | ?:[\\/]*)
7731  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7732  ;;
7733  *)
7734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7735for as_dir in $PATH
7736do
7737  IFS=$as_save_IFS
7738  test -z "$as_dir" && as_dir=.
7739    for ac_exec_ext in '' $ac_executable_extensions; do
7740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7741    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7743    break 2
7744  fi
7745done
7746  done
7747IFS=$as_save_IFS
7748
7749  ;;
7750esac
7751fi
7752FIND=$ac_cv_path_FIND
7753if test -n "$FIND"; then
7754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7755$as_echo "$FIND" >&6; }
7756else
7757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7758$as_echo "no" >&6; }
7759fi
7760
7761
7762          if test "x$FIND" = x; then
7763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7764          fi
7765        else
7766          # Otherwise we believe it is a complete path. Use it as it is.
7767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7768$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7770$as_echo_n "checking for FIND... " >&6; }
7771          if test ! -x "$tool_specified"; then
7772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7773$as_echo "not found" >&6; }
7774            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7775          fi
7776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7777$as_echo "$tool_specified" >&6; }
7778        fi
7779      fi
7780    fi
7781
7782  fi
7783
7784
7785
7786  if test "x$FIND" = x; then
7787    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7788  fi
7789
7790
7791
7792
7793
7794  # Publish this variable in the help.
7795
7796
7797  if [ -z "${HEAD+x}" ]; then
7798    # The variable is not set by user, try to locate tool using the code snippet
7799    for ac_prog in head
7800do
7801  # Extract the first word of "$ac_prog", so it can be a program name with args.
7802set dummy $ac_prog; ac_word=$2
7803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7804$as_echo_n "checking for $ac_word... " >&6; }
7805if ${ac_cv_path_HEAD+:} false; then :
7806  $as_echo_n "(cached) " >&6
7807else
7808  case $HEAD in
7809  [\\/]* | ?:[\\/]*)
7810  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7811  ;;
7812  *)
7813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7814for as_dir in $PATH
7815do
7816  IFS=$as_save_IFS
7817  test -z "$as_dir" && as_dir=.
7818    for ac_exec_ext in '' $ac_executable_extensions; do
7819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7820    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7822    break 2
7823  fi
7824done
7825  done
7826IFS=$as_save_IFS
7827
7828  ;;
7829esac
7830fi
7831HEAD=$ac_cv_path_HEAD
7832if test -n "$HEAD"; then
7833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7834$as_echo "$HEAD" >&6; }
7835else
7836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7837$as_echo "no" >&6; }
7838fi
7839
7840
7841  test -n "$HEAD" && break
7842done
7843
7844  else
7845    # The variable is set, but is it from the command line or the environment?
7846
7847    # Try to remove the string !HEAD! from our list.
7848    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7849    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7850      # If it failed, the variable was not from the command line. Ignore it,
7851      # but warn the user (except for BASH, which is always set by the calling BASH).
7852      if test "xHEAD" != xBASH; then
7853        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7854$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7855      fi
7856      # Try to locate tool using the code snippet
7857      for ac_prog in head
7858do
7859  # Extract the first word of "$ac_prog", so it can be a program name with args.
7860set dummy $ac_prog; ac_word=$2
7861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7862$as_echo_n "checking for $ac_word... " >&6; }
7863if ${ac_cv_path_HEAD+:} false; then :
7864  $as_echo_n "(cached) " >&6
7865else
7866  case $HEAD in
7867  [\\/]* | ?:[\\/]*)
7868  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7869  ;;
7870  *)
7871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7872for as_dir in $PATH
7873do
7874  IFS=$as_save_IFS
7875  test -z "$as_dir" && as_dir=.
7876    for ac_exec_ext in '' $ac_executable_extensions; do
7877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7878    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7880    break 2
7881  fi
7882done
7883  done
7884IFS=$as_save_IFS
7885
7886  ;;
7887esac
7888fi
7889HEAD=$ac_cv_path_HEAD
7890if test -n "$HEAD"; then
7891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7892$as_echo "$HEAD" >&6; }
7893else
7894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7895$as_echo "no" >&6; }
7896fi
7897
7898
7899  test -n "$HEAD" && break
7900done
7901
7902    else
7903      # If it succeeded, then it was overridden by the user. We will use it
7904      # for the tool.
7905
7906      # First remove it from the list of overridden variables, so we can test
7907      # for unknown variables in the end.
7908      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7909
7910      # Check if we try to supply an empty value
7911      if test "x$HEAD" = x; then
7912        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7913$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7915$as_echo_n "checking for HEAD... " >&6; }
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7917$as_echo "disabled" >&6; }
7918      else
7919        # Check if the provided tool contains a complete path.
7920        tool_specified="$HEAD"
7921        tool_basename="${tool_specified##*/}"
7922        if test "x$tool_basename" = "x$tool_specified"; then
7923          # A command without a complete path is provided, search $PATH.
7924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7925$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7926          # Extract the first word of "$tool_basename", so it can be a program name with args.
7927set dummy $tool_basename; ac_word=$2
7928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7929$as_echo_n "checking for $ac_word... " >&6; }
7930if ${ac_cv_path_HEAD+:} false; then :
7931  $as_echo_n "(cached) " >&6
7932else
7933  case $HEAD in
7934  [\\/]* | ?:[\\/]*)
7935  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7936  ;;
7937  *)
7938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7939for as_dir in $PATH
7940do
7941  IFS=$as_save_IFS
7942  test -z "$as_dir" && as_dir=.
7943    for ac_exec_ext in '' $ac_executable_extensions; do
7944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7945    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7947    break 2
7948  fi
7949done
7950  done
7951IFS=$as_save_IFS
7952
7953  ;;
7954esac
7955fi
7956HEAD=$ac_cv_path_HEAD
7957if test -n "$HEAD"; then
7958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7959$as_echo "$HEAD" >&6; }
7960else
7961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7962$as_echo "no" >&6; }
7963fi
7964
7965
7966          if test "x$HEAD" = x; then
7967            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7968          fi
7969        else
7970          # Otherwise we believe it is a complete path. Use it as it is.
7971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7972$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7973          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7974$as_echo_n "checking for HEAD... " >&6; }
7975          if test ! -x "$tool_specified"; then
7976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7977$as_echo "not found" >&6; }
7978            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7979          fi
7980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7981$as_echo "$tool_specified" >&6; }
7982        fi
7983      fi
7984    fi
7985
7986  fi
7987
7988
7989
7990  if test "x$HEAD" = x; then
7991    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7992  fi
7993
7994
7995
7996
7997
7998  # Publish this variable in the help.
7999
8000
8001  if [ -z "${LN+x}" ]; then
8002    # The variable is not set by user, try to locate tool using the code snippet
8003    for ac_prog in ln
8004do
8005  # Extract the first word of "$ac_prog", so it can be a program name with args.
8006set dummy $ac_prog; ac_word=$2
8007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8008$as_echo_n "checking for $ac_word... " >&6; }
8009if ${ac_cv_path_LN+:} false; then :
8010  $as_echo_n "(cached) " >&6
8011else
8012  case $LN in
8013  [\\/]* | ?:[\\/]*)
8014  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8015  ;;
8016  *)
8017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8018for as_dir in $PATH
8019do
8020  IFS=$as_save_IFS
8021  test -z "$as_dir" && as_dir=.
8022    for ac_exec_ext in '' $ac_executable_extensions; do
8023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8024    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8026    break 2
8027  fi
8028done
8029  done
8030IFS=$as_save_IFS
8031
8032  ;;
8033esac
8034fi
8035LN=$ac_cv_path_LN
8036if test -n "$LN"; then
8037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8038$as_echo "$LN" >&6; }
8039else
8040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8041$as_echo "no" >&6; }
8042fi
8043
8044
8045  test -n "$LN" && break
8046done
8047
8048  else
8049    # The variable is set, but is it from the command line or the environment?
8050
8051    # Try to remove the string !LN! from our list.
8052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8054      # If it failed, the variable was not from the command line. Ignore it,
8055      # but warn the user (except for BASH, which is always set by the calling BASH).
8056      if test "xLN" != xBASH; then
8057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8058$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8059      fi
8060      # Try to locate tool using the code snippet
8061      for ac_prog in ln
8062do
8063  # Extract the first word of "$ac_prog", so it can be a program name with args.
8064set dummy $ac_prog; ac_word=$2
8065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066$as_echo_n "checking for $ac_word... " >&6; }
8067if ${ac_cv_path_LN+:} false; then :
8068  $as_echo_n "(cached) " >&6
8069else
8070  case $LN in
8071  [\\/]* | ?:[\\/]*)
8072  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8073  ;;
8074  *)
8075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8076for as_dir in $PATH
8077do
8078  IFS=$as_save_IFS
8079  test -z "$as_dir" && as_dir=.
8080    for ac_exec_ext in '' $ac_executable_extensions; do
8081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8082    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8084    break 2
8085  fi
8086done
8087  done
8088IFS=$as_save_IFS
8089
8090  ;;
8091esac
8092fi
8093LN=$ac_cv_path_LN
8094if test -n "$LN"; then
8095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8096$as_echo "$LN" >&6; }
8097else
8098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8099$as_echo "no" >&6; }
8100fi
8101
8102
8103  test -n "$LN" && break
8104done
8105
8106    else
8107      # If it succeeded, then it was overridden by the user. We will use it
8108      # for the tool.
8109
8110      # First remove it from the list of overridden variables, so we can test
8111      # for unknown variables in the end.
8112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8113
8114      # Check if we try to supply an empty value
8115      if test "x$LN" = x; then
8116        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8117$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8118        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8119$as_echo_n "checking for LN... " >&6; }
8120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8121$as_echo "disabled" >&6; }
8122      else
8123        # Check if the provided tool contains a complete path.
8124        tool_specified="$LN"
8125        tool_basename="${tool_specified##*/}"
8126        if test "x$tool_basename" = "x$tool_specified"; then
8127          # A command without a complete path is provided, search $PATH.
8128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8129$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8130          # Extract the first word of "$tool_basename", so it can be a program name with args.
8131set dummy $tool_basename; ac_word=$2
8132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8133$as_echo_n "checking for $ac_word... " >&6; }
8134if ${ac_cv_path_LN+:} false; then :
8135  $as_echo_n "(cached) " >&6
8136else
8137  case $LN in
8138  [\\/]* | ?:[\\/]*)
8139  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8140  ;;
8141  *)
8142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8143for as_dir in $PATH
8144do
8145  IFS=$as_save_IFS
8146  test -z "$as_dir" && as_dir=.
8147    for ac_exec_ext in '' $ac_executable_extensions; do
8148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8149    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8151    break 2
8152  fi
8153done
8154  done
8155IFS=$as_save_IFS
8156
8157  ;;
8158esac
8159fi
8160LN=$ac_cv_path_LN
8161if test -n "$LN"; then
8162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8163$as_echo "$LN" >&6; }
8164else
8165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8166$as_echo "no" >&6; }
8167fi
8168
8169
8170          if test "x$LN" = x; then
8171            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8172          fi
8173        else
8174          # Otherwise we believe it is a complete path. Use it as it is.
8175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8176$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8177          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8178$as_echo_n "checking for LN... " >&6; }
8179          if test ! -x "$tool_specified"; then
8180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8181$as_echo "not found" >&6; }
8182            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8183          fi
8184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8185$as_echo "$tool_specified" >&6; }
8186        fi
8187      fi
8188    fi
8189
8190  fi
8191
8192
8193
8194  if test "x$LN" = x; then
8195    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8196  fi
8197
8198
8199
8200
8201
8202  # Publish this variable in the help.
8203
8204
8205  if [ -z "${LS+x}" ]; then
8206    # The variable is not set by user, try to locate tool using the code snippet
8207    for ac_prog in ls
8208do
8209  # Extract the first word of "$ac_prog", so it can be a program name with args.
8210set dummy $ac_prog; ac_word=$2
8211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8212$as_echo_n "checking for $ac_word... " >&6; }
8213if ${ac_cv_path_LS+:} false; then :
8214  $as_echo_n "(cached) " >&6
8215else
8216  case $LS in
8217  [\\/]* | ?:[\\/]*)
8218  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8219  ;;
8220  *)
8221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH
8223do
8224  IFS=$as_save_IFS
8225  test -z "$as_dir" && as_dir=.
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230    break 2
8231  fi
8232done
8233  done
8234IFS=$as_save_IFS
8235
8236  ;;
8237esac
8238fi
8239LS=$ac_cv_path_LS
8240if test -n "$LS"; then
8241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8242$as_echo "$LS" >&6; }
8243else
8244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
8246fi
8247
8248
8249  test -n "$LS" && break
8250done
8251
8252  else
8253    # The variable is set, but is it from the command line or the environment?
8254
8255    # Try to remove the string !LS! from our list.
8256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8258      # If it failed, the variable was not from the command line. Ignore it,
8259      # but warn the user (except for BASH, which is always set by the calling BASH).
8260      if test "xLS" != xBASH; then
8261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8262$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8263      fi
8264      # Try to locate tool using the code snippet
8265      for ac_prog in ls
8266do
8267  # Extract the first word of "$ac_prog", so it can be a program name with args.
8268set dummy $ac_prog; ac_word=$2
8269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8270$as_echo_n "checking for $ac_word... " >&6; }
8271if ${ac_cv_path_LS+:} false; then :
8272  $as_echo_n "(cached) " >&6
8273else
8274  case $LS in
8275  [\\/]* | ?:[\\/]*)
8276  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8277  ;;
8278  *)
8279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8280for as_dir in $PATH
8281do
8282  IFS=$as_save_IFS
8283  test -z "$as_dir" && as_dir=.
8284    for ac_exec_ext in '' $ac_executable_extensions; do
8285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8286    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8288    break 2
8289  fi
8290done
8291  done
8292IFS=$as_save_IFS
8293
8294  ;;
8295esac
8296fi
8297LS=$ac_cv_path_LS
8298if test -n "$LS"; then
8299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8300$as_echo "$LS" >&6; }
8301else
8302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8303$as_echo "no" >&6; }
8304fi
8305
8306
8307  test -n "$LS" && break
8308done
8309
8310    else
8311      # If it succeeded, then it was overridden by the user. We will use it
8312      # for the tool.
8313
8314      # First remove it from the list of overridden variables, so we can test
8315      # for unknown variables in the end.
8316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8317
8318      # Check if we try to supply an empty value
8319      if test "x$LS" = x; then
8320        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8321$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8323$as_echo_n "checking for LS... " >&6; }
8324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8325$as_echo "disabled" >&6; }
8326      else
8327        # Check if the provided tool contains a complete path.
8328        tool_specified="$LS"
8329        tool_basename="${tool_specified##*/}"
8330        if test "x$tool_basename" = "x$tool_specified"; then
8331          # A command without a complete path is provided, search $PATH.
8332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8333$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8334          # Extract the first word of "$tool_basename", so it can be a program name with args.
8335set dummy $tool_basename; ac_word=$2
8336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8337$as_echo_n "checking for $ac_word... " >&6; }
8338if ${ac_cv_path_LS+:} false; then :
8339  $as_echo_n "(cached) " >&6
8340else
8341  case $LS in
8342  [\\/]* | ?:[\\/]*)
8343  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8344  ;;
8345  *)
8346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8347for as_dir in $PATH
8348do
8349  IFS=$as_save_IFS
8350  test -z "$as_dir" && as_dir=.
8351    for ac_exec_ext in '' $ac_executable_extensions; do
8352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8353    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8355    break 2
8356  fi
8357done
8358  done
8359IFS=$as_save_IFS
8360
8361  ;;
8362esac
8363fi
8364LS=$ac_cv_path_LS
8365if test -n "$LS"; then
8366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8367$as_echo "$LS" >&6; }
8368else
8369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8370$as_echo "no" >&6; }
8371fi
8372
8373
8374          if test "x$LS" = x; then
8375            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8376          fi
8377        else
8378          # Otherwise we believe it is a complete path. Use it as it is.
8379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8380$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8381          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8382$as_echo_n "checking for LS... " >&6; }
8383          if test ! -x "$tool_specified"; then
8384            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8385$as_echo "not found" >&6; }
8386            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8387          fi
8388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8389$as_echo "$tool_specified" >&6; }
8390        fi
8391      fi
8392    fi
8393
8394  fi
8395
8396
8397
8398  if test "x$LS" = x; then
8399    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8400  fi
8401
8402
8403
8404
8405
8406  # Publish this variable in the help.
8407
8408
8409  if [ -z "${MKDIR+x}" ]; then
8410    # The variable is not set by user, try to locate tool using the code snippet
8411    for ac_prog in mkdir
8412do
8413  # Extract the first word of "$ac_prog", so it can be a program name with args.
8414set dummy $ac_prog; ac_word=$2
8415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8416$as_echo_n "checking for $ac_word... " >&6; }
8417if ${ac_cv_path_MKDIR+:} false; then :
8418  $as_echo_n "(cached) " >&6
8419else
8420  case $MKDIR in
8421  [\\/]* | ?:[\\/]*)
8422  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8423  ;;
8424  *)
8425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8426for as_dir in $PATH
8427do
8428  IFS=$as_save_IFS
8429  test -z "$as_dir" && as_dir=.
8430    for ac_exec_ext in '' $ac_executable_extensions; do
8431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8432    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8434    break 2
8435  fi
8436done
8437  done
8438IFS=$as_save_IFS
8439
8440  ;;
8441esac
8442fi
8443MKDIR=$ac_cv_path_MKDIR
8444if test -n "$MKDIR"; then
8445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8446$as_echo "$MKDIR" >&6; }
8447else
8448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8449$as_echo "no" >&6; }
8450fi
8451
8452
8453  test -n "$MKDIR" && break
8454done
8455
8456  else
8457    # The variable is set, but is it from the command line or the environment?
8458
8459    # Try to remove the string !MKDIR! from our list.
8460    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8461    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8462      # If it failed, the variable was not from the command line. Ignore it,
8463      # but warn the user (except for BASH, which is always set by the calling BASH).
8464      if test "xMKDIR" != xBASH; then
8465        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8466$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8467      fi
8468      # Try to locate tool using the code snippet
8469      for ac_prog in mkdir
8470do
8471  # Extract the first word of "$ac_prog", so it can be a program name with args.
8472set dummy $ac_prog; ac_word=$2
8473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8474$as_echo_n "checking for $ac_word... " >&6; }
8475if ${ac_cv_path_MKDIR+:} false; then :
8476  $as_echo_n "(cached) " >&6
8477else
8478  case $MKDIR in
8479  [\\/]* | ?:[\\/]*)
8480  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8481  ;;
8482  *)
8483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8484for as_dir in $PATH
8485do
8486  IFS=$as_save_IFS
8487  test -z "$as_dir" && as_dir=.
8488    for ac_exec_ext in '' $ac_executable_extensions; do
8489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8490    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8492    break 2
8493  fi
8494done
8495  done
8496IFS=$as_save_IFS
8497
8498  ;;
8499esac
8500fi
8501MKDIR=$ac_cv_path_MKDIR
8502if test -n "$MKDIR"; then
8503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8504$as_echo "$MKDIR" >&6; }
8505else
8506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507$as_echo "no" >&6; }
8508fi
8509
8510
8511  test -n "$MKDIR" && break
8512done
8513
8514    else
8515      # If it succeeded, then it was overridden by the user. We will use it
8516      # for the tool.
8517
8518      # First remove it from the list of overridden variables, so we can test
8519      # for unknown variables in the end.
8520      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8521
8522      # Check if we try to supply an empty value
8523      if test "x$MKDIR" = x; then
8524        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8525$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8527$as_echo_n "checking for MKDIR... " >&6; }
8528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8529$as_echo "disabled" >&6; }
8530      else
8531        # Check if the provided tool contains a complete path.
8532        tool_specified="$MKDIR"
8533        tool_basename="${tool_specified##*/}"
8534        if test "x$tool_basename" = "x$tool_specified"; then
8535          # A command without a complete path is provided, search $PATH.
8536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8537$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8538          # Extract the first word of "$tool_basename", so it can be a program name with args.
8539set dummy $tool_basename; ac_word=$2
8540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8541$as_echo_n "checking for $ac_word... " >&6; }
8542if ${ac_cv_path_MKDIR+:} false; then :
8543  $as_echo_n "(cached) " >&6
8544else
8545  case $MKDIR in
8546  [\\/]* | ?:[\\/]*)
8547  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8548  ;;
8549  *)
8550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8551for as_dir in $PATH
8552do
8553  IFS=$as_save_IFS
8554  test -z "$as_dir" && as_dir=.
8555    for ac_exec_ext in '' $ac_executable_extensions; do
8556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8557    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8559    break 2
8560  fi
8561done
8562  done
8563IFS=$as_save_IFS
8564
8565  ;;
8566esac
8567fi
8568MKDIR=$ac_cv_path_MKDIR
8569if test -n "$MKDIR"; then
8570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8571$as_echo "$MKDIR" >&6; }
8572else
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574$as_echo "no" >&6; }
8575fi
8576
8577
8578          if test "x$MKDIR" = x; then
8579            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8580          fi
8581        else
8582          # Otherwise we believe it is a complete path. Use it as it is.
8583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8584$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8585          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8586$as_echo_n "checking for MKDIR... " >&6; }
8587          if test ! -x "$tool_specified"; then
8588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8589$as_echo "not found" >&6; }
8590            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8591          fi
8592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8593$as_echo "$tool_specified" >&6; }
8594        fi
8595      fi
8596    fi
8597
8598  fi
8599
8600
8601
8602  if test "x$MKDIR" = x; then
8603    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8604  fi
8605
8606
8607
8608
8609
8610  # Publish this variable in the help.
8611
8612
8613  if [ -z "${MKTEMP+x}" ]; then
8614    # The variable is not set by user, try to locate tool using the code snippet
8615    for ac_prog in mktemp
8616do
8617  # Extract the first word of "$ac_prog", so it can be a program name with args.
8618set dummy $ac_prog; ac_word=$2
8619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8620$as_echo_n "checking for $ac_word... " >&6; }
8621if ${ac_cv_path_MKTEMP+:} false; then :
8622  $as_echo_n "(cached) " >&6
8623else
8624  case $MKTEMP in
8625  [\\/]* | ?:[\\/]*)
8626  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8627  ;;
8628  *)
8629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8630for as_dir in $PATH
8631do
8632  IFS=$as_save_IFS
8633  test -z "$as_dir" && as_dir=.
8634    for ac_exec_ext in '' $ac_executable_extensions; do
8635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8636    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8638    break 2
8639  fi
8640done
8641  done
8642IFS=$as_save_IFS
8643
8644  ;;
8645esac
8646fi
8647MKTEMP=$ac_cv_path_MKTEMP
8648if test -n "$MKTEMP"; then
8649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8650$as_echo "$MKTEMP" >&6; }
8651else
8652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8653$as_echo "no" >&6; }
8654fi
8655
8656
8657  test -n "$MKTEMP" && break
8658done
8659
8660  else
8661    # The variable is set, but is it from the command line or the environment?
8662
8663    # Try to remove the string !MKTEMP! from our list.
8664    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8665    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8666      # If it failed, the variable was not from the command line. Ignore it,
8667      # but warn the user (except for BASH, which is always set by the calling BASH).
8668      if test "xMKTEMP" != xBASH; then
8669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8670$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8671      fi
8672      # Try to locate tool using the code snippet
8673      for ac_prog in mktemp
8674do
8675  # Extract the first word of "$ac_prog", so it can be a program name with args.
8676set dummy $ac_prog; ac_word=$2
8677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8678$as_echo_n "checking for $ac_word... " >&6; }
8679if ${ac_cv_path_MKTEMP+:} false; then :
8680  $as_echo_n "(cached) " >&6
8681else
8682  case $MKTEMP in
8683  [\\/]* | ?:[\\/]*)
8684  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8685  ;;
8686  *)
8687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688for as_dir in $PATH
8689do
8690  IFS=$as_save_IFS
8691  test -z "$as_dir" && as_dir=.
8692    for ac_exec_ext in '' $ac_executable_extensions; do
8693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696    break 2
8697  fi
8698done
8699  done
8700IFS=$as_save_IFS
8701
8702  ;;
8703esac
8704fi
8705MKTEMP=$ac_cv_path_MKTEMP
8706if test -n "$MKTEMP"; then
8707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8708$as_echo "$MKTEMP" >&6; }
8709else
8710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8711$as_echo "no" >&6; }
8712fi
8713
8714
8715  test -n "$MKTEMP" && break
8716done
8717
8718    else
8719      # If it succeeded, then it was overridden by the user. We will use it
8720      # for the tool.
8721
8722      # First remove it from the list of overridden variables, so we can test
8723      # for unknown variables in the end.
8724      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8725
8726      # Check if we try to supply an empty value
8727      if test "x$MKTEMP" = x; then
8728        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8729$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8730        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8731$as_echo_n "checking for MKTEMP... " >&6; }
8732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8733$as_echo "disabled" >&6; }
8734      else
8735        # Check if the provided tool contains a complete path.
8736        tool_specified="$MKTEMP"
8737        tool_basename="${tool_specified##*/}"
8738        if test "x$tool_basename" = "x$tool_specified"; then
8739          # A command without a complete path is provided, search $PATH.
8740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8741$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8742          # Extract the first word of "$tool_basename", so it can be a program name with args.
8743set dummy $tool_basename; ac_word=$2
8744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8745$as_echo_n "checking for $ac_word... " >&6; }
8746if ${ac_cv_path_MKTEMP+:} false; then :
8747  $as_echo_n "(cached) " >&6
8748else
8749  case $MKTEMP in
8750  [\\/]* | ?:[\\/]*)
8751  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8752  ;;
8753  *)
8754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8755for as_dir in $PATH
8756do
8757  IFS=$as_save_IFS
8758  test -z "$as_dir" && as_dir=.
8759    for ac_exec_ext in '' $ac_executable_extensions; do
8760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8761    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8763    break 2
8764  fi
8765done
8766  done
8767IFS=$as_save_IFS
8768
8769  ;;
8770esac
8771fi
8772MKTEMP=$ac_cv_path_MKTEMP
8773if test -n "$MKTEMP"; then
8774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8775$as_echo "$MKTEMP" >&6; }
8776else
8777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8778$as_echo "no" >&6; }
8779fi
8780
8781
8782          if test "x$MKTEMP" = x; then
8783            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8784          fi
8785        else
8786          # Otherwise we believe it is a complete path. Use it as it is.
8787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8788$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8789          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8790$as_echo_n "checking for MKTEMP... " >&6; }
8791          if test ! -x "$tool_specified"; then
8792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8793$as_echo "not found" >&6; }
8794            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8795          fi
8796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8797$as_echo "$tool_specified" >&6; }
8798        fi
8799      fi
8800    fi
8801
8802  fi
8803
8804
8805
8806  if test "x$MKTEMP" = x; then
8807    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8808  fi
8809
8810
8811
8812
8813
8814  # Publish this variable in the help.
8815
8816
8817  if [ -z "${MV+x}" ]; then
8818    # The variable is not set by user, try to locate tool using the code snippet
8819    for ac_prog in mv
8820do
8821  # Extract the first word of "$ac_prog", so it can be a program name with args.
8822set dummy $ac_prog; ac_word=$2
8823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8824$as_echo_n "checking for $ac_word... " >&6; }
8825if ${ac_cv_path_MV+:} false; then :
8826  $as_echo_n "(cached) " >&6
8827else
8828  case $MV in
8829  [\\/]* | ?:[\\/]*)
8830  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8831  ;;
8832  *)
8833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8834for as_dir in $PATH
8835do
8836  IFS=$as_save_IFS
8837  test -z "$as_dir" && as_dir=.
8838    for ac_exec_ext in '' $ac_executable_extensions; do
8839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8840    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8842    break 2
8843  fi
8844done
8845  done
8846IFS=$as_save_IFS
8847
8848  ;;
8849esac
8850fi
8851MV=$ac_cv_path_MV
8852if test -n "$MV"; then
8853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8854$as_echo "$MV" >&6; }
8855else
8856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8857$as_echo "no" >&6; }
8858fi
8859
8860
8861  test -n "$MV" && break
8862done
8863
8864  else
8865    # The variable is set, but is it from the command line or the environment?
8866
8867    # Try to remove the string !MV! from our list.
8868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8870      # If it failed, the variable was not from the command line. Ignore it,
8871      # but warn the user (except for BASH, which is always set by the calling BASH).
8872      if test "xMV" != xBASH; then
8873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8874$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8875      fi
8876      # Try to locate tool using the code snippet
8877      for ac_prog in mv
8878do
8879  # Extract the first word of "$ac_prog", so it can be a program name with args.
8880set dummy $ac_prog; ac_word=$2
8881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8882$as_echo_n "checking for $ac_word... " >&6; }
8883if ${ac_cv_path_MV+:} false; then :
8884  $as_echo_n "(cached) " >&6
8885else
8886  case $MV in
8887  [\\/]* | ?:[\\/]*)
8888  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8889  ;;
8890  *)
8891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8892for as_dir in $PATH
8893do
8894  IFS=$as_save_IFS
8895  test -z "$as_dir" && as_dir=.
8896    for ac_exec_ext in '' $ac_executable_extensions; do
8897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8898    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900    break 2
8901  fi
8902done
8903  done
8904IFS=$as_save_IFS
8905
8906  ;;
8907esac
8908fi
8909MV=$ac_cv_path_MV
8910if test -n "$MV"; then
8911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8912$as_echo "$MV" >&6; }
8913else
8914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915$as_echo "no" >&6; }
8916fi
8917
8918
8919  test -n "$MV" && break
8920done
8921
8922    else
8923      # If it succeeded, then it was overridden by the user. We will use it
8924      # for the tool.
8925
8926      # First remove it from the list of overridden variables, so we can test
8927      # for unknown variables in the end.
8928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8929
8930      # Check if we try to supply an empty value
8931      if test "x$MV" = x; then
8932        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8933$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8935$as_echo_n "checking for MV... " >&6; }
8936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8937$as_echo "disabled" >&6; }
8938      else
8939        # Check if the provided tool contains a complete path.
8940        tool_specified="$MV"
8941        tool_basename="${tool_specified##*/}"
8942        if test "x$tool_basename" = "x$tool_specified"; then
8943          # A command without a complete path is provided, search $PATH.
8944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8945$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8946          # Extract the first word of "$tool_basename", so it can be a program name with args.
8947set dummy $tool_basename; ac_word=$2
8948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8949$as_echo_n "checking for $ac_word... " >&6; }
8950if ${ac_cv_path_MV+:} false; then :
8951  $as_echo_n "(cached) " >&6
8952else
8953  case $MV in
8954  [\\/]* | ?:[\\/]*)
8955  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8956  ;;
8957  *)
8958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8959for as_dir in $PATH
8960do
8961  IFS=$as_save_IFS
8962  test -z "$as_dir" && as_dir=.
8963    for ac_exec_ext in '' $ac_executable_extensions; do
8964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8965    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8967    break 2
8968  fi
8969done
8970  done
8971IFS=$as_save_IFS
8972
8973  ;;
8974esac
8975fi
8976MV=$ac_cv_path_MV
8977if test -n "$MV"; then
8978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8979$as_echo "$MV" >&6; }
8980else
8981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8982$as_echo "no" >&6; }
8983fi
8984
8985
8986          if test "x$MV" = x; then
8987            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8988          fi
8989        else
8990          # Otherwise we believe it is a complete path. Use it as it is.
8991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8992$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8993          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8994$as_echo_n "checking for MV... " >&6; }
8995          if test ! -x "$tool_specified"; then
8996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8997$as_echo "not found" >&6; }
8998            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8999          fi
9000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9001$as_echo "$tool_specified" >&6; }
9002        fi
9003      fi
9004    fi
9005
9006  fi
9007
9008
9009
9010  if test "x$MV" = x; then
9011    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9012  fi
9013
9014
9015
9016
9017
9018  # Publish this variable in the help.
9019
9020
9021  if [ -z "${NAWK+x}" ]; then
9022    # The variable is not set by user, try to locate tool using the code snippet
9023    for ac_prog in nawk gawk awk
9024do
9025  # Extract the first word of "$ac_prog", so it can be a program name with args.
9026set dummy $ac_prog; ac_word=$2
9027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9028$as_echo_n "checking for $ac_word... " >&6; }
9029if ${ac_cv_path_NAWK+:} false; then :
9030  $as_echo_n "(cached) " >&6
9031else
9032  case $NAWK in
9033  [\\/]* | ?:[\\/]*)
9034  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9035  ;;
9036  *)
9037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9038for as_dir in $PATH
9039do
9040  IFS=$as_save_IFS
9041  test -z "$as_dir" && as_dir=.
9042    for ac_exec_ext in '' $ac_executable_extensions; do
9043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9044    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9046    break 2
9047  fi
9048done
9049  done
9050IFS=$as_save_IFS
9051
9052  ;;
9053esac
9054fi
9055NAWK=$ac_cv_path_NAWK
9056if test -n "$NAWK"; then
9057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9058$as_echo "$NAWK" >&6; }
9059else
9060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9061$as_echo "no" >&6; }
9062fi
9063
9064
9065  test -n "$NAWK" && break
9066done
9067
9068  else
9069    # The variable is set, but is it from the command line or the environment?
9070
9071    # Try to remove the string !NAWK! from our list.
9072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9074      # If it failed, the variable was not from the command line. Ignore it,
9075      # but warn the user (except for BASH, which is always set by the calling BASH).
9076      if test "xNAWK" != xBASH; then
9077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9078$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9079      fi
9080      # Try to locate tool using the code snippet
9081      for ac_prog in nawk gawk awk
9082do
9083  # Extract the first word of "$ac_prog", so it can be a program name with args.
9084set dummy $ac_prog; ac_word=$2
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9086$as_echo_n "checking for $ac_word... " >&6; }
9087if ${ac_cv_path_NAWK+:} false; then :
9088  $as_echo_n "(cached) " >&6
9089else
9090  case $NAWK in
9091  [\\/]* | ?:[\\/]*)
9092  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9093  ;;
9094  *)
9095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9096for as_dir in $PATH
9097do
9098  IFS=$as_save_IFS
9099  test -z "$as_dir" && as_dir=.
9100    for ac_exec_ext in '' $ac_executable_extensions; do
9101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9102    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9104    break 2
9105  fi
9106done
9107  done
9108IFS=$as_save_IFS
9109
9110  ;;
9111esac
9112fi
9113NAWK=$ac_cv_path_NAWK
9114if test -n "$NAWK"; then
9115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9116$as_echo "$NAWK" >&6; }
9117else
9118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119$as_echo "no" >&6; }
9120fi
9121
9122
9123  test -n "$NAWK" && break
9124done
9125
9126    else
9127      # If it succeeded, then it was overridden by the user. We will use it
9128      # for the tool.
9129
9130      # First remove it from the list of overridden variables, so we can test
9131      # for unknown variables in the end.
9132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9133
9134      # Check if we try to supply an empty value
9135      if test "x$NAWK" = x; then
9136        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9137$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9139$as_echo_n "checking for NAWK... " >&6; }
9140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9141$as_echo "disabled" >&6; }
9142      else
9143        # Check if the provided tool contains a complete path.
9144        tool_specified="$NAWK"
9145        tool_basename="${tool_specified##*/}"
9146        if test "x$tool_basename" = "x$tool_specified"; then
9147          # A command without a complete path is provided, search $PATH.
9148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9149$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9150          # Extract the first word of "$tool_basename", so it can be a program name with args.
9151set dummy $tool_basename; ac_word=$2
9152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9153$as_echo_n "checking for $ac_word... " >&6; }
9154if ${ac_cv_path_NAWK+:} false; then :
9155  $as_echo_n "(cached) " >&6
9156else
9157  case $NAWK in
9158  [\\/]* | ?:[\\/]*)
9159  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9160  ;;
9161  *)
9162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9163for as_dir in $PATH
9164do
9165  IFS=$as_save_IFS
9166  test -z "$as_dir" && as_dir=.
9167    for ac_exec_ext in '' $ac_executable_extensions; do
9168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9169    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9171    break 2
9172  fi
9173done
9174  done
9175IFS=$as_save_IFS
9176
9177  ;;
9178esac
9179fi
9180NAWK=$ac_cv_path_NAWK
9181if test -n "$NAWK"; then
9182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9183$as_echo "$NAWK" >&6; }
9184else
9185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9186$as_echo "no" >&6; }
9187fi
9188
9189
9190          if test "x$NAWK" = x; then
9191            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9192          fi
9193        else
9194          # Otherwise we believe it is a complete path. Use it as it is.
9195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9196$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9197          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9198$as_echo_n "checking for NAWK... " >&6; }
9199          if test ! -x "$tool_specified"; then
9200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9201$as_echo "not found" >&6; }
9202            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9203          fi
9204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9205$as_echo "$tool_specified" >&6; }
9206        fi
9207      fi
9208    fi
9209
9210  fi
9211
9212
9213
9214  if test "x$NAWK" = x; then
9215    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9216  fi
9217
9218
9219
9220
9221
9222  # Publish this variable in the help.
9223
9224
9225  if [ -z "${PRINTF+x}" ]; then
9226    # The variable is not set by user, try to locate tool using the code snippet
9227    for ac_prog in printf
9228do
9229  # Extract the first word of "$ac_prog", so it can be a program name with args.
9230set dummy $ac_prog; ac_word=$2
9231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9232$as_echo_n "checking for $ac_word... " >&6; }
9233if ${ac_cv_path_PRINTF+:} false; then :
9234  $as_echo_n "(cached) " >&6
9235else
9236  case $PRINTF in
9237  [\\/]* | ?:[\\/]*)
9238  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9239  ;;
9240  *)
9241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9242for as_dir in $PATH
9243do
9244  IFS=$as_save_IFS
9245  test -z "$as_dir" && as_dir=.
9246    for ac_exec_ext in '' $ac_executable_extensions; do
9247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9248    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9250    break 2
9251  fi
9252done
9253  done
9254IFS=$as_save_IFS
9255
9256  ;;
9257esac
9258fi
9259PRINTF=$ac_cv_path_PRINTF
9260if test -n "$PRINTF"; then
9261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9262$as_echo "$PRINTF" >&6; }
9263else
9264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9265$as_echo "no" >&6; }
9266fi
9267
9268
9269  test -n "$PRINTF" && break
9270done
9271
9272  else
9273    # The variable is set, but is it from the command line or the environment?
9274
9275    # Try to remove the string !PRINTF! from our list.
9276    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9277    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9278      # If it failed, the variable was not from the command line. Ignore it,
9279      # but warn the user (except for BASH, which is always set by the calling BASH).
9280      if test "xPRINTF" != xBASH; then
9281        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9282$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9283      fi
9284      # Try to locate tool using the code snippet
9285      for ac_prog in printf
9286do
9287  # Extract the first word of "$ac_prog", so it can be a program name with args.
9288set dummy $ac_prog; ac_word=$2
9289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9290$as_echo_n "checking for $ac_word... " >&6; }
9291if ${ac_cv_path_PRINTF+:} false; then :
9292  $as_echo_n "(cached) " >&6
9293else
9294  case $PRINTF in
9295  [\\/]* | ?:[\\/]*)
9296  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9297  ;;
9298  *)
9299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9300for as_dir in $PATH
9301do
9302  IFS=$as_save_IFS
9303  test -z "$as_dir" && as_dir=.
9304    for ac_exec_ext in '' $ac_executable_extensions; do
9305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9306    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9308    break 2
9309  fi
9310done
9311  done
9312IFS=$as_save_IFS
9313
9314  ;;
9315esac
9316fi
9317PRINTF=$ac_cv_path_PRINTF
9318if test -n "$PRINTF"; then
9319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9320$as_echo "$PRINTF" >&6; }
9321else
9322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323$as_echo "no" >&6; }
9324fi
9325
9326
9327  test -n "$PRINTF" && break
9328done
9329
9330    else
9331      # If it succeeded, then it was overridden by the user. We will use it
9332      # for the tool.
9333
9334      # First remove it from the list of overridden variables, so we can test
9335      # for unknown variables in the end.
9336      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9337
9338      # Check if we try to supply an empty value
9339      if test "x$PRINTF" = x; then
9340        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9341$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9342        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9343$as_echo_n "checking for PRINTF... " >&6; }
9344        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9345$as_echo "disabled" >&6; }
9346      else
9347        # Check if the provided tool contains a complete path.
9348        tool_specified="$PRINTF"
9349        tool_basename="${tool_specified##*/}"
9350        if test "x$tool_basename" = "x$tool_specified"; then
9351          # A command without a complete path is provided, search $PATH.
9352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9353$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9354          # Extract the first word of "$tool_basename", so it can be a program name with args.
9355set dummy $tool_basename; ac_word=$2
9356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9357$as_echo_n "checking for $ac_word... " >&6; }
9358if ${ac_cv_path_PRINTF+:} false; then :
9359  $as_echo_n "(cached) " >&6
9360else
9361  case $PRINTF in
9362  [\\/]* | ?:[\\/]*)
9363  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9364  ;;
9365  *)
9366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9367for as_dir in $PATH
9368do
9369  IFS=$as_save_IFS
9370  test -z "$as_dir" && as_dir=.
9371    for ac_exec_ext in '' $ac_executable_extensions; do
9372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9373    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9375    break 2
9376  fi
9377done
9378  done
9379IFS=$as_save_IFS
9380
9381  ;;
9382esac
9383fi
9384PRINTF=$ac_cv_path_PRINTF
9385if test -n "$PRINTF"; then
9386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9387$as_echo "$PRINTF" >&6; }
9388else
9389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390$as_echo "no" >&6; }
9391fi
9392
9393
9394          if test "x$PRINTF" = x; then
9395            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9396          fi
9397        else
9398          # Otherwise we believe it is a complete path. Use it as it is.
9399          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9400$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9401          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9402$as_echo_n "checking for PRINTF... " >&6; }
9403          if test ! -x "$tool_specified"; then
9404            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9405$as_echo "not found" >&6; }
9406            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9407          fi
9408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9409$as_echo "$tool_specified" >&6; }
9410        fi
9411      fi
9412    fi
9413
9414  fi
9415
9416
9417
9418  if test "x$PRINTF" = x; then
9419    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9420  fi
9421
9422
9423
9424
9425
9426  # Publish this variable in the help.
9427
9428
9429  if [ -z "${RM+x}" ]; then
9430    # The variable is not set by user, try to locate tool using the code snippet
9431    for ac_prog in rm
9432do
9433  # Extract the first word of "$ac_prog", so it can be a program name with args.
9434set dummy $ac_prog; ac_word=$2
9435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9436$as_echo_n "checking for $ac_word... " >&6; }
9437if ${ac_cv_path_RM+:} false; then :
9438  $as_echo_n "(cached) " >&6
9439else
9440  case $RM in
9441  [\\/]* | ?:[\\/]*)
9442  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9443  ;;
9444  *)
9445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9446for as_dir in $PATH
9447do
9448  IFS=$as_save_IFS
9449  test -z "$as_dir" && as_dir=.
9450    for ac_exec_ext in '' $ac_executable_extensions; do
9451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9452    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9454    break 2
9455  fi
9456done
9457  done
9458IFS=$as_save_IFS
9459
9460  ;;
9461esac
9462fi
9463RM=$ac_cv_path_RM
9464if test -n "$RM"; then
9465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9466$as_echo "$RM" >&6; }
9467else
9468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469$as_echo "no" >&6; }
9470fi
9471
9472
9473  test -n "$RM" && break
9474done
9475
9476  else
9477    # The variable is set, but is it from the command line or the environment?
9478
9479    # Try to remove the string !RM! from our list.
9480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9482      # If it failed, the variable was not from the command line. Ignore it,
9483      # but warn the user (except for BASH, which is always set by the calling BASH).
9484      if test "xRM" != xBASH; then
9485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9486$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9487      fi
9488      # Try to locate tool using the code snippet
9489      for ac_prog in rm
9490do
9491  # Extract the first word of "$ac_prog", so it can be a program name with args.
9492set dummy $ac_prog; ac_word=$2
9493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9494$as_echo_n "checking for $ac_word... " >&6; }
9495if ${ac_cv_path_RM+:} false; then :
9496  $as_echo_n "(cached) " >&6
9497else
9498  case $RM in
9499  [\\/]* | ?:[\\/]*)
9500  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9501  ;;
9502  *)
9503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504for as_dir in $PATH
9505do
9506  IFS=$as_save_IFS
9507  test -z "$as_dir" && as_dir=.
9508    for ac_exec_ext in '' $ac_executable_extensions; do
9509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9510    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9512    break 2
9513  fi
9514done
9515  done
9516IFS=$as_save_IFS
9517
9518  ;;
9519esac
9520fi
9521RM=$ac_cv_path_RM
9522if test -n "$RM"; then
9523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9524$as_echo "$RM" >&6; }
9525else
9526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
9528fi
9529
9530
9531  test -n "$RM" && break
9532done
9533
9534    else
9535      # If it succeeded, then it was overridden by the user. We will use it
9536      # for the tool.
9537
9538      # First remove it from the list of overridden variables, so we can test
9539      # for unknown variables in the end.
9540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9541
9542      # Check if we try to supply an empty value
9543      if test "x$RM" = x; then
9544        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9545$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9547$as_echo_n "checking for RM... " >&6; }
9548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9549$as_echo "disabled" >&6; }
9550      else
9551        # Check if the provided tool contains a complete path.
9552        tool_specified="$RM"
9553        tool_basename="${tool_specified##*/}"
9554        if test "x$tool_basename" = "x$tool_specified"; then
9555          # A command without a complete path is provided, search $PATH.
9556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9557$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9558          # Extract the first word of "$tool_basename", so it can be a program name with args.
9559set dummy $tool_basename; ac_word=$2
9560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9561$as_echo_n "checking for $ac_word... " >&6; }
9562if ${ac_cv_path_RM+:} false; then :
9563  $as_echo_n "(cached) " >&6
9564else
9565  case $RM in
9566  [\\/]* | ?:[\\/]*)
9567  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9568  ;;
9569  *)
9570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9571for as_dir in $PATH
9572do
9573  IFS=$as_save_IFS
9574  test -z "$as_dir" && as_dir=.
9575    for ac_exec_ext in '' $ac_executable_extensions; do
9576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9577    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9579    break 2
9580  fi
9581done
9582  done
9583IFS=$as_save_IFS
9584
9585  ;;
9586esac
9587fi
9588RM=$ac_cv_path_RM
9589if test -n "$RM"; then
9590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9591$as_echo "$RM" >&6; }
9592else
9593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594$as_echo "no" >&6; }
9595fi
9596
9597
9598          if test "x$RM" = x; then
9599            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9600          fi
9601        else
9602          # Otherwise we believe it is a complete path. Use it as it is.
9603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9604$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9605          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9606$as_echo_n "checking for RM... " >&6; }
9607          if test ! -x "$tool_specified"; then
9608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9609$as_echo "not found" >&6; }
9610            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9611          fi
9612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9613$as_echo "$tool_specified" >&6; }
9614        fi
9615      fi
9616    fi
9617
9618  fi
9619
9620
9621
9622  if test "x$RM" = x; then
9623    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9624  fi
9625
9626
9627
9628
9629
9630  # Publish this variable in the help.
9631
9632
9633  if [ -z "${RMDIR+x}" ]; then
9634    # The variable is not set by user, try to locate tool using the code snippet
9635    for ac_prog in rmdir
9636do
9637  # Extract the first word of "$ac_prog", so it can be a program name with args.
9638set dummy $ac_prog; ac_word=$2
9639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640$as_echo_n "checking for $ac_word... " >&6; }
9641if ${ac_cv_path_RMDIR+:} false; then :
9642  $as_echo_n "(cached) " >&6
9643else
9644  case $RMDIR in
9645  [\\/]* | ?:[\\/]*)
9646  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9647  ;;
9648  *)
9649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9650for as_dir in $PATH
9651do
9652  IFS=$as_save_IFS
9653  test -z "$as_dir" && as_dir=.
9654    for ac_exec_ext in '' $ac_executable_extensions; do
9655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9656    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9658    break 2
9659  fi
9660done
9661  done
9662IFS=$as_save_IFS
9663
9664  ;;
9665esac
9666fi
9667RMDIR=$ac_cv_path_RMDIR
9668if test -n "$RMDIR"; then
9669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9670$as_echo "$RMDIR" >&6; }
9671else
9672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673$as_echo "no" >&6; }
9674fi
9675
9676
9677  test -n "$RMDIR" && break
9678done
9679
9680  else
9681    # The variable is set, but is it from the command line or the environment?
9682
9683    # Try to remove the string !RMDIR! from our list.
9684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9686      # If it failed, the variable was not from the command line. Ignore it,
9687      # but warn the user (except for BASH, which is always set by the calling BASH).
9688      if test "xRMDIR" != xBASH; then
9689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9690$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9691      fi
9692      # Try to locate tool using the code snippet
9693      for ac_prog in rmdir
9694do
9695  # Extract the first word of "$ac_prog", so it can be a program name with args.
9696set dummy $ac_prog; ac_word=$2
9697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698$as_echo_n "checking for $ac_word... " >&6; }
9699if ${ac_cv_path_RMDIR+:} false; then :
9700  $as_echo_n "(cached) " >&6
9701else
9702  case $RMDIR in
9703  [\\/]* | ?:[\\/]*)
9704  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9705  ;;
9706  *)
9707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708for as_dir in $PATH
9709do
9710  IFS=$as_save_IFS
9711  test -z "$as_dir" && as_dir=.
9712    for ac_exec_ext in '' $ac_executable_extensions; do
9713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9716    break 2
9717  fi
9718done
9719  done
9720IFS=$as_save_IFS
9721
9722  ;;
9723esac
9724fi
9725RMDIR=$ac_cv_path_RMDIR
9726if test -n "$RMDIR"; then
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9728$as_echo "$RMDIR" >&6; }
9729else
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
9732fi
9733
9734
9735  test -n "$RMDIR" && break
9736done
9737
9738    else
9739      # If it succeeded, then it was overridden by the user. We will use it
9740      # for the tool.
9741
9742      # First remove it from the list of overridden variables, so we can test
9743      # for unknown variables in the end.
9744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9745
9746      # Check if we try to supply an empty value
9747      if test "x$RMDIR" = x; then
9748        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9749$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9751$as_echo_n "checking for RMDIR... " >&6; }
9752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9753$as_echo "disabled" >&6; }
9754      else
9755        # Check if the provided tool contains a complete path.
9756        tool_specified="$RMDIR"
9757        tool_basename="${tool_specified##*/}"
9758        if test "x$tool_basename" = "x$tool_specified"; then
9759          # A command without a complete path is provided, search $PATH.
9760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9761$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9762          # Extract the first word of "$tool_basename", so it can be a program name with args.
9763set dummy $tool_basename; ac_word=$2
9764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9765$as_echo_n "checking for $ac_word... " >&6; }
9766if ${ac_cv_path_RMDIR+:} false; then :
9767  $as_echo_n "(cached) " >&6
9768else
9769  case $RMDIR in
9770  [\\/]* | ?:[\\/]*)
9771  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9772  ;;
9773  *)
9774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9775for as_dir in $PATH
9776do
9777  IFS=$as_save_IFS
9778  test -z "$as_dir" && as_dir=.
9779    for ac_exec_ext in '' $ac_executable_extensions; do
9780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9781    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9783    break 2
9784  fi
9785done
9786  done
9787IFS=$as_save_IFS
9788
9789  ;;
9790esac
9791fi
9792RMDIR=$ac_cv_path_RMDIR
9793if test -n "$RMDIR"; then
9794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9795$as_echo "$RMDIR" >&6; }
9796else
9797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9798$as_echo "no" >&6; }
9799fi
9800
9801
9802          if test "x$RMDIR" = x; then
9803            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9804          fi
9805        else
9806          # Otherwise we believe it is a complete path. Use it as it is.
9807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9808$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9809          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9810$as_echo_n "checking for RMDIR... " >&6; }
9811          if test ! -x "$tool_specified"; then
9812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9813$as_echo "not found" >&6; }
9814            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9815          fi
9816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9817$as_echo "$tool_specified" >&6; }
9818        fi
9819      fi
9820    fi
9821
9822  fi
9823
9824
9825
9826  if test "x$RMDIR" = x; then
9827    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9828  fi
9829
9830
9831
9832
9833
9834  # Publish this variable in the help.
9835
9836
9837  if [ -z "${SH+x}" ]; then
9838    # The variable is not set by user, try to locate tool using the code snippet
9839    for ac_prog in sh
9840do
9841  # Extract the first word of "$ac_prog", so it can be a program name with args.
9842set dummy $ac_prog; ac_word=$2
9843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9844$as_echo_n "checking for $ac_word... " >&6; }
9845if ${ac_cv_path_SH+:} false; then :
9846  $as_echo_n "(cached) " >&6
9847else
9848  case $SH in
9849  [\\/]* | ?:[\\/]*)
9850  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9851  ;;
9852  *)
9853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9854for as_dir in $PATH
9855do
9856  IFS=$as_save_IFS
9857  test -z "$as_dir" && as_dir=.
9858    for ac_exec_ext in '' $ac_executable_extensions; do
9859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9860    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9862    break 2
9863  fi
9864done
9865  done
9866IFS=$as_save_IFS
9867
9868  ;;
9869esac
9870fi
9871SH=$ac_cv_path_SH
9872if test -n "$SH"; then
9873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9874$as_echo "$SH" >&6; }
9875else
9876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9877$as_echo "no" >&6; }
9878fi
9879
9880
9881  test -n "$SH" && break
9882done
9883
9884  else
9885    # The variable is set, but is it from the command line or the environment?
9886
9887    # Try to remove the string !SH! from our list.
9888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9890      # If it failed, the variable was not from the command line. Ignore it,
9891      # but warn the user (except for BASH, which is always set by the calling BASH).
9892      if test "xSH" != xBASH; then
9893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9894$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9895      fi
9896      # Try to locate tool using the code snippet
9897      for ac_prog in sh
9898do
9899  # Extract the first word of "$ac_prog", so it can be a program name with args.
9900set dummy $ac_prog; ac_word=$2
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9902$as_echo_n "checking for $ac_word... " >&6; }
9903if ${ac_cv_path_SH+:} false; then :
9904  $as_echo_n "(cached) " >&6
9905else
9906  case $SH in
9907  [\\/]* | ?:[\\/]*)
9908  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9909  ;;
9910  *)
9911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912for as_dir in $PATH
9913do
9914  IFS=$as_save_IFS
9915  test -z "$as_dir" && as_dir=.
9916    for ac_exec_ext in '' $ac_executable_extensions; do
9917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9918    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9920    break 2
9921  fi
9922done
9923  done
9924IFS=$as_save_IFS
9925
9926  ;;
9927esac
9928fi
9929SH=$ac_cv_path_SH
9930if test -n "$SH"; then
9931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9932$as_echo "$SH" >&6; }
9933else
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9935$as_echo "no" >&6; }
9936fi
9937
9938
9939  test -n "$SH" && break
9940done
9941
9942    else
9943      # If it succeeded, then it was overridden by the user. We will use it
9944      # for the tool.
9945
9946      # First remove it from the list of overridden variables, so we can test
9947      # for unknown variables in the end.
9948      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9949
9950      # Check if we try to supply an empty value
9951      if test "x$SH" = x; then
9952        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9953$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9954        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9955$as_echo_n "checking for SH... " >&6; }
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9957$as_echo "disabled" >&6; }
9958      else
9959        # Check if the provided tool contains a complete path.
9960        tool_specified="$SH"
9961        tool_basename="${tool_specified##*/}"
9962        if test "x$tool_basename" = "x$tool_specified"; then
9963          # A command without a complete path is provided, search $PATH.
9964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9965$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9966          # Extract the first word of "$tool_basename", so it can be a program name with args.
9967set dummy $tool_basename; ac_word=$2
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9969$as_echo_n "checking for $ac_word... " >&6; }
9970if ${ac_cv_path_SH+:} false; then :
9971  $as_echo_n "(cached) " >&6
9972else
9973  case $SH in
9974  [\\/]* | ?:[\\/]*)
9975  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9976  ;;
9977  *)
9978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9979for as_dir in $PATH
9980do
9981  IFS=$as_save_IFS
9982  test -z "$as_dir" && as_dir=.
9983    for ac_exec_ext in '' $ac_executable_extensions; do
9984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9985    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9987    break 2
9988  fi
9989done
9990  done
9991IFS=$as_save_IFS
9992
9993  ;;
9994esac
9995fi
9996SH=$ac_cv_path_SH
9997if test -n "$SH"; then
9998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9999$as_echo "$SH" >&6; }
10000else
10001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10002$as_echo "no" >&6; }
10003fi
10004
10005
10006          if test "x$SH" = x; then
10007            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10008          fi
10009        else
10010          # Otherwise we believe it is a complete path. Use it as it is.
10011          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10012$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10013          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10014$as_echo_n "checking for SH... " >&6; }
10015          if test ! -x "$tool_specified"; then
10016            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10017$as_echo "not found" >&6; }
10018            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10019          fi
10020          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10021$as_echo "$tool_specified" >&6; }
10022        fi
10023      fi
10024    fi
10025
10026  fi
10027
10028
10029
10030  if test "x$SH" = x; then
10031    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10032  fi
10033
10034
10035
10036
10037
10038  # Publish this variable in the help.
10039
10040
10041  if [ -z "${SORT+x}" ]; then
10042    # The variable is not set by user, try to locate tool using the code snippet
10043    for ac_prog in sort
10044do
10045  # Extract the first word of "$ac_prog", so it can be a program name with args.
10046set dummy $ac_prog; ac_word=$2
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048$as_echo_n "checking for $ac_word... " >&6; }
10049if ${ac_cv_path_SORT+:} false; then :
10050  $as_echo_n "(cached) " >&6
10051else
10052  case $SORT in
10053  [\\/]* | ?:[\\/]*)
10054  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10055  ;;
10056  *)
10057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058for as_dir in $PATH
10059do
10060  IFS=$as_save_IFS
10061  test -z "$as_dir" && as_dir=.
10062    for ac_exec_ext in '' $ac_executable_extensions; do
10063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10064    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066    break 2
10067  fi
10068done
10069  done
10070IFS=$as_save_IFS
10071
10072  ;;
10073esac
10074fi
10075SORT=$ac_cv_path_SORT
10076if test -n "$SORT"; then
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10078$as_echo "$SORT" >&6; }
10079else
10080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
10082fi
10083
10084
10085  test -n "$SORT" && break
10086done
10087
10088  else
10089    # The variable is set, but is it from the command line or the environment?
10090
10091    # Try to remove the string !SORT! from our list.
10092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10094      # If it failed, the variable was not from the command line. Ignore it,
10095      # but warn the user (except for BASH, which is always set by the calling BASH).
10096      if test "xSORT" != xBASH; then
10097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10098$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10099      fi
10100      # Try to locate tool using the code snippet
10101      for ac_prog in sort
10102do
10103  # Extract the first word of "$ac_prog", so it can be a program name with args.
10104set dummy $ac_prog; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if ${ac_cv_path_SORT+:} false; then :
10108  $as_echo_n "(cached) " >&6
10109else
10110  case $SORT in
10111  [\\/]* | ?:[\\/]*)
10112  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10113  ;;
10114  *)
10115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118  IFS=$as_save_IFS
10119  test -z "$as_dir" && as_dir=.
10120    for ac_exec_ext in '' $ac_executable_extensions; do
10121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124    break 2
10125  fi
10126done
10127  done
10128IFS=$as_save_IFS
10129
10130  ;;
10131esac
10132fi
10133SORT=$ac_cv_path_SORT
10134if test -n "$SORT"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10136$as_echo "$SORT" >&6; }
10137else
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
10143  test -n "$SORT" && break
10144done
10145
10146    else
10147      # If it succeeded, then it was overridden by the user. We will use it
10148      # for the tool.
10149
10150      # First remove it from the list of overridden variables, so we can test
10151      # for unknown variables in the end.
10152      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10153
10154      # Check if we try to supply an empty value
10155      if test "x$SORT" = x; then
10156        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10157$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10159$as_echo_n "checking for SORT... " >&6; }
10160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10161$as_echo "disabled" >&6; }
10162      else
10163        # Check if the provided tool contains a complete path.
10164        tool_specified="$SORT"
10165        tool_basename="${tool_specified##*/}"
10166        if test "x$tool_basename" = "x$tool_specified"; then
10167          # A command without a complete path is provided, search $PATH.
10168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10169$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10170          # Extract the first word of "$tool_basename", so it can be a program name with args.
10171set dummy $tool_basename; ac_word=$2
10172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10173$as_echo_n "checking for $ac_word... " >&6; }
10174if ${ac_cv_path_SORT+:} false; then :
10175  $as_echo_n "(cached) " >&6
10176else
10177  case $SORT in
10178  [\\/]* | ?:[\\/]*)
10179  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10180  ;;
10181  *)
10182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10183for as_dir in $PATH
10184do
10185  IFS=$as_save_IFS
10186  test -z "$as_dir" && as_dir=.
10187    for ac_exec_ext in '' $ac_executable_extensions; do
10188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10189    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10191    break 2
10192  fi
10193done
10194  done
10195IFS=$as_save_IFS
10196
10197  ;;
10198esac
10199fi
10200SORT=$ac_cv_path_SORT
10201if test -n "$SORT"; then
10202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10203$as_echo "$SORT" >&6; }
10204else
10205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206$as_echo "no" >&6; }
10207fi
10208
10209
10210          if test "x$SORT" = x; then
10211            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10212          fi
10213        else
10214          # Otherwise we believe it is a complete path. Use it as it is.
10215          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10216$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10217          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10218$as_echo_n "checking for SORT... " >&6; }
10219          if test ! -x "$tool_specified"; then
10220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10221$as_echo "not found" >&6; }
10222            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10223          fi
10224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10225$as_echo "$tool_specified" >&6; }
10226        fi
10227      fi
10228    fi
10229
10230  fi
10231
10232
10233
10234  if test "x$SORT" = x; then
10235    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10236  fi
10237
10238
10239
10240
10241
10242  # Publish this variable in the help.
10243
10244
10245  if [ -z "${TAIL+x}" ]; then
10246    # The variable is not set by user, try to locate tool using the code snippet
10247    for ac_prog in tail
10248do
10249  # Extract the first word of "$ac_prog", so it can be a program name with args.
10250set dummy $ac_prog; ac_word=$2
10251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10252$as_echo_n "checking for $ac_word... " >&6; }
10253if ${ac_cv_path_TAIL+:} false; then :
10254  $as_echo_n "(cached) " >&6
10255else
10256  case $TAIL in
10257  [\\/]* | ?:[\\/]*)
10258  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10259  ;;
10260  *)
10261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10262for as_dir in $PATH
10263do
10264  IFS=$as_save_IFS
10265  test -z "$as_dir" && as_dir=.
10266    for ac_exec_ext in '' $ac_executable_extensions; do
10267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10268    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10270    break 2
10271  fi
10272done
10273  done
10274IFS=$as_save_IFS
10275
10276  ;;
10277esac
10278fi
10279TAIL=$ac_cv_path_TAIL
10280if test -n "$TAIL"; then
10281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10282$as_echo "$TAIL" >&6; }
10283else
10284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10285$as_echo "no" >&6; }
10286fi
10287
10288
10289  test -n "$TAIL" && break
10290done
10291
10292  else
10293    # The variable is set, but is it from the command line or the environment?
10294
10295    # Try to remove the string !TAIL! from our list.
10296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10298      # If it failed, the variable was not from the command line. Ignore it,
10299      # but warn the user (except for BASH, which is always set by the calling BASH).
10300      if test "xTAIL" != xBASH; then
10301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10302$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10303      fi
10304      # Try to locate tool using the code snippet
10305      for ac_prog in tail
10306do
10307  # Extract the first word of "$ac_prog", so it can be a program name with args.
10308set dummy $ac_prog; ac_word=$2
10309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10310$as_echo_n "checking for $ac_word... " >&6; }
10311if ${ac_cv_path_TAIL+:} false; then :
10312  $as_echo_n "(cached) " >&6
10313else
10314  case $TAIL in
10315  [\\/]* | ?:[\\/]*)
10316  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10317  ;;
10318  *)
10319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10320for as_dir in $PATH
10321do
10322  IFS=$as_save_IFS
10323  test -z "$as_dir" && as_dir=.
10324    for ac_exec_ext in '' $ac_executable_extensions; do
10325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10326    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10328    break 2
10329  fi
10330done
10331  done
10332IFS=$as_save_IFS
10333
10334  ;;
10335esac
10336fi
10337TAIL=$ac_cv_path_TAIL
10338if test -n "$TAIL"; then
10339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10340$as_echo "$TAIL" >&6; }
10341else
10342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10343$as_echo "no" >&6; }
10344fi
10345
10346
10347  test -n "$TAIL" && break
10348done
10349
10350    else
10351      # If it succeeded, then it was overridden by the user. We will use it
10352      # for the tool.
10353
10354      # First remove it from the list of overridden variables, so we can test
10355      # for unknown variables in the end.
10356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10357
10358      # Check if we try to supply an empty value
10359      if test "x$TAIL" = x; then
10360        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10361$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10363$as_echo_n "checking for TAIL... " >&6; }
10364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10365$as_echo "disabled" >&6; }
10366      else
10367        # Check if the provided tool contains a complete path.
10368        tool_specified="$TAIL"
10369        tool_basename="${tool_specified##*/}"
10370        if test "x$tool_basename" = "x$tool_specified"; then
10371          # A command without a complete path is provided, search $PATH.
10372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10373$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10374          # Extract the first word of "$tool_basename", so it can be a program name with args.
10375set dummy $tool_basename; ac_word=$2
10376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10377$as_echo_n "checking for $ac_word... " >&6; }
10378if ${ac_cv_path_TAIL+:} false; then :
10379  $as_echo_n "(cached) " >&6
10380else
10381  case $TAIL in
10382  [\\/]* | ?:[\\/]*)
10383  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10384  ;;
10385  *)
10386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10387for as_dir in $PATH
10388do
10389  IFS=$as_save_IFS
10390  test -z "$as_dir" && as_dir=.
10391    for ac_exec_ext in '' $ac_executable_extensions; do
10392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10393    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10395    break 2
10396  fi
10397done
10398  done
10399IFS=$as_save_IFS
10400
10401  ;;
10402esac
10403fi
10404TAIL=$ac_cv_path_TAIL
10405if test -n "$TAIL"; then
10406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10407$as_echo "$TAIL" >&6; }
10408else
10409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10410$as_echo "no" >&6; }
10411fi
10412
10413
10414          if test "x$TAIL" = x; then
10415            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10416          fi
10417        else
10418          # Otherwise we believe it is a complete path. Use it as it is.
10419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10420$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10422$as_echo_n "checking for TAIL... " >&6; }
10423          if test ! -x "$tool_specified"; then
10424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10425$as_echo "not found" >&6; }
10426            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10427          fi
10428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10429$as_echo "$tool_specified" >&6; }
10430        fi
10431      fi
10432    fi
10433
10434  fi
10435
10436
10437
10438  if test "x$TAIL" = x; then
10439    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10440  fi
10441
10442
10443
10444
10445
10446  # Publish this variable in the help.
10447
10448
10449  if [ -z "${TAR+x}" ]; then
10450    # The variable is not set by user, try to locate tool using the code snippet
10451    for ac_prog in tar
10452do
10453  # Extract the first word of "$ac_prog", so it can be a program name with args.
10454set dummy $ac_prog; ac_word=$2
10455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10456$as_echo_n "checking for $ac_word... " >&6; }
10457if ${ac_cv_path_TAR+:} false; then :
10458  $as_echo_n "(cached) " >&6
10459else
10460  case $TAR in
10461  [\\/]* | ?:[\\/]*)
10462  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10463  ;;
10464  *)
10465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10466for as_dir in $PATH
10467do
10468  IFS=$as_save_IFS
10469  test -z "$as_dir" && as_dir=.
10470    for ac_exec_ext in '' $ac_executable_extensions; do
10471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10472    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10474    break 2
10475  fi
10476done
10477  done
10478IFS=$as_save_IFS
10479
10480  ;;
10481esac
10482fi
10483TAR=$ac_cv_path_TAR
10484if test -n "$TAR"; then
10485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10486$as_echo "$TAR" >&6; }
10487else
10488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10489$as_echo "no" >&6; }
10490fi
10491
10492
10493  test -n "$TAR" && break
10494done
10495
10496  else
10497    # The variable is set, but is it from the command line or the environment?
10498
10499    # Try to remove the string !TAR! from our list.
10500    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10501    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10502      # If it failed, the variable was not from the command line. Ignore it,
10503      # but warn the user (except for BASH, which is always set by the calling BASH).
10504      if test "xTAR" != xBASH; then
10505        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10506$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10507      fi
10508      # Try to locate tool using the code snippet
10509      for ac_prog in tar
10510do
10511  # Extract the first word of "$ac_prog", so it can be a program name with args.
10512set dummy $ac_prog; ac_word=$2
10513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10514$as_echo_n "checking for $ac_word... " >&6; }
10515if ${ac_cv_path_TAR+:} false; then :
10516  $as_echo_n "(cached) " >&6
10517else
10518  case $TAR in
10519  [\\/]* | ?:[\\/]*)
10520  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10521  ;;
10522  *)
10523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10524for as_dir in $PATH
10525do
10526  IFS=$as_save_IFS
10527  test -z "$as_dir" && as_dir=.
10528    for ac_exec_ext in '' $ac_executable_extensions; do
10529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10530    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10532    break 2
10533  fi
10534done
10535  done
10536IFS=$as_save_IFS
10537
10538  ;;
10539esac
10540fi
10541TAR=$ac_cv_path_TAR
10542if test -n "$TAR"; then
10543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10544$as_echo "$TAR" >&6; }
10545else
10546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547$as_echo "no" >&6; }
10548fi
10549
10550
10551  test -n "$TAR" && break
10552done
10553
10554    else
10555      # If it succeeded, then it was overridden by the user. We will use it
10556      # for the tool.
10557
10558      # First remove it from the list of overridden variables, so we can test
10559      # for unknown variables in the end.
10560      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10561
10562      # Check if we try to supply an empty value
10563      if test "x$TAR" = x; then
10564        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10565$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10567$as_echo_n "checking for TAR... " >&6; }
10568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10569$as_echo "disabled" >&6; }
10570      else
10571        # Check if the provided tool contains a complete path.
10572        tool_specified="$TAR"
10573        tool_basename="${tool_specified##*/}"
10574        if test "x$tool_basename" = "x$tool_specified"; then
10575          # A command without a complete path is provided, search $PATH.
10576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10577$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10578          # Extract the first word of "$tool_basename", so it can be a program name with args.
10579set dummy $tool_basename; ac_word=$2
10580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10581$as_echo_n "checking for $ac_word... " >&6; }
10582if ${ac_cv_path_TAR+:} false; then :
10583  $as_echo_n "(cached) " >&6
10584else
10585  case $TAR in
10586  [\\/]* | ?:[\\/]*)
10587  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10588  ;;
10589  *)
10590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10591for as_dir in $PATH
10592do
10593  IFS=$as_save_IFS
10594  test -z "$as_dir" && as_dir=.
10595    for ac_exec_ext in '' $ac_executable_extensions; do
10596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10597    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10599    break 2
10600  fi
10601done
10602  done
10603IFS=$as_save_IFS
10604
10605  ;;
10606esac
10607fi
10608TAR=$ac_cv_path_TAR
10609if test -n "$TAR"; then
10610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10611$as_echo "$TAR" >&6; }
10612else
10613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10614$as_echo "no" >&6; }
10615fi
10616
10617
10618          if test "x$TAR" = x; then
10619            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10620          fi
10621        else
10622          # Otherwise we believe it is a complete path. Use it as it is.
10623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10624$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10625          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10626$as_echo_n "checking for TAR... " >&6; }
10627          if test ! -x "$tool_specified"; then
10628            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10629$as_echo "not found" >&6; }
10630            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10631          fi
10632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10633$as_echo "$tool_specified" >&6; }
10634        fi
10635      fi
10636    fi
10637
10638  fi
10639
10640
10641
10642  if test "x$TAR" = x; then
10643    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10644  fi
10645
10646
10647
10648
10649
10650  # Publish this variable in the help.
10651
10652
10653  if [ -z "${TEE+x}" ]; then
10654    # The variable is not set by user, try to locate tool using the code snippet
10655    for ac_prog in tee
10656do
10657  # Extract the first word of "$ac_prog", so it can be a program name with args.
10658set dummy $ac_prog; ac_word=$2
10659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10660$as_echo_n "checking for $ac_word... " >&6; }
10661if ${ac_cv_path_TEE+:} false; then :
10662  $as_echo_n "(cached) " >&6
10663else
10664  case $TEE in
10665  [\\/]* | ?:[\\/]*)
10666  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10667  ;;
10668  *)
10669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10670for as_dir in $PATH
10671do
10672  IFS=$as_save_IFS
10673  test -z "$as_dir" && as_dir=.
10674    for ac_exec_ext in '' $ac_executable_extensions; do
10675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10676    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10678    break 2
10679  fi
10680done
10681  done
10682IFS=$as_save_IFS
10683
10684  ;;
10685esac
10686fi
10687TEE=$ac_cv_path_TEE
10688if test -n "$TEE"; then
10689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10690$as_echo "$TEE" >&6; }
10691else
10692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10693$as_echo "no" >&6; }
10694fi
10695
10696
10697  test -n "$TEE" && break
10698done
10699
10700  else
10701    # The variable is set, but is it from the command line or the environment?
10702
10703    # Try to remove the string !TEE! from our list.
10704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10706      # If it failed, the variable was not from the command line. Ignore it,
10707      # but warn the user (except for BASH, which is always set by the calling BASH).
10708      if test "xTEE" != xBASH; then
10709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10710$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10711      fi
10712      # Try to locate tool using the code snippet
10713      for ac_prog in tee
10714do
10715  # Extract the first word of "$ac_prog", so it can be a program name with args.
10716set dummy $ac_prog; ac_word=$2
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10718$as_echo_n "checking for $ac_word... " >&6; }
10719if ${ac_cv_path_TEE+:} false; then :
10720  $as_echo_n "(cached) " >&6
10721else
10722  case $TEE in
10723  [\\/]* | ?:[\\/]*)
10724  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10725  ;;
10726  *)
10727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10728for as_dir in $PATH
10729do
10730  IFS=$as_save_IFS
10731  test -z "$as_dir" && as_dir=.
10732    for ac_exec_ext in '' $ac_executable_extensions; do
10733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10734    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10736    break 2
10737  fi
10738done
10739  done
10740IFS=$as_save_IFS
10741
10742  ;;
10743esac
10744fi
10745TEE=$ac_cv_path_TEE
10746if test -n "$TEE"; then
10747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10748$as_echo "$TEE" >&6; }
10749else
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751$as_echo "no" >&6; }
10752fi
10753
10754
10755  test -n "$TEE" && break
10756done
10757
10758    else
10759      # If it succeeded, then it was overridden by the user. We will use it
10760      # for the tool.
10761
10762      # First remove it from the list of overridden variables, so we can test
10763      # for unknown variables in the end.
10764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10765
10766      # Check if we try to supply an empty value
10767      if test "x$TEE" = x; then
10768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10769$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10771$as_echo_n "checking for TEE... " >&6; }
10772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10773$as_echo "disabled" >&6; }
10774      else
10775        # Check if the provided tool contains a complete path.
10776        tool_specified="$TEE"
10777        tool_basename="${tool_specified##*/}"
10778        if test "x$tool_basename" = "x$tool_specified"; then
10779          # A command without a complete path is provided, search $PATH.
10780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10781$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10782          # Extract the first word of "$tool_basename", so it can be a program name with args.
10783set dummy $tool_basename; ac_word=$2
10784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10785$as_echo_n "checking for $ac_word... " >&6; }
10786if ${ac_cv_path_TEE+:} false; then :
10787  $as_echo_n "(cached) " >&6
10788else
10789  case $TEE in
10790  [\\/]* | ?:[\\/]*)
10791  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10792  ;;
10793  *)
10794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10795for as_dir in $PATH
10796do
10797  IFS=$as_save_IFS
10798  test -z "$as_dir" && as_dir=.
10799    for ac_exec_ext in '' $ac_executable_extensions; do
10800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10801    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10803    break 2
10804  fi
10805done
10806  done
10807IFS=$as_save_IFS
10808
10809  ;;
10810esac
10811fi
10812TEE=$ac_cv_path_TEE
10813if test -n "$TEE"; then
10814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10815$as_echo "$TEE" >&6; }
10816else
10817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818$as_echo "no" >&6; }
10819fi
10820
10821
10822          if test "x$TEE" = x; then
10823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10824          fi
10825        else
10826          # Otherwise we believe it is a complete path. Use it as it is.
10827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10828$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10830$as_echo_n "checking for TEE... " >&6; }
10831          if test ! -x "$tool_specified"; then
10832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10833$as_echo "not found" >&6; }
10834            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10835          fi
10836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10837$as_echo "$tool_specified" >&6; }
10838        fi
10839      fi
10840    fi
10841
10842  fi
10843
10844
10845
10846  if test "x$TEE" = x; then
10847    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10848  fi
10849
10850
10851
10852
10853
10854  # Publish this variable in the help.
10855
10856
10857  if [ -z "${TOUCH+x}" ]; then
10858    # The variable is not set by user, try to locate tool using the code snippet
10859    for ac_prog in touch
10860do
10861  # Extract the first word of "$ac_prog", so it can be a program name with args.
10862set dummy $ac_prog; ac_word=$2
10863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10864$as_echo_n "checking for $ac_word... " >&6; }
10865if ${ac_cv_path_TOUCH+:} false; then :
10866  $as_echo_n "(cached) " >&6
10867else
10868  case $TOUCH in
10869  [\\/]* | ?:[\\/]*)
10870  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10871  ;;
10872  *)
10873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10874for as_dir in $PATH
10875do
10876  IFS=$as_save_IFS
10877  test -z "$as_dir" && as_dir=.
10878    for ac_exec_ext in '' $ac_executable_extensions; do
10879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10880    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10882    break 2
10883  fi
10884done
10885  done
10886IFS=$as_save_IFS
10887
10888  ;;
10889esac
10890fi
10891TOUCH=$ac_cv_path_TOUCH
10892if test -n "$TOUCH"; then
10893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10894$as_echo "$TOUCH" >&6; }
10895else
10896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10897$as_echo "no" >&6; }
10898fi
10899
10900
10901  test -n "$TOUCH" && break
10902done
10903
10904  else
10905    # The variable is set, but is it from the command line or the environment?
10906
10907    # Try to remove the string !TOUCH! from our list.
10908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10910      # If it failed, the variable was not from the command line. Ignore it,
10911      # but warn the user (except for BASH, which is always set by the calling BASH).
10912      if test "xTOUCH" != xBASH; then
10913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10914$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10915      fi
10916      # Try to locate tool using the code snippet
10917      for ac_prog in touch
10918do
10919  # Extract the first word of "$ac_prog", so it can be a program name with args.
10920set dummy $ac_prog; ac_word=$2
10921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10922$as_echo_n "checking for $ac_word... " >&6; }
10923if ${ac_cv_path_TOUCH+:} false; then :
10924  $as_echo_n "(cached) " >&6
10925else
10926  case $TOUCH in
10927  [\\/]* | ?:[\\/]*)
10928  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10929  ;;
10930  *)
10931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10932for as_dir in $PATH
10933do
10934  IFS=$as_save_IFS
10935  test -z "$as_dir" && as_dir=.
10936    for ac_exec_ext in '' $ac_executable_extensions; do
10937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10938    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10940    break 2
10941  fi
10942done
10943  done
10944IFS=$as_save_IFS
10945
10946  ;;
10947esac
10948fi
10949TOUCH=$ac_cv_path_TOUCH
10950if test -n "$TOUCH"; then
10951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10952$as_echo "$TOUCH" >&6; }
10953else
10954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
10956fi
10957
10958
10959  test -n "$TOUCH" && break
10960done
10961
10962    else
10963      # If it succeeded, then it was overridden by the user. We will use it
10964      # for the tool.
10965
10966      # First remove it from the list of overridden variables, so we can test
10967      # for unknown variables in the end.
10968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10969
10970      # Check if we try to supply an empty value
10971      if test "x$TOUCH" = x; then
10972        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10973$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10975$as_echo_n "checking for TOUCH... " >&6; }
10976        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10977$as_echo "disabled" >&6; }
10978      else
10979        # Check if the provided tool contains a complete path.
10980        tool_specified="$TOUCH"
10981        tool_basename="${tool_specified##*/}"
10982        if test "x$tool_basename" = "x$tool_specified"; then
10983          # A command without a complete path is provided, search $PATH.
10984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10985$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10986          # Extract the first word of "$tool_basename", so it can be a program name with args.
10987set dummy $tool_basename; ac_word=$2
10988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10989$as_echo_n "checking for $ac_word... " >&6; }
10990if ${ac_cv_path_TOUCH+:} false; then :
10991  $as_echo_n "(cached) " >&6
10992else
10993  case $TOUCH in
10994  [\\/]* | ?:[\\/]*)
10995  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10996  ;;
10997  *)
10998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10999for as_dir in $PATH
11000do
11001  IFS=$as_save_IFS
11002  test -z "$as_dir" && as_dir=.
11003    for ac_exec_ext in '' $ac_executable_extensions; do
11004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11005    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11007    break 2
11008  fi
11009done
11010  done
11011IFS=$as_save_IFS
11012
11013  ;;
11014esac
11015fi
11016TOUCH=$ac_cv_path_TOUCH
11017if test -n "$TOUCH"; then
11018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11019$as_echo "$TOUCH" >&6; }
11020else
11021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022$as_echo "no" >&6; }
11023fi
11024
11025
11026          if test "x$TOUCH" = x; then
11027            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11028          fi
11029        else
11030          # Otherwise we believe it is a complete path. Use it as it is.
11031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11032$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11033          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11034$as_echo_n "checking for TOUCH... " >&6; }
11035          if test ! -x "$tool_specified"; then
11036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11037$as_echo "not found" >&6; }
11038            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11039          fi
11040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11041$as_echo "$tool_specified" >&6; }
11042        fi
11043      fi
11044    fi
11045
11046  fi
11047
11048
11049
11050  if test "x$TOUCH" = x; then
11051    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11052  fi
11053
11054
11055
11056
11057
11058  # Publish this variable in the help.
11059
11060
11061  if [ -z "${TR+x}" ]; then
11062    # The variable is not set by user, try to locate tool using the code snippet
11063    for ac_prog in tr
11064do
11065  # Extract the first word of "$ac_prog", so it can be a program name with args.
11066set dummy $ac_prog; ac_word=$2
11067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11068$as_echo_n "checking for $ac_word... " >&6; }
11069if ${ac_cv_path_TR+:} false; then :
11070  $as_echo_n "(cached) " >&6
11071else
11072  case $TR in
11073  [\\/]* | ?:[\\/]*)
11074  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11075  ;;
11076  *)
11077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11078for as_dir in $PATH
11079do
11080  IFS=$as_save_IFS
11081  test -z "$as_dir" && as_dir=.
11082    for ac_exec_ext in '' $ac_executable_extensions; do
11083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11084    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11086    break 2
11087  fi
11088done
11089  done
11090IFS=$as_save_IFS
11091
11092  ;;
11093esac
11094fi
11095TR=$ac_cv_path_TR
11096if test -n "$TR"; then
11097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11098$as_echo "$TR" >&6; }
11099else
11100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11101$as_echo "no" >&6; }
11102fi
11103
11104
11105  test -n "$TR" && break
11106done
11107
11108  else
11109    # The variable is set, but is it from the command line or the environment?
11110
11111    # Try to remove the string !TR! from our list.
11112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11114      # If it failed, the variable was not from the command line. Ignore it,
11115      # but warn the user (except for BASH, which is always set by the calling BASH).
11116      if test "xTR" != xBASH; then
11117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11118$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11119      fi
11120      # Try to locate tool using the code snippet
11121      for ac_prog in tr
11122do
11123  # Extract the first word of "$ac_prog", so it can be a program name with args.
11124set dummy $ac_prog; ac_word=$2
11125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11126$as_echo_n "checking for $ac_word... " >&6; }
11127if ${ac_cv_path_TR+:} false; then :
11128  $as_echo_n "(cached) " >&6
11129else
11130  case $TR in
11131  [\\/]* | ?:[\\/]*)
11132  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11133  ;;
11134  *)
11135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11136for as_dir in $PATH
11137do
11138  IFS=$as_save_IFS
11139  test -z "$as_dir" && as_dir=.
11140    for ac_exec_ext in '' $ac_executable_extensions; do
11141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11142    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11144    break 2
11145  fi
11146done
11147  done
11148IFS=$as_save_IFS
11149
11150  ;;
11151esac
11152fi
11153TR=$ac_cv_path_TR
11154if test -n "$TR"; then
11155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11156$as_echo "$TR" >&6; }
11157else
11158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11159$as_echo "no" >&6; }
11160fi
11161
11162
11163  test -n "$TR" && break
11164done
11165
11166    else
11167      # If it succeeded, then it was overridden by the user. We will use it
11168      # for the tool.
11169
11170      # First remove it from the list of overridden variables, so we can test
11171      # for unknown variables in the end.
11172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11173
11174      # Check if we try to supply an empty value
11175      if test "x$TR" = x; then
11176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11177$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11179$as_echo_n "checking for TR... " >&6; }
11180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11181$as_echo "disabled" >&6; }
11182      else
11183        # Check if the provided tool contains a complete path.
11184        tool_specified="$TR"
11185        tool_basename="${tool_specified##*/}"
11186        if test "x$tool_basename" = "x$tool_specified"; then
11187          # A command without a complete path is provided, search $PATH.
11188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11189$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11190          # Extract the first word of "$tool_basename", so it can be a program name with args.
11191set dummy $tool_basename; ac_word=$2
11192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11193$as_echo_n "checking for $ac_word... " >&6; }
11194if ${ac_cv_path_TR+:} false; then :
11195  $as_echo_n "(cached) " >&6
11196else
11197  case $TR in
11198  [\\/]* | ?:[\\/]*)
11199  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11200  ;;
11201  *)
11202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11203for as_dir in $PATH
11204do
11205  IFS=$as_save_IFS
11206  test -z "$as_dir" && as_dir=.
11207    for ac_exec_ext in '' $ac_executable_extensions; do
11208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11209    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11211    break 2
11212  fi
11213done
11214  done
11215IFS=$as_save_IFS
11216
11217  ;;
11218esac
11219fi
11220TR=$ac_cv_path_TR
11221if test -n "$TR"; then
11222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11223$as_echo "$TR" >&6; }
11224else
11225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11226$as_echo "no" >&6; }
11227fi
11228
11229
11230          if test "x$TR" = x; then
11231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11232          fi
11233        else
11234          # Otherwise we believe it is a complete path. Use it as it is.
11235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11236$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11238$as_echo_n "checking for TR... " >&6; }
11239          if test ! -x "$tool_specified"; then
11240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11241$as_echo "not found" >&6; }
11242            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11243          fi
11244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11245$as_echo "$tool_specified" >&6; }
11246        fi
11247      fi
11248    fi
11249
11250  fi
11251
11252
11253
11254  if test "x$TR" = x; then
11255    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11256  fi
11257
11258
11259
11260
11261
11262  # Publish this variable in the help.
11263
11264
11265  if [ -z "${UNAME+x}" ]; then
11266    # The variable is not set by user, try to locate tool using the code snippet
11267    for ac_prog in uname
11268do
11269  # Extract the first word of "$ac_prog", so it can be a program name with args.
11270set dummy $ac_prog; ac_word=$2
11271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11272$as_echo_n "checking for $ac_word... " >&6; }
11273if ${ac_cv_path_UNAME+:} false; then :
11274  $as_echo_n "(cached) " >&6
11275else
11276  case $UNAME in
11277  [\\/]* | ?:[\\/]*)
11278  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11279  ;;
11280  *)
11281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11282for as_dir in $PATH
11283do
11284  IFS=$as_save_IFS
11285  test -z "$as_dir" && as_dir=.
11286    for ac_exec_ext in '' $ac_executable_extensions; do
11287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11288    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11290    break 2
11291  fi
11292done
11293  done
11294IFS=$as_save_IFS
11295
11296  ;;
11297esac
11298fi
11299UNAME=$ac_cv_path_UNAME
11300if test -n "$UNAME"; then
11301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11302$as_echo "$UNAME" >&6; }
11303else
11304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
11306fi
11307
11308
11309  test -n "$UNAME" && break
11310done
11311
11312  else
11313    # The variable is set, but is it from the command line or the environment?
11314
11315    # Try to remove the string !UNAME! from our list.
11316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11318      # If it failed, the variable was not from the command line. Ignore it,
11319      # but warn the user (except for BASH, which is always set by the calling BASH).
11320      if test "xUNAME" != xBASH; then
11321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11322$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11323      fi
11324      # Try to locate tool using the code snippet
11325      for ac_prog in uname
11326do
11327  # Extract the first word of "$ac_prog", so it can be a program name with args.
11328set dummy $ac_prog; ac_word=$2
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11330$as_echo_n "checking for $ac_word... " >&6; }
11331if ${ac_cv_path_UNAME+:} false; then :
11332  $as_echo_n "(cached) " >&6
11333else
11334  case $UNAME in
11335  [\\/]* | ?:[\\/]*)
11336  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11337  ;;
11338  *)
11339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11340for as_dir in $PATH
11341do
11342  IFS=$as_save_IFS
11343  test -z "$as_dir" && as_dir=.
11344    for ac_exec_ext in '' $ac_executable_extensions; do
11345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11346    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11348    break 2
11349  fi
11350done
11351  done
11352IFS=$as_save_IFS
11353
11354  ;;
11355esac
11356fi
11357UNAME=$ac_cv_path_UNAME
11358if test -n "$UNAME"; then
11359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11360$as_echo "$UNAME" >&6; }
11361else
11362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
11364fi
11365
11366
11367  test -n "$UNAME" && break
11368done
11369
11370    else
11371      # If it succeeded, then it was overridden by the user. We will use it
11372      # for the tool.
11373
11374      # First remove it from the list of overridden variables, so we can test
11375      # for unknown variables in the end.
11376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11377
11378      # Check if we try to supply an empty value
11379      if test "x$UNAME" = x; then
11380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11381$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11383$as_echo_n "checking for UNAME... " >&6; }
11384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11385$as_echo "disabled" >&6; }
11386      else
11387        # Check if the provided tool contains a complete path.
11388        tool_specified="$UNAME"
11389        tool_basename="${tool_specified##*/}"
11390        if test "x$tool_basename" = "x$tool_specified"; then
11391          # A command without a complete path is provided, search $PATH.
11392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11393$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11394          # Extract the first word of "$tool_basename", so it can be a program name with args.
11395set dummy $tool_basename; ac_word=$2
11396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11397$as_echo_n "checking for $ac_word... " >&6; }
11398if ${ac_cv_path_UNAME+:} false; then :
11399  $as_echo_n "(cached) " >&6
11400else
11401  case $UNAME in
11402  [\\/]* | ?:[\\/]*)
11403  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11404  ;;
11405  *)
11406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11407for as_dir in $PATH
11408do
11409  IFS=$as_save_IFS
11410  test -z "$as_dir" && as_dir=.
11411    for ac_exec_ext in '' $ac_executable_extensions; do
11412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11413    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11415    break 2
11416  fi
11417done
11418  done
11419IFS=$as_save_IFS
11420
11421  ;;
11422esac
11423fi
11424UNAME=$ac_cv_path_UNAME
11425if test -n "$UNAME"; then
11426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11427$as_echo "$UNAME" >&6; }
11428else
11429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11430$as_echo "no" >&6; }
11431fi
11432
11433
11434          if test "x$UNAME" = x; then
11435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11436          fi
11437        else
11438          # Otherwise we believe it is a complete path. Use it as it is.
11439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11440$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11442$as_echo_n "checking for UNAME... " >&6; }
11443          if test ! -x "$tool_specified"; then
11444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11445$as_echo "not found" >&6; }
11446            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11447          fi
11448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11449$as_echo "$tool_specified" >&6; }
11450        fi
11451      fi
11452    fi
11453
11454  fi
11455
11456
11457
11458  if test "x$UNAME" = x; then
11459    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11460  fi
11461
11462
11463
11464
11465
11466  # Publish this variable in the help.
11467
11468
11469  if [ -z "${UNIQ+x}" ]; then
11470    # The variable is not set by user, try to locate tool using the code snippet
11471    for ac_prog in uniq
11472do
11473  # Extract the first word of "$ac_prog", so it can be a program name with args.
11474set dummy $ac_prog; ac_word=$2
11475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11476$as_echo_n "checking for $ac_word... " >&6; }
11477if ${ac_cv_path_UNIQ+:} false; then :
11478  $as_echo_n "(cached) " >&6
11479else
11480  case $UNIQ in
11481  [\\/]* | ?:[\\/]*)
11482  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11483  ;;
11484  *)
11485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11486for as_dir in $PATH
11487do
11488  IFS=$as_save_IFS
11489  test -z "$as_dir" && as_dir=.
11490    for ac_exec_ext in '' $ac_executable_extensions; do
11491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11492    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11494    break 2
11495  fi
11496done
11497  done
11498IFS=$as_save_IFS
11499
11500  ;;
11501esac
11502fi
11503UNIQ=$ac_cv_path_UNIQ
11504if test -n "$UNIQ"; then
11505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11506$as_echo "$UNIQ" >&6; }
11507else
11508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11509$as_echo "no" >&6; }
11510fi
11511
11512
11513  test -n "$UNIQ" && break
11514done
11515
11516  else
11517    # The variable is set, but is it from the command line or the environment?
11518
11519    # Try to remove the string !UNIQ! from our list.
11520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11522      # If it failed, the variable was not from the command line. Ignore it,
11523      # but warn the user (except for BASH, which is always set by the calling BASH).
11524      if test "xUNIQ" != xBASH; then
11525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11526$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11527      fi
11528      # Try to locate tool using the code snippet
11529      for ac_prog in uniq
11530do
11531  # Extract the first word of "$ac_prog", so it can be a program name with args.
11532set dummy $ac_prog; ac_word=$2
11533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11534$as_echo_n "checking for $ac_word... " >&6; }
11535if ${ac_cv_path_UNIQ+:} false; then :
11536  $as_echo_n "(cached) " >&6
11537else
11538  case $UNIQ in
11539  [\\/]* | ?:[\\/]*)
11540  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11541  ;;
11542  *)
11543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11544for as_dir in $PATH
11545do
11546  IFS=$as_save_IFS
11547  test -z "$as_dir" && as_dir=.
11548    for ac_exec_ext in '' $ac_executable_extensions; do
11549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11550    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11552    break 2
11553  fi
11554done
11555  done
11556IFS=$as_save_IFS
11557
11558  ;;
11559esac
11560fi
11561UNIQ=$ac_cv_path_UNIQ
11562if test -n "$UNIQ"; then
11563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11564$as_echo "$UNIQ" >&6; }
11565else
11566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11567$as_echo "no" >&6; }
11568fi
11569
11570
11571  test -n "$UNIQ" && break
11572done
11573
11574    else
11575      # If it succeeded, then it was overridden by the user. We will use it
11576      # for the tool.
11577
11578      # First remove it from the list of overridden variables, so we can test
11579      # for unknown variables in the end.
11580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11581
11582      # Check if we try to supply an empty value
11583      if test "x$UNIQ" = x; then
11584        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11585$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11587$as_echo_n "checking for UNIQ... " >&6; }
11588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11589$as_echo "disabled" >&6; }
11590      else
11591        # Check if the provided tool contains a complete path.
11592        tool_specified="$UNIQ"
11593        tool_basename="${tool_specified##*/}"
11594        if test "x$tool_basename" = "x$tool_specified"; then
11595          # A command without a complete path is provided, search $PATH.
11596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11597$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11598          # Extract the first word of "$tool_basename", so it can be a program name with args.
11599set dummy $tool_basename; ac_word=$2
11600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11601$as_echo_n "checking for $ac_word... " >&6; }
11602if ${ac_cv_path_UNIQ+:} false; then :
11603  $as_echo_n "(cached) " >&6
11604else
11605  case $UNIQ in
11606  [\\/]* | ?:[\\/]*)
11607  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11608  ;;
11609  *)
11610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11611for as_dir in $PATH
11612do
11613  IFS=$as_save_IFS
11614  test -z "$as_dir" && as_dir=.
11615    for ac_exec_ext in '' $ac_executable_extensions; do
11616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11617    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11619    break 2
11620  fi
11621done
11622  done
11623IFS=$as_save_IFS
11624
11625  ;;
11626esac
11627fi
11628UNIQ=$ac_cv_path_UNIQ
11629if test -n "$UNIQ"; then
11630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11631$as_echo "$UNIQ" >&6; }
11632else
11633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11634$as_echo "no" >&6; }
11635fi
11636
11637
11638          if test "x$UNIQ" = x; then
11639            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11640          fi
11641        else
11642          # Otherwise we believe it is a complete path. Use it as it is.
11643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11644$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11645          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11646$as_echo_n "checking for UNIQ... " >&6; }
11647          if test ! -x "$tool_specified"; then
11648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11649$as_echo "not found" >&6; }
11650            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11651          fi
11652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11653$as_echo "$tool_specified" >&6; }
11654        fi
11655      fi
11656    fi
11657
11658  fi
11659
11660
11661
11662  if test "x$UNIQ" = x; then
11663    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11664  fi
11665
11666
11667
11668
11669
11670  # Publish this variable in the help.
11671
11672
11673  if [ -z "${WC+x}" ]; then
11674    # The variable is not set by user, try to locate tool using the code snippet
11675    for ac_prog in wc
11676do
11677  # Extract the first word of "$ac_prog", so it can be a program name with args.
11678set dummy $ac_prog; ac_word=$2
11679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11680$as_echo_n "checking for $ac_word... " >&6; }
11681if ${ac_cv_path_WC+:} false; then :
11682  $as_echo_n "(cached) " >&6
11683else
11684  case $WC in
11685  [\\/]* | ?:[\\/]*)
11686  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11687  ;;
11688  *)
11689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11690for as_dir in $PATH
11691do
11692  IFS=$as_save_IFS
11693  test -z "$as_dir" && as_dir=.
11694    for ac_exec_ext in '' $ac_executable_extensions; do
11695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11696    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11698    break 2
11699  fi
11700done
11701  done
11702IFS=$as_save_IFS
11703
11704  ;;
11705esac
11706fi
11707WC=$ac_cv_path_WC
11708if test -n "$WC"; then
11709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11710$as_echo "$WC" >&6; }
11711else
11712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713$as_echo "no" >&6; }
11714fi
11715
11716
11717  test -n "$WC" && break
11718done
11719
11720  else
11721    # The variable is set, but is it from the command line or the environment?
11722
11723    # Try to remove the string !WC! from our list.
11724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11726      # If it failed, the variable was not from the command line. Ignore it,
11727      # but warn the user (except for BASH, which is always set by the calling BASH).
11728      if test "xWC" != xBASH; then
11729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11730$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11731      fi
11732      # Try to locate tool using the code snippet
11733      for ac_prog in wc
11734do
11735  # Extract the first word of "$ac_prog", so it can be a program name with args.
11736set dummy $ac_prog; ac_word=$2
11737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11738$as_echo_n "checking for $ac_word... " >&6; }
11739if ${ac_cv_path_WC+:} false; then :
11740  $as_echo_n "(cached) " >&6
11741else
11742  case $WC in
11743  [\\/]* | ?:[\\/]*)
11744  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11745  ;;
11746  *)
11747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11748for as_dir in $PATH
11749do
11750  IFS=$as_save_IFS
11751  test -z "$as_dir" && as_dir=.
11752    for ac_exec_ext in '' $ac_executable_extensions; do
11753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11754    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11756    break 2
11757  fi
11758done
11759  done
11760IFS=$as_save_IFS
11761
11762  ;;
11763esac
11764fi
11765WC=$ac_cv_path_WC
11766if test -n "$WC"; then
11767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11768$as_echo "$WC" >&6; }
11769else
11770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771$as_echo "no" >&6; }
11772fi
11773
11774
11775  test -n "$WC" && break
11776done
11777
11778    else
11779      # If it succeeded, then it was overridden by the user. We will use it
11780      # for the tool.
11781
11782      # First remove it from the list of overridden variables, so we can test
11783      # for unknown variables in the end.
11784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11785
11786      # Check if we try to supply an empty value
11787      if test "x$WC" = x; then
11788        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11789$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11791$as_echo_n "checking for WC... " >&6; }
11792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11793$as_echo "disabled" >&6; }
11794      else
11795        # Check if the provided tool contains a complete path.
11796        tool_specified="$WC"
11797        tool_basename="${tool_specified##*/}"
11798        if test "x$tool_basename" = "x$tool_specified"; then
11799          # A command without a complete path is provided, search $PATH.
11800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11801$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11802          # Extract the first word of "$tool_basename", so it can be a program name with args.
11803set dummy $tool_basename; ac_word=$2
11804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11805$as_echo_n "checking for $ac_word... " >&6; }
11806if ${ac_cv_path_WC+:} false; then :
11807  $as_echo_n "(cached) " >&6
11808else
11809  case $WC in
11810  [\\/]* | ?:[\\/]*)
11811  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11812  ;;
11813  *)
11814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11815for as_dir in $PATH
11816do
11817  IFS=$as_save_IFS
11818  test -z "$as_dir" && as_dir=.
11819    for ac_exec_ext in '' $ac_executable_extensions; do
11820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11821    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11823    break 2
11824  fi
11825done
11826  done
11827IFS=$as_save_IFS
11828
11829  ;;
11830esac
11831fi
11832WC=$ac_cv_path_WC
11833if test -n "$WC"; then
11834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11835$as_echo "$WC" >&6; }
11836else
11837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11838$as_echo "no" >&6; }
11839fi
11840
11841
11842          if test "x$WC" = x; then
11843            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11844          fi
11845        else
11846          # Otherwise we believe it is a complete path. Use it as it is.
11847          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11848$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11849          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11850$as_echo_n "checking for WC... " >&6; }
11851          if test ! -x "$tool_specified"; then
11852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11853$as_echo "not found" >&6; }
11854            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11855          fi
11856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11857$as_echo "$tool_specified" >&6; }
11858        fi
11859      fi
11860    fi
11861
11862  fi
11863
11864
11865
11866  if test "x$WC" = x; then
11867    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11868  fi
11869
11870
11871
11872
11873
11874  # Publish this variable in the help.
11875
11876
11877  if [ -z "${WHICH+x}" ]; then
11878    # The variable is not set by user, try to locate tool using the code snippet
11879    for ac_prog in which
11880do
11881  # Extract the first word of "$ac_prog", so it can be a program name with args.
11882set dummy $ac_prog; ac_word=$2
11883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11884$as_echo_n "checking for $ac_word... " >&6; }
11885if ${ac_cv_path_WHICH+:} false; then :
11886  $as_echo_n "(cached) " >&6
11887else
11888  case $WHICH in
11889  [\\/]* | ?:[\\/]*)
11890  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11891  ;;
11892  *)
11893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11894for as_dir in $PATH
11895do
11896  IFS=$as_save_IFS
11897  test -z "$as_dir" && as_dir=.
11898    for ac_exec_ext in '' $ac_executable_extensions; do
11899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11900    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11902    break 2
11903  fi
11904done
11905  done
11906IFS=$as_save_IFS
11907
11908  ;;
11909esac
11910fi
11911WHICH=$ac_cv_path_WHICH
11912if test -n "$WHICH"; then
11913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11914$as_echo "$WHICH" >&6; }
11915else
11916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11917$as_echo "no" >&6; }
11918fi
11919
11920
11921  test -n "$WHICH" && break
11922done
11923
11924  else
11925    # The variable is set, but is it from the command line or the environment?
11926
11927    # Try to remove the string !WHICH! from our list.
11928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11930      # If it failed, the variable was not from the command line. Ignore it,
11931      # but warn the user (except for BASH, which is always set by the calling BASH).
11932      if test "xWHICH" != xBASH; then
11933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11934$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11935      fi
11936      # Try to locate tool using the code snippet
11937      for ac_prog in which
11938do
11939  # Extract the first word of "$ac_prog", so it can be a program name with args.
11940set dummy $ac_prog; ac_word=$2
11941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11942$as_echo_n "checking for $ac_word... " >&6; }
11943if ${ac_cv_path_WHICH+:} false; then :
11944  $as_echo_n "(cached) " >&6
11945else
11946  case $WHICH in
11947  [\\/]* | ?:[\\/]*)
11948  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11949  ;;
11950  *)
11951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11952for as_dir in $PATH
11953do
11954  IFS=$as_save_IFS
11955  test -z "$as_dir" && as_dir=.
11956    for ac_exec_ext in '' $ac_executable_extensions; do
11957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11958    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11960    break 2
11961  fi
11962done
11963  done
11964IFS=$as_save_IFS
11965
11966  ;;
11967esac
11968fi
11969WHICH=$ac_cv_path_WHICH
11970if test -n "$WHICH"; then
11971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11972$as_echo "$WHICH" >&6; }
11973else
11974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11975$as_echo "no" >&6; }
11976fi
11977
11978
11979  test -n "$WHICH" && break
11980done
11981
11982    else
11983      # If it succeeded, then it was overridden by the user. We will use it
11984      # for the tool.
11985
11986      # First remove it from the list of overridden variables, so we can test
11987      # for unknown variables in the end.
11988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11989
11990      # Check if we try to supply an empty value
11991      if test "x$WHICH" = x; then
11992        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11993$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11995$as_echo_n "checking for WHICH... " >&6; }
11996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11997$as_echo "disabled" >&6; }
11998      else
11999        # Check if the provided tool contains a complete path.
12000        tool_specified="$WHICH"
12001        tool_basename="${tool_specified##*/}"
12002        if test "x$tool_basename" = "x$tool_specified"; then
12003          # A command without a complete path is provided, search $PATH.
12004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12005$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12006          # Extract the first word of "$tool_basename", so it can be a program name with args.
12007set dummy $tool_basename; ac_word=$2
12008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12009$as_echo_n "checking for $ac_word... " >&6; }
12010if ${ac_cv_path_WHICH+:} false; then :
12011  $as_echo_n "(cached) " >&6
12012else
12013  case $WHICH in
12014  [\\/]* | ?:[\\/]*)
12015  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12016  ;;
12017  *)
12018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12019for as_dir in $PATH
12020do
12021  IFS=$as_save_IFS
12022  test -z "$as_dir" && as_dir=.
12023    for ac_exec_ext in '' $ac_executable_extensions; do
12024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12025    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12027    break 2
12028  fi
12029done
12030  done
12031IFS=$as_save_IFS
12032
12033  ;;
12034esac
12035fi
12036WHICH=$ac_cv_path_WHICH
12037if test -n "$WHICH"; then
12038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12039$as_echo "$WHICH" >&6; }
12040else
12041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042$as_echo "no" >&6; }
12043fi
12044
12045
12046          if test "x$WHICH" = x; then
12047            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12048          fi
12049        else
12050          # Otherwise we believe it is a complete path. Use it as it is.
12051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12052$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12053          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12054$as_echo_n "checking for WHICH... " >&6; }
12055          if test ! -x "$tool_specified"; then
12056            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12057$as_echo "not found" >&6; }
12058            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12059          fi
12060          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12061$as_echo "$tool_specified" >&6; }
12062        fi
12063      fi
12064    fi
12065
12066  fi
12067
12068
12069
12070  if test "x$WHICH" = x; then
12071    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12072  fi
12073
12074
12075
12076
12077
12078  # Publish this variable in the help.
12079
12080
12081  if [ -z "${XARGS+x}" ]; then
12082    # The variable is not set by user, try to locate tool using the code snippet
12083    for ac_prog in xargs
12084do
12085  # Extract the first word of "$ac_prog", so it can be a program name with args.
12086set dummy $ac_prog; ac_word=$2
12087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12088$as_echo_n "checking for $ac_word... " >&6; }
12089if ${ac_cv_path_XARGS+:} false; then :
12090  $as_echo_n "(cached) " >&6
12091else
12092  case $XARGS in
12093  [\\/]* | ?:[\\/]*)
12094  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12095  ;;
12096  *)
12097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12098for as_dir in $PATH
12099do
12100  IFS=$as_save_IFS
12101  test -z "$as_dir" && as_dir=.
12102    for ac_exec_ext in '' $ac_executable_extensions; do
12103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12104    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12106    break 2
12107  fi
12108done
12109  done
12110IFS=$as_save_IFS
12111
12112  ;;
12113esac
12114fi
12115XARGS=$ac_cv_path_XARGS
12116if test -n "$XARGS"; then
12117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12118$as_echo "$XARGS" >&6; }
12119else
12120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12121$as_echo "no" >&6; }
12122fi
12123
12124
12125  test -n "$XARGS" && break
12126done
12127
12128  else
12129    # The variable is set, but is it from the command line or the environment?
12130
12131    # Try to remove the string !XARGS! from our list.
12132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12134      # If it failed, the variable was not from the command line. Ignore it,
12135      # but warn the user (except for BASH, which is always set by the calling BASH).
12136      if test "xXARGS" != xBASH; then
12137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12138$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12139      fi
12140      # Try to locate tool using the code snippet
12141      for ac_prog in xargs
12142do
12143  # Extract the first word of "$ac_prog", so it can be a program name with args.
12144set dummy $ac_prog; ac_word=$2
12145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12146$as_echo_n "checking for $ac_word... " >&6; }
12147if ${ac_cv_path_XARGS+:} false; then :
12148  $as_echo_n "(cached) " >&6
12149else
12150  case $XARGS in
12151  [\\/]* | ?:[\\/]*)
12152  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12153  ;;
12154  *)
12155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12156for as_dir in $PATH
12157do
12158  IFS=$as_save_IFS
12159  test -z "$as_dir" && as_dir=.
12160    for ac_exec_ext in '' $ac_executable_extensions; do
12161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12162    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12164    break 2
12165  fi
12166done
12167  done
12168IFS=$as_save_IFS
12169
12170  ;;
12171esac
12172fi
12173XARGS=$ac_cv_path_XARGS
12174if test -n "$XARGS"; then
12175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12176$as_echo "$XARGS" >&6; }
12177else
12178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12179$as_echo "no" >&6; }
12180fi
12181
12182
12183  test -n "$XARGS" && break
12184done
12185
12186    else
12187      # If it succeeded, then it was overridden by the user. We will use it
12188      # for the tool.
12189
12190      # First remove it from the list of overridden variables, so we can test
12191      # for unknown variables in the end.
12192      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12193
12194      # Check if we try to supply an empty value
12195      if test "x$XARGS" = x; then
12196        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12197$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12199$as_echo_n "checking for XARGS... " >&6; }
12200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12201$as_echo "disabled" >&6; }
12202      else
12203        # Check if the provided tool contains a complete path.
12204        tool_specified="$XARGS"
12205        tool_basename="${tool_specified##*/}"
12206        if test "x$tool_basename" = "x$tool_specified"; then
12207          # A command without a complete path is provided, search $PATH.
12208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12209$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12210          # Extract the first word of "$tool_basename", so it can be a program name with args.
12211set dummy $tool_basename; ac_word=$2
12212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12213$as_echo_n "checking for $ac_word... " >&6; }
12214if ${ac_cv_path_XARGS+:} false; then :
12215  $as_echo_n "(cached) " >&6
12216else
12217  case $XARGS in
12218  [\\/]* | ?:[\\/]*)
12219  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12220  ;;
12221  *)
12222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12223for as_dir in $PATH
12224do
12225  IFS=$as_save_IFS
12226  test -z "$as_dir" && as_dir=.
12227    for ac_exec_ext in '' $ac_executable_extensions; do
12228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12229    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12231    break 2
12232  fi
12233done
12234  done
12235IFS=$as_save_IFS
12236
12237  ;;
12238esac
12239fi
12240XARGS=$ac_cv_path_XARGS
12241if test -n "$XARGS"; then
12242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12243$as_echo "$XARGS" >&6; }
12244else
12245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12246$as_echo "no" >&6; }
12247fi
12248
12249
12250          if test "x$XARGS" = x; then
12251            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12252          fi
12253        else
12254          # Otherwise we believe it is a complete path. Use it as it is.
12255          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12256$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12257          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12258$as_echo_n "checking for XARGS... " >&6; }
12259          if test ! -x "$tool_specified"; then
12260            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12261$as_echo "not found" >&6; }
12262            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12263          fi
12264          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12265$as_echo "$tool_specified" >&6; }
12266        fi
12267      fi
12268    fi
12269
12270  fi
12271
12272
12273
12274  if test "x$XARGS" = x; then
12275    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12276  fi
12277
12278
12279
12280  # Then required tools that require some special treatment.
12281
12282
12283  # Publish this variable in the help.
12284
12285
12286  if [ -z "${AWK+x}" ]; then
12287    # The variable is not set by user, try to locate tool using the code snippet
12288    for ac_prog in gawk mawk nawk awk
12289do
12290  # Extract the first word of "$ac_prog", so it can be a program name with args.
12291set dummy $ac_prog; ac_word=$2
12292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12293$as_echo_n "checking for $ac_word... " >&6; }
12294if ${ac_cv_prog_AWK+:} false; then :
12295  $as_echo_n "(cached) " >&6
12296else
12297  if test -n "$AWK"; then
12298  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12299else
12300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12301for as_dir in $PATH
12302do
12303  IFS=$as_save_IFS
12304  test -z "$as_dir" && as_dir=.
12305    for ac_exec_ext in '' $ac_executable_extensions; do
12306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12307    ac_cv_prog_AWK="$ac_prog"
12308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12309    break 2
12310  fi
12311done
12312  done
12313IFS=$as_save_IFS
12314
12315fi
12316fi
12317AWK=$ac_cv_prog_AWK
12318if test -n "$AWK"; then
12319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12320$as_echo "$AWK" >&6; }
12321else
12322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12323$as_echo "no" >&6; }
12324fi
12325
12326
12327  test -n "$AWK" && break
12328done
12329
12330  else
12331    # The variable is set, but is it from the command line or the environment?
12332
12333    # Try to remove the string !AWK! from our list.
12334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12336      # If it failed, the variable was not from the command line. Ignore it,
12337      # but warn the user (except for BASH, which is always set by the calling BASH).
12338      if test "xAWK" != xBASH; then
12339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12340$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12341      fi
12342      # Try to locate tool using the code snippet
12343      for ac_prog in gawk mawk nawk awk
12344do
12345  # Extract the first word of "$ac_prog", so it can be a program name with args.
12346set dummy $ac_prog; ac_word=$2
12347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12348$as_echo_n "checking for $ac_word... " >&6; }
12349if ${ac_cv_prog_AWK+:} false; then :
12350  $as_echo_n "(cached) " >&6
12351else
12352  if test -n "$AWK"; then
12353  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12354else
12355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12356for as_dir in $PATH
12357do
12358  IFS=$as_save_IFS
12359  test -z "$as_dir" && as_dir=.
12360    for ac_exec_ext in '' $ac_executable_extensions; do
12361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12362    ac_cv_prog_AWK="$ac_prog"
12363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12364    break 2
12365  fi
12366done
12367  done
12368IFS=$as_save_IFS
12369
12370fi
12371fi
12372AWK=$ac_cv_prog_AWK
12373if test -n "$AWK"; then
12374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12375$as_echo "$AWK" >&6; }
12376else
12377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12378$as_echo "no" >&6; }
12379fi
12380
12381
12382  test -n "$AWK" && break
12383done
12384
12385    else
12386      # If it succeeded, then it was overridden by the user. We will use it
12387      # for the tool.
12388
12389      # First remove it from the list of overridden variables, so we can test
12390      # for unknown variables in the end.
12391      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12392
12393      # Check if we try to supply an empty value
12394      if test "x$AWK" = x; then
12395        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12396$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12398$as_echo_n "checking for AWK... " >&6; }
12399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12400$as_echo "disabled" >&6; }
12401      else
12402        # Check if the provided tool contains a complete path.
12403        tool_specified="$AWK"
12404        tool_basename="${tool_specified##*/}"
12405        if test "x$tool_basename" = "x$tool_specified"; then
12406          # A command without a complete path is provided, search $PATH.
12407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12408$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12409          # Extract the first word of "$tool_basename", so it can be a program name with args.
12410set dummy $tool_basename; ac_word=$2
12411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12412$as_echo_n "checking for $ac_word... " >&6; }
12413if ${ac_cv_path_AWK+:} false; then :
12414  $as_echo_n "(cached) " >&6
12415else
12416  case $AWK in
12417  [\\/]* | ?:[\\/]*)
12418  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12419  ;;
12420  *)
12421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12422for as_dir in $PATH
12423do
12424  IFS=$as_save_IFS
12425  test -z "$as_dir" && as_dir=.
12426    for ac_exec_ext in '' $ac_executable_extensions; do
12427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12428    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12430    break 2
12431  fi
12432done
12433  done
12434IFS=$as_save_IFS
12435
12436  ;;
12437esac
12438fi
12439AWK=$ac_cv_path_AWK
12440if test -n "$AWK"; then
12441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12442$as_echo "$AWK" >&6; }
12443else
12444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12445$as_echo "no" >&6; }
12446fi
12447
12448
12449          if test "x$AWK" = x; then
12450            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12451          fi
12452        else
12453          # Otherwise we believe it is a complete path. Use it as it is.
12454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12455$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12456          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12457$as_echo_n "checking for AWK... " >&6; }
12458          if test ! -x "$tool_specified"; then
12459            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12460$as_echo "not found" >&6; }
12461            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12462          fi
12463          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12464$as_echo "$tool_specified" >&6; }
12465        fi
12466      fi
12467    fi
12468
12469  fi
12470
12471
12472  if test "x$AWK" = x; then
12473    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12474  fi
12475
12476
12477
12478
12479  # Publish this variable in the help.
12480
12481
12482  if [ -z "${GREP+x}" ]; then
12483    # The variable is not set by user, try to locate tool using the code snippet
12484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12485$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12486if ${ac_cv_path_GREP+:} false; then :
12487  $as_echo_n "(cached) " >&6
12488else
12489  if test -z "$GREP"; then
12490  ac_path_GREP_found=false
12491  # Loop through the user's path and test for each of PROGNAME-LIST
12492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12493for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12494do
12495  IFS=$as_save_IFS
12496  test -z "$as_dir" && as_dir=.
12497    for ac_prog in grep ggrep; do
12498    for ac_exec_ext in '' $ac_executable_extensions; do
12499      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12500      as_fn_executable_p "$ac_path_GREP" || continue
12501# Check for GNU ac_path_GREP and select it if it is found.
12502  # Check for GNU $ac_path_GREP
12503case `"$ac_path_GREP" --version 2>&1` in
12504*GNU*)
12505  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12506*)
12507  ac_count=0
12508  $as_echo_n 0123456789 >"conftest.in"
12509  while :
12510  do
12511    cat "conftest.in" "conftest.in" >"conftest.tmp"
12512    mv "conftest.tmp" "conftest.in"
12513    cp "conftest.in" "conftest.nl"
12514    $as_echo 'GREP' >> "conftest.nl"
12515    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12516    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12517    as_fn_arith $ac_count + 1 && ac_count=$as_val
12518    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12519      # Best one so far, save it but keep looking for a better one
12520      ac_cv_path_GREP="$ac_path_GREP"
12521      ac_path_GREP_max=$ac_count
12522    fi
12523    # 10*(2^10) chars as input seems more than enough
12524    test $ac_count -gt 10 && break
12525  done
12526  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12527esac
12528
12529      $ac_path_GREP_found && break 3
12530    done
12531  done
12532  done
12533IFS=$as_save_IFS
12534  if test -z "$ac_cv_path_GREP"; then
12535    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12536  fi
12537else
12538  ac_cv_path_GREP=$GREP
12539fi
12540
12541fi
12542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12543$as_echo "$ac_cv_path_GREP" >&6; }
12544 GREP="$ac_cv_path_GREP"
12545
12546
12547  else
12548    # The variable is set, but is it from the command line or the environment?
12549
12550    # Try to remove the string !GREP! from our list.
12551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12553      # If it failed, the variable was not from the command line. Ignore it,
12554      # but warn the user (except for BASH, which is always set by the calling BASH).
12555      if test "xGREP" != xBASH; then
12556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12557$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12558      fi
12559      # Try to locate tool using the code snippet
12560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12561$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12562if ${ac_cv_path_GREP+:} false; then :
12563  $as_echo_n "(cached) " >&6
12564else
12565  if test -z "$GREP"; then
12566  ac_path_GREP_found=false
12567  # Loop through the user's path and test for each of PROGNAME-LIST
12568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12569for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12570do
12571  IFS=$as_save_IFS
12572  test -z "$as_dir" && as_dir=.
12573    for ac_prog in grep ggrep; do
12574    for ac_exec_ext in '' $ac_executable_extensions; do
12575      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12576      as_fn_executable_p "$ac_path_GREP" || continue
12577# Check for GNU ac_path_GREP and select it if it is found.
12578  # Check for GNU $ac_path_GREP
12579case `"$ac_path_GREP" --version 2>&1` in
12580*GNU*)
12581  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12582*)
12583  ac_count=0
12584  $as_echo_n 0123456789 >"conftest.in"
12585  while :
12586  do
12587    cat "conftest.in" "conftest.in" >"conftest.tmp"
12588    mv "conftest.tmp" "conftest.in"
12589    cp "conftest.in" "conftest.nl"
12590    $as_echo 'GREP' >> "conftest.nl"
12591    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12592    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12593    as_fn_arith $ac_count + 1 && ac_count=$as_val
12594    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12595      # Best one so far, save it but keep looking for a better one
12596      ac_cv_path_GREP="$ac_path_GREP"
12597      ac_path_GREP_max=$ac_count
12598    fi
12599    # 10*(2^10) chars as input seems more than enough
12600    test $ac_count -gt 10 && break
12601  done
12602  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12603esac
12604
12605      $ac_path_GREP_found && break 3
12606    done
12607  done
12608  done
12609IFS=$as_save_IFS
12610  if test -z "$ac_cv_path_GREP"; then
12611    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12612  fi
12613else
12614  ac_cv_path_GREP=$GREP
12615fi
12616
12617fi
12618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12619$as_echo "$ac_cv_path_GREP" >&6; }
12620 GREP="$ac_cv_path_GREP"
12621
12622
12623    else
12624      # If it succeeded, then it was overridden by the user. We will use it
12625      # for the tool.
12626
12627      # First remove it from the list of overridden variables, so we can test
12628      # for unknown variables in the end.
12629      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12630
12631      # Check if we try to supply an empty value
12632      if test "x$GREP" = x; then
12633        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12634$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12636$as_echo_n "checking for GREP... " >&6; }
12637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12638$as_echo "disabled" >&6; }
12639      else
12640        # Check if the provided tool contains a complete path.
12641        tool_specified="$GREP"
12642        tool_basename="${tool_specified##*/}"
12643        if test "x$tool_basename" = "x$tool_specified"; then
12644          # A command without a complete path is provided, search $PATH.
12645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12646$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12647          # Extract the first word of "$tool_basename", so it can be a program name with args.
12648set dummy $tool_basename; ac_word=$2
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12650$as_echo_n "checking for $ac_word... " >&6; }
12651if ${ac_cv_path_GREP+:} false; then :
12652  $as_echo_n "(cached) " >&6
12653else
12654  case $GREP in
12655  [\\/]* | ?:[\\/]*)
12656  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12657  ;;
12658  *)
12659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12660for as_dir in $PATH
12661do
12662  IFS=$as_save_IFS
12663  test -z "$as_dir" && as_dir=.
12664    for ac_exec_ext in '' $ac_executable_extensions; do
12665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12666    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12668    break 2
12669  fi
12670done
12671  done
12672IFS=$as_save_IFS
12673
12674  ;;
12675esac
12676fi
12677GREP=$ac_cv_path_GREP
12678if test -n "$GREP"; then
12679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12680$as_echo "$GREP" >&6; }
12681else
12682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12683$as_echo "no" >&6; }
12684fi
12685
12686
12687          if test "x$GREP" = x; then
12688            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12689          fi
12690        else
12691          # Otherwise we believe it is a complete path. Use it as it is.
12692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12693$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12694          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12695$as_echo_n "checking for GREP... " >&6; }
12696          if test ! -x "$tool_specified"; then
12697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12698$as_echo "not found" >&6; }
12699            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12700          fi
12701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12702$as_echo "$tool_specified" >&6; }
12703        fi
12704      fi
12705    fi
12706
12707  fi
12708
12709
12710  if test "x$GREP" = x; then
12711    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12712  fi
12713
12714
12715
12716
12717  # Publish this variable in the help.
12718
12719
12720  if [ -z "${EGREP+x}" ]; then
12721    # The variable is not set by user, try to locate tool using the code snippet
12722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12723$as_echo_n "checking for egrep... " >&6; }
12724if ${ac_cv_path_EGREP+:} false; then :
12725  $as_echo_n "(cached) " >&6
12726else
12727  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12728   then ac_cv_path_EGREP="$GREP -E"
12729   else
12730     if test -z "$EGREP"; then
12731  ac_path_EGREP_found=false
12732  # Loop through the user's path and test for each of PROGNAME-LIST
12733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12734for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12735do
12736  IFS=$as_save_IFS
12737  test -z "$as_dir" && as_dir=.
12738    for ac_prog in egrep; do
12739    for ac_exec_ext in '' $ac_executable_extensions; do
12740      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12741      as_fn_executable_p "$ac_path_EGREP" || continue
12742# Check for GNU ac_path_EGREP and select it if it is found.
12743  # Check for GNU $ac_path_EGREP
12744case `"$ac_path_EGREP" --version 2>&1` in
12745*GNU*)
12746  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12747*)
12748  ac_count=0
12749  $as_echo_n 0123456789 >"conftest.in"
12750  while :
12751  do
12752    cat "conftest.in" "conftest.in" >"conftest.tmp"
12753    mv "conftest.tmp" "conftest.in"
12754    cp "conftest.in" "conftest.nl"
12755    $as_echo 'EGREP' >> "conftest.nl"
12756    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12757    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12758    as_fn_arith $ac_count + 1 && ac_count=$as_val
12759    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12760      # Best one so far, save it but keep looking for a better one
12761      ac_cv_path_EGREP="$ac_path_EGREP"
12762      ac_path_EGREP_max=$ac_count
12763    fi
12764    # 10*(2^10) chars as input seems more than enough
12765    test $ac_count -gt 10 && break
12766  done
12767  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12768esac
12769
12770      $ac_path_EGREP_found && break 3
12771    done
12772  done
12773  done
12774IFS=$as_save_IFS
12775  if test -z "$ac_cv_path_EGREP"; then
12776    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12777  fi
12778else
12779  ac_cv_path_EGREP=$EGREP
12780fi
12781
12782   fi
12783fi
12784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12785$as_echo "$ac_cv_path_EGREP" >&6; }
12786 EGREP="$ac_cv_path_EGREP"
12787
12788
12789  else
12790    # The variable is set, but is it from the command line or the environment?
12791
12792    # Try to remove the string !EGREP! from our list.
12793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12795      # If it failed, the variable was not from the command line. Ignore it,
12796      # but warn the user (except for BASH, which is always set by the calling BASH).
12797      if test "xEGREP" != xBASH; then
12798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12799$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12800      fi
12801      # Try to locate tool using the code snippet
12802      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12803$as_echo_n "checking for egrep... " >&6; }
12804if ${ac_cv_path_EGREP+:} false; then :
12805  $as_echo_n "(cached) " >&6
12806else
12807  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12808   then ac_cv_path_EGREP="$GREP -E"
12809   else
12810     if test -z "$EGREP"; then
12811  ac_path_EGREP_found=false
12812  # Loop through the user's path and test for each of PROGNAME-LIST
12813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12814for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12815do
12816  IFS=$as_save_IFS
12817  test -z "$as_dir" && as_dir=.
12818    for ac_prog in egrep; do
12819    for ac_exec_ext in '' $ac_executable_extensions; do
12820      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12821      as_fn_executable_p "$ac_path_EGREP" || continue
12822# Check for GNU ac_path_EGREP and select it if it is found.
12823  # Check for GNU $ac_path_EGREP
12824case `"$ac_path_EGREP" --version 2>&1` in
12825*GNU*)
12826  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12827*)
12828  ac_count=0
12829  $as_echo_n 0123456789 >"conftest.in"
12830  while :
12831  do
12832    cat "conftest.in" "conftest.in" >"conftest.tmp"
12833    mv "conftest.tmp" "conftest.in"
12834    cp "conftest.in" "conftest.nl"
12835    $as_echo 'EGREP' >> "conftest.nl"
12836    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12837    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12838    as_fn_arith $ac_count + 1 && ac_count=$as_val
12839    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12840      # Best one so far, save it but keep looking for a better one
12841      ac_cv_path_EGREP="$ac_path_EGREP"
12842      ac_path_EGREP_max=$ac_count
12843    fi
12844    # 10*(2^10) chars as input seems more than enough
12845    test $ac_count -gt 10 && break
12846  done
12847  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12848esac
12849
12850      $ac_path_EGREP_found && break 3
12851    done
12852  done
12853  done
12854IFS=$as_save_IFS
12855  if test -z "$ac_cv_path_EGREP"; then
12856    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12857  fi
12858else
12859  ac_cv_path_EGREP=$EGREP
12860fi
12861
12862   fi
12863fi
12864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12865$as_echo "$ac_cv_path_EGREP" >&6; }
12866 EGREP="$ac_cv_path_EGREP"
12867
12868
12869    else
12870      # If it succeeded, then it was overridden by the user. We will use it
12871      # for the tool.
12872
12873      # First remove it from the list of overridden variables, so we can test
12874      # for unknown variables in the end.
12875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12876
12877      # Check if we try to supply an empty value
12878      if test "x$EGREP" = x; then
12879        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12880$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12882$as_echo_n "checking for EGREP... " >&6; }
12883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12884$as_echo "disabled" >&6; }
12885      else
12886        # Check if the provided tool contains a complete path.
12887        tool_specified="$EGREP"
12888        tool_basename="${tool_specified##*/}"
12889        if test "x$tool_basename" = "x$tool_specified"; then
12890          # A command without a complete path is provided, search $PATH.
12891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12892$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12893          # Extract the first word of "$tool_basename", so it can be a program name with args.
12894set dummy $tool_basename; ac_word=$2
12895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12896$as_echo_n "checking for $ac_word... " >&6; }
12897if ${ac_cv_path_EGREP+:} false; then :
12898  $as_echo_n "(cached) " >&6
12899else
12900  case $EGREP in
12901  [\\/]* | ?:[\\/]*)
12902  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12903  ;;
12904  *)
12905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12906for as_dir in $PATH
12907do
12908  IFS=$as_save_IFS
12909  test -z "$as_dir" && as_dir=.
12910    for ac_exec_ext in '' $ac_executable_extensions; do
12911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12912    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12914    break 2
12915  fi
12916done
12917  done
12918IFS=$as_save_IFS
12919
12920  ;;
12921esac
12922fi
12923EGREP=$ac_cv_path_EGREP
12924if test -n "$EGREP"; then
12925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12926$as_echo "$EGREP" >&6; }
12927else
12928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12929$as_echo "no" >&6; }
12930fi
12931
12932
12933          if test "x$EGREP" = x; then
12934            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12935          fi
12936        else
12937          # Otherwise we believe it is a complete path. Use it as it is.
12938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12939$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12940          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12941$as_echo_n "checking for EGREP... " >&6; }
12942          if test ! -x "$tool_specified"; then
12943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12944$as_echo "not found" >&6; }
12945            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12946          fi
12947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12948$as_echo "$tool_specified" >&6; }
12949        fi
12950      fi
12951    fi
12952
12953  fi
12954
12955
12956  if test "x$EGREP" = x; then
12957    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12958  fi
12959
12960
12961
12962
12963  # Publish this variable in the help.
12964
12965
12966  if [ -z "${FGREP+x}" ]; then
12967    # The variable is not set by user, try to locate tool using the code snippet
12968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12969$as_echo_n "checking for fgrep... " >&6; }
12970if ${ac_cv_path_FGREP+:} false; then :
12971  $as_echo_n "(cached) " >&6
12972else
12973  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12974   then ac_cv_path_FGREP="$GREP -F"
12975   else
12976     if test -z "$FGREP"; then
12977  ac_path_FGREP_found=false
12978  # Loop through the user's path and test for each of PROGNAME-LIST
12979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12980for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12981do
12982  IFS=$as_save_IFS
12983  test -z "$as_dir" && as_dir=.
12984    for ac_prog in fgrep; do
12985    for ac_exec_ext in '' $ac_executable_extensions; do
12986      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12987      as_fn_executable_p "$ac_path_FGREP" || continue
12988# Check for GNU ac_path_FGREP and select it if it is found.
12989  # Check for GNU $ac_path_FGREP
12990case `"$ac_path_FGREP" --version 2>&1` in
12991*GNU*)
12992  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12993*)
12994  ac_count=0
12995  $as_echo_n 0123456789 >"conftest.in"
12996  while :
12997  do
12998    cat "conftest.in" "conftest.in" >"conftest.tmp"
12999    mv "conftest.tmp" "conftest.in"
13000    cp "conftest.in" "conftest.nl"
13001    $as_echo 'FGREP' >> "conftest.nl"
13002    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13003    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13004    as_fn_arith $ac_count + 1 && ac_count=$as_val
13005    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13006      # Best one so far, save it but keep looking for a better one
13007      ac_cv_path_FGREP="$ac_path_FGREP"
13008      ac_path_FGREP_max=$ac_count
13009    fi
13010    # 10*(2^10) chars as input seems more than enough
13011    test $ac_count -gt 10 && break
13012  done
13013  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13014esac
13015
13016      $ac_path_FGREP_found && break 3
13017    done
13018  done
13019  done
13020IFS=$as_save_IFS
13021  if test -z "$ac_cv_path_FGREP"; then
13022    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13023  fi
13024else
13025  ac_cv_path_FGREP=$FGREP
13026fi
13027
13028   fi
13029fi
13030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13031$as_echo "$ac_cv_path_FGREP" >&6; }
13032 FGREP="$ac_cv_path_FGREP"
13033
13034
13035  else
13036    # The variable is set, but is it from the command line or the environment?
13037
13038    # Try to remove the string !FGREP! from our list.
13039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13041      # If it failed, the variable was not from the command line. Ignore it,
13042      # but warn the user (except for BASH, which is always set by the calling BASH).
13043      if test "xFGREP" != xBASH; then
13044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13045$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13046      fi
13047      # Try to locate tool using the code snippet
13048      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13049$as_echo_n "checking for fgrep... " >&6; }
13050if ${ac_cv_path_FGREP+:} false; then :
13051  $as_echo_n "(cached) " >&6
13052else
13053  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13054   then ac_cv_path_FGREP="$GREP -F"
13055   else
13056     if test -z "$FGREP"; then
13057  ac_path_FGREP_found=false
13058  # Loop through the user's path and test for each of PROGNAME-LIST
13059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13060for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13061do
13062  IFS=$as_save_IFS
13063  test -z "$as_dir" && as_dir=.
13064    for ac_prog in fgrep; do
13065    for ac_exec_ext in '' $ac_executable_extensions; do
13066      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13067      as_fn_executable_p "$ac_path_FGREP" || continue
13068# Check for GNU ac_path_FGREP and select it if it is found.
13069  # Check for GNU $ac_path_FGREP
13070case `"$ac_path_FGREP" --version 2>&1` in
13071*GNU*)
13072  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13073*)
13074  ac_count=0
13075  $as_echo_n 0123456789 >"conftest.in"
13076  while :
13077  do
13078    cat "conftest.in" "conftest.in" >"conftest.tmp"
13079    mv "conftest.tmp" "conftest.in"
13080    cp "conftest.in" "conftest.nl"
13081    $as_echo 'FGREP' >> "conftest.nl"
13082    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13083    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13084    as_fn_arith $ac_count + 1 && ac_count=$as_val
13085    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13086      # Best one so far, save it but keep looking for a better one
13087      ac_cv_path_FGREP="$ac_path_FGREP"
13088      ac_path_FGREP_max=$ac_count
13089    fi
13090    # 10*(2^10) chars as input seems more than enough
13091    test $ac_count -gt 10 && break
13092  done
13093  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13094esac
13095
13096      $ac_path_FGREP_found && break 3
13097    done
13098  done
13099  done
13100IFS=$as_save_IFS
13101  if test -z "$ac_cv_path_FGREP"; then
13102    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13103  fi
13104else
13105  ac_cv_path_FGREP=$FGREP
13106fi
13107
13108   fi
13109fi
13110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13111$as_echo "$ac_cv_path_FGREP" >&6; }
13112 FGREP="$ac_cv_path_FGREP"
13113
13114
13115    else
13116      # If it succeeded, then it was overridden by the user. We will use it
13117      # for the tool.
13118
13119      # First remove it from the list of overridden variables, so we can test
13120      # for unknown variables in the end.
13121      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13122
13123      # Check if we try to supply an empty value
13124      if test "x$FGREP" = x; then
13125        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13126$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13127        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13128$as_echo_n "checking for FGREP... " >&6; }
13129        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13130$as_echo "disabled" >&6; }
13131      else
13132        # Check if the provided tool contains a complete path.
13133        tool_specified="$FGREP"
13134        tool_basename="${tool_specified##*/}"
13135        if test "x$tool_basename" = "x$tool_specified"; then
13136          # A command without a complete path is provided, search $PATH.
13137          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13138$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13139          # Extract the first word of "$tool_basename", so it can be a program name with args.
13140set dummy $tool_basename; ac_word=$2
13141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13142$as_echo_n "checking for $ac_word... " >&6; }
13143if ${ac_cv_path_FGREP+:} false; then :
13144  $as_echo_n "(cached) " >&6
13145else
13146  case $FGREP in
13147  [\\/]* | ?:[\\/]*)
13148  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13149  ;;
13150  *)
13151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13152for as_dir in $PATH
13153do
13154  IFS=$as_save_IFS
13155  test -z "$as_dir" && as_dir=.
13156    for ac_exec_ext in '' $ac_executable_extensions; do
13157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13158    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13160    break 2
13161  fi
13162done
13163  done
13164IFS=$as_save_IFS
13165
13166  ;;
13167esac
13168fi
13169FGREP=$ac_cv_path_FGREP
13170if test -n "$FGREP"; then
13171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13172$as_echo "$FGREP" >&6; }
13173else
13174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13175$as_echo "no" >&6; }
13176fi
13177
13178
13179          if test "x$FGREP" = x; then
13180            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13181          fi
13182        else
13183          # Otherwise we believe it is a complete path. Use it as it is.
13184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13185$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13186          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13187$as_echo_n "checking for FGREP... " >&6; }
13188          if test ! -x "$tool_specified"; then
13189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13190$as_echo "not found" >&6; }
13191            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13192          fi
13193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13194$as_echo "$tool_specified" >&6; }
13195        fi
13196      fi
13197    fi
13198
13199  fi
13200
13201
13202  if test "x$FGREP" = x; then
13203    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13204  fi
13205
13206
13207
13208
13209  # Publish this variable in the help.
13210
13211
13212  if [ -z "${SED+x}" ]; then
13213    # The variable is not set by user, 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    # The variable is set, but is it from the command line or the environment?
13285
13286    # Try to remove the string !SED! from our list.
13287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13289      # If it failed, the variable was not from the command line. Ignore it,
13290      # but warn the user (except for BASH, which is always set by the calling BASH).
13291      if test "xSED" != xBASH; then
13292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13293$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13294      fi
13295      # Try to locate tool using the code snippet
13296      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13297$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13298if ${ac_cv_path_SED+:} false; then :
13299  $as_echo_n "(cached) " >&6
13300else
13301            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13302     for ac_i in 1 2 3 4 5 6 7; do
13303       ac_script="$ac_script$as_nl$ac_script"
13304     done
13305     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13306     { ac_script=; unset ac_script;}
13307     if test -z "$SED"; then
13308  ac_path_SED_found=false
13309  # Loop through the user's path and test for each of PROGNAME-LIST
13310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13311for as_dir in $PATH
13312do
13313  IFS=$as_save_IFS
13314  test -z "$as_dir" && as_dir=.
13315    for ac_prog in sed gsed; do
13316    for ac_exec_ext in '' $ac_executable_extensions; do
13317      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13318      as_fn_executable_p "$ac_path_SED" || continue
13319# Check for GNU ac_path_SED and select it if it is found.
13320  # Check for GNU $ac_path_SED
13321case `"$ac_path_SED" --version 2>&1` in
13322*GNU*)
13323  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13324*)
13325  ac_count=0
13326  $as_echo_n 0123456789 >"conftest.in"
13327  while :
13328  do
13329    cat "conftest.in" "conftest.in" >"conftest.tmp"
13330    mv "conftest.tmp" "conftest.in"
13331    cp "conftest.in" "conftest.nl"
13332    $as_echo '' >> "conftest.nl"
13333    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13334    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13335    as_fn_arith $ac_count + 1 && ac_count=$as_val
13336    if test $ac_count -gt ${ac_path_SED_max-0}; then
13337      # Best one so far, save it but keep looking for a better one
13338      ac_cv_path_SED="$ac_path_SED"
13339      ac_path_SED_max=$ac_count
13340    fi
13341    # 10*(2^10) chars as input seems more than enough
13342    test $ac_count -gt 10 && break
13343  done
13344  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13345esac
13346
13347      $ac_path_SED_found && break 3
13348    done
13349  done
13350  done
13351IFS=$as_save_IFS
13352  if test -z "$ac_cv_path_SED"; then
13353    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13354  fi
13355else
13356  ac_cv_path_SED=$SED
13357fi
13358
13359fi
13360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13361$as_echo "$ac_cv_path_SED" >&6; }
13362 SED="$ac_cv_path_SED"
13363  rm -f conftest.sed
13364
13365    else
13366      # If it succeeded, then it was overridden by the user. We will use it
13367      # for the tool.
13368
13369      # First remove it from the list of overridden variables, so we can test
13370      # for unknown variables in the end.
13371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13372
13373      # Check if we try to supply an empty value
13374      if test "x$SED" = x; then
13375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13376$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13378$as_echo_n "checking for SED... " >&6; }
13379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13380$as_echo "disabled" >&6; }
13381      else
13382        # Check if the provided tool contains a complete path.
13383        tool_specified="$SED"
13384        tool_basename="${tool_specified##*/}"
13385        if test "x$tool_basename" = "x$tool_specified"; then
13386          # A command without a complete path is provided, search $PATH.
13387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13388$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13389          # Extract the first word of "$tool_basename", so it can be a program name with args.
13390set dummy $tool_basename; ac_word=$2
13391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13392$as_echo_n "checking for $ac_word... " >&6; }
13393if ${ac_cv_path_SED+:} false; then :
13394  $as_echo_n "(cached) " >&6
13395else
13396  case $SED in
13397  [\\/]* | ?:[\\/]*)
13398  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13399  ;;
13400  *)
13401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13402for as_dir in $PATH
13403do
13404  IFS=$as_save_IFS
13405  test -z "$as_dir" && as_dir=.
13406    for ac_exec_ext in '' $ac_executable_extensions; do
13407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13408    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13410    break 2
13411  fi
13412done
13413  done
13414IFS=$as_save_IFS
13415
13416  ;;
13417esac
13418fi
13419SED=$ac_cv_path_SED
13420if test -n "$SED"; then
13421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13422$as_echo "$SED" >&6; }
13423else
13424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13425$as_echo "no" >&6; }
13426fi
13427
13428
13429          if test "x$SED" = x; then
13430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13431          fi
13432        else
13433          # Otherwise we believe it is a complete path. Use it as it is.
13434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13435$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13437$as_echo_n "checking for SED... " >&6; }
13438          if test ! -x "$tool_specified"; then
13439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13440$as_echo "not found" >&6; }
13441            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13442          fi
13443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13444$as_echo "$tool_specified" >&6; }
13445        fi
13446      fi
13447    fi
13448
13449  fi
13450
13451
13452  if test "x$SED" = x; then
13453    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13454  fi
13455
13456
13457
13458  # Always force rm.
13459  RM="$RM -f"
13460
13461  # pwd behaves differently on various platforms and some don't support the -L flag.
13462  # Always use the bash builtin pwd to get uniform behavior.
13463  THEPWDCMD=pwd
13464
13465  # These are not required on all platforms
13466
13467
13468  # Publish this variable in the help.
13469
13470
13471  if [ -z "${CYGPATH+x}" ]; then
13472    # The variable is not set by user, try to locate tool using the code snippet
13473    for ac_prog in cygpath
13474do
13475  # Extract the first word of "$ac_prog", so it can be a program name with args.
13476set dummy $ac_prog; ac_word=$2
13477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13478$as_echo_n "checking for $ac_word... " >&6; }
13479if ${ac_cv_path_CYGPATH+:} false; then :
13480  $as_echo_n "(cached) " >&6
13481else
13482  case $CYGPATH in
13483  [\\/]* | ?:[\\/]*)
13484  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13485  ;;
13486  *)
13487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13488for as_dir in $PATH
13489do
13490  IFS=$as_save_IFS
13491  test -z "$as_dir" && as_dir=.
13492    for ac_exec_ext in '' $ac_executable_extensions; do
13493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13494    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13496    break 2
13497  fi
13498done
13499  done
13500IFS=$as_save_IFS
13501
13502  ;;
13503esac
13504fi
13505CYGPATH=$ac_cv_path_CYGPATH
13506if test -n "$CYGPATH"; then
13507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13508$as_echo "$CYGPATH" >&6; }
13509else
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13511$as_echo "no" >&6; }
13512fi
13513
13514
13515  test -n "$CYGPATH" && break
13516done
13517
13518  else
13519    # The variable is set, but is it from the command line or the environment?
13520
13521    # Try to remove the string !CYGPATH! from our list.
13522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13524      # If it failed, the variable was not from the command line. Ignore it,
13525      # but warn the user (except for BASH, which is always set by the calling BASH).
13526      if test "xCYGPATH" != xBASH; then
13527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13528$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13529      fi
13530      # Try to locate tool using the code snippet
13531      for ac_prog in cygpath
13532do
13533  # Extract the first word of "$ac_prog", so it can be a program name with args.
13534set dummy $ac_prog; ac_word=$2
13535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13536$as_echo_n "checking for $ac_word... " >&6; }
13537if ${ac_cv_path_CYGPATH+:} false; then :
13538  $as_echo_n "(cached) " >&6
13539else
13540  case $CYGPATH in
13541  [\\/]* | ?:[\\/]*)
13542  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13543  ;;
13544  *)
13545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13546for as_dir in $PATH
13547do
13548  IFS=$as_save_IFS
13549  test -z "$as_dir" && as_dir=.
13550    for ac_exec_ext in '' $ac_executable_extensions; do
13551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13552    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13554    break 2
13555  fi
13556done
13557  done
13558IFS=$as_save_IFS
13559
13560  ;;
13561esac
13562fi
13563CYGPATH=$ac_cv_path_CYGPATH
13564if test -n "$CYGPATH"; then
13565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13566$as_echo "$CYGPATH" >&6; }
13567else
13568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569$as_echo "no" >&6; }
13570fi
13571
13572
13573  test -n "$CYGPATH" && break
13574done
13575
13576    else
13577      # If it succeeded, then it was overridden by the user. We will use it
13578      # for the tool.
13579
13580      # First remove it from the list of overridden variables, so we can test
13581      # for unknown variables in the end.
13582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13583
13584      # Check if we try to supply an empty value
13585      if test "x$CYGPATH" = x; then
13586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13587$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13589$as_echo_n "checking for CYGPATH... " >&6; }
13590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13591$as_echo "disabled" >&6; }
13592      else
13593        # Check if the provided tool contains a complete path.
13594        tool_specified="$CYGPATH"
13595        tool_basename="${tool_specified##*/}"
13596        if test "x$tool_basename" = "x$tool_specified"; then
13597          # A command without a complete path is provided, search $PATH.
13598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13599$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13600          # Extract the first word of "$tool_basename", so it can be a program name with args.
13601set dummy $tool_basename; ac_word=$2
13602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13603$as_echo_n "checking for $ac_word... " >&6; }
13604if ${ac_cv_path_CYGPATH+:} false; then :
13605  $as_echo_n "(cached) " >&6
13606else
13607  case $CYGPATH in
13608  [\\/]* | ?:[\\/]*)
13609  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13610  ;;
13611  *)
13612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13613for as_dir in $PATH
13614do
13615  IFS=$as_save_IFS
13616  test -z "$as_dir" && as_dir=.
13617    for ac_exec_ext in '' $ac_executable_extensions; do
13618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13619    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13621    break 2
13622  fi
13623done
13624  done
13625IFS=$as_save_IFS
13626
13627  ;;
13628esac
13629fi
13630CYGPATH=$ac_cv_path_CYGPATH
13631if test -n "$CYGPATH"; then
13632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13633$as_echo "$CYGPATH" >&6; }
13634else
13635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13636$as_echo "no" >&6; }
13637fi
13638
13639
13640          if test "x$CYGPATH" = x; then
13641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13642          fi
13643        else
13644          # Otherwise we believe it is a complete path. Use it as it is.
13645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13646$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13648$as_echo_n "checking for CYGPATH... " >&6; }
13649          if test ! -x "$tool_specified"; then
13650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13651$as_echo "not found" >&6; }
13652            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13653          fi
13654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13655$as_echo "$tool_specified" >&6; }
13656        fi
13657      fi
13658    fi
13659
13660  fi
13661
13662
13663
13664
13665  # Publish this variable in the help.
13666
13667
13668  if [ -z "${READLINK+x}" ]; then
13669    # The variable is not set by user, try to locate tool using the code snippet
13670    for ac_prog in greadlink readlink
13671do
13672  # Extract the first word of "$ac_prog", so it can be a program name with args.
13673set dummy $ac_prog; ac_word=$2
13674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13675$as_echo_n "checking for $ac_word... " >&6; }
13676if ${ac_cv_path_READLINK+:} false; then :
13677  $as_echo_n "(cached) " >&6
13678else
13679  case $READLINK in
13680  [\\/]* | ?:[\\/]*)
13681  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13682  ;;
13683  *)
13684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13685for as_dir in $PATH
13686do
13687  IFS=$as_save_IFS
13688  test -z "$as_dir" && as_dir=.
13689    for ac_exec_ext in '' $ac_executable_extensions; do
13690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13691    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13693    break 2
13694  fi
13695done
13696  done
13697IFS=$as_save_IFS
13698
13699  ;;
13700esac
13701fi
13702READLINK=$ac_cv_path_READLINK
13703if test -n "$READLINK"; then
13704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13705$as_echo "$READLINK" >&6; }
13706else
13707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13708$as_echo "no" >&6; }
13709fi
13710
13711
13712  test -n "$READLINK" && break
13713done
13714
13715  else
13716    # The variable is set, but is it from the command line or the environment?
13717
13718    # Try to remove the string !READLINK! from our list.
13719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13721      # If it failed, the variable was not from the command line. Ignore it,
13722      # but warn the user (except for BASH, which is always set by the calling BASH).
13723      if test "xREADLINK" != xBASH; then
13724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13725$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13726      fi
13727      # Try to locate tool using the code snippet
13728      for ac_prog in greadlink readlink
13729do
13730  # Extract the first word of "$ac_prog", so it can be a program name with args.
13731set dummy $ac_prog; ac_word=$2
13732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13733$as_echo_n "checking for $ac_word... " >&6; }
13734if ${ac_cv_path_READLINK+:} false; then :
13735  $as_echo_n "(cached) " >&6
13736else
13737  case $READLINK in
13738  [\\/]* | ?:[\\/]*)
13739  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13740  ;;
13741  *)
13742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13743for as_dir in $PATH
13744do
13745  IFS=$as_save_IFS
13746  test -z "$as_dir" && as_dir=.
13747    for ac_exec_ext in '' $ac_executable_extensions; do
13748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13749    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13751    break 2
13752  fi
13753done
13754  done
13755IFS=$as_save_IFS
13756
13757  ;;
13758esac
13759fi
13760READLINK=$ac_cv_path_READLINK
13761if test -n "$READLINK"; then
13762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13763$as_echo "$READLINK" >&6; }
13764else
13765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13766$as_echo "no" >&6; }
13767fi
13768
13769
13770  test -n "$READLINK" && break
13771done
13772
13773    else
13774      # If it succeeded, then it was overridden by the user. We will use it
13775      # for the tool.
13776
13777      # First remove it from the list of overridden variables, so we can test
13778      # for unknown variables in the end.
13779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13780
13781      # Check if we try to supply an empty value
13782      if test "x$READLINK" = x; then
13783        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13784$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13786$as_echo_n "checking for READLINK... " >&6; }
13787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13788$as_echo "disabled" >&6; }
13789      else
13790        # Check if the provided tool contains a complete path.
13791        tool_specified="$READLINK"
13792        tool_basename="${tool_specified##*/}"
13793        if test "x$tool_basename" = "x$tool_specified"; then
13794          # A command without a complete path is provided, search $PATH.
13795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13796$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13797          # Extract the first word of "$tool_basename", so it can be a program name with args.
13798set dummy $tool_basename; ac_word=$2
13799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13800$as_echo_n "checking for $ac_word... " >&6; }
13801if ${ac_cv_path_READLINK+:} false; then :
13802  $as_echo_n "(cached) " >&6
13803else
13804  case $READLINK in
13805  [\\/]* | ?:[\\/]*)
13806  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13807  ;;
13808  *)
13809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13810for as_dir in $PATH
13811do
13812  IFS=$as_save_IFS
13813  test -z "$as_dir" && as_dir=.
13814    for ac_exec_ext in '' $ac_executable_extensions; do
13815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13816    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13818    break 2
13819  fi
13820done
13821  done
13822IFS=$as_save_IFS
13823
13824  ;;
13825esac
13826fi
13827READLINK=$ac_cv_path_READLINK
13828if test -n "$READLINK"; then
13829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13830$as_echo "$READLINK" >&6; }
13831else
13832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13833$as_echo "no" >&6; }
13834fi
13835
13836
13837          if test "x$READLINK" = x; then
13838            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13839          fi
13840        else
13841          # Otherwise we believe it is a complete path. Use it as it is.
13842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13843$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13844          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13845$as_echo_n "checking for READLINK... " >&6; }
13846          if test ! -x "$tool_specified"; then
13847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13848$as_echo "not found" >&6; }
13849            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13850          fi
13851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13852$as_echo "$tool_specified" >&6; }
13853        fi
13854      fi
13855    fi
13856
13857  fi
13858
13859
13860
13861
13862  # Publish this variable in the help.
13863
13864
13865  if [ -z "${DF+x}" ]; then
13866    # The variable is not set by user, try to locate tool using the code snippet
13867    for ac_prog in df
13868do
13869  # Extract the first word of "$ac_prog", so it can be a program name with args.
13870set dummy $ac_prog; ac_word=$2
13871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13872$as_echo_n "checking for $ac_word... " >&6; }
13873if ${ac_cv_path_DF+:} false; then :
13874  $as_echo_n "(cached) " >&6
13875else
13876  case $DF in
13877  [\\/]* | ?:[\\/]*)
13878  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13879  ;;
13880  *)
13881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13882for as_dir in $PATH
13883do
13884  IFS=$as_save_IFS
13885  test -z "$as_dir" && as_dir=.
13886    for ac_exec_ext in '' $ac_executable_extensions; do
13887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13888    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13890    break 2
13891  fi
13892done
13893  done
13894IFS=$as_save_IFS
13895
13896  ;;
13897esac
13898fi
13899DF=$ac_cv_path_DF
13900if test -n "$DF"; then
13901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13902$as_echo "$DF" >&6; }
13903else
13904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13905$as_echo "no" >&6; }
13906fi
13907
13908
13909  test -n "$DF" && break
13910done
13911
13912  else
13913    # The variable is set, but is it from the command line or the environment?
13914
13915    # Try to remove the string !DF! from our list.
13916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13918      # If it failed, the variable was not from the command line. Ignore it,
13919      # but warn the user (except for BASH, which is always set by the calling BASH).
13920      if test "xDF" != xBASH; then
13921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13922$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13923      fi
13924      # Try to locate tool using the code snippet
13925      for ac_prog in df
13926do
13927  # Extract the first word of "$ac_prog", so it can be a program name with args.
13928set dummy $ac_prog; ac_word=$2
13929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13930$as_echo_n "checking for $ac_word... " >&6; }
13931if ${ac_cv_path_DF+:} false; then :
13932  $as_echo_n "(cached) " >&6
13933else
13934  case $DF in
13935  [\\/]* | ?:[\\/]*)
13936  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13937  ;;
13938  *)
13939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13940for as_dir in $PATH
13941do
13942  IFS=$as_save_IFS
13943  test -z "$as_dir" && as_dir=.
13944    for ac_exec_ext in '' $ac_executable_extensions; do
13945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13946    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13948    break 2
13949  fi
13950done
13951  done
13952IFS=$as_save_IFS
13953
13954  ;;
13955esac
13956fi
13957DF=$ac_cv_path_DF
13958if test -n "$DF"; then
13959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13960$as_echo "$DF" >&6; }
13961else
13962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13963$as_echo "no" >&6; }
13964fi
13965
13966
13967  test -n "$DF" && break
13968done
13969
13970    else
13971      # If it succeeded, then it was overridden by the user. We will use it
13972      # for the tool.
13973
13974      # First remove it from the list of overridden variables, so we can test
13975      # for unknown variables in the end.
13976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13977
13978      # Check if we try to supply an empty value
13979      if test "x$DF" = x; then
13980        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13981$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13983$as_echo_n "checking for DF... " >&6; }
13984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13985$as_echo "disabled" >&6; }
13986      else
13987        # Check if the provided tool contains a complete path.
13988        tool_specified="$DF"
13989        tool_basename="${tool_specified##*/}"
13990        if test "x$tool_basename" = "x$tool_specified"; then
13991          # A command without a complete path is provided, search $PATH.
13992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13993$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13994          # Extract the first word of "$tool_basename", so it can be a program name with args.
13995set dummy $tool_basename; ac_word=$2
13996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13997$as_echo_n "checking for $ac_word... " >&6; }
13998if ${ac_cv_path_DF+:} false; then :
13999  $as_echo_n "(cached) " >&6
14000else
14001  case $DF in
14002  [\\/]* | ?:[\\/]*)
14003  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14004  ;;
14005  *)
14006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14007for as_dir in $PATH
14008do
14009  IFS=$as_save_IFS
14010  test -z "$as_dir" && as_dir=.
14011    for ac_exec_ext in '' $ac_executable_extensions; do
14012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14013    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14015    break 2
14016  fi
14017done
14018  done
14019IFS=$as_save_IFS
14020
14021  ;;
14022esac
14023fi
14024DF=$ac_cv_path_DF
14025if test -n "$DF"; then
14026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14027$as_echo "$DF" >&6; }
14028else
14029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14030$as_echo "no" >&6; }
14031fi
14032
14033
14034          if test "x$DF" = x; then
14035            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14036          fi
14037        else
14038          # Otherwise we believe it is a complete path. Use it as it is.
14039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14040$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14041          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14042$as_echo_n "checking for DF... " >&6; }
14043          if test ! -x "$tool_specified"; then
14044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14045$as_echo "not found" >&6; }
14046            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14047          fi
14048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14049$as_echo "$tool_specified" >&6; }
14050        fi
14051      fi
14052    fi
14053
14054  fi
14055
14056
14057
14058
14059  # Publish this variable in the help.
14060
14061
14062  if [ -z "${CPIO+x}" ]; then
14063    # The variable is not set by user, try to locate tool using the code snippet
14064    for ac_prog in cpio bsdcpio
14065do
14066  # Extract the first word of "$ac_prog", so it can be a program name with args.
14067set dummy $ac_prog; ac_word=$2
14068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14069$as_echo_n "checking for $ac_word... " >&6; }
14070if ${ac_cv_path_CPIO+:} false; then :
14071  $as_echo_n "(cached) " >&6
14072else
14073  case $CPIO in
14074  [\\/]* | ?:[\\/]*)
14075  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14076  ;;
14077  *)
14078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14079for as_dir in $PATH
14080do
14081  IFS=$as_save_IFS
14082  test -z "$as_dir" && as_dir=.
14083    for ac_exec_ext in '' $ac_executable_extensions; do
14084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14085    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14087    break 2
14088  fi
14089done
14090  done
14091IFS=$as_save_IFS
14092
14093  ;;
14094esac
14095fi
14096CPIO=$ac_cv_path_CPIO
14097if test -n "$CPIO"; then
14098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14099$as_echo "$CPIO" >&6; }
14100else
14101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14102$as_echo "no" >&6; }
14103fi
14104
14105
14106  test -n "$CPIO" && break
14107done
14108
14109  else
14110    # The variable is set, but is it from the command line or the environment?
14111
14112    # Try to remove the string !CPIO! from our list.
14113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14115      # If it failed, the variable was not from the command line. Ignore it,
14116      # but warn the user (except for BASH, which is always set by the calling BASH).
14117      if test "xCPIO" != xBASH; then
14118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14119$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14120      fi
14121      # Try to locate tool using the code snippet
14122      for ac_prog in cpio bsdcpio
14123do
14124  # Extract the first word of "$ac_prog", so it can be a program name with args.
14125set dummy $ac_prog; ac_word=$2
14126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14127$as_echo_n "checking for $ac_word... " >&6; }
14128if ${ac_cv_path_CPIO+:} false; then :
14129  $as_echo_n "(cached) " >&6
14130else
14131  case $CPIO in
14132  [\\/]* | ?:[\\/]*)
14133  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14134  ;;
14135  *)
14136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14137for as_dir in $PATH
14138do
14139  IFS=$as_save_IFS
14140  test -z "$as_dir" && as_dir=.
14141    for ac_exec_ext in '' $ac_executable_extensions; do
14142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14143    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14145    break 2
14146  fi
14147done
14148  done
14149IFS=$as_save_IFS
14150
14151  ;;
14152esac
14153fi
14154CPIO=$ac_cv_path_CPIO
14155if test -n "$CPIO"; then
14156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14157$as_echo "$CPIO" >&6; }
14158else
14159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14160$as_echo "no" >&6; }
14161fi
14162
14163
14164  test -n "$CPIO" && break
14165done
14166
14167    else
14168      # If it succeeded, then it was overridden by the user. We will use it
14169      # for the tool.
14170
14171      # First remove it from the list of overridden variables, so we can test
14172      # for unknown variables in the end.
14173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14174
14175      # Check if we try to supply an empty value
14176      if test "x$CPIO" = x; then
14177        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14178$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14180$as_echo_n "checking for CPIO... " >&6; }
14181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14182$as_echo "disabled" >&6; }
14183      else
14184        # Check if the provided tool contains a complete path.
14185        tool_specified="$CPIO"
14186        tool_basename="${tool_specified##*/}"
14187        if test "x$tool_basename" = "x$tool_specified"; then
14188          # A command without a complete path is provided, search $PATH.
14189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14190$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14191          # Extract the first word of "$tool_basename", so it can be a program name with args.
14192set dummy $tool_basename; ac_word=$2
14193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14194$as_echo_n "checking for $ac_word... " >&6; }
14195if ${ac_cv_path_CPIO+:} false; then :
14196  $as_echo_n "(cached) " >&6
14197else
14198  case $CPIO in
14199  [\\/]* | ?:[\\/]*)
14200  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14201  ;;
14202  *)
14203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14204for as_dir in $PATH
14205do
14206  IFS=$as_save_IFS
14207  test -z "$as_dir" && as_dir=.
14208    for ac_exec_ext in '' $ac_executable_extensions; do
14209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14210    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14212    break 2
14213  fi
14214done
14215  done
14216IFS=$as_save_IFS
14217
14218  ;;
14219esac
14220fi
14221CPIO=$ac_cv_path_CPIO
14222if test -n "$CPIO"; then
14223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14224$as_echo "$CPIO" >&6; }
14225else
14226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14227$as_echo "no" >&6; }
14228fi
14229
14230
14231          if test "x$CPIO" = x; then
14232            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14233          fi
14234        else
14235          # Otherwise we believe it is a complete path. Use it as it is.
14236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14237$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14238          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14239$as_echo_n "checking for CPIO... " >&6; }
14240          if test ! -x "$tool_specified"; then
14241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14242$as_echo "not found" >&6; }
14243            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14244          fi
14245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14246$as_echo "$tool_specified" >&6; }
14247        fi
14248      fi
14249    fi
14250
14251  fi
14252
14253
14254
14255
14256  # Publish this variable in the help.
14257
14258
14259  if [ -z "${NICE+x}" ]; then
14260    # The variable is not set by user, try to locate tool using the code snippet
14261    for ac_prog in nice
14262do
14263  # Extract the first word of "$ac_prog", so it can be a program name with args.
14264set dummy $ac_prog; ac_word=$2
14265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14266$as_echo_n "checking for $ac_word... " >&6; }
14267if ${ac_cv_path_NICE+:} false; then :
14268  $as_echo_n "(cached) " >&6
14269else
14270  case $NICE in
14271  [\\/]* | ?:[\\/]*)
14272  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14273  ;;
14274  *)
14275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14276for as_dir in $PATH
14277do
14278  IFS=$as_save_IFS
14279  test -z "$as_dir" && as_dir=.
14280    for ac_exec_ext in '' $ac_executable_extensions; do
14281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14282    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14284    break 2
14285  fi
14286done
14287  done
14288IFS=$as_save_IFS
14289
14290  ;;
14291esac
14292fi
14293NICE=$ac_cv_path_NICE
14294if test -n "$NICE"; then
14295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14296$as_echo "$NICE" >&6; }
14297else
14298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14299$as_echo "no" >&6; }
14300fi
14301
14302
14303  test -n "$NICE" && break
14304done
14305
14306  else
14307    # The variable is set, but is it from the command line or the environment?
14308
14309    # Try to remove the string !NICE! from our list.
14310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14312      # If it failed, the variable was not from the command line. Ignore it,
14313      # but warn the user (except for BASH, which is always set by the calling BASH).
14314      if test "xNICE" != xBASH; then
14315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14316$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14317      fi
14318      # Try to locate tool using the code snippet
14319      for ac_prog in nice
14320do
14321  # Extract the first word of "$ac_prog", so it can be a program name with args.
14322set dummy $ac_prog; ac_word=$2
14323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14324$as_echo_n "checking for $ac_word... " >&6; }
14325if ${ac_cv_path_NICE+:} false; then :
14326  $as_echo_n "(cached) " >&6
14327else
14328  case $NICE in
14329  [\\/]* | ?:[\\/]*)
14330  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14331  ;;
14332  *)
14333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14334for as_dir in $PATH
14335do
14336  IFS=$as_save_IFS
14337  test -z "$as_dir" && as_dir=.
14338    for ac_exec_ext in '' $ac_executable_extensions; do
14339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14340    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14342    break 2
14343  fi
14344done
14345  done
14346IFS=$as_save_IFS
14347
14348  ;;
14349esac
14350fi
14351NICE=$ac_cv_path_NICE
14352if test -n "$NICE"; then
14353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14354$as_echo "$NICE" >&6; }
14355else
14356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14357$as_echo "no" >&6; }
14358fi
14359
14360
14361  test -n "$NICE" && break
14362done
14363
14364    else
14365      # If it succeeded, then it was overridden by the user. We will use it
14366      # for the tool.
14367
14368      # First remove it from the list of overridden variables, so we can test
14369      # for unknown variables in the end.
14370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14371
14372      # Check if we try to supply an empty value
14373      if test "x$NICE" = x; then
14374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14375$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14377$as_echo_n "checking for NICE... " >&6; }
14378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14379$as_echo "disabled" >&6; }
14380      else
14381        # Check if the provided tool contains a complete path.
14382        tool_specified="$NICE"
14383        tool_basename="${tool_specified##*/}"
14384        if test "x$tool_basename" = "x$tool_specified"; then
14385          # A command without a complete path is provided, search $PATH.
14386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14387$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14388          # Extract the first word of "$tool_basename", so it can be a program name with args.
14389set dummy $tool_basename; ac_word=$2
14390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14391$as_echo_n "checking for $ac_word... " >&6; }
14392if ${ac_cv_path_NICE+:} false; then :
14393  $as_echo_n "(cached) " >&6
14394else
14395  case $NICE in
14396  [\\/]* | ?:[\\/]*)
14397  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14398  ;;
14399  *)
14400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14401for as_dir in $PATH
14402do
14403  IFS=$as_save_IFS
14404  test -z "$as_dir" && as_dir=.
14405    for ac_exec_ext in '' $ac_executable_extensions; do
14406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14407    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14409    break 2
14410  fi
14411done
14412  done
14413IFS=$as_save_IFS
14414
14415  ;;
14416esac
14417fi
14418NICE=$ac_cv_path_NICE
14419if test -n "$NICE"; then
14420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14421$as_echo "$NICE" >&6; }
14422else
14423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14424$as_echo "no" >&6; }
14425fi
14426
14427
14428          if test "x$NICE" = x; then
14429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14430          fi
14431        else
14432          # Otherwise we believe it is a complete path. Use it as it is.
14433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14434$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14436$as_echo_n "checking for NICE... " >&6; }
14437          if test ! -x "$tool_specified"; then
14438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14439$as_echo "not found" >&6; }
14440            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14441          fi
14442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14443$as_echo "$tool_specified" >&6; }
14444        fi
14445      fi
14446    fi
14447
14448  fi
14449
14450
14451
14452
14453# Now we can determine OpenJDK build and target platforms. This is required to
14454# have early on.
14455# Make sure we can run config.sub.
14456$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14457  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14458
14459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14460$as_echo_n "checking build system type... " >&6; }
14461if ${ac_cv_build+:} false; then :
14462  $as_echo_n "(cached) " >&6
14463else
14464  ac_build_alias=$build_alias
14465test "x$ac_build_alias" = x &&
14466  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14467test "x$ac_build_alias" = x &&
14468  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14469ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14470  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14471
14472fi
14473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14474$as_echo "$ac_cv_build" >&6; }
14475case $ac_cv_build in
14476*-*-*) ;;
14477*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14478esac
14479build=$ac_cv_build
14480ac_save_IFS=$IFS; IFS='-'
14481set x $ac_cv_build
14482shift
14483build_cpu=$1
14484build_vendor=$2
14485shift; shift
14486# Remember, the first character of IFS is used to create $*,
14487# except with old shells:
14488build_os=$*
14489IFS=$ac_save_IFS
14490case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14491
14492
14493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14494$as_echo_n "checking host system type... " >&6; }
14495if ${ac_cv_host+:} false; then :
14496  $as_echo_n "(cached) " >&6
14497else
14498  if test "x$host_alias" = x; then
14499  ac_cv_host=$ac_cv_build
14500else
14501  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14502    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14503fi
14504
14505fi
14506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14507$as_echo "$ac_cv_host" >&6; }
14508case $ac_cv_host in
14509*-*-*) ;;
14510*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14511esac
14512host=$ac_cv_host
14513ac_save_IFS=$IFS; IFS='-'
14514set x $ac_cv_host
14515shift
14516host_cpu=$1
14517host_vendor=$2
14518shift; shift
14519# Remember, the first character of IFS is used to create $*,
14520# except with old shells:
14521host_os=$*
14522IFS=$ac_save_IFS
14523case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14524
14525
14526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14527$as_echo_n "checking target system type... " >&6; }
14528if ${ac_cv_target+:} false; then :
14529  $as_echo_n "(cached) " >&6
14530else
14531  if test "x$target_alias" = x; then
14532  ac_cv_target=$ac_cv_host
14533else
14534  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14535    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14536fi
14537
14538fi
14539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14540$as_echo "$ac_cv_target" >&6; }
14541case $ac_cv_target in
14542*-*-*) ;;
14543*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14544esac
14545target=$ac_cv_target
14546ac_save_IFS=$IFS; IFS='-'
14547set x $ac_cv_target
14548shift
14549target_cpu=$1
14550target_vendor=$2
14551shift; shift
14552# Remember, the first character of IFS is used to create $*,
14553# except with old shells:
14554target_os=$*
14555IFS=$ac_save_IFS
14556case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14557
14558
14559# The aliases save the names the user supplied, while $host etc.
14560# will get canonicalized.
14561test -n "$target_alias" &&
14562  test "$program_prefix$program_suffix$program_transform_name" = \
14563    NONENONEs,x,x, &&
14564  program_prefix=${target_alias}-
14565
14566  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14567  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14568  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14569  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14570  # to use the configure naming style.
14571
14572
14573
14574
14575
14576  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14577  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14578  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14579  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14580  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14581  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14582
14583
14584
14585  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14586
14587  case "$build_os" in
14588    *linux*)
14589      VAR_OS=linux
14590      VAR_OS_TYPE=unix
14591      ;;
14592    *solaris*)
14593      VAR_OS=solaris
14594      VAR_OS_TYPE=unix
14595      ;;
14596    *darwin*)
14597      VAR_OS=macosx
14598      VAR_OS_TYPE=unix
14599      ;;
14600    *bsd*)
14601      VAR_OS=bsd
14602      VAR_OS_TYPE=unix
14603      ;;
14604    *cygwin*)
14605      VAR_OS=windows
14606      VAR_OS_ENV=windows.cygwin
14607      ;;
14608    *mingw*)
14609      VAR_OS=windows
14610      VAR_OS_ENV=windows.msys
14611      ;;
14612    *aix*)
14613      VAR_OS=aix
14614      VAR_OS_TYPE=unix
14615      ;;
14616    *)
14617      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14618      ;;
14619  esac
14620
14621
14622  # First argument is the cpu name from the trip/quad
14623  case "$build_cpu" in
14624    x86_64)
14625      VAR_CPU=x86_64
14626      VAR_CPU_ARCH=x86
14627      VAR_CPU_BITS=64
14628      VAR_CPU_ENDIAN=little
14629      ;;
14630    i?86)
14631      VAR_CPU=x86
14632      VAR_CPU_ARCH=x86
14633      VAR_CPU_BITS=32
14634      VAR_CPU_ENDIAN=little
14635      ;;
14636    arm*)
14637      VAR_CPU=arm
14638      VAR_CPU_ARCH=arm
14639      VAR_CPU_BITS=32
14640      VAR_CPU_ENDIAN=little
14641      ;;
14642    aarch64)
14643      VAR_CPU=aarch64
14644      VAR_CPU_ARCH=aarch64
14645      VAR_CPU_BITS=64
14646      VAR_CPU_ENDIAN=little
14647      ;;
14648    powerpc)
14649      VAR_CPU=ppc
14650      VAR_CPU_ARCH=ppc
14651      VAR_CPU_BITS=32
14652      VAR_CPU_ENDIAN=big
14653      ;;
14654    powerpc64)
14655      VAR_CPU=ppc64
14656      VAR_CPU_ARCH=ppc
14657      VAR_CPU_BITS=64
14658      VAR_CPU_ENDIAN=big
14659      ;;
14660    powerpc64le)
14661      VAR_CPU=ppc64
14662      VAR_CPU_ARCH=ppc
14663      VAR_CPU_BITS=64
14664      VAR_CPU_ENDIAN=little
14665      ;;
14666    s390)
14667      VAR_CPU=s390
14668      VAR_CPU_ARCH=s390
14669      VAR_CPU_BITS=32
14670      VAR_CPU_ENDIAN=big
14671      ;;
14672    s390x)
14673      VAR_CPU=s390x
14674      VAR_CPU_ARCH=s390
14675      VAR_CPU_BITS=64
14676      VAR_CPU_ENDIAN=big
14677      ;;
14678    sparc)
14679      VAR_CPU=sparc
14680      VAR_CPU_ARCH=sparc
14681      VAR_CPU_BITS=32
14682      VAR_CPU_ENDIAN=big
14683      ;;
14684    sparcv9|sparc64)
14685      VAR_CPU=sparcv9
14686      VAR_CPU_ARCH=sparc
14687      VAR_CPU_BITS=64
14688      VAR_CPU_ENDIAN=big
14689      ;;
14690    *)
14691      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14692      ;;
14693  esac
14694
14695  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14696  OPENJDK_BUILD_OS="$VAR_OS"
14697  if test "x$VAR_OS_TYPE" != x; then
14698    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14699  else
14700    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14701  fi
14702  if test "x$VAR_OS_ENV" != x; then
14703    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14704  else
14705    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14706  fi
14707  OPENJDK_BUILD_CPU="$VAR_CPU"
14708  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14709  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14710  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14711
14712
14713
14714
14715
14716
14717
14718
14719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14720$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14722$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14723
14724  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14725
14726  case "$host_os" in
14727    *linux*)
14728      VAR_OS=linux
14729      VAR_OS_TYPE=unix
14730      ;;
14731    *solaris*)
14732      VAR_OS=solaris
14733      VAR_OS_TYPE=unix
14734      ;;
14735    *darwin*)
14736      VAR_OS=macosx
14737      VAR_OS_TYPE=unix
14738      ;;
14739    *bsd*)
14740      VAR_OS=bsd
14741      VAR_OS_TYPE=unix
14742      ;;
14743    *cygwin*)
14744      VAR_OS=windows
14745      VAR_OS_ENV=windows.cygwin
14746      ;;
14747    *mingw*)
14748      VAR_OS=windows
14749      VAR_OS_ENV=windows.msys
14750      ;;
14751    *aix*)
14752      VAR_OS=aix
14753      VAR_OS_TYPE=unix
14754      ;;
14755    *)
14756      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14757      ;;
14758  esac
14759
14760
14761  # First argument is the cpu name from the trip/quad
14762  case "$host_cpu" in
14763    x86_64)
14764      VAR_CPU=x86_64
14765      VAR_CPU_ARCH=x86
14766      VAR_CPU_BITS=64
14767      VAR_CPU_ENDIAN=little
14768      ;;
14769    i?86)
14770      VAR_CPU=x86
14771      VAR_CPU_ARCH=x86
14772      VAR_CPU_BITS=32
14773      VAR_CPU_ENDIAN=little
14774      ;;
14775    arm*)
14776      VAR_CPU=arm
14777      VAR_CPU_ARCH=arm
14778      VAR_CPU_BITS=32
14779      VAR_CPU_ENDIAN=little
14780      ;;
14781    aarch64)
14782      VAR_CPU=aarch64
14783      VAR_CPU_ARCH=aarch64
14784      VAR_CPU_BITS=64
14785      VAR_CPU_ENDIAN=little
14786      ;;
14787    powerpc)
14788      VAR_CPU=ppc
14789      VAR_CPU_ARCH=ppc
14790      VAR_CPU_BITS=32
14791      VAR_CPU_ENDIAN=big
14792      ;;
14793    powerpc64)
14794      VAR_CPU=ppc64
14795      VAR_CPU_ARCH=ppc
14796      VAR_CPU_BITS=64
14797      VAR_CPU_ENDIAN=big
14798      ;;
14799    powerpc64le)
14800      VAR_CPU=ppc64
14801      VAR_CPU_ARCH=ppc
14802      VAR_CPU_BITS=64
14803      VAR_CPU_ENDIAN=little
14804      ;;
14805    s390)
14806      VAR_CPU=s390
14807      VAR_CPU_ARCH=s390
14808      VAR_CPU_BITS=32
14809      VAR_CPU_ENDIAN=big
14810      ;;
14811    s390x)
14812      VAR_CPU=s390x
14813      VAR_CPU_ARCH=s390
14814      VAR_CPU_BITS=64
14815      VAR_CPU_ENDIAN=big
14816      ;;
14817    sparc)
14818      VAR_CPU=sparc
14819      VAR_CPU_ARCH=sparc
14820      VAR_CPU_BITS=32
14821      VAR_CPU_ENDIAN=big
14822      ;;
14823    sparcv9|sparc64)
14824      VAR_CPU=sparcv9
14825      VAR_CPU_ARCH=sparc
14826      VAR_CPU_BITS=64
14827      VAR_CPU_ENDIAN=big
14828      ;;
14829    *)
14830      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14831      ;;
14832  esac
14833
14834  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14835  OPENJDK_TARGET_OS="$VAR_OS"
14836  if test "x$VAR_OS_TYPE" != x; then
14837    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14838  else
14839    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14840  fi
14841  if test "x$VAR_OS_ENV" != x; then
14842    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14843  else
14844    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14845  fi
14846  OPENJDK_TARGET_CPU="$VAR_CPU"
14847  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14848  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14849  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14850
14851
14852
14853
14854
14855
14856
14857
14858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14859$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14861$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14862
14863
14864
14865# Check whether --with-target-bits was given.
14866if test "${with_target_bits+set}" = set; then :
14867  withval=$with_target_bits;
14868fi
14869
14870
14871  # We have three types of compiles:
14872  # native  == normal compilation, target system == build system
14873  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14874  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14875  #
14876  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14877    # We're doing a proper cross-compilation
14878    COMPILE_TYPE="cross"
14879  else
14880    COMPILE_TYPE="native"
14881  fi
14882
14883  if test "x$with_target_bits" != x; then
14884    if test "x$COMPILE_TYPE" = "xcross"; then
14885      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14886    fi
14887
14888    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14889      # A reduced build is requested
14890      COMPILE_TYPE="reduced"
14891      OPENJDK_TARGET_CPU_BITS=32
14892      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14893        OPENJDK_TARGET_CPU=x86
14894      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14895        OPENJDK_TARGET_CPU=sparc
14896      else
14897        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14898      fi
14899    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14900      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
14901    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14902      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14903$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14904    else
14905      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14906    fi
14907  fi
14908
14909
14910  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14911$as_echo_n "checking compilation type... " >&6; }
14912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14913$as_echo "$COMPILE_TYPE" >&6; }
14914
14915
14916  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14917    REQUIRED_OS_NAME=SunOS
14918    REQUIRED_OS_VERSION=5.10
14919  fi
14920  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14921    REQUIRED_OS_NAME=Linux
14922    REQUIRED_OS_VERSION=2.6
14923  fi
14924  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14925    REQUIRED_OS_NAME=Windows
14926    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14927      REQUIRED_OS_VERSION=5.2
14928    else
14929      REQUIRED_OS_VERSION=5.1
14930    fi
14931  fi
14932  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14933    REQUIRED_OS_NAME=Darwin
14934    REQUIRED_OS_VERSION=11.2
14935  fi
14936
14937
14938
14939
14940
14941  # Also store the legacy naming of the cpu.
14942  # Ie i586 and amd64 instead of x86 and x86_64
14943  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14944  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14945    OPENJDK_TARGET_CPU_LEGACY="i586"
14946  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14947    # On all platforms except MacOSX replace x86_64 with amd64.
14948    OPENJDK_TARGET_CPU_LEGACY="amd64"
14949  fi
14950
14951
14952  # And the second legacy naming of the cpu.
14953  # Ie i386 and amd64 instead of x86 and x86_64.
14954  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14955  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14956    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14957  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14958    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14959  fi
14960
14961
14962  # This is the name of the cpu (but using i386 and amd64 instead of
14963  # x86 and x86_64, respectively), preceeded by a /, to be used when
14964  # locating libraries. On macosx, it's empty, though.
14965  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14966  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14967    OPENJDK_TARGET_CPU_LIBDIR=""
14968  fi
14969
14970
14971  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14972  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14973  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14974  OPENJDK_TARGET_CPU_ISADIR=""
14975  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14976    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14977      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14978    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14979      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14980    fi
14981  fi
14982
14983
14984  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14985  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14986  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14987    # On linux only, we replace x86 with i386.
14988    OPENJDK_TARGET_CPU_OSARCH="i386"
14989  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14990    # On all platforms except macosx, we replace x86_64 with amd64.
14991    OPENJDK_TARGET_CPU_OSARCH="amd64"
14992  fi
14993
14994
14995  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14996  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14997    OPENJDK_TARGET_CPU_JLI="i386"
14998  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14999    # On all platforms except macosx, we replace x86_64 with amd64.
15000    OPENJDK_TARGET_CPU_JLI="amd64"
15001  fi
15002  # Now setup the -D flags for building libjli.
15003  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15004  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15005    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15006      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15007    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15008      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15009    fi
15010  fi
15011
15012
15013  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15014      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15015  else
15016      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15017  fi
15018
15019
15020  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15021    A_LP64="LP64:="
15022    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15023    # unpack200.exe
15024    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15025      ADD_LP64="-D_LP64=1"
15026    fi
15027  fi
15028  LP64=$A_LP64
15029
15030
15031  if test "x$COMPILE_TYPE" = "xcross"; then
15032    # FIXME: ... or should this include reduced builds..?
15033    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15034  else
15035    DEFINE_CROSS_COMPILE_ARCH=""
15036  fi
15037
15038
15039  # ZERO_ARCHDEF is used to enable architecture-specific code
15040  case "${OPENJDK_TARGET_CPU}" in
15041    ppc)     ZERO_ARCHDEF=PPC32 ;;
15042    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15043    s390*)   ZERO_ARCHDEF=S390  ;;
15044    sparc*)  ZERO_ARCHDEF=SPARC ;;
15045    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15046    x86)     ZERO_ARCHDEF=IA32  ;;
15047    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15048  esac
15049
15050
15051
15052
15053# Continue setting up basic stuff. Most remaining code require fundamental tools.
15054
15055  # Save the current directory this script was started from
15056  CURDIR="$PWD"
15057
15058  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15059  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15060  # was not available at that time.
15061  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15062  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15063    ORIGINAL_PATH="$REWRITTEN_PATH"
15064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15065$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15066  fi
15067
15068  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15069    PATH_SEP=";"
15070
15071  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15072  if test $SRC_ROOT_LENGTH -gt 100; then
15073    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15074  fi
15075
15076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15078$as_echo_n "checking cygwin release... " >&6; }
15079    CYGWIN_VERSION=`$UNAME -r`
15080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15081$as_echo "$CYGWIN_VERSION" >&6; }
15082    WINDOWS_ENV_VENDOR='cygwin'
15083    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15084
15085    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15086    if test "x$CYGWIN_VERSION_OLD" != x; then
15087      { $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
15088$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;}
15089      as_fn_error $? "Cannot continue" "$LINENO" 5
15090    fi
15091    if test "x$CYGPATH" = x; then
15092      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15093    fi
15094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15095$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15096    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15097    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15098    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15099    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15101$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15102    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15103    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15104    if test "x$test_cygdrive_prefix" = x; then
15105      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15106    fi
15107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15109$as_echo_n "checking msys release... " >&6; }
15110    MSYS_VERSION=`$UNAME -r`
15111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15112$as_echo "$MSYS_VERSION" >&6; }
15113
15114    WINDOWS_ENV_VENDOR='msys'
15115    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15116
15117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15118$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15119    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15120    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15121
15122  windows_path="$MSYS_ROOT_PATH"
15123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15124    unix_path=`$CYGPATH -u "$windows_path"`
15125    MSYS_ROOT_PATH="$unix_path"
15126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15128    MSYS_ROOT_PATH="$unix_path"
15129  fi
15130
15131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15132$as_echo "$MSYS_ROOT_PATH" >&6; }
15133    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15134  else
15135    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15136  fi
15137
15138  # Test if windows or unix (cygwin/msys) find is first in path.
15139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15140$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15141  FIND_BINARY_OUTPUT=`find --version 2>&1`
15142  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15144$as_echo "unix style" >&6; }
15145  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15147$as_echo "Windows" >&6; }
15148    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15149$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15150    { $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
15151$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15152    as_fn_error $? "Cannot continue" "$LINENO" 5
15153  else
15154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15155$as_echo "unknown" >&6; }
15156    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15157$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15158  fi
15159
15160  else
15161    PATH_SEP=":"
15162  fi
15163
15164
15165  # We get the top-level directory from the supporting wrappers.
15166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15167$as_echo_n "checking for top-level directory... " >&6; }
15168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15169$as_echo "$TOPDIR" >&6; }
15170
15171
15172  # Save the original version of TOPDIR for string comparisons
15173  ORIGINAL_TOPDIR="$TOPDIR"
15174
15175
15176  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15177
15178  # Only process if variable expands to non-empty
15179
15180  if test "x$CURDIR" != x; then
15181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15182
15183  # Input might be given as Windows format, start by converting to
15184  # unix format.
15185  path="$CURDIR"
15186  new_path=`$CYGPATH -u "$path"`
15187
15188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15191  # "foo.exe" is OK but "foo" is an error.
15192  #
15193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15194  # It is also a way to make sure we got the proper file name for the real test later on.
15195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15196  if test "x$test_shortpath" = x; then
15197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15198$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15199    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15200  fi
15201
15202  # Call helper function which possibly converts this using DOS-style short mode.
15203  # If so, the updated path is stored in $new_path.
15204
15205  input_path="$new_path"
15206  # Check if we need to convert this using DOS-style short mode. If the path
15207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15208  # take no chances and rewrite it.
15209  # Note: m4 eats our [], so we need to use [ and ] instead.
15210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15211  if test "x$has_forbidden_chars" != x; then
15212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15216      # Going to short mode and back again did indeed matter. Since short mode is
15217      # case insensitive, let's make it lowercase to improve readability.
15218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15219      # Now convert it back to Unix-style (cygpath)
15220      input_path=`$CYGPATH -u "$shortmode_path"`
15221      new_path="$input_path"
15222    fi
15223  fi
15224
15225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15226  if test "x$test_cygdrive_prefix" = x; then
15227    # As a simple fix, exclude /usr/bin since it's not a real path.
15228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15230      # a path prefixed by /cygdrive for fixpath to work.
15231      new_path="$CYGWIN_ROOT_PATH$input_path"
15232    fi
15233  fi
15234
15235
15236  if test "x$path" != "x$new_path"; then
15237    CURDIR="$new_path"
15238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15239$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15240  fi
15241
15242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15243
15244  path="$CURDIR"
15245  has_colon=`$ECHO $path | $GREP ^.:`
15246  new_path="$path"
15247  if test "x$has_colon" = x; then
15248    # Not in mixed or Windows style, start by that.
15249    new_path=`cmd //c echo $path`
15250  fi
15251
15252
15253  input_path="$new_path"
15254  # Check if we need to convert this using DOS-style short mode. If the path
15255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15256  # take no chances and rewrite it.
15257  # Note: m4 eats our [], so we need to use [ and ] instead.
15258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15259  if test "x$has_forbidden_chars" != x; then
15260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15262  fi
15263
15264
15265  windows_path="$new_path"
15266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15267    unix_path=`$CYGPATH -u "$windows_path"`
15268    new_path="$unix_path"
15269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15271    new_path="$unix_path"
15272  fi
15273
15274  if test "x$path" != "x$new_path"; then
15275    CURDIR="$new_path"
15276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15277$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15278  fi
15279
15280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15282
15283    else
15284      # We're on a unix platform. Hooray! :)
15285      path="$CURDIR"
15286      has_space=`$ECHO "$path" | $GREP " "`
15287      if test "x$has_space" != x; then
15288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15289$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15291      fi
15292
15293      # Use eval to expand a potential ~
15294      eval path="$path"
15295      if test ! -f "$path" && test ! -d "$path"; then
15296        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15297      fi
15298
15299      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15300    fi
15301  fi
15302
15303
15304  # Only process if variable expands to non-empty
15305
15306  if test "x$TOPDIR" != x; then
15307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15308
15309  # Input might be given as Windows format, start by converting to
15310  # unix format.
15311  path="$TOPDIR"
15312  new_path=`$CYGPATH -u "$path"`
15313
15314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15317  # "foo.exe" is OK but "foo" is an error.
15318  #
15319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15320  # It is also a way to make sure we got the proper file name for the real test later on.
15321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15322  if test "x$test_shortpath" = x; then
15323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15324$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15325    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15326  fi
15327
15328  # Call helper function which possibly converts this using DOS-style short mode.
15329  # If so, the updated path is stored in $new_path.
15330
15331  input_path="$new_path"
15332  # Check if we need to convert this using DOS-style short mode. If the path
15333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15334  # take no chances and rewrite it.
15335  # Note: m4 eats our [], so we need to use [ and ] instead.
15336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15337  if test "x$has_forbidden_chars" != x; then
15338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15342      # Going to short mode and back again did indeed matter. Since short mode is
15343      # case insensitive, let's make it lowercase to improve readability.
15344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15345      # Now convert it back to Unix-style (cygpath)
15346      input_path=`$CYGPATH -u "$shortmode_path"`
15347      new_path="$input_path"
15348    fi
15349  fi
15350
15351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15352  if test "x$test_cygdrive_prefix" = x; then
15353    # As a simple fix, exclude /usr/bin since it's not a real path.
15354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15356      # a path prefixed by /cygdrive for fixpath to work.
15357      new_path="$CYGWIN_ROOT_PATH$input_path"
15358    fi
15359  fi
15360
15361
15362  if test "x$path" != "x$new_path"; then
15363    TOPDIR="$new_path"
15364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15365$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15366  fi
15367
15368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15369
15370  path="$TOPDIR"
15371  has_colon=`$ECHO $path | $GREP ^.:`
15372  new_path="$path"
15373  if test "x$has_colon" = x; then
15374    # Not in mixed or Windows style, start by that.
15375    new_path=`cmd //c echo $path`
15376  fi
15377
15378
15379  input_path="$new_path"
15380  # Check if we need to convert this using DOS-style short mode. If the path
15381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15382  # take no chances and rewrite it.
15383  # Note: m4 eats our [], so we need to use [ and ] instead.
15384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15385  if test "x$has_forbidden_chars" != x; then
15386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15388  fi
15389
15390
15391  windows_path="$new_path"
15392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15393    unix_path=`$CYGPATH -u "$windows_path"`
15394    new_path="$unix_path"
15395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15397    new_path="$unix_path"
15398  fi
15399
15400  if test "x$path" != "x$new_path"; then
15401    TOPDIR="$new_path"
15402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15403$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15404  fi
15405
15406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15408
15409    else
15410      # We're on a unix platform. Hooray! :)
15411      path="$TOPDIR"
15412      has_space=`$ECHO "$path" | $GREP " "`
15413      if test "x$has_space" != x; then
15414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15415$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15417      fi
15418
15419      # Use eval to expand a potential ~
15420      eval path="$path"
15421      if test ! -f "$path" && test ! -d "$path"; then
15422        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15423      fi
15424
15425      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15426    fi
15427  fi
15428
15429  # SRC_ROOT is a traditional alias for TOPDIR.
15430  SRC_ROOT=$TOPDIR
15431
15432  # Calculate a canonical version of TOPDIR for string comparisons
15433  CANONICAL_TOPDIR=$TOPDIR
15434
15435  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15436    # Follow a chain of symbolic links. Use readlink
15437    # where it exists, else fall back to horribly
15438    # complicated shell code.
15439    if test "x$READLINK_TESTED" != yes; then
15440      # On MacOSX there is a readlink tool with a different
15441      # purpose than the GNU readlink tool. Check the found readlink.
15442      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15443      if test "x$ISGNU" = x; then
15444        # A readlink that we do not know how to use.
15445        # Are there other non-GNU readlinks out there?
15446        READLINK_TESTED=yes
15447        READLINK=
15448      fi
15449    fi
15450
15451    if test "x$READLINK" != x; then
15452      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15453    else
15454      # Save the current directory for restoring afterwards
15455      STARTDIR=$PWD
15456      COUNTER=0
15457      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15458      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15459      cd $sym_link_dir
15460      # Use -P flag to resolve symlinks in directories.
15461      cd `$THEPWDCMD -P`
15462      sym_link_dir=`$THEPWDCMD -P`
15463      # Resolve file symlinks
15464      while test $COUNTER -lt 20; do
15465        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15466        if test "x$ISLINK" == x; then
15467          # This is not a symbolic link! We are done!
15468          break
15469        fi
15470        # Again resolve directory symlinks since the target of the just found
15471        # link could be in a different directory
15472        cd `$DIRNAME $ISLINK`
15473        sym_link_dir=`$THEPWDCMD -P`
15474        sym_link_file=`$BASENAME $ISLINK`
15475        let COUNTER=COUNTER+1
15476      done
15477      cd $STARTDIR
15478      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15479    fi
15480  fi
15481
15482
15483
15484  # Locate the directory of this script.
15485  AUTOCONF_DIR=$TOPDIR/common/autoconf
15486
15487
15488# Check if it's a pure open build or if custom sources are to be used.
15489
15490  # Check whether --enable-openjdk-only was given.
15491if test "${enable_openjdk_only+set}" = set; then :
15492  enableval=$enable_openjdk_only;
15493else
15494  enable_openjdk_only="no"
15495fi
15496
15497
15498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15499$as_echo_n "checking for presence of closed sources... " >&6; }
15500  if test -d "$SRC_ROOT/jdk/src/closed"; then
15501    CLOSED_SOURCE_PRESENT=yes
15502  else
15503    CLOSED_SOURCE_PRESENT=no
15504  fi
15505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15506$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15507
15508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15509$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15510  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15512$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15513
15514  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15515    OPENJDK=true
15516    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15517      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15518$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15519    fi
15520  else
15521    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15522      OPENJDK=true
15523    else
15524      OPENJDK=false
15525    fi
15526  fi
15527
15528  if test "x$OPENJDK" = "xtrue"; then
15529    SET_OPENJDK="OPENJDK=true"
15530  fi
15531
15532
15533
15534  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15535  # the IncludeCustomExtension macro.
15536
15537
15538# Check whether --with-custom-make-dir was given.
15539if test "${with_custom_make_dir+set}" = set; then :
15540  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
15541$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15542fi
15543
15544
15545
15546
15547# These are needed to be able to create a configuration name (and thus the output directory)
15548
15549  ###############################################################################
15550  #
15551  # Check which variant of the JDK that we want to build.
15552  # Currently we have:
15553  #    normal:   standard edition
15554  # but the custom make system may add other variants
15555  #
15556  # Effectively the JDK variant gives a name to a specific set of
15557  # modules to compile into the JDK. In the future, these modules
15558  # might even be Jigsaw modules.
15559  #
15560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15561$as_echo_n "checking which variant of the JDK to build... " >&6; }
15562
15563# Check whether --with-jdk-variant was given.
15564if test "${with_jdk_variant+set}" = set; then :
15565  withval=$with_jdk_variant;
15566fi
15567
15568
15569  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15570    JDK_VARIANT="normal"
15571  else
15572    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15573  fi
15574
15575
15576
15577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15578$as_echo "$JDK_VARIANT" >&6; }
15579
15580
15581###############################################################################
15582#
15583# Check which interpreter of the JVM we want to build.
15584# Currently we have:
15585#    template: Template interpreter (the default)
15586#    cpp     : C++ interpreter
15587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15588$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15589
15590# Check whether --with-jvm-interpreter was given.
15591if test "${with_jvm_interpreter+set}" = set; then :
15592  withval=$with_jvm_interpreter;
15593fi
15594
15595
15596if test "x$with_jvm_interpreter" = x; then
15597     with_jvm_interpreter="template"
15598fi
15599
15600JVM_INTERPRETER="$with_jvm_interpreter"
15601
15602if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15603   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15604fi
15605
15606
15607
15608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15609$as_echo "$with_jvm_interpreter" >&6; }
15610
15611
15612
15613  ###############################################################################
15614  #
15615  # Check which variants of the JVM that we want to build.
15616  # Currently we have:
15617  #    server: normal interpreter and a tiered C1/C2 compiler
15618  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15619  #    minimal1: reduced form of client with optional VM services and features stripped out
15620  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15621  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15622  #    zero: no machine code interpreter, no compiler
15623  #    zeroshark: zero interpreter and shark/llvm compiler backend
15624#    core: interpreter only, no compiler (only works on some platforms)
15625  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15626$as_echo_n "checking which variants of the JVM to build... " >&6; }
15627
15628# Check whether --with-jvm-variants was given.
15629if test "${with_jvm_variants+set}" = set; then :
15630  withval=$with_jvm_variants;
15631fi
15632
15633
15634  if test "x$with_jvm_variants" = x; then
15635    with_jvm_variants="server"
15636  fi
15637
15638  JVM_VARIANTS=",$with_jvm_variants,"
15639  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,//'`
15640
15641  if test "x$TEST_VARIANTS" != "x,"; then
15642     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15643  fi
15644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15645$as_echo "$with_jvm_variants" >&6; }
15646
15647  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15648  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15649  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15650  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15651  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15652  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15653  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15654
15655  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15656    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15657      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15658    fi
15659  fi
15660  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15661    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15662      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15663    fi
15664  fi
15665  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15666    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15667      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15668    fi
15669  fi
15670
15671  # Replace the commas with AND for use in the build directory name.
15672  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15673  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/'`
15674  if test "x$COUNT_VARIANTS" != "x,1"; then
15675    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15676  else
15677    BUILDING_MULTIPLE_JVM_VARIANTS=no
15678  fi
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689  INCLUDE_SA=true
15690  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15691    INCLUDE_SA=false
15692  fi
15693  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15694    INCLUDE_SA=false
15695  fi
15696  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15697    INCLUDE_SA=false
15698  fi
15699  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15700    INCLUDE_SA=false
15701  fi
15702
15703
15704  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15705    MACOSX_UNIVERSAL="true"
15706  fi
15707
15708
15709
15710
15711  ###############################################################################
15712  #
15713  # Set the debug level
15714  #    release: no debug information, all optimizations, no asserts.
15715  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15716  #    fastdebug: debug information (-g), all optimizations, all asserts
15717  #    slowdebug: debug information (-g), no optimizations, all asserts
15718  #
15719  DEBUG_LEVEL="release"
15720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15721$as_echo_n "checking which debug level to use... " >&6; }
15722  # Check whether --enable-debug was given.
15723if test "${enable_debug+set}" = set; then :
15724  enableval=$enable_debug;
15725        ENABLE_DEBUG="${enableval}"
15726        DEBUG_LEVEL="fastdebug"
15727
15728else
15729  ENABLE_DEBUG="no"
15730fi
15731
15732
15733
15734# Check whether --with-debug-level was given.
15735if test "${with_debug_level+set}" = set; then :
15736  withval=$with_debug_level;
15737        DEBUG_LEVEL="${withval}"
15738        if test "x$ENABLE_DEBUG" = xyes; then
15739          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15740        fi
15741
15742fi
15743
15744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15745$as_echo "$DEBUG_LEVEL" >&6; }
15746
15747  if test "x$DEBUG_LEVEL" != xrelease && \
15748      test "x$DEBUG_LEVEL" != xoptimized && \
15749      test "x$DEBUG_LEVEL" != xfastdebug && \
15750      test "x$DEBUG_LEVEL" != xslowdebug; then
15751    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15752  fi
15753
15754
15755  ###############################################################################
15756  #
15757  # Setup legacy vars/targets and new vars to deal with different debug levels.
15758  #
15759
15760  case $DEBUG_LEVEL in
15761    release )
15762      VARIANT="OPT"
15763      FASTDEBUG="false"
15764      DEBUG_CLASSFILES="false"
15765      BUILD_VARIANT_RELEASE=""
15766      HOTSPOT_DEBUG_LEVEL="product"
15767      HOTSPOT_EXPORT="product"
15768      ;;
15769    fastdebug )
15770      VARIANT="DBG"
15771      FASTDEBUG="true"
15772      DEBUG_CLASSFILES="true"
15773      BUILD_VARIANT_RELEASE="-fastdebug"
15774      HOTSPOT_DEBUG_LEVEL="fastdebug"
15775      HOTSPOT_EXPORT="fastdebug"
15776      ;;
15777    slowdebug )
15778      VARIANT="DBG"
15779      FASTDEBUG="false"
15780      DEBUG_CLASSFILES="true"
15781      BUILD_VARIANT_RELEASE="-debug"
15782      HOTSPOT_DEBUG_LEVEL="debug"
15783      HOTSPOT_EXPORT="debug"
15784      ;;
15785    optimized )
15786      VARIANT="OPT"
15787      FASTDEBUG="false"
15788      DEBUG_CLASSFILES="false"
15789      BUILD_VARIANT_RELEASE="-optimized"
15790      HOTSPOT_DEBUG_LEVEL="optimized"
15791      HOTSPOT_EXPORT="optimized"
15792      ;;
15793  esac
15794
15795  # The debug level 'optimized' is a little special because it is currently only
15796  # applicable to the HotSpot build where it means to build a completely
15797  # optimized version of the VM without any debugging code (like for the
15798  # 'release' debug level which is called 'product' in the HotSpot build) but
15799  # with the exception that it can contain additional code which is otherwise
15800  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15801  # test new and/or experimental features which are not intended for customer
15802  # shipment. Because these new features need to be tested and benchmarked in
15803  # real world scenarios, we want to build the containing JDK at the 'release'
15804  # debug level.
15805  if test "x$DEBUG_LEVEL" = xoptimized; then
15806    DEBUG_LEVEL="release"
15807  fi
15808
15809  #####
15810  # Generate the legacy makefile targets for hotspot.
15811  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15812  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15813  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15814  # But until then ...
15815  HOTSPOT_TARGET=""
15816
15817  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15818    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15819  fi
15820
15821  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15822    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15823  fi
15824
15825  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15826    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15827  fi
15828
15829  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15830    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15831  fi
15832
15833  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15834    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15835  fi
15836
15837  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15838    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15839  fi
15840
15841  if test "x$JVM_VARIANT_CORE" = xtrue; then
15842    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15843  fi
15844
15845  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15846
15847  # On Macosx universal binaries are produced, but they only contain
15848  # 64 bit intel. This invalidates control of which jvms are built
15849  # from configure, but only server is valid anyway. Fix this
15850  # when hotspot makefiles are rewritten.
15851  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15852    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15853  fi
15854
15855  #####
15856
15857
15858
15859
15860
15861
15862
15863
15864# With basic setup done, call the custom early hook.
15865
15866
15867# Check if we have devkits, extra paths or sysroot set.
15868
15869
15870# Check whether --with-devkit was given.
15871if test "${with_devkit+set}" = set; then :
15872  withval=$with_devkit;
15873
15874  # Only process if variable expands to non-empty
15875
15876  if test "x$with_devkit" != x; then
15877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15878
15879  # Input might be given as Windows format, start by converting to
15880  # unix format.
15881  path="$with_devkit"
15882  new_path=`$CYGPATH -u "$path"`
15883
15884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15887  # "foo.exe" is OK but "foo" is an error.
15888  #
15889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15890  # It is also a way to make sure we got the proper file name for the real test later on.
15891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15892  if test "x$test_shortpath" = x; then
15893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15894$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15895    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15896  fi
15897
15898  # Call helper function which possibly converts this using DOS-style short mode.
15899  # If so, the updated path is stored in $new_path.
15900
15901  input_path="$new_path"
15902  # Check if we need to convert this using DOS-style short mode. If the path
15903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15904  # take no chances and rewrite it.
15905  # Note: m4 eats our [], so we need to use [ and ] instead.
15906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15907  if test "x$has_forbidden_chars" != x; then
15908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15912      # Going to short mode and back again did indeed matter. Since short mode is
15913      # case insensitive, let's make it lowercase to improve readability.
15914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15915      # Now convert it back to Unix-style (cygpath)
15916      input_path=`$CYGPATH -u "$shortmode_path"`
15917      new_path="$input_path"
15918    fi
15919  fi
15920
15921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15922  if test "x$test_cygdrive_prefix" = x; then
15923    # As a simple fix, exclude /usr/bin since it's not a real path.
15924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15926      # a path prefixed by /cygdrive for fixpath to work.
15927      new_path="$CYGWIN_ROOT_PATH$input_path"
15928    fi
15929  fi
15930
15931
15932  if test "x$path" != "x$new_path"; then
15933    with_devkit="$new_path"
15934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15935$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15936  fi
15937
15938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15939
15940  path="$with_devkit"
15941  has_colon=`$ECHO $path | $GREP ^.:`
15942  new_path="$path"
15943  if test "x$has_colon" = x; then
15944    # Not in mixed or Windows style, start by that.
15945    new_path=`cmd //c echo $path`
15946  fi
15947
15948
15949  input_path="$new_path"
15950  # Check if we need to convert this using DOS-style short mode. If the path
15951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15952  # take no chances and rewrite it.
15953  # Note: m4 eats our [], so we need to use [ and ] instead.
15954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15955  if test "x$has_forbidden_chars" != x; then
15956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15958  fi
15959
15960
15961  windows_path="$new_path"
15962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15963    unix_path=`$CYGPATH -u "$windows_path"`
15964    new_path="$unix_path"
15965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15967    new_path="$unix_path"
15968  fi
15969
15970  if test "x$path" != "x$new_path"; then
15971    with_devkit="$new_path"
15972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15973$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15974  fi
15975
15976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15978
15979    else
15980      # We're on a unix platform. Hooray! :)
15981      path="$with_devkit"
15982      has_space=`$ECHO "$path" | $GREP " "`
15983      if test "x$has_space" != x; then
15984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15985$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15987      fi
15988
15989      # Use eval to expand a potential ~
15990      eval path="$path"
15991      if test ! -f "$path" && test ! -d "$path"; then
15992        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15993      fi
15994
15995      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15996    fi
15997  fi
15998
15999        DEVKIT_ROOT="$with_devkit"
16000        # Check for a meta data info file in the root of the devkit
16001        if test -f "$DEVKIT_ROOT/devkit.info"; then
16002          . $DEVKIT_ROOT/devkit.info
16003          # This potentially sets the following:
16004          # A descriptive name of the devkit
16005
16006  if test "x$DEVKIT_NAME" = x; then
16007    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16008  fi
16009
16010          # Corresponds to --with-extra-path
16011
16012  if test "x$DEVKIT_EXTRA_PATH" = x; then
16013    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16014  fi
16015
16016          # Corresponds to --with-toolchain-path
16017
16018  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16019    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16020  fi
16021
16022          # Corresponds to --with-sysroot
16023
16024  if test "x$DEVKIT_SYSROOT" = x; then
16025    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16026  fi
16027
16028
16029          # Identifies the Visual Studio version in the devkit
16030
16031  if test "x$DEVKIT_VS_VERSION" = x; then
16032    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16033  fi
16034
16035          # The Visual Studio include environment variable
16036
16037  if test "x$DEVKIT_VS_INCLUDE" = x; then
16038    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16039  fi
16040
16041          # The Visual Studio lib environment variable
16042
16043  if test "x$DEVKIT_VS_LIB" = x; then
16044    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16045  fi
16046
16047          # Corresponds to --with-msvcr-dll
16048
16049  if test "x$DEVKIT_MSVCR_DLL" = x; then
16050    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16051  fi
16052
16053          # Corresponds to --with-msvcp-dll
16054
16055  if test "x$DEVKIT_MSVCP_DLL" = x; then
16056    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16057  fi
16058
16059        fi
16060
16061        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16062$as_echo_n "checking for devkit... " >&6; }
16063        if test "x$DEVKIT_NAME" != x; then
16064          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16065$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16066        else
16067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16068$as_echo "$DEVKIT_ROOT" >&6; }
16069        fi
16070
16071
16072  if test "x$DEVKIT_EXTRA_PATH" != x; then
16073    if test "x$EXTRA_PATH" = x; then
16074      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16075    else
16076      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16077    fi
16078  fi
16079
16080
16081        # Fallback default of just /bin if DEVKIT_PATH is not defined
16082        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16083          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16084        fi
16085
16086  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16087    if test "x$TOOLCHAIN_PATH" = x; then
16088      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16089    else
16090      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16091    fi
16092  fi
16093
16094
16095        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16096        # places for backwards compatiblity.
16097        if test "x$DEVKIT_SYSROOT" != x; then
16098          SYSROOT="$DEVKIT_SYSROOT"
16099        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16100          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16101        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16102          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16103        fi
16104
16105
16106fi
16107
16108
16109  # You can force the sysroot if the sysroot encoded into the compiler tools
16110  # is not correct.
16111
16112# Check whether --with-sys-root was given.
16113if test "${with_sys_root+set}" = set; then :
16114  withval=$with_sys_root; SYSROOT=$with_sys_root
16115
16116fi
16117
16118
16119
16120# Check whether --with-sysroot was given.
16121if test "${with_sysroot+set}" = set; then :
16122  withval=$with_sysroot; SYSROOT=$with_sysroot
16123
16124fi
16125
16126
16127
16128# Check whether --with-tools-dir was given.
16129if test "${with_tools_dir+set}" = set; then :
16130  withval=$with_tools_dir;
16131  if test "x$with_tools_dir" != x; then
16132    if test "x$TOOLCHAIN_PATH" = x; then
16133      TOOLCHAIN_PATH="$with_tools_dir"
16134    else
16135      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16136    fi
16137  fi
16138
16139
16140fi
16141
16142
16143
16144# Check whether --with-toolchain-path was given.
16145if test "${with_toolchain_path+set}" = set; then :
16146  withval=$with_toolchain_path;
16147  if test "x$with_toolchain_path" != x; then
16148    if test "x$TOOLCHAIN_PATH" = x; then
16149      TOOLCHAIN_PATH="$with_toolchain_path"
16150    else
16151      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16152    fi
16153  fi
16154
16155
16156fi
16157
16158
16159
16160# Check whether --with-extra-path was given.
16161if test "${with_extra_path+set}" = set; then :
16162  withval=$with_extra_path;
16163  if test "x$with_extra_path" != x; then
16164    if test "x$EXTRA_PATH" = x; then
16165      EXTRA_PATH="$with_extra_path"
16166    else
16167      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16168    fi
16169  fi
16170
16171
16172fi
16173
16174
16175  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16176    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16177    # If not, detect if Xcode is installed by running xcodebuild -version
16178    # if no Xcode installed, xcodebuild exits with 1
16179    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16180    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16181      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16182      # fall back on the stub binary in /usr/bin/xcodebuild
16183      # Extract the first word of "xcodebuild", so it can be a program name with args.
16184set dummy xcodebuild; ac_word=$2
16185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16186$as_echo_n "checking for $ac_word... " >&6; }
16187if ${ac_cv_path_XCODEBUILD+:} false; then :
16188  $as_echo_n "(cached) " >&6
16189else
16190  case $XCODEBUILD in
16191  [\\/]* | ?:[\\/]*)
16192  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16193  ;;
16194  *)
16195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16196for as_dir in $TOOLCHAIN_PATH
16197do
16198  IFS=$as_save_IFS
16199  test -z "$as_dir" && as_dir=.
16200    for ac_exec_ext in '' $ac_executable_extensions; do
16201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16202    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16204    break 2
16205  fi
16206done
16207  done
16208IFS=$as_save_IFS
16209
16210  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16211  ;;
16212esac
16213fi
16214XCODEBUILD=$ac_cv_path_XCODEBUILD
16215if test -n "$XCODEBUILD"; then
16216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16217$as_echo "$XCODEBUILD" >&6; }
16218else
16219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16220$as_echo "no" >&6; }
16221fi
16222
16223
16224    else
16225      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16226      # when only the command line tools are installed there are no SDKs, so headers
16227      # are copied into the system frameworks
16228      XCODEBUILD=
16229
16230    fi
16231
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16233$as_echo_n "checking for sdk name... " >&6; }
16234
16235# Check whether --with-sdk-name was given.
16236if test "${with_sdk_name+set}" = set; then :
16237  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16238
16239fi
16240
16241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16242$as_echo "$SDKNAME" >&6; }
16243
16244    # if toolchain path is specified then don't rely on system headers, they may not compile
16245    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16246    test -z "$TOOLCHAIN_PATH" && \
16247      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16248
16249    if test -z "$SYSROOT"; then
16250      if test -n "$XCODEBUILD"; then
16251        # if we don't have system headers, use default SDK name (last resort)
16252        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16253          SDKNAME=${SDKNAME:-macosx}
16254        fi
16255
16256        if test -n "$SDKNAME"; then
16257          # Call xcodebuild to determine SYSROOT
16258          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16259        fi
16260      else
16261        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16262          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
16263        fi
16264      fi
16265    else
16266      # warn user if --with-sdk-name was also set
16267      if test -n "$with_sdk_name"; then
16268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16269$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16270      fi
16271    fi
16272
16273    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16274      # If no system framework headers, then SYSROOT must be set, or we won't build
16275      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
16276    fi
16277
16278    # Perform a basic sanity test
16279    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16280      if test -z "$SYSROOT"; then
16281        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
16282      else
16283        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16284      fi
16285    fi
16286
16287    # set SDKROOT too, Xcode tools will pick it up
16288    SDKROOT=$SYSROOT
16289
16290  fi
16291
16292  # Prepend the extra path to the global path
16293
16294  if test "x$EXTRA_PATH" != x; then
16295    if test "x$PATH" = x; then
16296      PATH="$EXTRA_PATH"
16297    else
16298      PATH="$EXTRA_PATH:$PATH"
16299    fi
16300  fi
16301
16302
16303  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16304    # Add extra search paths on solaris for utilities like ar and as etc...
16305    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16306  fi
16307
16308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16309$as_echo_n "checking for sysroot... " >&6; }
16310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16311$as_echo "$SYSROOT" >&6; }
16312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16313$as_echo_n "checking for toolchain path... " >&6; }
16314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16315$as_echo "$TOOLCHAIN_PATH" >&6; }
16316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16317$as_echo_n "checking for extra path... " >&6; }
16318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16319$as_echo "$EXTRA_PATH" >&6; }
16320
16321
16322# To properly create a configuration name, we need to have the OpenJDK target
16323# and options (variants and debug level) parsed.
16324
16325
16326
16327# Check whether --with-conf-name was given.
16328if test "${with_conf_name+set}" = set; then :
16329  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16330fi
16331
16332
16333  # Test from where we are running configure, in or outside of src root.
16334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16335$as_echo_n "checking where to store configuration... " >&6; }
16336  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16337      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16338      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16339    # We are running configure from the src root.
16340    # Create a default ./build/target-variant-debuglevel output root.
16341    if test "x${CONF_NAME}" = x; then
16342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16343$as_echo "in default location" >&6; }
16344      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16345    else
16346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16347$as_echo "in build directory with custom name" >&6; }
16348    fi
16349    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16350    $MKDIR -p "$OUTPUT_ROOT"
16351    if test ! -d "$OUTPUT_ROOT"; then
16352      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16353    fi
16354  else
16355    # We are running configure from outside of the src dir.
16356    # Then use the current directory as output dir!
16357    # If configuration is situated in normal build directory, just use the build
16358    # directory name as configuration name, otherwise use the complete path.
16359    if test "x${CONF_NAME}" = x; then
16360      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16361    fi
16362    OUTPUT_ROOT="$CURDIR"
16363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16364$as_echo "in current directory" >&6; }
16365
16366    # WARNING: This might be a bad thing to do. You need to be sure you want to
16367    # have a configuration in this directory. Do some sanity checks!
16368
16369    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16370      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16371      # other files
16372      files_present=`$LS $OUTPUT_ROOT`
16373      # Configure has already touched config.log and confdefs.h in the current dir when this check
16374      # is performed.
16375      filtered_files=`$ECHO "$files_present" \
16376          | $SED -e 's/config.log//g' \
16377              -e 's/configure.log//g' \
16378              -e 's/confdefs.h//g' \
16379              -e 's/ //g' \
16380          | $TR -d '\n'`
16381      if test "x$filtered_files" != x; then
16382        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16383$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16384        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16385$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16386        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16387$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16388        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16389$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16390        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16391$as_echo "$as_me: seriously mess up just about everything." >&6;}
16392        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16393$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16394        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16395$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16396        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16397      fi
16398    fi
16399  fi
16400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16401$as_echo_n "checking what configuration name to use... " >&6; }
16402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16403$as_echo "$CONF_NAME" >&6; }
16404
16405
16406  # Only process if variable expands to non-empty
16407
16408  if test "x$OUTPUT_ROOT" != x; then
16409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16410
16411  # Input might be given as Windows format, start by converting to
16412  # unix format.
16413  path="$OUTPUT_ROOT"
16414  new_path=`$CYGPATH -u "$path"`
16415
16416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16419  # "foo.exe" is OK but "foo" is an error.
16420  #
16421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16422  # It is also a way to make sure we got the proper file name for the real test later on.
16423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16424  if test "x$test_shortpath" = x; then
16425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16426$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16427    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16428  fi
16429
16430  # Call helper function which possibly converts this using DOS-style short mode.
16431  # If so, the updated path is stored in $new_path.
16432
16433  input_path="$new_path"
16434  # Check if we need to convert this using DOS-style short mode. If the path
16435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16436  # take no chances and rewrite it.
16437  # Note: m4 eats our [], so we need to use [ and ] instead.
16438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16439  if test "x$has_forbidden_chars" != x; then
16440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16444      # Going to short mode and back again did indeed matter. Since short mode is
16445      # case insensitive, let's make it lowercase to improve readability.
16446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16447      # Now convert it back to Unix-style (cygpath)
16448      input_path=`$CYGPATH -u "$shortmode_path"`
16449      new_path="$input_path"
16450    fi
16451  fi
16452
16453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16454  if test "x$test_cygdrive_prefix" = x; then
16455    # As a simple fix, exclude /usr/bin since it's not a real path.
16456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16458      # a path prefixed by /cygdrive for fixpath to work.
16459      new_path="$CYGWIN_ROOT_PATH$input_path"
16460    fi
16461  fi
16462
16463
16464  if test "x$path" != "x$new_path"; then
16465    OUTPUT_ROOT="$new_path"
16466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16467$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16468  fi
16469
16470    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16471
16472  path="$OUTPUT_ROOT"
16473  has_colon=`$ECHO $path | $GREP ^.:`
16474  new_path="$path"
16475  if test "x$has_colon" = x; then
16476    # Not in mixed or Windows style, start by that.
16477    new_path=`cmd //c echo $path`
16478  fi
16479
16480
16481  input_path="$new_path"
16482  # Check if we need to convert this using DOS-style short mode. If the path
16483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16484  # take no chances and rewrite it.
16485  # Note: m4 eats our [], so we need to use [ and ] instead.
16486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16487  if test "x$has_forbidden_chars" != x; then
16488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16490  fi
16491
16492
16493  windows_path="$new_path"
16494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16495    unix_path=`$CYGPATH -u "$windows_path"`
16496    new_path="$unix_path"
16497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16499    new_path="$unix_path"
16500  fi
16501
16502  if test "x$path" != "x$new_path"; then
16503    OUTPUT_ROOT="$new_path"
16504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16505$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16506  fi
16507
16508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16510
16511    else
16512      # We're on a unix platform. Hooray! :)
16513      path="$OUTPUT_ROOT"
16514      has_space=`$ECHO "$path" | $GREP " "`
16515      if test "x$has_space" != x; then
16516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16517$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16518        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16519      fi
16520
16521      # Use eval to expand a potential ~
16522      eval path="$path"
16523      if test ! -f "$path" && test ! -d "$path"; then
16524        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16525      fi
16526
16527      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16528    fi
16529  fi
16530
16531
16532  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16533  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16534
16535  SPEC=$OUTPUT_ROOT/spec.gmk
16536
16537  CONF_NAME=$CONF_NAME
16538
16539  OUTPUT_ROOT=$OUTPUT_ROOT
16540
16541
16542
16543  # The spec.gmk file contains all variables for the make system.
16544  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16545
16546  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16547  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16548
16549  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16550  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16551
16552  # The compare.sh is used to compare the build output to other builds.
16553  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16554
16555  # The generated Makefile knows where the spec.gmk is and where the source is.
16556  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16557  # which will look for generated configurations
16558  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16559
16560
16561
16562# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16563
16564  for ac_prog in apt-get yum port pkgutil pkgadd
16565do
16566  # Extract the first word of "$ac_prog", so it can be a program name with args.
16567set dummy $ac_prog; ac_word=$2
16568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16569$as_echo_n "checking for $ac_word... " >&6; }
16570if ${ac_cv_prog_PKGHANDLER+:} false; then :
16571  $as_echo_n "(cached) " >&6
16572else
16573  if test -n "$PKGHANDLER"; then
16574  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16575else
16576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16577for as_dir in $PATH
16578do
16579  IFS=$as_save_IFS
16580  test -z "$as_dir" && as_dir=.
16581    for ac_exec_ext in '' $ac_executable_extensions; do
16582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16583    ac_cv_prog_PKGHANDLER="$ac_prog"
16584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16585    break 2
16586  fi
16587done
16588  done
16589IFS=$as_save_IFS
16590
16591fi
16592fi
16593PKGHANDLER=$ac_cv_prog_PKGHANDLER
16594if test -n "$PKGHANDLER"; then
16595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16596$as_echo "$PKGHANDLER" >&6; }
16597else
16598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16599$as_echo "no" >&6; }
16600fi
16601
16602
16603  test -n "$PKGHANDLER" && break
16604done
16605
16606
16607
16608# Setup tools that requires more complex handling, or that is not needed by the configure script.
16609
16610
16611
16612  # Publish this variable in the help.
16613
16614
16615  if [ -z "${MAKE+x}" ]; then
16616    # The variable is not set by user, try to locate tool using the code snippet
16617
16618    # Try our hardest to locate a correct version of GNU make
16619    for ac_prog in gmake
16620do
16621  # Extract the first word of "$ac_prog", so it can be a program name with args.
16622set dummy $ac_prog; ac_word=$2
16623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16624$as_echo_n "checking for $ac_word... " >&6; }
16625if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16626  $as_echo_n "(cached) " >&6
16627else
16628  case $CHECK_GMAKE in
16629  [\\/]* | ?:[\\/]*)
16630  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16631  ;;
16632  *)
16633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16634for as_dir in $PATH
16635do
16636  IFS=$as_save_IFS
16637  test -z "$as_dir" && as_dir=.
16638    for ac_exec_ext in '' $ac_executable_extensions; do
16639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16640    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16642    break 2
16643  fi
16644done
16645  done
16646IFS=$as_save_IFS
16647
16648  ;;
16649esac
16650fi
16651CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16652if test -n "$CHECK_GMAKE"; then
16653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16654$as_echo "$CHECK_GMAKE" >&6; }
16655else
16656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16657$as_echo "no" >&6; }
16658fi
16659
16660
16661  test -n "$CHECK_GMAKE" && break
16662done
16663
16664
16665  MAKE_CANDIDATE=""$CHECK_GMAKE""
16666  DESCRIPTION="gmake in PATH"
16667
16668  # On Cygwin, we require a newer version of make than on other platforms
16669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16670    MAKE_VERSION_EXPR="-e 4\."
16671    MAKE_REQUIRED_VERSION="4.0"
16672   else
16673    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16674    MAKE_REQUIRED_VERSION="3.81"
16675  fi
16676
16677  if test "x$MAKE_CANDIDATE" != x; then
16678    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16679$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16680    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16681    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16682    if test "x$IS_GNU_MAKE" = x; then
16683      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16684$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16685    else
16686      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16687      if test "x$IS_MODERN_MAKE" = x; then
16688        { $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
16689$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;}
16690      else
16691        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16692          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16693            MAKE_EXPECTED_ENV='cygwin'
16694          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16695            MAKE_EXPECTED_ENV='msys'
16696          else
16697            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16698          fi
16699          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16700          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16701        else
16702          # Not relevant for non-Windows
16703          IS_MAKE_CORRECT_ENV=true
16704        fi
16705        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16706          { $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
16707$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;}
16708        else
16709          FOUND_MAKE=$MAKE_CANDIDATE
16710
16711  # Only process if variable expands to non-empty
16712
16713  if test "x$FOUND_MAKE" != x; then
16714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16715
16716  # First separate the path from the arguments. This will split at the first
16717  # space.
16718  complete="$FOUND_MAKE"
16719  path="${complete%% *}"
16720  tmp="$complete EOL"
16721  arguments="${tmp#* }"
16722
16723  # Input might be given as Windows format, start by converting to
16724  # unix format.
16725  new_path=`$CYGPATH -u "$path"`
16726
16727  # Now try to locate executable using which
16728  new_path=`$WHICH "$new_path" 2> /dev/null`
16729  # bat and cmd files are not always considered executable in cygwin causing which
16730  # to not find them
16731  if test "x$new_path" = x \
16732      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16733      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16734    new_path=`$CYGPATH -u "$path"`
16735  fi
16736  if test "x$new_path" = x; then
16737    # Oops. Which didn't find the executable.
16738    # The splitting of arguments from the executable at a space might have been incorrect,
16739    # since paths with space are more likely in Windows. Give it another try with the whole
16740    # argument.
16741    path="$complete"
16742    arguments="EOL"
16743    new_path=`$CYGPATH -u "$path"`
16744    new_path=`$WHICH "$new_path" 2> /dev/null`
16745    # bat and cmd files are not always considered executable in cygwin causing which
16746    # to not find them
16747    if test "x$new_path" = x \
16748        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16749        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16750      new_path=`$CYGPATH -u "$path"`
16751    fi
16752    if test "x$new_path" = x; then
16753      # It's still not found. Now this is an unrecoverable error.
16754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16755$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16756      has_space=`$ECHO "$complete" | $GREP " "`
16757      if test "x$has_space" != x; then
16758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16760      fi
16761      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16762    fi
16763  fi
16764
16765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16768  # "foo.exe" is OK but "foo" is an error.
16769  #
16770  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16771  # It is also a way to make sure we got the proper file name for the real test later on.
16772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16773  if test "x$test_shortpath" = x; then
16774    # Short path failed, file does not exist as specified.
16775    # Try adding .exe or .cmd
16776    if test -f "${new_path}.exe"; then
16777      input_to_shortpath="${new_path}.exe"
16778    elif test -f "${new_path}.cmd"; then
16779      input_to_shortpath="${new_path}.cmd"
16780    else
16781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16782$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16783      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16784$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16785      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16786    fi
16787  else
16788    input_to_shortpath="$new_path"
16789  fi
16790
16791  # Call helper function which possibly converts this using DOS-style short mode.
16792  # If so, the updated path is stored in $new_path.
16793  new_path="$input_to_shortpath"
16794
16795  input_path="$input_to_shortpath"
16796  # Check if we need to convert this using DOS-style short mode. If the path
16797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16798  # take no chances and rewrite it.
16799  # Note: m4 eats our [], so we need to use [ and ] instead.
16800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16801  if test "x$has_forbidden_chars" != x; then
16802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16806      # Going to short mode and back again did indeed matter. Since short mode is
16807      # case insensitive, let's make it lowercase to improve readability.
16808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16809      # Now convert it back to Unix-style (cygpath)
16810      input_path=`$CYGPATH -u "$shortmode_path"`
16811      new_path="$input_path"
16812    fi
16813  fi
16814
16815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16816  if test "x$test_cygdrive_prefix" = x; then
16817    # As a simple fix, exclude /usr/bin since it's not a real path.
16818    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16820      # a path prefixed by /cygdrive for fixpath to work.
16821      new_path="$CYGWIN_ROOT_PATH$input_path"
16822    fi
16823  fi
16824
16825  # remove trailing .exe if any
16826  new_path="${new_path/%.exe/}"
16827
16828    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16829
16830  # First separate the path from the arguments. This will split at the first
16831  # space.
16832  complete="$FOUND_MAKE"
16833  path="${complete%% *}"
16834  tmp="$complete EOL"
16835  arguments="${tmp#* }"
16836
16837  # Input might be given as Windows format, start by converting to
16838  # unix format.
16839  new_path="$path"
16840
16841  windows_path="$new_path"
16842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16843    unix_path=`$CYGPATH -u "$windows_path"`
16844    new_path="$unix_path"
16845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16847    new_path="$unix_path"
16848  fi
16849
16850
16851  # Now try to locate executable using which
16852  new_path=`$WHICH "$new_path" 2> /dev/null`
16853
16854  if test "x$new_path" = x; then
16855    # Oops. Which didn't find the executable.
16856    # The splitting of arguments from the executable at a space might have been incorrect,
16857    # since paths with space are more likely in Windows. Give it another try with the whole
16858    # argument.
16859    path="$complete"
16860    arguments="EOL"
16861    new_path="$path"
16862
16863  windows_path="$new_path"
16864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16865    unix_path=`$CYGPATH -u "$windows_path"`
16866    new_path="$unix_path"
16867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16869    new_path="$unix_path"
16870  fi
16871
16872
16873    new_path=`$WHICH "$new_path" 2> /dev/null`
16874    # bat and cmd files are not always considered executable in MSYS causing which
16875    # to not find them
16876    if test "x$new_path" = x \
16877        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16878        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16879      new_path="$path"
16880
16881  windows_path="$new_path"
16882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16883    unix_path=`$CYGPATH -u "$windows_path"`
16884    new_path="$unix_path"
16885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16887    new_path="$unix_path"
16888  fi
16889
16890    fi
16891
16892    if test "x$new_path" = x; then
16893      # It's still not found. Now this is an unrecoverable error.
16894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16895$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16896      has_space=`$ECHO "$complete" | $GREP " "`
16897      if test "x$has_space" != x; then
16898        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16899$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16900      fi
16901      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16902    fi
16903  fi
16904
16905  # Now new_path has a complete unix path to the binary
16906  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16907    # Keep paths in /bin as-is, but remove trailing .exe if any
16908    new_path="${new_path/%.exe/}"
16909    # Do not save /bin paths to all_fixpath_prefixes!
16910  else
16911    # Not in mixed or Windows style, start by that.
16912    new_path=`cmd //c echo $new_path`
16913
16914  input_path="$new_path"
16915  # Check if we need to convert this using DOS-style short mode. If the path
16916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16917  # take no chances and rewrite it.
16918  # Note: m4 eats our [], so we need to use [ and ] instead.
16919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16920  if test "x$has_forbidden_chars" != x; then
16921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16923  fi
16924
16925    # Output is in $new_path
16926
16927  windows_path="$new_path"
16928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16929    unix_path=`$CYGPATH -u "$windows_path"`
16930    new_path="$unix_path"
16931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16933    new_path="$unix_path"
16934  fi
16935
16936    # remove trailing .exe if any
16937    new_path="${new_path/%.exe/}"
16938
16939    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16940    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16941  fi
16942
16943    else
16944      # We're on a unix platform. Hooray! :)
16945      # First separate the path from the arguments. This will split at the first
16946      # space.
16947      complete="$FOUND_MAKE"
16948      path="${complete%% *}"
16949      tmp="$complete EOL"
16950      arguments="${tmp#* }"
16951
16952      # Cannot rely on the command "which" here since it doesn't always work.
16953      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16954      if test -z "$is_absolute_path"; then
16955        # Path to executable is not absolute. Find it.
16956        IFS_save="$IFS"
16957        IFS=:
16958        for p in $PATH; do
16959          if test -f "$p/$path" && test -x "$p/$path"; then
16960            new_path="$p/$path"
16961            break
16962          fi
16963        done
16964        IFS="$IFS_save"
16965      else
16966        # This is an absolute path, we can use it without further modifications.
16967        new_path="$path"
16968      fi
16969
16970      if test "x$new_path" = x; then
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16972$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16973        has_space=`$ECHO "$complete" | $GREP " "`
16974        if test "x$has_space" != x; then
16975          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16976$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16977        fi
16978        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16979      fi
16980    fi
16981
16982    # Now join together the path and the arguments once again
16983    if test "x$arguments" != xEOL; then
16984      new_complete="$new_path ${arguments% *}"
16985    else
16986      new_complete="$new_path"
16987    fi
16988
16989    if test "x$complete" != "x$new_complete"; then
16990      FOUND_MAKE="$new_complete"
16991      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16992$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16993    fi
16994  fi
16995
16996        fi
16997      fi
16998    fi
16999  fi
17000
17001
17002    if test "x$FOUND_MAKE" = x; then
17003      for ac_prog in make
17004do
17005  # Extract the first word of "$ac_prog", so it can be a program name with args.
17006set dummy $ac_prog; ac_word=$2
17007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17008$as_echo_n "checking for $ac_word... " >&6; }
17009if ${ac_cv_path_CHECK_MAKE+:} false; then :
17010  $as_echo_n "(cached) " >&6
17011else
17012  case $CHECK_MAKE in
17013  [\\/]* | ?:[\\/]*)
17014  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17015  ;;
17016  *)
17017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17018for as_dir in $PATH
17019do
17020  IFS=$as_save_IFS
17021  test -z "$as_dir" && as_dir=.
17022    for ac_exec_ext in '' $ac_executable_extensions; do
17023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17024    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17026    break 2
17027  fi
17028done
17029  done
17030IFS=$as_save_IFS
17031
17032  ;;
17033esac
17034fi
17035CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17036if test -n "$CHECK_MAKE"; then
17037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17038$as_echo "$CHECK_MAKE" >&6; }
17039else
17040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17041$as_echo "no" >&6; }
17042fi
17043
17044
17045  test -n "$CHECK_MAKE" && break
17046done
17047
17048
17049  MAKE_CANDIDATE=""$CHECK_MAKE""
17050  DESCRIPTION="make in PATH"
17051
17052  # On Cygwin, we require a newer version of make than on other platforms
17053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17054    MAKE_VERSION_EXPR="-e 4\."
17055    MAKE_REQUIRED_VERSION="4.0"
17056   else
17057    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17058    MAKE_REQUIRED_VERSION="3.81"
17059  fi
17060
17061  if test "x$MAKE_CANDIDATE" != x; then
17062    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17063$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17064    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17065    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17066    if test "x$IS_GNU_MAKE" = x; then
17067      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17068$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17069    else
17070      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17071      if test "x$IS_MODERN_MAKE" = x; then
17072        { $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
17073$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;}
17074      else
17075        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17076          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17077            MAKE_EXPECTED_ENV='cygwin'
17078          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17079            MAKE_EXPECTED_ENV='msys'
17080          else
17081            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17082          fi
17083          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17084          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17085        else
17086          # Not relevant for non-Windows
17087          IS_MAKE_CORRECT_ENV=true
17088        fi
17089        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17090          { $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
17091$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;}
17092        else
17093          FOUND_MAKE=$MAKE_CANDIDATE
17094
17095  # Only process if variable expands to non-empty
17096
17097  if test "x$FOUND_MAKE" != x; then
17098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17099
17100  # First separate the path from the arguments. This will split at the first
17101  # space.
17102  complete="$FOUND_MAKE"
17103  path="${complete%% *}"
17104  tmp="$complete EOL"
17105  arguments="${tmp#* }"
17106
17107  # Input might be given as Windows format, start by converting to
17108  # unix format.
17109  new_path=`$CYGPATH -u "$path"`
17110
17111  # Now try to locate executable using which
17112  new_path=`$WHICH "$new_path" 2> /dev/null`
17113  # bat and cmd files are not always considered executable in cygwin causing which
17114  # to not find them
17115  if test "x$new_path" = x \
17116      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17117      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17118    new_path=`$CYGPATH -u "$path"`
17119  fi
17120  if test "x$new_path" = x; then
17121    # Oops. Which didn't find the executable.
17122    # The splitting of arguments from the executable at a space might have been incorrect,
17123    # since paths with space are more likely in Windows. Give it another try with the whole
17124    # argument.
17125    path="$complete"
17126    arguments="EOL"
17127    new_path=`$CYGPATH -u "$path"`
17128    new_path=`$WHICH "$new_path" 2> /dev/null`
17129    # bat and cmd files are not always considered executable in cygwin causing which
17130    # to not find them
17131    if test "x$new_path" = x \
17132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17134      new_path=`$CYGPATH -u "$path"`
17135    fi
17136    if test "x$new_path" = x; then
17137      # It's still not found. Now this is an unrecoverable error.
17138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17139$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17140      has_space=`$ECHO "$complete" | $GREP " "`
17141      if test "x$has_space" != x; then
17142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17144      fi
17145      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17146    fi
17147  fi
17148
17149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17152  # "foo.exe" is OK but "foo" is an error.
17153  #
17154  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17155  # It is also a way to make sure we got the proper file name for the real test later on.
17156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17157  if test "x$test_shortpath" = x; then
17158    # Short path failed, file does not exist as specified.
17159    # Try adding .exe or .cmd
17160    if test -f "${new_path}.exe"; then
17161      input_to_shortpath="${new_path}.exe"
17162    elif test -f "${new_path}.cmd"; then
17163      input_to_shortpath="${new_path}.cmd"
17164    else
17165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17166$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17167      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17168$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17169      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17170    fi
17171  else
17172    input_to_shortpath="$new_path"
17173  fi
17174
17175  # Call helper function which possibly converts this using DOS-style short mode.
17176  # If so, the updated path is stored in $new_path.
17177  new_path="$input_to_shortpath"
17178
17179  input_path="$input_to_shortpath"
17180  # Check if we need to convert this using DOS-style short mode. If the path
17181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17182  # take no chances and rewrite it.
17183  # Note: m4 eats our [], so we need to use [ and ] instead.
17184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17185  if test "x$has_forbidden_chars" != x; then
17186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17190      # Going to short mode and back again did indeed matter. Since short mode is
17191      # case insensitive, let's make it lowercase to improve readability.
17192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17193      # Now convert it back to Unix-style (cygpath)
17194      input_path=`$CYGPATH -u "$shortmode_path"`
17195      new_path="$input_path"
17196    fi
17197  fi
17198
17199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17200  if test "x$test_cygdrive_prefix" = x; then
17201    # As a simple fix, exclude /usr/bin since it's not a real path.
17202    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17204      # a path prefixed by /cygdrive for fixpath to work.
17205      new_path="$CYGWIN_ROOT_PATH$input_path"
17206    fi
17207  fi
17208
17209  # remove trailing .exe if any
17210  new_path="${new_path/%.exe/}"
17211
17212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17213
17214  # First separate the path from the arguments. This will split at the first
17215  # space.
17216  complete="$FOUND_MAKE"
17217  path="${complete%% *}"
17218  tmp="$complete EOL"
17219  arguments="${tmp#* }"
17220
17221  # Input might be given as Windows format, start by converting to
17222  # unix format.
17223  new_path="$path"
17224
17225  windows_path="$new_path"
17226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17227    unix_path=`$CYGPATH -u "$windows_path"`
17228    new_path="$unix_path"
17229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17231    new_path="$unix_path"
17232  fi
17233
17234
17235  # Now try to locate executable using which
17236  new_path=`$WHICH "$new_path" 2> /dev/null`
17237
17238  if test "x$new_path" = x; then
17239    # Oops. Which didn't find the executable.
17240    # The splitting of arguments from the executable at a space might have been incorrect,
17241    # since paths with space are more likely in Windows. Give it another try with the whole
17242    # argument.
17243    path="$complete"
17244    arguments="EOL"
17245    new_path="$path"
17246
17247  windows_path="$new_path"
17248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17249    unix_path=`$CYGPATH -u "$windows_path"`
17250    new_path="$unix_path"
17251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17253    new_path="$unix_path"
17254  fi
17255
17256
17257    new_path=`$WHICH "$new_path" 2> /dev/null`
17258    # bat and cmd files are not always considered executable in MSYS causing which
17259    # to not find them
17260    if test "x$new_path" = x \
17261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17263      new_path="$path"
17264
17265  windows_path="$new_path"
17266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17267    unix_path=`$CYGPATH -u "$windows_path"`
17268    new_path="$unix_path"
17269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17271    new_path="$unix_path"
17272  fi
17273
17274    fi
17275
17276    if test "x$new_path" = x; then
17277      # It's still not found. Now this is an unrecoverable error.
17278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17279$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17280      has_space=`$ECHO "$complete" | $GREP " "`
17281      if test "x$has_space" != x; then
17282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17284      fi
17285      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17286    fi
17287  fi
17288
17289  # Now new_path has a complete unix path to the binary
17290  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17291    # Keep paths in /bin as-is, but remove trailing .exe if any
17292    new_path="${new_path/%.exe/}"
17293    # Do not save /bin paths to all_fixpath_prefixes!
17294  else
17295    # Not in mixed or Windows style, start by that.
17296    new_path=`cmd //c echo $new_path`
17297
17298  input_path="$new_path"
17299  # Check if we need to convert this using DOS-style short mode. If the path
17300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17301  # take no chances and rewrite it.
17302  # Note: m4 eats our [], so we need to use [ and ] instead.
17303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17304  if test "x$has_forbidden_chars" != x; then
17305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17307  fi
17308
17309    # Output is in $new_path
17310
17311  windows_path="$new_path"
17312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17313    unix_path=`$CYGPATH -u "$windows_path"`
17314    new_path="$unix_path"
17315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17317    new_path="$unix_path"
17318  fi
17319
17320    # remove trailing .exe if any
17321    new_path="${new_path/%.exe/}"
17322
17323    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17324    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17325  fi
17326
17327    else
17328      # We're on a unix platform. Hooray! :)
17329      # First separate the path from the arguments. This will split at the first
17330      # space.
17331      complete="$FOUND_MAKE"
17332      path="${complete%% *}"
17333      tmp="$complete EOL"
17334      arguments="${tmp#* }"
17335
17336      # Cannot rely on the command "which" here since it doesn't always work.
17337      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17338      if test -z "$is_absolute_path"; then
17339        # Path to executable is not absolute. Find it.
17340        IFS_save="$IFS"
17341        IFS=:
17342        for p in $PATH; do
17343          if test -f "$p/$path" && test -x "$p/$path"; then
17344            new_path="$p/$path"
17345            break
17346          fi
17347        done
17348        IFS="$IFS_save"
17349      else
17350        # This is an absolute path, we can use it without further modifications.
17351        new_path="$path"
17352      fi
17353
17354      if test "x$new_path" = x; then
17355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17356$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17357        has_space=`$ECHO "$complete" | $GREP " "`
17358        if test "x$has_space" != x; then
17359          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17360$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17361        fi
17362        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17363      fi
17364    fi
17365
17366    # Now join together the path and the arguments once again
17367    if test "x$arguments" != xEOL; then
17368      new_complete="$new_path ${arguments% *}"
17369    else
17370      new_complete="$new_path"
17371    fi
17372
17373    if test "x$complete" != "x$new_complete"; then
17374      FOUND_MAKE="$new_complete"
17375      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17376$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17377    fi
17378  fi
17379
17380        fi
17381      fi
17382    fi
17383  fi
17384
17385    fi
17386
17387    if test "x$FOUND_MAKE" = x; then
17388      if test "x$TOOLCHAIN_PATH" != x; then
17389        # We have a toolchain path, check that as well before giving up.
17390        OLD_PATH=$PATH
17391        PATH=$TOOLCHAIN_PATH:$PATH
17392        for ac_prog in gmake
17393do
17394  # Extract the first word of "$ac_prog", so it can be a program name with args.
17395set dummy $ac_prog; ac_word=$2
17396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17397$as_echo_n "checking for $ac_word... " >&6; }
17398if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17399  $as_echo_n "(cached) " >&6
17400else
17401  case $CHECK_TOOLSDIR_GMAKE in
17402  [\\/]* | ?:[\\/]*)
17403  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17404  ;;
17405  *)
17406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17407for as_dir in $PATH
17408do
17409  IFS=$as_save_IFS
17410  test -z "$as_dir" && as_dir=.
17411    for ac_exec_ext in '' $ac_executable_extensions; do
17412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17413    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17415    break 2
17416  fi
17417done
17418  done
17419IFS=$as_save_IFS
17420
17421  ;;
17422esac
17423fi
17424CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17425if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17427$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17428else
17429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17430$as_echo "no" >&6; }
17431fi
17432
17433
17434  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17435done
17436
17437
17438  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17439  DESCRIPTION="gmake in tools-dir"
17440
17441  # On Cygwin, we require a newer version of make than on other platforms
17442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17443    MAKE_VERSION_EXPR="-e 4\."
17444    MAKE_REQUIRED_VERSION="4.0"
17445   else
17446    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17447    MAKE_REQUIRED_VERSION="3.81"
17448  fi
17449
17450  if test "x$MAKE_CANDIDATE" != x; then
17451    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17452$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17453    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17454    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17455    if test "x$IS_GNU_MAKE" = x; then
17456      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17457$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17458    else
17459      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17460      if test "x$IS_MODERN_MAKE" = x; then
17461        { $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
17462$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;}
17463      else
17464        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17465          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17466            MAKE_EXPECTED_ENV='cygwin'
17467          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17468            MAKE_EXPECTED_ENV='msys'
17469          else
17470            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17471          fi
17472          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17473          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17474        else
17475          # Not relevant for non-Windows
17476          IS_MAKE_CORRECT_ENV=true
17477        fi
17478        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17479          { $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
17480$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;}
17481        else
17482          FOUND_MAKE=$MAKE_CANDIDATE
17483
17484  # Only process if variable expands to non-empty
17485
17486  if test "x$FOUND_MAKE" != x; then
17487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17488
17489  # First separate the path from the arguments. This will split at the first
17490  # space.
17491  complete="$FOUND_MAKE"
17492  path="${complete%% *}"
17493  tmp="$complete EOL"
17494  arguments="${tmp#* }"
17495
17496  # Input might be given as Windows format, start by converting to
17497  # unix format.
17498  new_path=`$CYGPATH -u "$path"`
17499
17500  # Now try to locate executable using which
17501  new_path=`$WHICH "$new_path" 2> /dev/null`
17502  # bat and cmd files are not always considered executable in cygwin causing which
17503  # to not find them
17504  if test "x$new_path" = x \
17505      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17506      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17507    new_path=`$CYGPATH -u "$path"`
17508  fi
17509  if test "x$new_path" = x; then
17510    # Oops. Which didn't find the executable.
17511    # The splitting of arguments from the executable at a space might have been incorrect,
17512    # since paths with space are more likely in Windows. Give it another try with the whole
17513    # argument.
17514    path="$complete"
17515    arguments="EOL"
17516    new_path=`$CYGPATH -u "$path"`
17517    new_path=`$WHICH "$new_path" 2> /dev/null`
17518    # bat and cmd files are not always considered executable in cygwin causing which
17519    # to not find them
17520    if test "x$new_path" = x \
17521        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17522        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17523      new_path=`$CYGPATH -u "$path"`
17524    fi
17525    if test "x$new_path" = x; then
17526      # It's still not found. Now this is an unrecoverable error.
17527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17528$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17529      has_space=`$ECHO "$complete" | $GREP " "`
17530      if test "x$has_space" != x; then
17531        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17532$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17533      fi
17534      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17535    fi
17536  fi
17537
17538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17541  # "foo.exe" is OK but "foo" is an error.
17542  #
17543  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17544  # It is also a way to make sure we got the proper file name for the real test later on.
17545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17546  if test "x$test_shortpath" = x; then
17547    # Short path failed, file does not exist as specified.
17548    # Try adding .exe or .cmd
17549    if test -f "${new_path}.exe"; then
17550      input_to_shortpath="${new_path}.exe"
17551    elif test -f "${new_path}.cmd"; then
17552      input_to_shortpath="${new_path}.cmd"
17553    else
17554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17555$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17556      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17557$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17558      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17559    fi
17560  else
17561    input_to_shortpath="$new_path"
17562  fi
17563
17564  # Call helper function which possibly converts this using DOS-style short mode.
17565  # If so, the updated path is stored in $new_path.
17566  new_path="$input_to_shortpath"
17567
17568  input_path="$input_to_shortpath"
17569  # Check if we need to convert this using DOS-style short mode. If the path
17570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17571  # take no chances and rewrite it.
17572  # Note: m4 eats our [], so we need to use [ and ] instead.
17573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17574  if test "x$has_forbidden_chars" != x; then
17575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17579      # Going to short mode and back again did indeed matter. Since short mode is
17580      # case insensitive, let's make it lowercase to improve readability.
17581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17582      # Now convert it back to Unix-style (cygpath)
17583      input_path=`$CYGPATH -u "$shortmode_path"`
17584      new_path="$input_path"
17585    fi
17586  fi
17587
17588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17589  if test "x$test_cygdrive_prefix" = x; then
17590    # As a simple fix, exclude /usr/bin since it's not a real path.
17591    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17593      # a path prefixed by /cygdrive for fixpath to work.
17594      new_path="$CYGWIN_ROOT_PATH$input_path"
17595    fi
17596  fi
17597
17598  # remove trailing .exe if any
17599  new_path="${new_path/%.exe/}"
17600
17601    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17602
17603  # First separate the path from the arguments. This will split at the first
17604  # space.
17605  complete="$FOUND_MAKE"
17606  path="${complete%% *}"
17607  tmp="$complete EOL"
17608  arguments="${tmp#* }"
17609
17610  # Input might be given as Windows format, start by converting to
17611  # unix format.
17612  new_path="$path"
17613
17614  windows_path="$new_path"
17615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17616    unix_path=`$CYGPATH -u "$windows_path"`
17617    new_path="$unix_path"
17618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17620    new_path="$unix_path"
17621  fi
17622
17623
17624  # Now try to locate executable using which
17625  new_path=`$WHICH "$new_path" 2> /dev/null`
17626
17627  if test "x$new_path" = x; then
17628    # Oops. Which didn't find the executable.
17629    # The splitting of arguments from the executable at a space might have been incorrect,
17630    # since paths with space are more likely in Windows. Give it another try with the whole
17631    # argument.
17632    path="$complete"
17633    arguments="EOL"
17634    new_path="$path"
17635
17636  windows_path="$new_path"
17637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17638    unix_path=`$CYGPATH -u "$windows_path"`
17639    new_path="$unix_path"
17640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17642    new_path="$unix_path"
17643  fi
17644
17645
17646    new_path=`$WHICH "$new_path" 2> /dev/null`
17647    # bat and cmd files are not always considered executable in MSYS causing which
17648    # to not find them
17649    if test "x$new_path" = x \
17650        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17651        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17652      new_path="$path"
17653
17654  windows_path="$new_path"
17655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17656    unix_path=`$CYGPATH -u "$windows_path"`
17657    new_path="$unix_path"
17658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17660    new_path="$unix_path"
17661  fi
17662
17663    fi
17664
17665    if test "x$new_path" = x; then
17666      # It's still not found. Now this is an unrecoverable error.
17667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17668$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17669      has_space=`$ECHO "$complete" | $GREP " "`
17670      if test "x$has_space" != x; then
17671        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17672$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17673      fi
17674      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17675    fi
17676  fi
17677
17678  # Now new_path has a complete unix path to the binary
17679  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17680    # Keep paths in /bin as-is, but remove trailing .exe if any
17681    new_path="${new_path/%.exe/}"
17682    # Do not save /bin paths to all_fixpath_prefixes!
17683  else
17684    # Not in mixed or Windows style, start by that.
17685    new_path=`cmd //c echo $new_path`
17686
17687  input_path="$new_path"
17688  # Check if we need to convert this using DOS-style short mode. If the path
17689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17690  # take no chances and rewrite it.
17691  # Note: m4 eats our [], so we need to use [ and ] instead.
17692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17693  if test "x$has_forbidden_chars" != x; then
17694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17696  fi
17697
17698    # Output is in $new_path
17699
17700  windows_path="$new_path"
17701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17702    unix_path=`$CYGPATH -u "$windows_path"`
17703    new_path="$unix_path"
17704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17706    new_path="$unix_path"
17707  fi
17708
17709    # remove trailing .exe if any
17710    new_path="${new_path/%.exe/}"
17711
17712    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17713    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17714  fi
17715
17716    else
17717      # We're on a unix platform. Hooray! :)
17718      # First separate the path from the arguments. This will split at the first
17719      # space.
17720      complete="$FOUND_MAKE"
17721      path="${complete%% *}"
17722      tmp="$complete EOL"
17723      arguments="${tmp#* }"
17724
17725      # Cannot rely on the command "which" here since it doesn't always work.
17726      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17727      if test -z "$is_absolute_path"; then
17728        # Path to executable is not absolute. Find it.
17729        IFS_save="$IFS"
17730        IFS=:
17731        for p in $PATH; do
17732          if test -f "$p/$path" && test -x "$p/$path"; then
17733            new_path="$p/$path"
17734            break
17735          fi
17736        done
17737        IFS="$IFS_save"
17738      else
17739        # This is an absolute path, we can use it without further modifications.
17740        new_path="$path"
17741      fi
17742
17743      if test "x$new_path" = x; then
17744        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17745$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17746        has_space=`$ECHO "$complete" | $GREP " "`
17747        if test "x$has_space" != x; then
17748          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17749$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17750        fi
17751        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17752      fi
17753    fi
17754
17755    # Now join together the path and the arguments once again
17756    if test "x$arguments" != xEOL; then
17757      new_complete="$new_path ${arguments% *}"
17758    else
17759      new_complete="$new_path"
17760    fi
17761
17762    if test "x$complete" != "x$new_complete"; then
17763      FOUND_MAKE="$new_complete"
17764      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17765$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17766    fi
17767  fi
17768
17769        fi
17770      fi
17771    fi
17772  fi
17773
17774        if test "x$FOUND_MAKE" = x; then
17775          for ac_prog in make
17776do
17777  # Extract the first word of "$ac_prog", so it can be a program name with args.
17778set dummy $ac_prog; ac_word=$2
17779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17780$as_echo_n "checking for $ac_word... " >&6; }
17781if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17782  $as_echo_n "(cached) " >&6
17783else
17784  case $CHECK_TOOLSDIR_MAKE in
17785  [\\/]* | ?:[\\/]*)
17786  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17787  ;;
17788  *)
17789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17790for as_dir in $PATH
17791do
17792  IFS=$as_save_IFS
17793  test -z "$as_dir" && as_dir=.
17794    for ac_exec_ext in '' $ac_executable_extensions; do
17795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17796    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17798    break 2
17799  fi
17800done
17801  done
17802IFS=$as_save_IFS
17803
17804  ;;
17805esac
17806fi
17807CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17808if test -n "$CHECK_TOOLSDIR_MAKE"; then
17809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17810$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17811else
17812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17813$as_echo "no" >&6; }
17814fi
17815
17816
17817  test -n "$CHECK_TOOLSDIR_MAKE" && break
17818done
17819
17820
17821  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17822  DESCRIPTION="make in tools-dir"
17823
17824  # On Cygwin, we require a newer version of make than on other platforms
17825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17826    MAKE_VERSION_EXPR="-e 4\."
17827    MAKE_REQUIRED_VERSION="4.0"
17828   else
17829    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17830    MAKE_REQUIRED_VERSION="3.81"
17831  fi
17832
17833  if test "x$MAKE_CANDIDATE" != x; then
17834    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17835$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17836    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17837    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17838    if test "x$IS_GNU_MAKE" = x; then
17839      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17840$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17841    else
17842      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17843      if test "x$IS_MODERN_MAKE" = x; then
17844        { $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
17845$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;}
17846      else
17847        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17848          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17849            MAKE_EXPECTED_ENV='cygwin'
17850          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17851            MAKE_EXPECTED_ENV='msys'
17852          else
17853            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17854          fi
17855          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17856          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17857        else
17858          # Not relevant for non-Windows
17859          IS_MAKE_CORRECT_ENV=true
17860        fi
17861        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17862          { $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
17863$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;}
17864        else
17865          FOUND_MAKE=$MAKE_CANDIDATE
17866
17867  # Only process if variable expands to non-empty
17868
17869  if test "x$FOUND_MAKE" != x; then
17870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17871
17872  # First separate the path from the arguments. This will split at the first
17873  # space.
17874  complete="$FOUND_MAKE"
17875  path="${complete%% *}"
17876  tmp="$complete EOL"
17877  arguments="${tmp#* }"
17878
17879  # Input might be given as Windows format, start by converting to
17880  # unix format.
17881  new_path=`$CYGPATH -u "$path"`
17882
17883  # Now try to locate executable using which
17884  new_path=`$WHICH "$new_path" 2> /dev/null`
17885  # bat and cmd files are not always considered executable in cygwin causing which
17886  # to not find them
17887  if test "x$new_path" = x \
17888      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17889      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17890    new_path=`$CYGPATH -u "$path"`
17891  fi
17892  if test "x$new_path" = x; then
17893    # Oops. Which didn't find the executable.
17894    # The splitting of arguments from the executable at a space might have been incorrect,
17895    # since paths with space are more likely in Windows. Give it another try with the whole
17896    # argument.
17897    path="$complete"
17898    arguments="EOL"
17899    new_path=`$CYGPATH -u "$path"`
17900    new_path=`$WHICH "$new_path" 2> /dev/null`
17901    # bat and cmd files are not always considered executable in cygwin causing which
17902    # to not find them
17903    if test "x$new_path" = x \
17904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17906      new_path=`$CYGPATH -u "$path"`
17907    fi
17908    if test "x$new_path" = x; then
17909      # It's still not found. Now this is an unrecoverable error.
17910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17911$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17912      has_space=`$ECHO "$complete" | $GREP " "`
17913      if test "x$has_space" != x; then
17914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17916      fi
17917      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17918    fi
17919  fi
17920
17921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17924  # "foo.exe" is OK but "foo" is an error.
17925  #
17926  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17927  # It is also a way to make sure we got the proper file name for the real test later on.
17928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17929  if test "x$test_shortpath" = x; then
17930    # Short path failed, file does not exist as specified.
17931    # Try adding .exe or .cmd
17932    if test -f "${new_path}.exe"; then
17933      input_to_shortpath="${new_path}.exe"
17934    elif test -f "${new_path}.cmd"; then
17935      input_to_shortpath="${new_path}.cmd"
17936    else
17937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17938$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17939      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17940$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17941      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17942    fi
17943  else
17944    input_to_shortpath="$new_path"
17945  fi
17946
17947  # Call helper function which possibly converts this using DOS-style short mode.
17948  # If so, the updated path is stored in $new_path.
17949  new_path="$input_to_shortpath"
17950
17951  input_path="$input_to_shortpath"
17952  # Check if we need to convert this using DOS-style short mode. If the path
17953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17954  # take no chances and rewrite it.
17955  # Note: m4 eats our [], so we need to use [ and ] instead.
17956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17957  if test "x$has_forbidden_chars" != x; then
17958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17962      # Going to short mode and back again did indeed matter. Since short mode is
17963      # case insensitive, let's make it lowercase to improve readability.
17964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17965      # Now convert it back to Unix-style (cygpath)
17966      input_path=`$CYGPATH -u "$shortmode_path"`
17967      new_path="$input_path"
17968    fi
17969  fi
17970
17971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17972  if test "x$test_cygdrive_prefix" = x; then
17973    # As a simple fix, exclude /usr/bin since it's not a real path.
17974    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17976      # a path prefixed by /cygdrive for fixpath to work.
17977      new_path="$CYGWIN_ROOT_PATH$input_path"
17978    fi
17979  fi
17980
17981  # remove trailing .exe if any
17982  new_path="${new_path/%.exe/}"
17983
17984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17985
17986  # First separate the path from the arguments. This will split at the first
17987  # space.
17988  complete="$FOUND_MAKE"
17989  path="${complete%% *}"
17990  tmp="$complete EOL"
17991  arguments="${tmp#* }"
17992
17993  # Input might be given as Windows format, start by converting to
17994  # unix format.
17995  new_path="$path"
17996
17997  windows_path="$new_path"
17998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17999    unix_path=`$CYGPATH -u "$windows_path"`
18000    new_path="$unix_path"
18001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18003    new_path="$unix_path"
18004  fi
18005
18006
18007  # Now try to locate executable using which
18008  new_path=`$WHICH "$new_path" 2> /dev/null`
18009
18010  if test "x$new_path" = x; then
18011    # Oops. Which didn't find the executable.
18012    # The splitting of arguments from the executable at a space might have been incorrect,
18013    # since paths with space are more likely in Windows. Give it another try with the whole
18014    # argument.
18015    path="$complete"
18016    arguments="EOL"
18017    new_path="$path"
18018
18019  windows_path="$new_path"
18020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18021    unix_path=`$CYGPATH -u "$windows_path"`
18022    new_path="$unix_path"
18023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18025    new_path="$unix_path"
18026  fi
18027
18028
18029    new_path=`$WHICH "$new_path" 2> /dev/null`
18030    # bat and cmd files are not always considered executable in MSYS causing which
18031    # to not find them
18032    if test "x$new_path" = x \
18033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18035      new_path="$path"
18036
18037  windows_path="$new_path"
18038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18039    unix_path=`$CYGPATH -u "$windows_path"`
18040    new_path="$unix_path"
18041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18043    new_path="$unix_path"
18044  fi
18045
18046    fi
18047
18048    if test "x$new_path" = x; then
18049      # It's still not found. Now this is an unrecoverable error.
18050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18052      has_space=`$ECHO "$complete" | $GREP " "`
18053      if test "x$has_space" != x; then
18054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18056      fi
18057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18058    fi
18059  fi
18060
18061  # Now new_path has a complete unix path to the binary
18062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18063    # Keep paths in /bin as-is, but remove trailing .exe if any
18064    new_path="${new_path/%.exe/}"
18065    # Do not save /bin paths to all_fixpath_prefixes!
18066  else
18067    # Not in mixed or Windows style, start by that.
18068    new_path=`cmd //c echo $new_path`
18069
18070  input_path="$new_path"
18071  # Check if we need to convert this using DOS-style short mode. If the path
18072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18073  # take no chances and rewrite it.
18074  # Note: m4 eats our [], so we need to use [ and ] instead.
18075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18076  if test "x$has_forbidden_chars" != x; then
18077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18079  fi
18080
18081    # Output is in $new_path
18082
18083  windows_path="$new_path"
18084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18085    unix_path=`$CYGPATH -u "$windows_path"`
18086    new_path="$unix_path"
18087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18089    new_path="$unix_path"
18090  fi
18091
18092    # remove trailing .exe if any
18093    new_path="${new_path/%.exe/}"
18094
18095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18097  fi
18098
18099    else
18100      # We're on a unix platform. Hooray! :)
18101      # First separate the path from the arguments. This will split at the first
18102      # space.
18103      complete="$FOUND_MAKE"
18104      path="${complete%% *}"
18105      tmp="$complete EOL"
18106      arguments="${tmp#* }"
18107
18108      # Cannot rely on the command "which" here since it doesn't always work.
18109      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18110      if test -z "$is_absolute_path"; then
18111        # Path to executable is not absolute. Find it.
18112        IFS_save="$IFS"
18113        IFS=:
18114        for p in $PATH; do
18115          if test -f "$p/$path" && test -x "$p/$path"; then
18116            new_path="$p/$path"
18117            break
18118          fi
18119        done
18120        IFS="$IFS_save"
18121      else
18122        # This is an absolute path, we can use it without further modifications.
18123        new_path="$path"
18124      fi
18125
18126      if test "x$new_path" = x; then
18127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18128$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18129        has_space=`$ECHO "$complete" | $GREP " "`
18130        if test "x$has_space" != x; then
18131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18133        fi
18134        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18135      fi
18136    fi
18137
18138    # Now join together the path and the arguments once again
18139    if test "x$arguments" != xEOL; then
18140      new_complete="$new_path ${arguments% *}"
18141    else
18142      new_complete="$new_path"
18143    fi
18144
18145    if test "x$complete" != "x$new_complete"; then
18146      FOUND_MAKE="$new_complete"
18147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18148$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18149    fi
18150  fi
18151
18152        fi
18153      fi
18154    fi
18155  fi
18156
18157        fi
18158        PATH=$OLD_PATH
18159      fi
18160    fi
18161
18162    if test "x$FOUND_MAKE" = x; then
18163      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
18164    fi
18165
18166  else
18167    # The variable is set, but is it from the command line or the environment?
18168
18169    # Try to remove the string !MAKE! from our list.
18170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18172      # If it failed, the variable was not from the command line. Ignore it,
18173      # but warn the user (except for BASH, which is always set by the calling BASH).
18174      if test "xMAKE" != xBASH; then
18175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18176$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18177      fi
18178      # Try to locate tool using the code snippet
18179
18180    # Try our hardest to locate a correct version of GNU make
18181    for ac_prog in gmake
18182do
18183  # Extract the first word of "$ac_prog", so it can be a program name with args.
18184set dummy $ac_prog; ac_word=$2
18185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18186$as_echo_n "checking for $ac_word... " >&6; }
18187if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18188  $as_echo_n "(cached) " >&6
18189else
18190  case $CHECK_GMAKE in
18191  [\\/]* | ?:[\\/]*)
18192  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18193  ;;
18194  *)
18195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18196for as_dir in $PATH
18197do
18198  IFS=$as_save_IFS
18199  test -z "$as_dir" && as_dir=.
18200    for ac_exec_ext in '' $ac_executable_extensions; do
18201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18202    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18204    break 2
18205  fi
18206done
18207  done
18208IFS=$as_save_IFS
18209
18210  ;;
18211esac
18212fi
18213CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18214if test -n "$CHECK_GMAKE"; then
18215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18216$as_echo "$CHECK_GMAKE" >&6; }
18217else
18218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18219$as_echo "no" >&6; }
18220fi
18221
18222
18223  test -n "$CHECK_GMAKE" && break
18224done
18225
18226
18227  MAKE_CANDIDATE=""$CHECK_GMAKE""
18228  DESCRIPTION="gmake in PATH"
18229
18230  # On Cygwin, we require a newer version of make than on other platforms
18231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18232    MAKE_VERSION_EXPR="-e 4\."
18233    MAKE_REQUIRED_VERSION="4.0"
18234   else
18235    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18236    MAKE_REQUIRED_VERSION="3.81"
18237  fi
18238
18239  if test "x$MAKE_CANDIDATE" != x; then
18240    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18241$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18242    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18243    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18244    if test "x$IS_GNU_MAKE" = x; then
18245      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18246$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18247    else
18248      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18249      if test "x$IS_MODERN_MAKE" = x; then
18250        { $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
18251$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;}
18252      else
18253        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18254          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18255            MAKE_EXPECTED_ENV='cygwin'
18256          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18257            MAKE_EXPECTED_ENV='msys'
18258          else
18259            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18260          fi
18261          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18262          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18263        else
18264          # Not relevant for non-Windows
18265          IS_MAKE_CORRECT_ENV=true
18266        fi
18267        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18268          { $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
18269$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;}
18270        else
18271          FOUND_MAKE=$MAKE_CANDIDATE
18272
18273  # Only process if variable expands to non-empty
18274
18275  if test "x$FOUND_MAKE" != x; then
18276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18277
18278  # First separate the path from the arguments. This will split at the first
18279  # space.
18280  complete="$FOUND_MAKE"
18281  path="${complete%% *}"
18282  tmp="$complete EOL"
18283  arguments="${tmp#* }"
18284
18285  # Input might be given as Windows format, start by converting to
18286  # unix format.
18287  new_path=`$CYGPATH -u "$path"`
18288
18289  # Now try to locate executable using which
18290  new_path=`$WHICH "$new_path" 2> /dev/null`
18291  # bat and cmd files are not always considered executable in cygwin causing which
18292  # to not find them
18293  if test "x$new_path" = x \
18294      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18295      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18296    new_path=`$CYGPATH -u "$path"`
18297  fi
18298  if test "x$new_path" = x; then
18299    # Oops. Which didn't find the executable.
18300    # The splitting of arguments from the executable at a space might have been incorrect,
18301    # since paths with space are more likely in Windows. Give it another try with the whole
18302    # argument.
18303    path="$complete"
18304    arguments="EOL"
18305    new_path=`$CYGPATH -u "$path"`
18306    new_path=`$WHICH "$new_path" 2> /dev/null`
18307    # bat and cmd files are not always considered executable in cygwin causing which
18308    # to not find them
18309    if test "x$new_path" = x \
18310        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18311        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18312      new_path=`$CYGPATH -u "$path"`
18313    fi
18314    if test "x$new_path" = x; then
18315      # It's still not found. Now this is an unrecoverable error.
18316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18317$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18318      has_space=`$ECHO "$complete" | $GREP " "`
18319      if test "x$has_space" != x; then
18320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18322      fi
18323      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18324    fi
18325  fi
18326
18327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18330  # "foo.exe" is OK but "foo" is an error.
18331  #
18332  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18333  # It is also a way to make sure we got the proper file name for the real test later on.
18334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18335  if test "x$test_shortpath" = x; then
18336    # Short path failed, file does not exist as specified.
18337    # Try adding .exe or .cmd
18338    if test -f "${new_path}.exe"; then
18339      input_to_shortpath="${new_path}.exe"
18340    elif test -f "${new_path}.cmd"; then
18341      input_to_shortpath="${new_path}.cmd"
18342    else
18343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18344$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18347      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18348    fi
18349  else
18350    input_to_shortpath="$new_path"
18351  fi
18352
18353  # Call helper function which possibly converts this using DOS-style short mode.
18354  # If so, the updated path is stored in $new_path.
18355  new_path="$input_to_shortpath"
18356
18357  input_path="$input_to_shortpath"
18358  # Check if we need to convert this using DOS-style short mode. If the path
18359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18360  # take no chances and rewrite it.
18361  # Note: m4 eats our [], so we need to use [ and ] instead.
18362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18363  if test "x$has_forbidden_chars" != x; then
18364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18368      # Going to short mode and back again did indeed matter. Since short mode is
18369      # case insensitive, let's make it lowercase to improve readability.
18370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18371      # Now convert it back to Unix-style (cygpath)
18372      input_path=`$CYGPATH -u "$shortmode_path"`
18373      new_path="$input_path"
18374    fi
18375  fi
18376
18377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18378  if test "x$test_cygdrive_prefix" = x; then
18379    # As a simple fix, exclude /usr/bin since it's not a real path.
18380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18382      # a path prefixed by /cygdrive for fixpath to work.
18383      new_path="$CYGWIN_ROOT_PATH$input_path"
18384    fi
18385  fi
18386
18387  # remove trailing .exe if any
18388  new_path="${new_path/%.exe/}"
18389
18390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18391
18392  # First separate the path from the arguments. This will split at the first
18393  # space.
18394  complete="$FOUND_MAKE"
18395  path="${complete%% *}"
18396  tmp="$complete EOL"
18397  arguments="${tmp#* }"
18398
18399  # Input might be given as Windows format, start by converting to
18400  # unix format.
18401  new_path="$path"
18402
18403  windows_path="$new_path"
18404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18405    unix_path=`$CYGPATH -u "$windows_path"`
18406    new_path="$unix_path"
18407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18409    new_path="$unix_path"
18410  fi
18411
18412
18413  # Now try to locate executable using which
18414  new_path=`$WHICH "$new_path" 2> /dev/null`
18415
18416  if test "x$new_path" = x; then
18417    # Oops. Which didn't find the executable.
18418    # The splitting of arguments from the executable at a space might have been incorrect,
18419    # since paths with space are more likely in Windows. Give it another try with the whole
18420    # argument.
18421    path="$complete"
18422    arguments="EOL"
18423    new_path="$path"
18424
18425  windows_path="$new_path"
18426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18427    unix_path=`$CYGPATH -u "$windows_path"`
18428    new_path="$unix_path"
18429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18431    new_path="$unix_path"
18432  fi
18433
18434
18435    new_path=`$WHICH "$new_path" 2> /dev/null`
18436    # bat and cmd files are not always considered executable in MSYS causing which
18437    # to not find them
18438    if test "x$new_path" = x \
18439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18441      new_path="$path"
18442
18443  windows_path="$new_path"
18444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18445    unix_path=`$CYGPATH -u "$windows_path"`
18446    new_path="$unix_path"
18447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18449    new_path="$unix_path"
18450  fi
18451
18452    fi
18453
18454    if test "x$new_path" = x; then
18455      # It's still not found. Now this is an unrecoverable error.
18456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18457$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18458      has_space=`$ECHO "$complete" | $GREP " "`
18459      if test "x$has_space" != x; then
18460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18462      fi
18463      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18464    fi
18465  fi
18466
18467  # Now new_path has a complete unix path to the binary
18468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18469    # Keep paths in /bin as-is, but remove trailing .exe if any
18470    new_path="${new_path/%.exe/}"
18471    # Do not save /bin paths to all_fixpath_prefixes!
18472  else
18473    # Not in mixed or Windows style, start by that.
18474    new_path=`cmd //c echo $new_path`
18475
18476  input_path="$new_path"
18477  # Check if we need to convert this using DOS-style short mode. If the path
18478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18479  # take no chances and rewrite it.
18480  # Note: m4 eats our [], so we need to use [ and ] instead.
18481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18482  if test "x$has_forbidden_chars" != x; then
18483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18485  fi
18486
18487    # Output is in $new_path
18488
18489  windows_path="$new_path"
18490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18491    unix_path=`$CYGPATH -u "$windows_path"`
18492    new_path="$unix_path"
18493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18495    new_path="$unix_path"
18496  fi
18497
18498    # remove trailing .exe if any
18499    new_path="${new_path/%.exe/}"
18500
18501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18503  fi
18504
18505    else
18506      # We're on a unix platform. Hooray! :)
18507      # First separate the path from the arguments. This will split at the first
18508      # space.
18509      complete="$FOUND_MAKE"
18510      path="${complete%% *}"
18511      tmp="$complete EOL"
18512      arguments="${tmp#* }"
18513
18514      # Cannot rely on the command "which" here since it doesn't always work.
18515      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18516      if test -z "$is_absolute_path"; then
18517        # Path to executable is not absolute. Find it.
18518        IFS_save="$IFS"
18519        IFS=:
18520        for p in $PATH; do
18521          if test -f "$p/$path" && test -x "$p/$path"; then
18522            new_path="$p/$path"
18523            break
18524          fi
18525        done
18526        IFS="$IFS_save"
18527      else
18528        # This is an absolute path, we can use it without further modifications.
18529        new_path="$path"
18530      fi
18531
18532      if test "x$new_path" = x; then
18533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18534$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18535        has_space=`$ECHO "$complete" | $GREP " "`
18536        if test "x$has_space" != x; then
18537          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18539        fi
18540        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18541      fi
18542    fi
18543
18544    # Now join together the path and the arguments once again
18545    if test "x$arguments" != xEOL; then
18546      new_complete="$new_path ${arguments% *}"
18547    else
18548      new_complete="$new_path"
18549    fi
18550
18551    if test "x$complete" != "x$new_complete"; then
18552      FOUND_MAKE="$new_complete"
18553      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18554$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18555    fi
18556  fi
18557
18558        fi
18559      fi
18560    fi
18561  fi
18562
18563
18564    if test "x$FOUND_MAKE" = x; then
18565      for ac_prog in make
18566do
18567  # Extract the first word of "$ac_prog", so it can be a program name with args.
18568set dummy $ac_prog; ac_word=$2
18569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18570$as_echo_n "checking for $ac_word... " >&6; }
18571if ${ac_cv_path_CHECK_MAKE+:} false; then :
18572  $as_echo_n "(cached) " >&6
18573else
18574  case $CHECK_MAKE in
18575  [\\/]* | ?:[\\/]*)
18576  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18577  ;;
18578  *)
18579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18580for as_dir in $PATH
18581do
18582  IFS=$as_save_IFS
18583  test -z "$as_dir" && as_dir=.
18584    for ac_exec_ext in '' $ac_executable_extensions; do
18585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18586    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18588    break 2
18589  fi
18590done
18591  done
18592IFS=$as_save_IFS
18593
18594  ;;
18595esac
18596fi
18597CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18598if test -n "$CHECK_MAKE"; then
18599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18600$as_echo "$CHECK_MAKE" >&6; }
18601else
18602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18603$as_echo "no" >&6; }
18604fi
18605
18606
18607  test -n "$CHECK_MAKE" && break
18608done
18609
18610
18611  MAKE_CANDIDATE=""$CHECK_MAKE""
18612  DESCRIPTION="make in PATH"
18613
18614  # On Cygwin, we require a newer version of make than on other platforms
18615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18616    MAKE_VERSION_EXPR="-e 4\."
18617    MAKE_REQUIRED_VERSION="4.0"
18618   else
18619    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18620    MAKE_REQUIRED_VERSION="3.81"
18621  fi
18622
18623  if test "x$MAKE_CANDIDATE" != x; then
18624    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18625$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18626    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18627    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18628    if test "x$IS_GNU_MAKE" = x; then
18629      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18630$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18631    else
18632      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18633      if test "x$IS_MODERN_MAKE" = x; then
18634        { $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
18635$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;}
18636      else
18637        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18638          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18639            MAKE_EXPECTED_ENV='cygwin'
18640          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18641            MAKE_EXPECTED_ENV='msys'
18642          else
18643            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18644          fi
18645          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18646          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18647        else
18648          # Not relevant for non-Windows
18649          IS_MAKE_CORRECT_ENV=true
18650        fi
18651        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18652          { $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
18653$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;}
18654        else
18655          FOUND_MAKE=$MAKE_CANDIDATE
18656
18657  # Only process if variable expands to non-empty
18658
18659  if test "x$FOUND_MAKE" != x; then
18660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18661
18662  # First separate the path from the arguments. This will split at the first
18663  # space.
18664  complete="$FOUND_MAKE"
18665  path="${complete%% *}"
18666  tmp="$complete EOL"
18667  arguments="${tmp#* }"
18668
18669  # Input might be given as Windows format, start by converting to
18670  # unix format.
18671  new_path=`$CYGPATH -u "$path"`
18672
18673  # Now try to locate executable using which
18674  new_path=`$WHICH "$new_path" 2> /dev/null`
18675  # bat and cmd files are not always considered executable in cygwin causing which
18676  # to not find them
18677  if test "x$new_path" = x \
18678      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18679      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18680    new_path=`$CYGPATH -u "$path"`
18681  fi
18682  if test "x$new_path" = x; then
18683    # Oops. Which didn't find the executable.
18684    # The splitting of arguments from the executable at a space might have been incorrect,
18685    # since paths with space are more likely in Windows. Give it another try with the whole
18686    # argument.
18687    path="$complete"
18688    arguments="EOL"
18689    new_path=`$CYGPATH -u "$path"`
18690    new_path=`$WHICH "$new_path" 2> /dev/null`
18691    # bat and cmd files are not always considered executable in cygwin causing which
18692    # to not find them
18693    if test "x$new_path" = x \
18694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18696      new_path=`$CYGPATH -u "$path"`
18697    fi
18698    if test "x$new_path" = x; then
18699      # It's still not found. Now this is an unrecoverable error.
18700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18702      has_space=`$ECHO "$complete" | $GREP " "`
18703      if test "x$has_space" != x; then
18704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18706      fi
18707      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18708    fi
18709  fi
18710
18711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18714  # "foo.exe" is OK but "foo" is an error.
18715  #
18716  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18717  # It is also a way to make sure we got the proper file name for the real test later on.
18718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18719  if test "x$test_shortpath" = x; then
18720    # Short path failed, file does not exist as specified.
18721    # Try adding .exe or .cmd
18722    if test -f "${new_path}.exe"; then
18723      input_to_shortpath="${new_path}.exe"
18724    elif test -f "${new_path}.cmd"; then
18725      input_to_shortpath="${new_path}.cmd"
18726    else
18727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18728$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18729      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18730$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18731      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18732    fi
18733  else
18734    input_to_shortpath="$new_path"
18735  fi
18736
18737  # Call helper function which possibly converts this using DOS-style short mode.
18738  # If so, the updated path is stored in $new_path.
18739  new_path="$input_to_shortpath"
18740
18741  input_path="$input_to_shortpath"
18742  # Check if we need to convert this using DOS-style short mode. If the path
18743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18744  # take no chances and rewrite it.
18745  # Note: m4 eats our [], so we need to use [ and ] instead.
18746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18747  if test "x$has_forbidden_chars" != x; then
18748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18752      # Going to short mode and back again did indeed matter. Since short mode is
18753      # case insensitive, let's make it lowercase to improve readability.
18754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18755      # Now convert it back to Unix-style (cygpath)
18756      input_path=`$CYGPATH -u "$shortmode_path"`
18757      new_path="$input_path"
18758    fi
18759  fi
18760
18761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18762  if test "x$test_cygdrive_prefix" = x; then
18763    # As a simple fix, exclude /usr/bin since it's not a real path.
18764    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18766      # a path prefixed by /cygdrive for fixpath to work.
18767      new_path="$CYGWIN_ROOT_PATH$input_path"
18768    fi
18769  fi
18770
18771  # remove trailing .exe if any
18772  new_path="${new_path/%.exe/}"
18773
18774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18775
18776  # First separate the path from the arguments. This will split at the first
18777  # space.
18778  complete="$FOUND_MAKE"
18779  path="${complete%% *}"
18780  tmp="$complete EOL"
18781  arguments="${tmp#* }"
18782
18783  # Input might be given as Windows format, start by converting to
18784  # unix format.
18785  new_path="$path"
18786
18787  windows_path="$new_path"
18788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18789    unix_path=`$CYGPATH -u "$windows_path"`
18790    new_path="$unix_path"
18791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18793    new_path="$unix_path"
18794  fi
18795
18796
18797  # Now try to locate executable using which
18798  new_path=`$WHICH "$new_path" 2> /dev/null`
18799
18800  if test "x$new_path" = x; then
18801    # Oops. Which didn't find the executable.
18802    # The splitting of arguments from the executable at a space might have been incorrect,
18803    # since paths with space are more likely in Windows. Give it another try with the whole
18804    # argument.
18805    path="$complete"
18806    arguments="EOL"
18807    new_path="$path"
18808
18809  windows_path="$new_path"
18810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18811    unix_path=`$CYGPATH -u "$windows_path"`
18812    new_path="$unix_path"
18813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18815    new_path="$unix_path"
18816  fi
18817
18818
18819    new_path=`$WHICH "$new_path" 2> /dev/null`
18820    # bat and cmd files are not always considered executable in MSYS causing which
18821    # to not find them
18822    if test "x$new_path" = x \
18823        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18824        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18825      new_path="$path"
18826
18827  windows_path="$new_path"
18828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18829    unix_path=`$CYGPATH -u "$windows_path"`
18830    new_path="$unix_path"
18831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18833    new_path="$unix_path"
18834  fi
18835
18836    fi
18837
18838    if test "x$new_path" = x; then
18839      # It's still not found. Now this is an unrecoverable error.
18840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18841$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18842      has_space=`$ECHO "$complete" | $GREP " "`
18843      if test "x$has_space" != x; then
18844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18846      fi
18847      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18848    fi
18849  fi
18850
18851  # Now new_path has a complete unix path to the binary
18852  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18853    # Keep paths in /bin as-is, but remove trailing .exe if any
18854    new_path="${new_path/%.exe/}"
18855    # Do not save /bin paths to all_fixpath_prefixes!
18856  else
18857    # Not in mixed or Windows style, start by that.
18858    new_path=`cmd //c echo $new_path`
18859
18860  input_path="$new_path"
18861  # Check if we need to convert this using DOS-style short mode. If the path
18862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18863  # take no chances and rewrite it.
18864  # Note: m4 eats our [], so we need to use [ and ] instead.
18865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18866  if test "x$has_forbidden_chars" != x; then
18867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18869  fi
18870
18871    # Output is in $new_path
18872
18873  windows_path="$new_path"
18874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18875    unix_path=`$CYGPATH -u "$windows_path"`
18876    new_path="$unix_path"
18877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18879    new_path="$unix_path"
18880  fi
18881
18882    # remove trailing .exe if any
18883    new_path="${new_path/%.exe/}"
18884
18885    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18886    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18887  fi
18888
18889    else
18890      # We're on a unix platform. Hooray! :)
18891      # First separate the path from the arguments. This will split at the first
18892      # space.
18893      complete="$FOUND_MAKE"
18894      path="${complete%% *}"
18895      tmp="$complete EOL"
18896      arguments="${tmp#* }"
18897
18898      # Cannot rely on the command "which" here since it doesn't always work.
18899      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18900      if test -z "$is_absolute_path"; then
18901        # Path to executable is not absolute. Find it.
18902        IFS_save="$IFS"
18903        IFS=:
18904        for p in $PATH; do
18905          if test -f "$p/$path" && test -x "$p/$path"; then
18906            new_path="$p/$path"
18907            break
18908          fi
18909        done
18910        IFS="$IFS_save"
18911      else
18912        # This is an absolute path, we can use it without further modifications.
18913        new_path="$path"
18914      fi
18915
18916      if test "x$new_path" = x; then
18917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18918$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18919        has_space=`$ECHO "$complete" | $GREP " "`
18920        if test "x$has_space" != x; then
18921          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18922$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18923        fi
18924        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18925      fi
18926    fi
18927
18928    # Now join together the path and the arguments once again
18929    if test "x$arguments" != xEOL; then
18930      new_complete="$new_path ${arguments% *}"
18931    else
18932      new_complete="$new_path"
18933    fi
18934
18935    if test "x$complete" != "x$new_complete"; then
18936      FOUND_MAKE="$new_complete"
18937      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18938$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18939    fi
18940  fi
18941
18942        fi
18943      fi
18944    fi
18945  fi
18946
18947    fi
18948
18949    if test "x$FOUND_MAKE" = x; then
18950      if test "x$TOOLCHAIN_PATH" != x; then
18951        # We have a toolchain path, check that as well before giving up.
18952        OLD_PATH=$PATH
18953        PATH=$TOOLCHAIN_PATH:$PATH
18954        for ac_prog in gmake
18955do
18956  # Extract the first word of "$ac_prog", so it can be a program name with args.
18957set dummy $ac_prog; ac_word=$2
18958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18959$as_echo_n "checking for $ac_word... " >&6; }
18960if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18961  $as_echo_n "(cached) " >&6
18962else
18963  case $CHECK_TOOLSDIR_GMAKE in
18964  [\\/]* | ?:[\\/]*)
18965  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18966  ;;
18967  *)
18968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18969for as_dir in $PATH
18970do
18971  IFS=$as_save_IFS
18972  test -z "$as_dir" && as_dir=.
18973    for ac_exec_ext in '' $ac_executable_extensions; do
18974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18975    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18977    break 2
18978  fi
18979done
18980  done
18981IFS=$as_save_IFS
18982
18983  ;;
18984esac
18985fi
18986CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18987if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18989$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18990else
18991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18992$as_echo "no" >&6; }
18993fi
18994
18995
18996  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18997done
18998
18999
19000  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19001  DESCRIPTION="gmake in tools-dir"
19002
19003  # On Cygwin, we require a newer version of make than on other platforms
19004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19005    MAKE_VERSION_EXPR="-e 4\."
19006    MAKE_REQUIRED_VERSION="4.0"
19007   else
19008    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19009    MAKE_REQUIRED_VERSION="3.81"
19010  fi
19011
19012  if test "x$MAKE_CANDIDATE" != x; then
19013    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19014$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19015    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19016    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19017    if test "x$IS_GNU_MAKE" = x; then
19018      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19019$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19020    else
19021      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19022      if test "x$IS_MODERN_MAKE" = x; then
19023        { $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
19024$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;}
19025      else
19026        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19027          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19028            MAKE_EXPECTED_ENV='cygwin'
19029          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19030            MAKE_EXPECTED_ENV='msys'
19031          else
19032            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19033          fi
19034          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19035          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19036        else
19037          # Not relevant for non-Windows
19038          IS_MAKE_CORRECT_ENV=true
19039        fi
19040        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19041          { $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
19042$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;}
19043        else
19044          FOUND_MAKE=$MAKE_CANDIDATE
19045
19046  # Only process if variable expands to non-empty
19047
19048  if test "x$FOUND_MAKE" != x; then
19049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19050
19051  # First separate the path from the arguments. This will split at the first
19052  # space.
19053  complete="$FOUND_MAKE"
19054  path="${complete%% *}"
19055  tmp="$complete EOL"
19056  arguments="${tmp#* }"
19057
19058  # Input might be given as Windows format, start by converting to
19059  # unix format.
19060  new_path=`$CYGPATH -u "$path"`
19061
19062  # Now try to locate executable using which
19063  new_path=`$WHICH "$new_path" 2> /dev/null`
19064  # bat and cmd files are not always considered executable in cygwin causing which
19065  # to not find them
19066  if test "x$new_path" = x \
19067      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19068      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19069    new_path=`$CYGPATH -u "$path"`
19070  fi
19071  if test "x$new_path" = x; then
19072    # Oops. Which didn't find the executable.
19073    # The splitting of arguments from the executable at a space might have been incorrect,
19074    # since paths with space are more likely in Windows. Give it another try with the whole
19075    # argument.
19076    path="$complete"
19077    arguments="EOL"
19078    new_path=`$CYGPATH -u "$path"`
19079    new_path=`$WHICH "$new_path" 2> /dev/null`
19080    # bat and cmd files are not always considered executable in cygwin causing which
19081    # to not find them
19082    if test "x$new_path" = x \
19083        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19084        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19085      new_path=`$CYGPATH -u "$path"`
19086    fi
19087    if test "x$new_path" = x; then
19088      # It's still not found. Now this is an unrecoverable error.
19089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19090$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19091      has_space=`$ECHO "$complete" | $GREP " "`
19092      if test "x$has_space" != x; then
19093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19095      fi
19096      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19097    fi
19098  fi
19099
19100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19103  # "foo.exe" is OK but "foo" is an error.
19104  #
19105  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19106  # It is also a way to make sure we got the proper file name for the real test later on.
19107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19108  if test "x$test_shortpath" = x; then
19109    # Short path failed, file does not exist as specified.
19110    # Try adding .exe or .cmd
19111    if test -f "${new_path}.exe"; then
19112      input_to_shortpath="${new_path}.exe"
19113    elif test -f "${new_path}.cmd"; then
19114      input_to_shortpath="${new_path}.cmd"
19115    else
19116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19117$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19118      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19119$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19120      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19121    fi
19122  else
19123    input_to_shortpath="$new_path"
19124  fi
19125
19126  # Call helper function which possibly converts this using DOS-style short mode.
19127  # If so, the updated path is stored in $new_path.
19128  new_path="$input_to_shortpath"
19129
19130  input_path="$input_to_shortpath"
19131  # Check if we need to convert this using DOS-style short mode. If the path
19132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19133  # take no chances and rewrite it.
19134  # Note: m4 eats our [], so we need to use [ and ] instead.
19135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19136  if test "x$has_forbidden_chars" != x; then
19137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19141      # Going to short mode and back again did indeed matter. Since short mode is
19142      # case insensitive, let's make it lowercase to improve readability.
19143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19144      # Now convert it back to Unix-style (cygpath)
19145      input_path=`$CYGPATH -u "$shortmode_path"`
19146      new_path="$input_path"
19147    fi
19148  fi
19149
19150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19151  if test "x$test_cygdrive_prefix" = x; then
19152    # As a simple fix, exclude /usr/bin since it's not a real path.
19153    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19155      # a path prefixed by /cygdrive for fixpath to work.
19156      new_path="$CYGWIN_ROOT_PATH$input_path"
19157    fi
19158  fi
19159
19160  # remove trailing .exe if any
19161  new_path="${new_path/%.exe/}"
19162
19163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19164
19165  # First separate the path from the arguments. This will split at the first
19166  # space.
19167  complete="$FOUND_MAKE"
19168  path="${complete%% *}"
19169  tmp="$complete EOL"
19170  arguments="${tmp#* }"
19171
19172  # Input might be given as Windows format, start by converting to
19173  # unix format.
19174  new_path="$path"
19175
19176  windows_path="$new_path"
19177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19178    unix_path=`$CYGPATH -u "$windows_path"`
19179    new_path="$unix_path"
19180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19182    new_path="$unix_path"
19183  fi
19184
19185
19186  # Now try to locate executable using which
19187  new_path=`$WHICH "$new_path" 2> /dev/null`
19188
19189  if test "x$new_path" = x; then
19190    # Oops. Which didn't find the executable.
19191    # The splitting of arguments from the executable at a space might have been incorrect,
19192    # since paths with space are more likely in Windows. Give it another try with the whole
19193    # argument.
19194    path="$complete"
19195    arguments="EOL"
19196    new_path="$path"
19197
19198  windows_path="$new_path"
19199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19200    unix_path=`$CYGPATH -u "$windows_path"`
19201    new_path="$unix_path"
19202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19204    new_path="$unix_path"
19205  fi
19206
19207
19208    new_path=`$WHICH "$new_path" 2> /dev/null`
19209    # bat and cmd files are not always considered executable in MSYS causing which
19210    # to not find them
19211    if test "x$new_path" = x \
19212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19214      new_path="$path"
19215
19216  windows_path="$new_path"
19217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19218    unix_path=`$CYGPATH -u "$windows_path"`
19219    new_path="$unix_path"
19220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19222    new_path="$unix_path"
19223  fi
19224
19225    fi
19226
19227    if test "x$new_path" = x; then
19228      # It's still not found. Now this is an unrecoverable error.
19229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19230$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19231      has_space=`$ECHO "$complete" | $GREP " "`
19232      if test "x$has_space" != x; then
19233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19235      fi
19236      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19237    fi
19238  fi
19239
19240  # Now new_path has a complete unix path to the binary
19241  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19242    # Keep paths in /bin as-is, but remove trailing .exe if any
19243    new_path="${new_path/%.exe/}"
19244    # Do not save /bin paths to all_fixpath_prefixes!
19245  else
19246    # Not in mixed or Windows style, start by that.
19247    new_path=`cmd //c echo $new_path`
19248
19249  input_path="$new_path"
19250  # Check if we need to convert this using DOS-style short mode. If the path
19251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19252  # take no chances and rewrite it.
19253  # Note: m4 eats our [], so we need to use [ and ] instead.
19254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19255  if test "x$has_forbidden_chars" != x; then
19256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19258  fi
19259
19260    # Output is in $new_path
19261
19262  windows_path="$new_path"
19263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19264    unix_path=`$CYGPATH -u "$windows_path"`
19265    new_path="$unix_path"
19266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19268    new_path="$unix_path"
19269  fi
19270
19271    # remove trailing .exe if any
19272    new_path="${new_path/%.exe/}"
19273
19274    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19275    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19276  fi
19277
19278    else
19279      # We're on a unix platform. Hooray! :)
19280      # First separate the path from the arguments. This will split at the first
19281      # space.
19282      complete="$FOUND_MAKE"
19283      path="${complete%% *}"
19284      tmp="$complete EOL"
19285      arguments="${tmp#* }"
19286
19287      # Cannot rely on the command "which" here since it doesn't always work.
19288      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19289      if test -z "$is_absolute_path"; then
19290        # Path to executable is not absolute. Find it.
19291        IFS_save="$IFS"
19292        IFS=:
19293        for p in $PATH; do
19294          if test -f "$p/$path" && test -x "$p/$path"; then
19295            new_path="$p/$path"
19296            break
19297          fi
19298        done
19299        IFS="$IFS_save"
19300      else
19301        # This is an absolute path, we can use it without further modifications.
19302        new_path="$path"
19303      fi
19304
19305      if test "x$new_path" = x; then
19306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19307$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19308        has_space=`$ECHO "$complete" | $GREP " "`
19309        if test "x$has_space" != x; then
19310          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19311$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19312        fi
19313        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19314      fi
19315    fi
19316
19317    # Now join together the path and the arguments once again
19318    if test "x$arguments" != xEOL; then
19319      new_complete="$new_path ${arguments% *}"
19320    else
19321      new_complete="$new_path"
19322    fi
19323
19324    if test "x$complete" != "x$new_complete"; then
19325      FOUND_MAKE="$new_complete"
19326      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19327$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19328    fi
19329  fi
19330
19331        fi
19332      fi
19333    fi
19334  fi
19335
19336        if test "x$FOUND_MAKE" = x; then
19337          for ac_prog in make
19338do
19339  # Extract the first word of "$ac_prog", so it can be a program name with args.
19340set dummy $ac_prog; ac_word=$2
19341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19342$as_echo_n "checking for $ac_word... " >&6; }
19343if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19344  $as_echo_n "(cached) " >&6
19345else
19346  case $CHECK_TOOLSDIR_MAKE in
19347  [\\/]* | ?:[\\/]*)
19348  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19349  ;;
19350  *)
19351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19352for as_dir in $PATH
19353do
19354  IFS=$as_save_IFS
19355  test -z "$as_dir" && as_dir=.
19356    for ac_exec_ext in '' $ac_executable_extensions; do
19357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19358    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19360    break 2
19361  fi
19362done
19363  done
19364IFS=$as_save_IFS
19365
19366  ;;
19367esac
19368fi
19369CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19370if test -n "$CHECK_TOOLSDIR_MAKE"; then
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19372$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19373else
19374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19375$as_echo "no" >&6; }
19376fi
19377
19378
19379  test -n "$CHECK_TOOLSDIR_MAKE" && break
19380done
19381
19382
19383  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19384  DESCRIPTION="make in tools-dir"
19385
19386  # On Cygwin, we require a newer version of make than on other platforms
19387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19388    MAKE_VERSION_EXPR="-e 4\."
19389    MAKE_REQUIRED_VERSION="4.0"
19390   else
19391    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19392    MAKE_REQUIRED_VERSION="3.81"
19393  fi
19394
19395  if test "x$MAKE_CANDIDATE" != x; then
19396    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19397$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19398    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19399    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19400    if test "x$IS_GNU_MAKE" = x; then
19401      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19402$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19403    else
19404      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19405      if test "x$IS_MODERN_MAKE" = x; then
19406        { $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
19407$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;}
19408      else
19409        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19410          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19411            MAKE_EXPECTED_ENV='cygwin'
19412          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19413            MAKE_EXPECTED_ENV='msys'
19414          else
19415            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19416          fi
19417          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19418          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19419        else
19420          # Not relevant for non-Windows
19421          IS_MAKE_CORRECT_ENV=true
19422        fi
19423        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19424          { $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
19425$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;}
19426        else
19427          FOUND_MAKE=$MAKE_CANDIDATE
19428
19429  # Only process if variable expands to non-empty
19430
19431  if test "x$FOUND_MAKE" != x; then
19432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19433
19434  # First separate the path from the arguments. This will split at the first
19435  # space.
19436  complete="$FOUND_MAKE"
19437  path="${complete%% *}"
19438  tmp="$complete EOL"
19439  arguments="${tmp#* }"
19440
19441  # Input might be given as Windows format, start by converting to
19442  # unix format.
19443  new_path=`$CYGPATH -u "$path"`
19444
19445  # Now try to locate executable using which
19446  new_path=`$WHICH "$new_path" 2> /dev/null`
19447  # bat and cmd files are not always considered executable in cygwin causing which
19448  # to not find them
19449  if test "x$new_path" = x \
19450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19452    new_path=`$CYGPATH -u "$path"`
19453  fi
19454  if test "x$new_path" = x; then
19455    # Oops. Which didn't find the executable.
19456    # The splitting of arguments from the executable at a space might have been incorrect,
19457    # since paths with space are more likely in Windows. Give it another try with the whole
19458    # argument.
19459    path="$complete"
19460    arguments="EOL"
19461    new_path=`$CYGPATH -u "$path"`
19462    new_path=`$WHICH "$new_path" 2> /dev/null`
19463    # bat and cmd files are not always considered executable in cygwin causing which
19464    # to not find them
19465    if test "x$new_path" = x \
19466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19468      new_path=`$CYGPATH -u "$path"`
19469    fi
19470    if test "x$new_path" = x; then
19471      # It's still not found. Now this is an unrecoverable error.
19472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19473$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19474      has_space=`$ECHO "$complete" | $GREP " "`
19475      if test "x$has_space" != x; then
19476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19478      fi
19479      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19480    fi
19481  fi
19482
19483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19486  # "foo.exe" is OK but "foo" is an error.
19487  #
19488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19489  # It is also a way to make sure we got the proper file name for the real test later on.
19490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19491  if test "x$test_shortpath" = x; then
19492    # Short path failed, file does not exist as specified.
19493    # Try adding .exe or .cmd
19494    if test -f "${new_path}.exe"; then
19495      input_to_shortpath="${new_path}.exe"
19496    elif test -f "${new_path}.cmd"; then
19497      input_to_shortpath="${new_path}.cmd"
19498    else
19499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19500$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19503      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19504    fi
19505  else
19506    input_to_shortpath="$new_path"
19507  fi
19508
19509  # Call helper function which possibly converts this using DOS-style short mode.
19510  # If so, the updated path is stored in $new_path.
19511  new_path="$input_to_shortpath"
19512
19513  input_path="$input_to_shortpath"
19514  # Check if we need to convert this using DOS-style short mode. If the path
19515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19516  # take no chances and rewrite it.
19517  # Note: m4 eats our [], so we need to use [ and ] instead.
19518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19519  if test "x$has_forbidden_chars" != x; then
19520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19524      # Going to short mode and back again did indeed matter. Since short mode is
19525      # case insensitive, let's make it lowercase to improve readability.
19526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19527      # Now convert it back to Unix-style (cygpath)
19528      input_path=`$CYGPATH -u "$shortmode_path"`
19529      new_path="$input_path"
19530    fi
19531  fi
19532
19533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19534  if test "x$test_cygdrive_prefix" = x; then
19535    # As a simple fix, exclude /usr/bin since it's not a real path.
19536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19538      # a path prefixed by /cygdrive for fixpath to work.
19539      new_path="$CYGWIN_ROOT_PATH$input_path"
19540    fi
19541  fi
19542
19543  # remove trailing .exe if any
19544  new_path="${new_path/%.exe/}"
19545
19546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19547
19548  # First separate the path from the arguments. This will split at the first
19549  # space.
19550  complete="$FOUND_MAKE"
19551  path="${complete%% *}"
19552  tmp="$complete EOL"
19553  arguments="${tmp#* }"
19554
19555  # Input might be given as Windows format, start by converting to
19556  # unix format.
19557  new_path="$path"
19558
19559  windows_path="$new_path"
19560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19561    unix_path=`$CYGPATH -u "$windows_path"`
19562    new_path="$unix_path"
19563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19565    new_path="$unix_path"
19566  fi
19567
19568
19569  # Now try to locate executable using which
19570  new_path=`$WHICH "$new_path" 2> /dev/null`
19571
19572  if test "x$new_path" = x; then
19573    # Oops. Which didn't find the executable.
19574    # The splitting of arguments from the executable at a space might have been incorrect,
19575    # since paths with space are more likely in Windows. Give it another try with the whole
19576    # argument.
19577    path="$complete"
19578    arguments="EOL"
19579    new_path="$path"
19580
19581  windows_path="$new_path"
19582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19583    unix_path=`$CYGPATH -u "$windows_path"`
19584    new_path="$unix_path"
19585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19587    new_path="$unix_path"
19588  fi
19589
19590
19591    new_path=`$WHICH "$new_path" 2> /dev/null`
19592    # bat and cmd files are not always considered executable in MSYS causing which
19593    # to not find them
19594    if test "x$new_path" = x \
19595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19597      new_path="$path"
19598
19599  windows_path="$new_path"
19600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19601    unix_path=`$CYGPATH -u "$windows_path"`
19602    new_path="$unix_path"
19603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19605    new_path="$unix_path"
19606  fi
19607
19608    fi
19609
19610    if test "x$new_path" = x; then
19611      # It's still not found. Now this is an unrecoverable error.
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19614      has_space=`$ECHO "$complete" | $GREP " "`
19615      if test "x$has_space" != x; then
19616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19618      fi
19619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19620    fi
19621  fi
19622
19623  # Now new_path has a complete unix path to the binary
19624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19625    # Keep paths in /bin as-is, but remove trailing .exe if any
19626    new_path="${new_path/%.exe/}"
19627    # Do not save /bin paths to all_fixpath_prefixes!
19628  else
19629    # Not in mixed or Windows style, start by that.
19630    new_path=`cmd //c echo $new_path`
19631
19632  input_path="$new_path"
19633  # Check if we need to convert this using DOS-style short mode. If the path
19634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19635  # take no chances and rewrite it.
19636  # Note: m4 eats our [], so we need to use [ and ] instead.
19637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19638  if test "x$has_forbidden_chars" != x; then
19639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19641  fi
19642
19643    # Output is in $new_path
19644
19645  windows_path="$new_path"
19646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19647    unix_path=`$CYGPATH -u "$windows_path"`
19648    new_path="$unix_path"
19649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19651    new_path="$unix_path"
19652  fi
19653
19654    # remove trailing .exe if any
19655    new_path="${new_path/%.exe/}"
19656
19657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19659  fi
19660
19661    else
19662      # We're on a unix platform. Hooray! :)
19663      # First separate the path from the arguments. This will split at the first
19664      # space.
19665      complete="$FOUND_MAKE"
19666      path="${complete%% *}"
19667      tmp="$complete EOL"
19668      arguments="${tmp#* }"
19669
19670      # Cannot rely on the command "which" here since it doesn't always work.
19671      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19672      if test -z "$is_absolute_path"; then
19673        # Path to executable is not absolute. Find it.
19674        IFS_save="$IFS"
19675        IFS=:
19676        for p in $PATH; do
19677          if test -f "$p/$path" && test -x "$p/$path"; then
19678            new_path="$p/$path"
19679            break
19680          fi
19681        done
19682        IFS="$IFS_save"
19683      else
19684        # This is an absolute path, we can use it without further modifications.
19685        new_path="$path"
19686      fi
19687
19688      if test "x$new_path" = x; then
19689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19691        has_space=`$ECHO "$complete" | $GREP " "`
19692        if test "x$has_space" != x; then
19693          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19695        fi
19696        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19697      fi
19698    fi
19699
19700    # Now join together the path and the arguments once again
19701    if test "x$arguments" != xEOL; then
19702      new_complete="$new_path ${arguments% *}"
19703    else
19704      new_complete="$new_path"
19705    fi
19706
19707    if test "x$complete" != "x$new_complete"; then
19708      FOUND_MAKE="$new_complete"
19709      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19710$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19711    fi
19712  fi
19713
19714        fi
19715      fi
19716    fi
19717  fi
19718
19719        fi
19720        PATH=$OLD_PATH
19721      fi
19722    fi
19723
19724    if test "x$FOUND_MAKE" = x; then
19725      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
19726    fi
19727
19728    else
19729      # If it succeeded, then it was overridden by the user. We will use it
19730      # for the tool.
19731
19732      # First remove it from the list of overridden variables, so we can test
19733      # for unknown variables in the end.
19734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19735
19736      # Check if we try to supply an empty value
19737      if test "x$MAKE" = x; then
19738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19739$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19741$as_echo_n "checking for MAKE... " >&6; }
19742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19743$as_echo "disabled" >&6; }
19744      else
19745        # Check if the provided tool contains a complete path.
19746        tool_specified="$MAKE"
19747        tool_basename="${tool_specified##*/}"
19748        if test "x$tool_basename" = "x$tool_specified"; then
19749          # A command without a complete path is provided, search $PATH.
19750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19751$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19752          # Extract the first word of "$tool_basename", so it can be a program name with args.
19753set dummy $tool_basename; ac_word=$2
19754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19755$as_echo_n "checking for $ac_word... " >&6; }
19756if ${ac_cv_path_MAKE+:} false; then :
19757  $as_echo_n "(cached) " >&6
19758else
19759  case $MAKE in
19760  [\\/]* | ?:[\\/]*)
19761  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19762  ;;
19763  *)
19764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19765for as_dir in $PATH
19766do
19767  IFS=$as_save_IFS
19768  test -z "$as_dir" && as_dir=.
19769    for ac_exec_ext in '' $ac_executable_extensions; do
19770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19771    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19773    break 2
19774  fi
19775done
19776  done
19777IFS=$as_save_IFS
19778
19779  ;;
19780esac
19781fi
19782MAKE=$ac_cv_path_MAKE
19783if test -n "$MAKE"; then
19784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19785$as_echo "$MAKE" >&6; }
19786else
19787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19788$as_echo "no" >&6; }
19789fi
19790
19791
19792          if test "x$MAKE" = x; then
19793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19794          fi
19795        else
19796          # Otherwise we believe it is a complete path. Use it as it is.
19797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19798$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19800$as_echo_n "checking for MAKE... " >&6; }
19801          if test ! -x "$tool_specified"; then
19802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19803$as_echo "not found" >&6; }
19804            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19805          fi
19806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19807$as_echo "$tool_specified" >&6; }
19808        fi
19809      fi
19810    fi
19811
19812    # If MAKE was set by user, verify the version
19813
19814  MAKE_CANDIDATE=""$MAKE""
19815  DESCRIPTION="user supplied MAKE=$MAKE"
19816
19817  # On Cygwin, we require a newer version of make than on other platforms
19818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19819    MAKE_VERSION_EXPR="-e 4\."
19820    MAKE_REQUIRED_VERSION="4.0"
19821   else
19822    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19823    MAKE_REQUIRED_VERSION="3.81"
19824  fi
19825
19826  if test "x$MAKE_CANDIDATE" != x; then
19827    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19828$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19829    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19830    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19831    if test "x$IS_GNU_MAKE" = x; then
19832      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19833$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19834    else
19835      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19836      if test "x$IS_MODERN_MAKE" = x; then
19837        { $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
19838$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;}
19839      else
19840        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19841          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19842            MAKE_EXPECTED_ENV='cygwin'
19843          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19844            MAKE_EXPECTED_ENV='msys'
19845          else
19846            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19847          fi
19848          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19849          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19850        else
19851          # Not relevant for non-Windows
19852          IS_MAKE_CORRECT_ENV=true
19853        fi
19854        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19855          { $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
19856$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;}
19857        else
19858          FOUND_MAKE=$MAKE_CANDIDATE
19859
19860  # Only process if variable expands to non-empty
19861
19862  if test "x$FOUND_MAKE" != x; then
19863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19864
19865  # First separate the path from the arguments. This will split at the first
19866  # space.
19867  complete="$FOUND_MAKE"
19868  path="${complete%% *}"
19869  tmp="$complete EOL"
19870  arguments="${tmp#* }"
19871
19872  # Input might be given as Windows format, start by converting to
19873  # unix format.
19874  new_path=`$CYGPATH -u "$path"`
19875
19876  # Now try to locate executable using which
19877  new_path=`$WHICH "$new_path" 2> /dev/null`
19878  # bat and cmd files are not always considered executable in cygwin causing which
19879  # to not find them
19880  if test "x$new_path" = x \
19881      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19882      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19883    new_path=`$CYGPATH -u "$path"`
19884  fi
19885  if test "x$new_path" = x; then
19886    # Oops. Which didn't find the executable.
19887    # The splitting of arguments from the executable at a space might have been incorrect,
19888    # since paths with space are more likely in Windows. Give it another try with the whole
19889    # argument.
19890    path="$complete"
19891    arguments="EOL"
19892    new_path=`$CYGPATH -u "$path"`
19893    new_path=`$WHICH "$new_path" 2> /dev/null`
19894    # bat and cmd files are not always considered executable in cygwin causing which
19895    # to not find them
19896    if test "x$new_path" = x \
19897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19899      new_path=`$CYGPATH -u "$path"`
19900    fi
19901    if test "x$new_path" = x; then
19902      # It's still not found. Now this is an unrecoverable error.
19903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19904$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19905      has_space=`$ECHO "$complete" | $GREP " "`
19906      if test "x$has_space" != x; then
19907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19909      fi
19910      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19911    fi
19912  fi
19913
19914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19917  # "foo.exe" is OK but "foo" is an error.
19918  #
19919  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19920  # It is also a way to make sure we got the proper file name for the real test later on.
19921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19922  if test "x$test_shortpath" = x; then
19923    # Short path failed, file does not exist as specified.
19924    # Try adding .exe or .cmd
19925    if test -f "${new_path}.exe"; then
19926      input_to_shortpath="${new_path}.exe"
19927    elif test -f "${new_path}.cmd"; then
19928      input_to_shortpath="${new_path}.cmd"
19929    else
19930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19931$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19932      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19933$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19934      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19935    fi
19936  else
19937    input_to_shortpath="$new_path"
19938  fi
19939
19940  # Call helper function which possibly converts this using DOS-style short mode.
19941  # If so, the updated path is stored in $new_path.
19942  new_path="$input_to_shortpath"
19943
19944  input_path="$input_to_shortpath"
19945  # Check if we need to convert this using DOS-style short mode. If the path
19946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19947  # take no chances and rewrite it.
19948  # Note: m4 eats our [], so we need to use [ and ] instead.
19949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19950  if test "x$has_forbidden_chars" != x; then
19951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19955      # Going to short mode and back again did indeed matter. Since short mode is
19956      # case insensitive, let's make it lowercase to improve readability.
19957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19958      # Now convert it back to Unix-style (cygpath)
19959      input_path=`$CYGPATH -u "$shortmode_path"`
19960      new_path="$input_path"
19961    fi
19962  fi
19963
19964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19965  if test "x$test_cygdrive_prefix" = x; then
19966    # As a simple fix, exclude /usr/bin since it's not a real path.
19967    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19969      # a path prefixed by /cygdrive for fixpath to work.
19970      new_path="$CYGWIN_ROOT_PATH$input_path"
19971    fi
19972  fi
19973
19974  # remove trailing .exe if any
19975  new_path="${new_path/%.exe/}"
19976
19977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19978
19979  # First separate the path from the arguments. This will split at the first
19980  # space.
19981  complete="$FOUND_MAKE"
19982  path="${complete%% *}"
19983  tmp="$complete EOL"
19984  arguments="${tmp#* }"
19985
19986  # Input might be given as Windows format, start by converting to
19987  # unix format.
19988  new_path="$path"
19989
19990  windows_path="$new_path"
19991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19992    unix_path=`$CYGPATH -u "$windows_path"`
19993    new_path="$unix_path"
19994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19996    new_path="$unix_path"
19997  fi
19998
19999
20000  # Now try to locate executable using which
20001  new_path=`$WHICH "$new_path" 2> /dev/null`
20002
20003  if test "x$new_path" = x; then
20004    # Oops. Which didn't find the executable.
20005    # The splitting of arguments from the executable at a space might have been incorrect,
20006    # since paths with space are more likely in Windows. Give it another try with the whole
20007    # argument.
20008    path="$complete"
20009    arguments="EOL"
20010    new_path="$path"
20011
20012  windows_path="$new_path"
20013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20014    unix_path=`$CYGPATH -u "$windows_path"`
20015    new_path="$unix_path"
20016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20018    new_path="$unix_path"
20019  fi
20020
20021
20022    new_path=`$WHICH "$new_path" 2> /dev/null`
20023    # bat and cmd files are not always considered executable in MSYS causing which
20024    # to not find them
20025    if test "x$new_path" = x \
20026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20028      new_path="$path"
20029
20030  windows_path="$new_path"
20031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20032    unix_path=`$CYGPATH -u "$windows_path"`
20033    new_path="$unix_path"
20034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20036    new_path="$unix_path"
20037  fi
20038
20039    fi
20040
20041    if test "x$new_path" = x; then
20042      # It's still not found. Now this is an unrecoverable error.
20043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20044$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20045      has_space=`$ECHO "$complete" | $GREP " "`
20046      if test "x$has_space" != x; then
20047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20049      fi
20050      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20051    fi
20052  fi
20053
20054  # Now new_path has a complete unix path to the binary
20055  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20056    # Keep paths in /bin as-is, but remove trailing .exe if any
20057    new_path="${new_path/%.exe/}"
20058    # Do not save /bin paths to all_fixpath_prefixes!
20059  else
20060    # Not in mixed or Windows style, start by that.
20061    new_path=`cmd //c echo $new_path`
20062
20063  input_path="$new_path"
20064  # Check if we need to convert this using DOS-style short mode. If the path
20065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20066  # take no chances and rewrite it.
20067  # Note: m4 eats our [], so we need to use [ and ] instead.
20068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20069  if test "x$has_forbidden_chars" != x; then
20070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20072  fi
20073
20074    # Output is in $new_path
20075
20076  windows_path="$new_path"
20077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20078    unix_path=`$CYGPATH -u "$windows_path"`
20079    new_path="$unix_path"
20080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20082    new_path="$unix_path"
20083  fi
20084
20085    # remove trailing .exe if any
20086    new_path="${new_path/%.exe/}"
20087
20088    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20089    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20090  fi
20091
20092    else
20093      # We're on a unix platform. Hooray! :)
20094      # First separate the path from the arguments. This will split at the first
20095      # space.
20096      complete="$FOUND_MAKE"
20097      path="${complete%% *}"
20098      tmp="$complete EOL"
20099      arguments="${tmp#* }"
20100
20101      # Cannot rely on the command "which" here since it doesn't always work.
20102      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20103      if test -z "$is_absolute_path"; then
20104        # Path to executable is not absolute. Find it.
20105        IFS_save="$IFS"
20106        IFS=:
20107        for p in $PATH; do
20108          if test -f "$p/$path" && test -x "$p/$path"; then
20109            new_path="$p/$path"
20110            break
20111          fi
20112        done
20113        IFS="$IFS_save"
20114      else
20115        # This is an absolute path, we can use it without further modifications.
20116        new_path="$path"
20117      fi
20118
20119      if test "x$new_path" = x; then
20120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20121$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20122        has_space=`$ECHO "$complete" | $GREP " "`
20123        if test "x$has_space" != x; then
20124          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20125$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20126        fi
20127        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20128      fi
20129    fi
20130
20131    # Now join together the path and the arguments once again
20132    if test "x$arguments" != xEOL; then
20133      new_complete="$new_path ${arguments% *}"
20134    else
20135      new_complete="$new_path"
20136    fi
20137
20138    if test "x$complete" != "x$new_complete"; then
20139      FOUND_MAKE="$new_complete"
20140      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20141$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20142    fi
20143  fi
20144
20145        fi
20146      fi
20147    fi
20148  fi
20149
20150    if test "x$FOUND_MAKE" = x; then
20151      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20152    fi
20153
20154  fi
20155
20156
20157  MAKE=$FOUND_MAKE
20158
20159  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20160$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20161
20162
20163  # Check if make supports the output sync option and if so, setup using it.
20164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20165$as_echo_n "checking if make --output-sync is supported... " >&6; }
20166  if $MAKE --version -O > /dev/null 2>&1; then
20167    OUTPUT_SYNC_SUPPORTED=true
20168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20169$as_echo "yes" >&6; }
20170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20171$as_echo_n "checking for output-sync value... " >&6; }
20172
20173# Check whether --with-output-sync was given.
20174if test "${with_output_sync+set}" = set; then :
20175  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20176fi
20177
20178    if test "x$OUTPUT_SYNC" = "x"; then
20179      OUTPUT_SYNC=none
20180    fi
20181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20182$as_echo "$OUTPUT_SYNC" >&6; }
20183    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20184      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20185    fi
20186  else
20187    OUTPUT_SYNC_SUPPORTED=false
20188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20189$as_echo "no" >&6; }
20190  fi
20191
20192
20193
20194
20195
20196
20197  # Test if find supports -delete
20198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20199$as_echo_n "checking if find supports -delete... " >&6; }
20200  FIND_DELETE="-delete"
20201
20202  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20203
20204  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20205
20206  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20207  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20208    # No, it does not.
20209    rm $DELETEDIR/TestIfFindSupportsDelete
20210    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20211      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20212      FIND_DELETE="-print | xargs rm"
20213    else
20214      FIND_DELETE="-exec rm \{\} \+"
20215    fi
20216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20217$as_echo "no" >&6; }
20218  else
20219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20220$as_echo "yes" >&6; }
20221  fi
20222  rmdir $DELETEDIR
20223
20224
20225
20226  # These tools might not be installed by default,
20227  # need hint on how to install them.
20228
20229
20230
20231  # Publish this variable in the help.
20232
20233
20234  if [ -z "${UNZIP+x}" ]; then
20235    # The variable is not set by user, try to locate tool using the code snippet
20236    for ac_prog in unzip
20237do
20238  # Extract the first word of "$ac_prog", so it can be a program name with args.
20239set dummy $ac_prog; ac_word=$2
20240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20241$as_echo_n "checking for $ac_word... " >&6; }
20242if ${ac_cv_path_UNZIP+:} false; then :
20243  $as_echo_n "(cached) " >&6
20244else
20245  case $UNZIP in
20246  [\\/]* | ?:[\\/]*)
20247  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20248  ;;
20249  *)
20250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20251for as_dir in $PATH
20252do
20253  IFS=$as_save_IFS
20254  test -z "$as_dir" && as_dir=.
20255    for ac_exec_ext in '' $ac_executable_extensions; do
20256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20257    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20259    break 2
20260  fi
20261done
20262  done
20263IFS=$as_save_IFS
20264
20265  ;;
20266esac
20267fi
20268UNZIP=$ac_cv_path_UNZIP
20269if test -n "$UNZIP"; then
20270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20271$as_echo "$UNZIP" >&6; }
20272else
20273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20274$as_echo "no" >&6; }
20275fi
20276
20277
20278  test -n "$UNZIP" && break
20279done
20280
20281  else
20282    # The variable is set, but is it from the command line or the environment?
20283
20284    # Try to remove the string !UNZIP! from our list.
20285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20287      # If it failed, the variable was not from the command line. Ignore it,
20288      # but warn the user (except for BASH, which is always set by the calling BASH).
20289      if test "xUNZIP" != xBASH; then
20290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20291$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20292      fi
20293      # Try to locate tool using the code snippet
20294      for ac_prog in unzip
20295do
20296  # Extract the first word of "$ac_prog", so it can be a program name with args.
20297set dummy $ac_prog; ac_word=$2
20298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20299$as_echo_n "checking for $ac_word... " >&6; }
20300if ${ac_cv_path_UNZIP+:} false; then :
20301  $as_echo_n "(cached) " >&6
20302else
20303  case $UNZIP in
20304  [\\/]* | ?:[\\/]*)
20305  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20306  ;;
20307  *)
20308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20309for as_dir in $PATH
20310do
20311  IFS=$as_save_IFS
20312  test -z "$as_dir" && as_dir=.
20313    for ac_exec_ext in '' $ac_executable_extensions; do
20314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20315    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20317    break 2
20318  fi
20319done
20320  done
20321IFS=$as_save_IFS
20322
20323  ;;
20324esac
20325fi
20326UNZIP=$ac_cv_path_UNZIP
20327if test -n "$UNZIP"; then
20328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20329$as_echo "$UNZIP" >&6; }
20330else
20331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20332$as_echo "no" >&6; }
20333fi
20334
20335
20336  test -n "$UNZIP" && break
20337done
20338
20339    else
20340      # If it succeeded, then it was overridden by the user. We will use it
20341      # for the tool.
20342
20343      # First remove it from the list of overridden variables, so we can test
20344      # for unknown variables in the end.
20345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20346
20347      # Check if we try to supply an empty value
20348      if test "x$UNZIP" = x; then
20349        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20350$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20352$as_echo_n "checking for UNZIP... " >&6; }
20353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20354$as_echo "disabled" >&6; }
20355      else
20356        # Check if the provided tool contains a complete path.
20357        tool_specified="$UNZIP"
20358        tool_basename="${tool_specified##*/}"
20359        if test "x$tool_basename" = "x$tool_specified"; then
20360          # A command without a complete path is provided, search $PATH.
20361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20362$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20363          # Extract the first word of "$tool_basename", so it can be a program name with args.
20364set dummy $tool_basename; ac_word=$2
20365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20366$as_echo_n "checking for $ac_word... " >&6; }
20367if ${ac_cv_path_UNZIP+:} false; then :
20368  $as_echo_n "(cached) " >&6
20369else
20370  case $UNZIP in
20371  [\\/]* | ?:[\\/]*)
20372  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20373  ;;
20374  *)
20375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20376for as_dir in $PATH
20377do
20378  IFS=$as_save_IFS
20379  test -z "$as_dir" && as_dir=.
20380    for ac_exec_ext in '' $ac_executable_extensions; do
20381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20382    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20384    break 2
20385  fi
20386done
20387  done
20388IFS=$as_save_IFS
20389
20390  ;;
20391esac
20392fi
20393UNZIP=$ac_cv_path_UNZIP
20394if test -n "$UNZIP"; then
20395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20396$as_echo "$UNZIP" >&6; }
20397else
20398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20399$as_echo "no" >&6; }
20400fi
20401
20402
20403          if test "x$UNZIP" = x; then
20404            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20405          fi
20406        else
20407          # Otherwise we believe it is a complete path. Use it as it is.
20408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20409$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20410          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20411$as_echo_n "checking for UNZIP... " >&6; }
20412          if test ! -x "$tool_specified"; then
20413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20414$as_echo "not found" >&6; }
20415            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20416          fi
20417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20418$as_echo "$tool_specified" >&6; }
20419        fi
20420      fi
20421    fi
20422
20423  fi
20424
20425
20426
20427  if test "x$UNZIP" = x; then
20428    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20429  fi
20430
20431
20432
20433
20434
20435  # Publish this variable in the help.
20436
20437
20438  if [ -z "${ZIP+x}" ]; then
20439    # The variable is not set by user, try to locate tool using the code snippet
20440    for ac_prog in zip
20441do
20442  # Extract the first word of "$ac_prog", so it can be a program name with args.
20443set dummy $ac_prog; ac_word=$2
20444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20445$as_echo_n "checking for $ac_word... " >&6; }
20446if ${ac_cv_path_ZIP+:} false; then :
20447  $as_echo_n "(cached) " >&6
20448else
20449  case $ZIP in
20450  [\\/]* | ?:[\\/]*)
20451  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20452  ;;
20453  *)
20454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20455for as_dir in $PATH
20456do
20457  IFS=$as_save_IFS
20458  test -z "$as_dir" && as_dir=.
20459    for ac_exec_ext in '' $ac_executable_extensions; do
20460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20461    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20463    break 2
20464  fi
20465done
20466  done
20467IFS=$as_save_IFS
20468
20469  ;;
20470esac
20471fi
20472ZIP=$ac_cv_path_ZIP
20473if test -n "$ZIP"; then
20474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20475$as_echo "$ZIP" >&6; }
20476else
20477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20478$as_echo "no" >&6; }
20479fi
20480
20481
20482  test -n "$ZIP" && break
20483done
20484
20485  else
20486    # The variable is set, but is it from the command line or the environment?
20487
20488    # Try to remove the string !ZIP! from our list.
20489    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20490    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20491      # If it failed, the variable was not from the command line. Ignore it,
20492      # but warn the user (except for BASH, which is always set by the calling BASH).
20493      if test "xZIP" != xBASH; then
20494        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20495$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20496      fi
20497      # Try to locate tool using the code snippet
20498      for ac_prog in zip
20499do
20500  # Extract the first word of "$ac_prog", so it can be a program name with args.
20501set dummy $ac_prog; ac_word=$2
20502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20503$as_echo_n "checking for $ac_word... " >&6; }
20504if ${ac_cv_path_ZIP+:} false; then :
20505  $as_echo_n "(cached) " >&6
20506else
20507  case $ZIP in
20508  [\\/]* | ?:[\\/]*)
20509  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20510  ;;
20511  *)
20512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20513for as_dir in $PATH
20514do
20515  IFS=$as_save_IFS
20516  test -z "$as_dir" && as_dir=.
20517    for ac_exec_ext in '' $ac_executable_extensions; do
20518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20519    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20521    break 2
20522  fi
20523done
20524  done
20525IFS=$as_save_IFS
20526
20527  ;;
20528esac
20529fi
20530ZIP=$ac_cv_path_ZIP
20531if test -n "$ZIP"; then
20532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20533$as_echo "$ZIP" >&6; }
20534else
20535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20536$as_echo "no" >&6; }
20537fi
20538
20539
20540  test -n "$ZIP" && break
20541done
20542
20543    else
20544      # If it succeeded, then it was overridden by the user. We will use it
20545      # for the tool.
20546
20547      # First remove it from the list of overridden variables, so we can test
20548      # for unknown variables in the end.
20549      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20550
20551      # Check if we try to supply an empty value
20552      if test "x$ZIP" = x; then
20553        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20554$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20556$as_echo_n "checking for ZIP... " >&6; }
20557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20558$as_echo "disabled" >&6; }
20559      else
20560        # Check if the provided tool contains a complete path.
20561        tool_specified="$ZIP"
20562        tool_basename="${tool_specified##*/}"
20563        if test "x$tool_basename" = "x$tool_specified"; then
20564          # A command without a complete path is provided, search $PATH.
20565          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20566$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20567          # Extract the first word of "$tool_basename", so it can be a program name with args.
20568set dummy $tool_basename; ac_word=$2
20569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20570$as_echo_n "checking for $ac_word... " >&6; }
20571if ${ac_cv_path_ZIP+:} false; then :
20572  $as_echo_n "(cached) " >&6
20573else
20574  case $ZIP in
20575  [\\/]* | ?:[\\/]*)
20576  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20577  ;;
20578  *)
20579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20580for as_dir in $PATH
20581do
20582  IFS=$as_save_IFS
20583  test -z "$as_dir" && as_dir=.
20584    for ac_exec_ext in '' $ac_executable_extensions; do
20585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20586    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20588    break 2
20589  fi
20590done
20591  done
20592IFS=$as_save_IFS
20593
20594  ;;
20595esac
20596fi
20597ZIP=$ac_cv_path_ZIP
20598if test -n "$ZIP"; then
20599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20600$as_echo "$ZIP" >&6; }
20601else
20602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20603$as_echo "no" >&6; }
20604fi
20605
20606
20607          if test "x$ZIP" = x; then
20608            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20609          fi
20610        else
20611          # Otherwise we believe it is a complete path. Use it as it is.
20612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20613$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20614          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20615$as_echo_n "checking for ZIP... " >&6; }
20616          if test ! -x "$tool_specified"; then
20617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20618$as_echo "not found" >&6; }
20619            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20620          fi
20621          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20622$as_echo "$tool_specified" >&6; }
20623        fi
20624      fi
20625    fi
20626
20627  fi
20628
20629
20630
20631  if test "x$ZIP" = x; then
20632    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20633  fi
20634
20635
20636
20637  # Non-required basic tools
20638
20639
20640
20641  # Publish this variable in the help.
20642
20643
20644  if [ -z "${LDD+x}" ]; then
20645    # The variable is not set by user, try to locate tool using the code snippet
20646    for ac_prog in ldd
20647do
20648  # Extract the first word of "$ac_prog", so it can be a program name with args.
20649set dummy $ac_prog; ac_word=$2
20650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20651$as_echo_n "checking for $ac_word... " >&6; }
20652if ${ac_cv_path_LDD+:} false; then :
20653  $as_echo_n "(cached) " >&6
20654else
20655  case $LDD in
20656  [\\/]* | ?:[\\/]*)
20657  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20658  ;;
20659  *)
20660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20661for as_dir in $PATH
20662do
20663  IFS=$as_save_IFS
20664  test -z "$as_dir" && as_dir=.
20665    for ac_exec_ext in '' $ac_executable_extensions; do
20666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20667    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20669    break 2
20670  fi
20671done
20672  done
20673IFS=$as_save_IFS
20674
20675  ;;
20676esac
20677fi
20678LDD=$ac_cv_path_LDD
20679if test -n "$LDD"; then
20680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20681$as_echo "$LDD" >&6; }
20682else
20683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20684$as_echo "no" >&6; }
20685fi
20686
20687
20688  test -n "$LDD" && break
20689done
20690
20691  else
20692    # The variable is set, but is it from the command line or the environment?
20693
20694    # Try to remove the string !LDD! from our list.
20695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20697      # If it failed, the variable was not from the command line. Ignore it,
20698      # but warn the user (except for BASH, which is always set by the calling BASH).
20699      if test "xLDD" != xBASH; then
20700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20701$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20702      fi
20703      # Try to locate tool using the code snippet
20704      for ac_prog in ldd
20705do
20706  # Extract the first word of "$ac_prog", so it can be a program name with args.
20707set dummy $ac_prog; ac_word=$2
20708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20709$as_echo_n "checking for $ac_word... " >&6; }
20710if ${ac_cv_path_LDD+:} false; then :
20711  $as_echo_n "(cached) " >&6
20712else
20713  case $LDD in
20714  [\\/]* | ?:[\\/]*)
20715  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20716  ;;
20717  *)
20718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20719for as_dir in $PATH
20720do
20721  IFS=$as_save_IFS
20722  test -z "$as_dir" && as_dir=.
20723    for ac_exec_ext in '' $ac_executable_extensions; do
20724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20725    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20727    break 2
20728  fi
20729done
20730  done
20731IFS=$as_save_IFS
20732
20733  ;;
20734esac
20735fi
20736LDD=$ac_cv_path_LDD
20737if test -n "$LDD"; then
20738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20739$as_echo "$LDD" >&6; }
20740else
20741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20742$as_echo "no" >&6; }
20743fi
20744
20745
20746  test -n "$LDD" && break
20747done
20748
20749    else
20750      # If it succeeded, then it was overridden by the user. We will use it
20751      # for the tool.
20752
20753      # First remove it from the list of overridden variables, so we can test
20754      # for unknown variables in the end.
20755      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20756
20757      # Check if we try to supply an empty value
20758      if test "x$LDD" = x; then
20759        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20760$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20762$as_echo_n "checking for LDD... " >&6; }
20763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20764$as_echo "disabled" >&6; }
20765      else
20766        # Check if the provided tool contains a complete path.
20767        tool_specified="$LDD"
20768        tool_basename="${tool_specified##*/}"
20769        if test "x$tool_basename" = "x$tool_specified"; then
20770          # A command without a complete path is provided, search $PATH.
20771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20772$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20773          # Extract the first word of "$tool_basename", so it can be a program name with args.
20774set dummy $tool_basename; ac_word=$2
20775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20776$as_echo_n "checking for $ac_word... " >&6; }
20777if ${ac_cv_path_LDD+:} false; then :
20778  $as_echo_n "(cached) " >&6
20779else
20780  case $LDD in
20781  [\\/]* | ?:[\\/]*)
20782  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20783  ;;
20784  *)
20785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20786for as_dir in $PATH
20787do
20788  IFS=$as_save_IFS
20789  test -z "$as_dir" && as_dir=.
20790    for ac_exec_ext in '' $ac_executable_extensions; do
20791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20792    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20794    break 2
20795  fi
20796done
20797  done
20798IFS=$as_save_IFS
20799
20800  ;;
20801esac
20802fi
20803LDD=$ac_cv_path_LDD
20804if test -n "$LDD"; then
20805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20806$as_echo "$LDD" >&6; }
20807else
20808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20809$as_echo "no" >&6; }
20810fi
20811
20812
20813          if test "x$LDD" = x; then
20814            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20815          fi
20816        else
20817          # Otherwise we believe it is a complete path. Use it as it is.
20818          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20819$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20820          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20821$as_echo_n "checking for LDD... " >&6; }
20822          if test ! -x "$tool_specified"; then
20823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20824$as_echo "not found" >&6; }
20825            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20826          fi
20827          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20828$as_echo "$tool_specified" >&6; }
20829        fi
20830      fi
20831    fi
20832
20833  fi
20834
20835
20836  if test "x$LDD" = "x"; then
20837    # List shared lib dependencies is used for
20838    # debug output and checking for forbidden dependencies.
20839    # We can build without it.
20840    LDD="true"
20841  fi
20842
20843
20844  # Publish this variable in the help.
20845
20846
20847  if [ -z "${OTOOL+x}" ]; then
20848    # The variable is not set by user, try to locate tool using the code snippet
20849    for ac_prog in otool
20850do
20851  # Extract the first word of "$ac_prog", so it can be a program name with args.
20852set dummy $ac_prog; ac_word=$2
20853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20854$as_echo_n "checking for $ac_word... " >&6; }
20855if ${ac_cv_path_OTOOL+:} false; then :
20856  $as_echo_n "(cached) " >&6
20857else
20858  case $OTOOL in
20859  [\\/]* | ?:[\\/]*)
20860  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20861  ;;
20862  *)
20863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20864for as_dir in $PATH
20865do
20866  IFS=$as_save_IFS
20867  test -z "$as_dir" && as_dir=.
20868    for ac_exec_ext in '' $ac_executable_extensions; do
20869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20870    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20872    break 2
20873  fi
20874done
20875  done
20876IFS=$as_save_IFS
20877
20878  ;;
20879esac
20880fi
20881OTOOL=$ac_cv_path_OTOOL
20882if test -n "$OTOOL"; then
20883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20884$as_echo "$OTOOL" >&6; }
20885else
20886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20887$as_echo "no" >&6; }
20888fi
20889
20890
20891  test -n "$OTOOL" && break
20892done
20893
20894  else
20895    # The variable is set, but is it from the command line or the environment?
20896
20897    # Try to remove the string !OTOOL! from our list.
20898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20900      # If it failed, the variable was not from the command line. Ignore it,
20901      # but warn the user (except for BASH, which is always set by the calling BASH).
20902      if test "xOTOOL" != xBASH; then
20903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20904$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20905      fi
20906      # Try to locate tool using the code snippet
20907      for ac_prog in otool
20908do
20909  # Extract the first word of "$ac_prog", so it can be a program name with args.
20910set dummy $ac_prog; ac_word=$2
20911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20912$as_echo_n "checking for $ac_word... " >&6; }
20913if ${ac_cv_path_OTOOL+:} false; then :
20914  $as_echo_n "(cached) " >&6
20915else
20916  case $OTOOL in
20917  [\\/]* | ?:[\\/]*)
20918  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20919  ;;
20920  *)
20921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20922for as_dir in $PATH
20923do
20924  IFS=$as_save_IFS
20925  test -z "$as_dir" && as_dir=.
20926    for ac_exec_ext in '' $ac_executable_extensions; do
20927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20928    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20930    break 2
20931  fi
20932done
20933  done
20934IFS=$as_save_IFS
20935
20936  ;;
20937esac
20938fi
20939OTOOL=$ac_cv_path_OTOOL
20940if test -n "$OTOOL"; then
20941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20942$as_echo "$OTOOL" >&6; }
20943else
20944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20945$as_echo "no" >&6; }
20946fi
20947
20948
20949  test -n "$OTOOL" && break
20950done
20951
20952    else
20953      # If it succeeded, then it was overridden by the user. We will use it
20954      # for the tool.
20955
20956      # First remove it from the list of overridden variables, so we can test
20957      # for unknown variables in the end.
20958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20959
20960      # Check if we try to supply an empty value
20961      if test "x$OTOOL" = x; then
20962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20963$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20965$as_echo_n "checking for OTOOL... " >&6; }
20966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20967$as_echo "disabled" >&6; }
20968      else
20969        # Check if the provided tool contains a complete path.
20970        tool_specified="$OTOOL"
20971        tool_basename="${tool_specified##*/}"
20972        if test "x$tool_basename" = "x$tool_specified"; then
20973          # A command without a complete path is provided, search $PATH.
20974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20975$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20976          # Extract the first word of "$tool_basename", so it can be a program name with args.
20977set dummy $tool_basename; ac_word=$2
20978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20979$as_echo_n "checking for $ac_word... " >&6; }
20980if ${ac_cv_path_OTOOL+:} false; then :
20981  $as_echo_n "(cached) " >&6
20982else
20983  case $OTOOL in
20984  [\\/]* | ?:[\\/]*)
20985  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20986  ;;
20987  *)
20988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20989for as_dir in $PATH
20990do
20991  IFS=$as_save_IFS
20992  test -z "$as_dir" && as_dir=.
20993    for ac_exec_ext in '' $ac_executable_extensions; do
20994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20995    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20997    break 2
20998  fi
20999done
21000  done
21001IFS=$as_save_IFS
21002
21003  ;;
21004esac
21005fi
21006OTOOL=$ac_cv_path_OTOOL
21007if test -n "$OTOOL"; then
21008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21009$as_echo "$OTOOL" >&6; }
21010else
21011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21012$as_echo "no" >&6; }
21013fi
21014
21015
21016          if test "x$OTOOL" = x; then
21017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21018          fi
21019        else
21020          # Otherwise we believe it is a complete path. Use it as it is.
21021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21022$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21024$as_echo_n "checking for OTOOL... " >&6; }
21025          if test ! -x "$tool_specified"; then
21026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21027$as_echo "not found" >&6; }
21028            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21029          fi
21030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21031$as_echo "$tool_specified" >&6; }
21032        fi
21033      fi
21034    fi
21035
21036  fi
21037
21038
21039  if test "x$OTOOL" = "x"; then
21040    OTOOL="true"
21041  fi
21042
21043
21044  # Publish this variable in the help.
21045
21046
21047  if [ -z "${READELF+x}" ]; then
21048    # The variable is not set by user, try to locate tool using the code snippet
21049    for ac_prog in greadelf readelf
21050do
21051  # Extract the first word of "$ac_prog", so it can be a program name with args.
21052set dummy $ac_prog; ac_word=$2
21053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21054$as_echo_n "checking for $ac_word... " >&6; }
21055if ${ac_cv_path_READELF+:} false; then :
21056  $as_echo_n "(cached) " >&6
21057else
21058  case $READELF in
21059  [\\/]* | ?:[\\/]*)
21060  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21061  ;;
21062  *)
21063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21064for as_dir in $PATH
21065do
21066  IFS=$as_save_IFS
21067  test -z "$as_dir" && as_dir=.
21068    for ac_exec_ext in '' $ac_executable_extensions; do
21069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21070    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21072    break 2
21073  fi
21074done
21075  done
21076IFS=$as_save_IFS
21077
21078  ;;
21079esac
21080fi
21081READELF=$ac_cv_path_READELF
21082if test -n "$READELF"; then
21083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21084$as_echo "$READELF" >&6; }
21085else
21086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21087$as_echo "no" >&6; }
21088fi
21089
21090
21091  test -n "$READELF" && break
21092done
21093
21094  else
21095    # The variable is set, but is it from the command line or the environment?
21096
21097    # Try to remove the string !READELF! from our list.
21098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21100      # If it failed, the variable was not from the command line. Ignore it,
21101      # but warn the user (except for BASH, which is always set by the calling BASH).
21102      if test "xREADELF" != xBASH; then
21103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21104$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21105      fi
21106      # Try to locate tool using the code snippet
21107      for ac_prog in greadelf readelf
21108do
21109  # Extract the first word of "$ac_prog", so it can be a program name with args.
21110set dummy $ac_prog; ac_word=$2
21111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21112$as_echo_n "checking for $ac_word... " >&6; }
21113if ${ac_cv_path_READELF+:} false; then :
21114  $as_echo_n "(cached) " >&6
21115else
21116  case $READELF in
21117  [\\/]* | ?:[\\/]*)
21118  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21119  ;;
21120  *)
21121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21122for as_dir in $PATH
21123do
21124  IFS=$as_save_IFS
21125  test -z "$as_dir" && as_dir=.
21126    for ac_exec_ext in '' $ac_executable_extensions; do
21127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21128    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21130    break 2
21131  fi
21132done
21133  done
21134IFS=$as_save_IFS
21135
21136  ;;
21137esac
21138fi
21139READELF=$ac_cv_path_READELF
21140if test -n "$READELF"; then
21141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21142$as_echo "$READELF" >&6; }
21143else
21144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21145$as_echo "no" >&6; }
21146fi
21147
21148
21149  test -n "$READELF" && break
21150done
21151
21152    else
21153      # If it succeeded, then it was overridden by the user. We will use it
21154      # for the tool.
21155
21156      # First remove it from the list of overridden variables, so we can test
21157      # for unknown variables in the end.
21158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21159
21160      # Check if we try to supply an empty value
21161      if test "x$READELF" = x; then
21162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21163$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21165$as_echo_n "checking for READELF... " >&6; }
21166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21167$as_echo "disabled" >&6; }
21168      else
21169        # Check if the provided tool contains a complete path.
21170        tool_specified="$READELF"
21171        tool_basename="${tool_specified##*/}"
21172        if test "x$tool_basename" = "x$tool_specified"; then
21173          # A command without a complete path is provided, search $PATH.
21174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21175$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21176          # Extract the first word of "$tool_basename", so it can be a program name with args.
21177set dummy $tool_basename; ac_word=$2
21178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21179$as_echo_n "checking for $ac_word... " >&6; }
21180if ${ac_cv_path_READELF+:} false; then :
21181  $as_echo_n "(cached) " >&6
21182else
21183  case $READELF in
21184  [\\/]* | ?:[\\/]*)
21185  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21186  ;;
21187  *)
21188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21189for as_dir in $PATH
21190do
21191  IFS=$as_save_IFS
21192  test -z "$as_dir" && as_dir=.
21193    for ac_exec_ext in '' $ac_executable_extensions; do
21194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21195    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21197    break 2
21198  fi
21199done
21200  done
21201IFS=$as_save_IFS
21202
21203  ;;
21204esac
21205fi
21206READELF=$ac_cv_path_READELF
21207if test -n "$READELF"; then
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21209$as_echo "$READELF" >&6; }
21210else
21211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21212$as_echo "no" >&6; }
21213fi
21214
21215
21216          if test "x$READELF" = x; then
21217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21218          fi
21219        else
21220          # Otherwise we believe it is a complete path. Use it as it is.
21221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21222$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21224$as_echo_n "checking for READELF... " >&6; }
21225          if test ! -x "$tool_specified"; then
21226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21227$as_echo "not found" >&6; }
21228            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21229          fi
21230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21231$as_echo "$tool_specified" >&6; }
21232        fi
21233      fi
21234    fi
21235
21236  fi
21237
21238
21239
21240
21241  # Publish this variable in the help.
21242
21243
21244  if [ -z "${HG+x}" ]; then
21245    # The variable is not set by user, try to locate tool using the code snippet
21246    for ac_prog in hg
21247do
21248  # Extract the first word of "$ac_prog", so it can be a program name with args.
21249set dummy $ac_prog; ac_word=$2
21250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21251$as_echo_n "checking for $ac_word... " >&6; }
21252if ${ac_cv_path_HG+:} false; then :
21253  $as_echo_n "(cached) " >&6
21254else
21255  case $HG in
21256  [\\/]* | ?:[\\/]*)
21257  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21258  ;;
21259  *)
21260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21261for as_dir in $PATH
21262do
21263  IFS=$as_save_IFS
21264  test -z "$as_dir" && as_dir=.
21265    for ac_exec_ext in '' $ac_executable_extensions; do
21266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21267    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21269    break 2
21270  fi
21271done
21272  done
21273IFS=$as_save_IFS
21274
21275  ;;
21276esac
21277fi
21278HG=$ac_cv_path_HG
21279if test -n "$HG"; then
21280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21281$as_echo "$HG" >&6; }
21282else
21283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21284$as_echo "no" >&6; }
21285fi
21286
21287
21288  test -n "$HG" && break
21289done
21290
21291  else
21292    # The variable is set, but is it from the command line or the environment?
21293
21294    # Try to remove the string !HG! from our list.
21295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21297      # If it failed, the variable was not from the command line. Ignore it,
21298      # but warn the user (except for BASH, which is always set by the calling BASH).
21299      if test "xHG" != xBASH; then
21300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21301$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21302      fi
21303      # Try to locate tool using the code snippet
21304      for ac_prog in hg
21305do
21306  # Extract the first word of "$ac_prog", so it can be a program name with args.
21307set dummy $ac_prog; ac_word=$2
21308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21309$as_echo_n "checking for $ac_word... " >&6; }
21310if ${ac_cv_path_HG+:} false; then :
21311  $as_echo_n "(cached) " >&6
21312else
21313  case $HG in
21314  [\\/]* | ?:[\\/]*)
21315  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21316  ;;
21317  *)
21318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21319for as_dir in $PATH
21320do
21321  IFS=$as_save_IFS
21322  test -z "$as_dir" && as_dir=.
21323    for ac_exec_ext in '' $ac_executable_extensions; do
21324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21325    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21327    break 2
21328  fi
21329done
21330  done
21331IFS=$as_save_IFS
21332
21333  ;;
21334esac
21335fi
21336HG=$ac_cv_path_HG
21337if test -n "$HG"; then
21338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21339$as_echo "$HG" >&6; }
21340else
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21342$as_echo "no" >&6; }
21343fi
21344
21345
21346  test -n "$HG" && break
21347done
21348
21349    else
21350      # If it succeeded, then it was overridden by the user. We will use it
21351      # for the tool.
21352
21353      # First remove it from the list of overridden variables, so we can test
21354      # for unknown variables in the end.
21355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21356
21357      # Check if we try to supply an empty value
21358      if test "x$HG" = x; then
21359        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21360$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21362$as_echo_n "checking for HG... " >&6; }
21363        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21364$as_echo "disabled" >&6; }
21365      else
21366        # Check if the provided tool contains a complete path.
21367        tool_specified="$HG"
21368        tool_basename="${tool_specified##*/}"
21369        if test "x$tool_basename" = "x$tool_specified"; then
21370          # A command without a complete path is provided, search $PATH.
21371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21372$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21373          # Extract the first word of "$tool_basename", so it can be a program name with args.
21374set dummy $tool_basename; ac_word=$2
21375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21376$as_echo_n "checking for $ac_word... " >&6; }
21377if ${ac_cv_path_HG+:} false; then :
21378  $as_echo_n "(cached) " >&6
21379else
21380  case $HG in
21381  [\\/]* | ?:[\\/]*)
21382  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21383  ;;
21384  *)
21385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21386for as_dir in $PATH
21387do
21388  IFS=$as_save_IFS
21389  test -z "$as_dir" && as_dir=.
21390    for ac_exec_ext in '' $ac_executable_extensions; do
21391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21392    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21394    break 2
21395  fi
21396done
21397  done
21398IFS=$as_save_IFS
21399
21400  ;;
21401esac
21402fi
21403HG=$ac_cv_path_HG
21404if test -n "$HG"; then
21405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21406$as_echo "$HG" >&6; }
21407else
21408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21409$as_echo "no" >&6; }
21410fi
21411
21412
21413          if test "x$HG" = x; then
21414            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21415          fi
21416        else
21417          # Otherwise we believe it is a complete path. Use it as it is.
21418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21419$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21420          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21421$as_echo_n "checking for HG... " >&6; }
21422          if test ! -x "$tool_specified"; then
21423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21424$as_echo "not found" >&6; }
21425            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21426          fi
21427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21428$as_echo "$tool_specified" >&6; }
21429        fi
21430      fi
21431    fi
21432
21433  fi
21434
21435
21436
21437
21438  # Publish this variable in the help.
21439
21440
21441  if [ -z "${STAT+x}" ]; then
21442    # The variable is not set by user, try to locate tool using the code snippet
21443    for ac_prog in stat
21444do
21445  # Extract the first word of "$ac_prog", so it can be a program name with args.
21446set dummy $ac_prog; ac_word=$2
21447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21448$as_echo_n "checking for $ac_word... " >&6; }
21449if ${ac_cv_path_STAT+:} false; then :
21450  $as_echo_n "(cached) " >&6
21451else
21452  case $STAT in
21453  [\\/]* | ?:[\\/]*)
21454  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21455  ;;
21456  *)
21457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21458for as_dir in $PATH
21459do
21460  IFS=$as_save_IFS
21461  test -z "$as_dir" && as_dir=.
21462    for ac_exec_ext in '' $ac_executable_extensions; do
21463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21464    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21466    break 2
21467  fi
21468done
21469  done
21470IFS=$as_save_IFS
21471
21472  ;;
21473esac
21474fi
21475STAT=$ac_cv_path_STAT
21476if test -n "$STAT"; then
21477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21478$as_echo "$STAT" >&6; }
21479else
21480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21481$as_echo "no" >&6; }
21482fi
21483
21484
21485  test -n "$STAT" && break
21486done
21487
21488  else
21489    # The variable is set, but is it from the command line or the environment?
21490
21491    # Try to remove the string !STAT! from our list.
21492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21494      # If it failed, the variable was not from the command line. Ignore it,
21495      # but warn the user (except for BASH, which is always set by the calling BASH).
21496      if test "xSTAT" != xBASH; then
21497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21498$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21499      fi
21500      # Try to locate tool using the code snippet
21501      for ac_prog in stat
21502do
21503  # Extract the first word of "$ac_prog", so it can be a program name with args.
21504set dummy $ac_prog; ac_word=$2
21505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21506$as_echo_n "checking for $ac_word... " >&6; }
21507if ${ac_cv_path_STAT+:} false; then :
21508  $as_echo_n "(cached) " >&6
21509else
21510  case $STAT in
21511  [\\/]* | ?:[\\/]*)
21512  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21513  ;;
21514  *)
21515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21516for as_dir in $PATH
21517do
21518  IFS=$as_save_IFS
21519  test -z "$as_dir" && as_dir=.
21520    for ac_exec_ext in '' $ac_executable_extensions; do
21521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21522    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21524    break 2
21525  fi
21526done
21527  done
21528IFS=$as_save_IFS
21529
21530  ;;
21531esac
21532fi
21533STAT=$ac_cv_path_STAT
21534if test -n "$STAT"; then
21535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21536$as_echo "$STAT" >&6; }
21537else
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21539$as_echo "no" >&6; }
21540fi
21541
21542
21543  test -n "$STAT" && break
21544done
21545
21546    else
21547      # If it succeeded, then it was overridden by the user. We will use it
21548      # for the tool.
21549
21550      # First remove it from the list of overridden variables, so we can test
21551      # for unknown variables in the end.
21552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21553
21554      # Check if we try to supply an empty value
21555      if test "x$STAT" = x; then
21556        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21557$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21559$as_echo_n "checking for STAT... " >&6; }
21560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21561$as_echo "disabled" >&6; }
21562      else
21563        # Check if the provided tool contains a complete path.
21564        tool_specified="$STAT"
21565        tool_basename="${tool_specified##*/}"
21566        if test "x$tool_basename" = "x$tool_specified"; then
21567          # A command without a complete path is provided, search $PATH.
21568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21569$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21570          # Extract the first word of "$tool_basename", so it can be a program name with args.
21571set dummy $tool_basename; ac_word=$2
21572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21573$as_echo_n "checking for $ac_word... " >&6; }
21574if ${ac_cv_path_STAT+:} false; then :
21575  $as_echo_n "(cached) " >&6
21576else
21577  case $STAT in
21578  [\\/]* | ?:[\\/]*)
21579  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21580  ;;
21581  *)
21582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21583for as_dir in $PATH
21584do
21585  IFS=$as_save_IFS
21586  test -z "$as_dir" && as_dir=.
21587    for ac_exec_ext in '' $ac_executable_extensions; do
21588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21589    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21591    break 2
21592  fi
21593done
21594  done
21595IFS=$as_save_IFS
21596
21597  ;;
21598esac
21599fi
21600STAT=$ac_cv_path_STAT
21601if test -n "$STAT"; then
21602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21603$as_echo "$STAT" >&6; }
21604else
21605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21606$as_echo "no" >&6; }
21607fi
21608
21609
21610          if test "x$STAT" = x; then
21611            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21612          fi
21613        else
21614          # Otherwise we believe it is a complete path. Use it as it is.
21615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21616$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21617          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21618$as_echo_n "checking for STAT... " >&6; }
21619          if test ! -x "$tool_specified"; then
21620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21621$as_echo "not found" >&6; }
21622            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21623          fi
21624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21625$as_echo "$tool_specified" >&6; }
21626        fi
21627      fi
21628    fi
21629
21630  fi
21631
21632
21633
21634
21635  # Publish this variable in the help.
21636
21637
21638  if [ -z "${TIME+x}" ]; then
21639    # The variable is not set by user, try to locate tool using the code snippet
21640    for ac_prog in time
21641do
21642  # Extract the first word of "$ac_prog", so it can be a program name with args.
21643set dummy $ac_prog; ac_word=$2
21644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21645$as_echo_n "checking for $ac_word... " >&6; }
21646if ${ac_cv_path_TIME+:} false; then :
21647  $as_echo_n "(cached) " >&6
21648else
21649  case $TIME in
21650  [\\/]* | ?:[\\/]*)
21651  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21652  ;;
21653  *)
21654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21655for as_dir in $PATH
21656do
21657  IFS=$as_save_IFS
21658  test -z "$as_dir" && as_dir=.
21659    for ac_exec_ext in '' $ac_executable_extensions; do
21660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21661    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21663    break 2
21664  fi
21665done
21666  done
21667IFS=$as_save_IFS
21668
21669  ;;
21670esac
21671fi
21672TIME=$ac_cv_path_TIME
21673if test -n "$TIME"; then
21674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21675$as_echo "$TIME" >&6; }
21676else
21677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21678$as_echo "no" >&6; }
21679fi
21680
21681
21682  test -n "$TIME" && break
21683done
21684
21685  else
21686    # The variable is set, but is it from the command line or the environment?
21687
21688    # Try to remove the string !TIME! from our list.
21689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21691      # If it failed, the variable was not from the command line. Ignore it,
21692      # but warn the user (except for BASH, which is always set by the calling BASH).
21693      if test "xTIME" != xBASH; then
21694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21695$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21696      fi
21697      # Try to locate tool using the code snippet
21698      for ac_prog in time
21699do
21700  # Extract the first word of "$ac_prog", so it can be a program name with args.
21701set dummy $ac_prog; ac_word=$2
21702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21703$as_echo_n "checking for $ac_word... " >&6; }
21704if ${ac_cv_path_TIME+:} false; then :
21705  $as_echo_n "(cached) " >&6
21706else
21707  case $TIME in
21708  [\\/]* | ?:[\\/]*)
21709  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21710  ;;
21711  *)
21712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21713for as_dir in $PATH
21714do
21715  IFS=$as_save_IFS
21716  test -z "$as_dir" && as_dir=.
21717    for ac_exec_ext in '' $ac_executable_extensions; do
21718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21719    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21721    break 2
21722  fi
21723done
21724  done
21725IFS=$as_save_IFS
21726
21727  ;;
21728esac
21729fi
21730TIME=$ac_cv_path_TIME
21731if test -n "$TIME"; then
21732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21733$as_echo "$TIME" >&6; }
21734else
21735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21736$as_echo "no" >&6; }
21737fi
21738
21739
21740  test -n "$TIME" && break
21741done
21742
21743    else
21744      # If it succeeded, then it was overridden by the user. We will use it
21745      # for the tool.
21746
21747      # First remove it from the list of overridden variables, so we can test
21748      # for unknown variables in the end.
21749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21750
21751      # Check if we try to supply an empty value
21752      if test "x$TIME" = x; then
21753        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21754$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21756$as_echo_n "checking for TIME... " >&6; }
21757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21758$as_echo "disabled" >&6; }
21759      else
21760        # Check if the provided tool contains a complete path.
21761        tool_specified="$TIME"
21762        tool_basename="${tool_specified##*/}"
21763        if test "x$tool_basename" = "x$tool_specified"; then
21764          # A command without a complete path is provided, search $PATH.
21765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21766$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21767          # Extract the first word of "$tool_basename", so it can be a program name with args.
21768set dummy $tool_basename; ac_word=$2
21769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21770$as_echo_n "checking for $ac_word... " >&6; }
21771if ${ac_cv_path_TIME+:} false; then :
21772  $as_echo_n "(cached) " >&6
21773else
21774  case $TIME in
21775  [\\/]* | ?:[\\/]*)
21776  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21777  ;;
21778  *)
21779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21780for as_dir in $PATH
21781do
21782  IFS=$as_save_IFS
21783  test -z "$as_dir" && as_dir=.
21784    for ac_exec_ext in '' $ac_executable_extensions; do
21785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21786    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21788    break 2
21789  fi
21790done
21791  done
21792IFS=$as_save_IFS
21793
21794  ;;
21795esac
21796fi
21797TIME=$ac_cv_path_TIME
21798if test -n "$TIME"; then
21799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21800$as_echo "$TIME" >&6; }
21801else
21802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21803$as_echo "no" >&6; }
21804fi
21805
21806
21807          if test "x$TIME" = x; then
21808            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21809          fi
21810        else
21811          # Otherwise we believe it is a complete path. Use it as it is.
21812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21813$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21815$as_echo_n "checking for TIME... " >&6; }
21816          if test ! -x "$tool_specified"; then
21817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21818$as_echo "not found" >&6; }
21819            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21820          fi
21821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21822$as_echo "$tool_specified" >&6; }
21823        fi
21824      fi
21825    fi
21826
21827  fi
21828
21829
21830
21831
21832  # Publish this variable in the help.
21833
21834
21835  if [ -z "${PATCH+x}" ]; then
21836    # The variable is not set by user, try to locate tool using the code snippet
21837    for ac_prog in gpatch patch
21838do
21839  # Extract the first word of "$ac_prog", so it can be a program name with args.
21840set dummy $ac_prog; ac_word=$2
21841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21842$as_echo_n "checking for $ac_word... " >&6; }
21843if ${ac_cv_path_PATCH+:} false; then :
21844  $as_echo_n "(cached) " >&6
21845else
21846  case $PATCH in
21847  [\\/]* | ?:[\\/]*)
21848  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21849  ;;
21850  *)
21851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21852for as_dir in $PATH
21853do
21854  IFS=$as_save_IFS
21855  test -z "$as_dir" && as_dir=.
21856    for ac_exec_ext in '' $ac_executable_extensions; do
21857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21858    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21860    break 2
21861  fi
21862done
21863  done
21864IFS=$as_save_IFS
21865
21866  ;;
21867esac
21868fi
21869PATCH=$ac_cv_path_PATCH
21870if test -n "$PATCH"; then
21871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21872$as_echo "$PATCH" >&6; }
21873else
21874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21875$as_echo "no" >&6; }
21876fi
21877
21878
21879  test -n "$PATCH" && break
21880done
21881
21882  else
21883    # The variable is set, but is it from the command line or the environment?
21884
21885    # Try to remove the string !PATCH! from our list.
21886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21888      # If it failed, the variable was not from the command line. Ignore it,
21889      # but warn the user (except for BASH, which is always set by the calling BASH).
21890      if test "xPATCH" != xBASH; then
21891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21892$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21893      fi
21894      # Try to locate tool using the code snippet
21895      for ac_prog in gpatch patch
21896do
21897  # Extract the first word of "$ac_prog", so it can be a program name with args.
21898set dummy $ac_prog; ac_word=$2
21899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21900$as_echo_n "checking for $ac_word... " >&6; }
21901if ${ac_cv_path_PATCH+:} false; then :
21902  $as_echo_n "(cached) " >&6
21903else
21904  case $PATCH in
21905  [\\/]* | ?:[\\/]*)
21906  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21907  ;;
21908  *)
21909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21910for as_dir in $PATH
21911do
21912  IFS=$as_save_IFS
21913  test -z "$as_dir" && as_dir=.
21914    for ac_exec_ext in '' $ac_executable_extensions; do
21915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21916    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21918    break 2
21919  fi
21920done
21921  done
21922IFS=$as_save_IFS
21923
21924  ;;
21925esac
21926fi
21927PATCH=$ac_cv_path_PATCH
21928if test -n "$PATCH"; then
21929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21930$as_echo "$PATCH" >&6; }
21931else
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21933$as_echo "no" >&6; }
21934fi
21935
21936
21937  test -n "$PATCH" && break
21938done
21939
21940    else
21941      # If it succeeded, then it was overridden by the user. We will use it
21942      # for the tool.
21943
21944      # First remove it from the list of overridden variables, so we can test
21945      # for unknown variables in the end.
21946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21947
21948      # Check if we try to supply an empty value
21949      if test "x$PATCH" = x; then
21950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21951$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21953$as_echo_n "checking for PATCH... " >&6; }
21954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21955$as_echo "disabled" >&6; }
21956      else
21957        # Check if the provided tool contains a complete path.
21958        tool_specified="$PATCH"
21959        tool_basename="${tool_specified##*/}"
21960        if test "x$tool_basename" = "x$tool_specified"; then
21961          # A command without a complete path is provided, search $PATH.
21962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21963$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21964          # Extract the first word of "$tool_basename", so it can be a program name with args.
21965set dummy $tool_basename; ac_word=$2
21966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21967$as_echo_n "checking for $ac_word... " >&6; }
21968if ${ac_cv_path_PATCH+:} false; then :
21969  $as_echo_n "(cached) " >&6
21970else
21971  case $PATCH in
21972  [\\/]* | ?:[\\/]*)
21973  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21974  ;;
21975  *)
21976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21977for as_dir in $PATH
21978do
21979  IFS=$as_save_IFS
21980  test -z "$as_dir" && as_dir=.
21981    for ac_exec_ext in '' $ac_executable_extensions; do
21982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21983    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21985    break 2
21986  fi
21987done
21988  done
21989IFS=$as_save_IFS
21990
21991  ;;
21992esac
21993fi
21994PATCH=$ac_cv_path_PATCH
21995if test -n "$PATCH"; then
21996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21997$as_echo "$PATCH" >&6; }
21998else
21999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22000$as_echo "no" >&6; }
22001fi
22002
22003
22004          if test "x$PATCH" = x; then
22005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22006          fi
22007        else
22008          # Otherwise we believe it is a complete path. Use it as it is.
22009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22010$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22012$as_echo_n "checking for PATCH... " >&6; }
22013          if test ! -x "$tool_specified"; then
22014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22015$as_echo "not found" >&6; }
22016            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22017          fi
22018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22019$as_echo "$tool_specified" >&6; }
22020        fi
22021      fi
22022    fi
22023
22024  fi
22025
22026
22027  # Check if it's GNU time
22028  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22029  if test "x$IS_GNU_TIME" != x; then
22030    IS_GNU_TIME=yes
22031  else
22032    IS_GNU_TIME=no
22033  fi
22034
22035
22036  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22037
22038
22039
22040  # Publish this variable in the help.
22041
22042
22043  if [ -z "${DSYMUTIL+x}" ]; then
22044    # The variable is not set by user, try to locate tool using the code snippet
22045    for ac_prog in dsymutil
22046do
22047  # Extract the first word of "$ac_prog", so it can be a program name with args.
22048set dummy $ac_prog; ac_word=$2
22049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22050$as_echo_n "checking for $ac_word... " >&6; }
22051if ${ac_cv_path_DSYMUTIL+:} false; then :
22052  $as_echo_n "(cached) " >&6
22053else
22054  case $DSYMUTIL in
22055  [\\/]* | ?:[\\/]*)
22056  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22057  ;;
22058  *)
22059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22060for as_dir in $PATH
22061do
22062  IFS=$as_save_IFS
22063  test -z "$as_dir" && as_dir=.
22064    for ac_exec_ext in '' $ac_executable_extensions; do
22065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22066    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22068    break 2
22069  fi
22070done
22071  done
22072IFS=$as_save_IFS
22073
22074  ;;
22075esac
22076fi
22077DSYMUTIL=$ac_cv_path_DSYMUTIL
22078if test -n "$DSYMUTIL"; then
22079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22080$as_echo "$DSYMUTIL" >&6; }
22081else
22082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22083$as_echo "no" >&6; }
22084fi
22085
22086
22087  test -n "$DSYMUTIL" && break
22088done
22089
22090  else
22091    # The variable is set, but is it from the command line or the environment?
22092
22093    # Try to remove the string !DSYMUTIL! from our list.
22094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22096      # If it failed, the variable was not from the command line. Ignore it,
22097      # but warn the user (except for BASH, which is always set by the calling BASH).
22098      if test "xDSYMUTIL" != xBASH; then
22099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22100$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22101      fi
22102      # Try to locate tool using the code snippet
22103      for ac_prog in dsymutil
22104do
22105  # Extract the first word of "$ac_prog", so it can be a program name with args.
22106set dummy $ac_prog; ac_word=$2
22107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22108$as_echo_n "checking for $ac_word... " >&6; }
22109if ${ac_cv_path_DSYMUTIL+:} false; then :
22110  $as_echo_n "(cached) " >&6
22111else
22112  case $DSYMUTIL in
22113  [\\/]* | ?:[\\/]*)
22114  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22115  ;;
22116  *)
22117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22118for as_dir in $PATH
22119do
22120  IFS=$as_save_IFS
22121  test -z "$as_dir" && as_dir=.
22122    for ac_exec_ext in '' $ac_executable_extensions; do
22123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22124    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22126    break 2
22127  fi
22128done
22129  done
22130IFS=$as_save_IFS
22131
22132  ;;
22133esac
22134fi
22135DSYMUTIL=$ac_cv_path_DSYMUTIL
22136if test -n "$DSYMUTIL"; then
22137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22138$as_echo "$DSYMUTIL" >&6; }
22139else
22140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22141$as_echo "no" >&6; }
22142fi
22143
22144
22145  test -n "$DSYMUTIL" && break
22146done
22147
22148    else
22149      # If it succeeded, then it was overridden by the user. We will use it
22150      # for the tool.
22151
22152      # First remove it from the list of overridden variables, so we can test
22153      # for unknown variables in the end.
22154      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22155
22156      # Check if we try to supply an empty value
22157      if test "x$DSYMUTIL" = x; then
22158        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22159$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22161$as_echo_n "checking for DSYMUTIL... " >&6; }
22162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22163$as_echo "disabled" >&6; }
22164      else
22165        # Check if the provided tool contains a complete path.
22166        tool_specified="$DSYMUTIL"
22167        tool_basename="${tool_specified##*/}"
22168        if test "x$tool_basename" = "x$tool_specified"; then
22169          # A command without a complete path is provided, search $PATH.
22170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22171$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22172          # Extract the first word of "$tool_basename", so it can be a program name with args.
22173set dummy $tool_basename; ac_word=$2
22174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22175$as_echo_n "checking for $ac_word... " >&6; }
22176if ${ac_cv_path_DSYMUTIL+:} false; then :
22177  $as_echo_n "(cached) " >&6
22178else
22179  case $DSYMUTIL in
22180  [\\/]* | ?:[\\/]*)
22181  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22182  ;;
22183  *)
22184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22185for as_dir in $PATH
22186do
22187  IFS=$as_save_IFS
22188  test -z "$as_dir" && as_dir=.
22189    for ac_exec_ext in '' $ac_executable_extensions; do
22190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22191    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22193    break 2
22194  fi
22195done
22196  done
22197IFS=$as_save_IFS
22198
22199  ;;
22200esac
22201fi
22202DSYMUTIL=$ac_cv_path_DSYMUTIL
22203if test -n "$DSYMUTIL"; then
22204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22205$as_echo "$DSYMUTIL" >&6; }
22206else
22207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22208$as_echo "no" >&6; }
22209fi
22210
22211
22212          if test "x$DSYMUTIL" = x; then
22213            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22214          fi
22215        else
22216          # Otherwise we believe it is a complete path. Use it as it is.
22217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22218$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22219          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22220$as_echo_n "checking for DSYMUTIL... " >&6; }
22221          if test ! -x "$tool_specified"; then
22222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22223$as_echo "not found" >&6; }
22224            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22225          fi
22226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22227$as_echo "$tool_specified" >&6; }
22228        fi
22229      fi
22230    fi
22231
22232  fi
22233
22234
22235
22236  if test "x$DSYMUTIL" = x; then
22237    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22238  fi
22239
22240
22241
22242
22243
22244  # Publish this variable in the help.
22245
22246
22247  if [ -z "${XATTR+x}" ]; then
22248    # The variable is not set by user, try to locate tool using the code snippet
22249    for ac_prog in xattr
22250do
22251  # Extract the first word of "$ac_prog", so it can be a program name with args.
22252set dummy $ac_prog; ac_word=$2
22253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22254$as_echo_n "checking for $ac_word... " >&6; }
22255if ${ac_cv_path_XATTR+:} false; then :
22256  $as_echo_n "(cached) " >&6
22257else
22258  case $XATTR in
22259  [\\/]* | ?:[\\/]*)
22260  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22261  ;;
22262  *)
22263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22264for as_dir in $PATH
22265do
22266  IFS=$as_save_IFS
22267  test -z "$as_dir" && as_dir=.
22268    for ac_exec_ext in '' $ac_executable_extensions; do
22269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22270    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22272    break 2
22273  fi
22274done
22275  done
22276IFS=$as_save_IFS
22277
22278  ;;
22279esac
22280fi
22281XATTR=$ac_cv_path_XATTR
22282if test -n "$XATTR"; then
22283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22284$as_echo "$XATTR" >&6; }
22285else
22286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22287$as_echo "no" >&6; }
22288fi
22289
22290
22291  test -n "$XATTR" && break
22292done
22293
22294  else
22295    # The variable is set, but is it from the command line or the environment?
22296
22297    # Try to remove the string !XATTR! from our list.
22298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22300      # If it failed, the variable was not from the command line. Ignore it,
22301      # but warn the user (except for BASH, which is always set by the calling BASH).
22302      if test "xXATTR" != xBASH; then
22303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22304$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22305      fi
22306      # Try to locate tool using the code snippet
22307      for ac_prog in xattr
22308do
22309  # Extract the first word of "$ac_prog", so it can be a program name with args.
22310set dummy $ac_prog; ac_word=$2
22311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22312$as_echo_n "checking for $ac_word... " >&6; }
22313if ${ac_cv_path_XATTR+:} false; then :
22314  $as_echo_n "(cached) " >&6
22315else
22316  case $XATTR in
22317  [\\/]* | ?:[\\/]*)
22318  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22319  ;;
22320  *)
22321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22322for as_dir in $PATH
22323do
22324  IFS=$as_save_IFS
22325  test -z "$as_dir" && as_dir=.
22326    for ac_exec_ext in '' $ac_executable_extensions; do
22327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22328    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22330    break 2
22331  fi
22332done
22333  done
22334IFS=$as_save_IFS
22335
22336  ;;
22337esac
22338fi
22339XATTR=$ac_cv_path_XATTR
22340if test -n "$XATTR"; then
22341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22342$as_echo "$XATTR" >&6; }
22343else
22344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22345$as_echo "no" >&6; }
22346fi
22347
22348
22349  test -n "$XATTR" && break
22350done
22351
22352    else
22353      # If it succeeded, then it was overridden by the user. We will use it
22354      # for the tool.
22355
22356      # First remove it from the list of overridden variables, so we can test
22357      # for unknown variables in the end.
22358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22359
22360      # Check if we try to supply an empty value
22361      if test "x$XATTR" = x; then
22362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22363$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22365$as_echo_n "checking for XATTR... " >&6; }
22366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22367$as_echo "disabled" >&6; }
22368      else
22369        # Check if the provided tool contains a complete path.
22370        tool_specified="$XATTR"
22371        tool_basename="${tool_specified##*/}"
22372        if test "x$tool_basename" = "x$tool_specified"; then
22373          # A command without a complete path is provided, search $PATH.
22374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22375$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22376          # Extract the first word of "$tool_basename", so it can be a program name with args.
22377set dummy $tool_basename; ac_word=$2
22378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22379$as_echo_n "checking for $ac_word... " >&6; }
22380if ${ac_cv_path_XATTR+:} false; then :
22381  $as_echo_n "(cached) " >&6
22382else
22383  case $XATTR in
22384  [\\/]* | ?:[\\/]*)
22385  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22386  ;;
22387  *)
22388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22389for as_dir in $PATH
22390do
22391  IFS=$as_save_IFS
22392  test -z "$as_dir" && as_dir=.
22393    for ac_exec_ext in '' $ac_executable_extensions; do
22394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22395    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22397    break 2
22398  fi
22399done
22400  done
22401IFS=$as_save_IFS
22402
22403  ;;
22404esac
22405fi
22406XATTR=$ac_cv_path_XATTR
22407if test -n "$XATTR"; then
22408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22409$as_echo "$XATTR" >&6; }
22410else
22411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22412$as_echo "no" >&6; }
22413fi
22414
22415
22416          if test "x$XATTR" = x; then
22417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22418          fi
22419        else
22420          # Otherwise we believe it is a complete path. Use it as it is.
22421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22422$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22424$as_echo_n "checking for XATTR... " >&6; }
22425          if test ! -x "$tool_specified"; then
22426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22427$as_echo "not found" >&6; }
22428            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22429          fi
22430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22431$as_echo "$tool_specified" >&6; }
22432        fi
22433      fi
22434    fi
22435
22436  fi
22437
22438
22439
22440  if test "x$XATTR" = x; then
22441    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22442  fi
22443
22444
22445
22446
22447  # Publish this variable in the help.
22448
22449
22450  if [ -z "${CODESIGN+x}" ]; then
22451    # The variable is not set by user, try to locate tool using the code snippet
22452    for ac_prog in codesign
22453do
22454  # Extract the first word of "$ac_prog", so it can be a program name with args.
22455set dummy $ac_prog; ac_word=$2
22456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22457$as_echo_n "checking for $ac_word... " >&6; }
22458if ${ac_cv_path_CODESIGN+:} false; then :
22459  $as_echo_n "(cached) " >&6
22460else
22461  case $CODESIGN in
22462  [\\/]* | ?:[\\/]*)
22463  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22464  ;;
22465  *)
22466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22467for as_dir in $PATH
22468do
22469  IFS=$as_save_IFS
22470  test -z "$as_dir" && as_dir=.
22471    for ac_exec_ext in '' $ac_executable_extensions; do
22472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22473    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22475    break 2
22476  fi
22477done
22478  done
22479IFS=$as_save_IFS
22480
22481  ;;
22482esac
22483fi
22484CODESIGN=$ac_cv_path_CODESIGN
22485if test -n "$CODESIGN"; then
22486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22487$as_echo "$CODESIGN" >&6; }
22488else
22489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22490$as_echo "no" >&6; }
22491fi
22492
22493
22494  test -n "$CODESIGN" && break
22495done
22496
22497  else
22498    # The variable is set, but is it from the command line or the environment?
22499
22500    # Try to remove the string !CODESIGN! from our list.
22501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22503      # If it failed, the variable was not from the command line. Ignore it,
22504      # but warn the user (except for BASH, which is always set by the calling BASH).
22505      if test "xCODESIGN" != xBASH; then
22506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22507$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22508      fi
22509      # Try to locate tool using the code snippet
22510      for ac_prog in codesign
22511do
22512  # Extract the first word of "$ac_prog", so it can be a program name with args.
22513set dummy $ac_prog; ac_word=$2
22514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22515$as_echo_n "checking for $ac_word... " >&6; }
22516if ${ac_cv_path_CODESIGN+:} false; then :
22517  $as_echo_n "(cached) " >&6
22518else
22519  case $CODESIGN in
22520  [\\/]* | ?:[\\/]*)
22521  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22522  ;;
22523  *)
22524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22525for as_dir in $PATH
22526do
22527  IFS=$as_save_IFS
22528  test -z "$as_dir" && as_dir=.
22529    for ac_exec_ext in '' $ac_executable_extensions; do
22530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22531    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22533    break 2
22534  fi
22535done
22536  done
22537IFS=$as_save_IFS
22538
22539  ;;
22540esac
22541fi
22542CODESIGN=$ac_cv_path_CODESIGN
22543if test -n "$CODESIGN"; then
22544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22545$as_echo "$CODESIGN" >&6; }
22546else
22547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22548$as_echo "no" >&6; }
22549fi
22550
22551
22552  test -n "$CODESIGN" && break
22553done
22554
22555    else
22556      # If it succeeded, then it was overridden by the user. We will use it
22557      # for the tool.
22558
22559      # First remove it from the list of overridden variables, so we can test
22560      # for unknown variables in the end.
22561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22562
22563      # Check if we try to supply an empty value
22564      if test "x$CODESIGN" = x; then
22565        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22566$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22568$as_echo_n "checking for CODESIGN... " >&6; }
22569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22570$as_echo "disabled" >&6; }
22571      else
22572        # Check if the provided tool contains a complete path.
22573        tool_specified="$CODESIGN"
22574        tool_basename="${tool_specified##*/}"
22575        if test "x$tool_basename" = "x$tool_specified"; then
22576          # A command without a complete path is provided, search $PATH.
22577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22578$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22579          # Extract the first word of "$tool_basename", so it can be a program name with args.
22580set dummy $tool_basename; ac_word=$2
22581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22582$as_echo_n "checking for $ac_word... " >&6; }
22583if ${ac_cv_path_CODESIGN+:} false; then :
22584  $as_echo_n "(cached) " >&6
22585else
22586  case $CODESIGN in
22587  [\\/]* | ?:[\\/]*)
22588  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22589  ;;
22590  *)
22591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22592for as_dir in $PATH
22593do
22594  IFS=$as_save_IFS
22595  test -z "$as_dir" && as_dir=.
22596    for ac_exec_ext in '' $ac_executable_extensions; do
22597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22598    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22600    break 2
22601  fi
22602done
22603  done
22604IFS=$as_save_IFS
22605
22606  ;;
22607esac
22608fi
22609CODESIGN=$ac_cv_path_CODESIGN
22610if test -n "$CODESIGN"; then
22611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22612$as_echo "$CODESIGN" >&6; }
22613else
22614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22615$as_echo "no" >&6; }
22616fi
22617
22618
22619          if test "x$CODESIGN" = x; then
22620            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22621          fi
22622        else
22623          # Otherwise we believe it is a complete path. Use it as it is.
22624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22625$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22626          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22627$as_echo_n "checking for CODESIGN... " >&6; }
22628          if test ! -x "$tool_specified"; then
22629            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22630$as_echo "not found" >&6; }
22631            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22632          fi
22633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22634$as_echo "$tool_specified" >&6; }
22635        fi
22636      fi
22637    fi
22638
22639  fi
22640
22641
22642    if test "x$CODESIGN" != "x"; then
22643      # Verify that the openjdk_codesign certificate is present
22644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22645$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22646      rm -f codesign-testfile
22647      touch codesign-testfile
22648      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22649      rm -f codesign-testfile
22650      if test "x$CODESIGN" = x; then
22651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22652$as_echo "no" >&6; }
22653      else
22654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22655$as_echo "yes" >&6; }
22656      fi
22657    fi
22658
22659
22660
22661  # Publish this variable in the help.
22662
22663
22664  if [ -z "${SETFILE+x}" ]; then
22665    # The variable is not set by user, try to locate tool using the code snippet
22666    for ac_prog in SetFile
22667do
22668  # Extract the first word of "$ac_prog", so it can be a program name with args.
22669set dummy $ac_prog; ac_word=$2
22670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22671$as_echo_n "checking for $ac_word... " >&6; }
22672if ${ac_cv_path_SETFILE+:} false; then :
22673  $as_echo_n "(cached) " >&6
22674else
22675  case $SETFILE in
22676  [\\/]* | ?:[\\/]*)
22677  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22678  ;;
22679  *)
22680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22681for as_dir in $PATH
22682do
22683  IFS=$as_save_IFS
22684  test -z "$as_dir" && as_dir=.
22685    for ac_exec_ext in '' $ac_executable_extensions; do
22686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22687    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22689    break 2
22690  fi
22691done
22692  done
22693IFS=$as_save_IFS
22694
22695  ;;
22696esac
22697fi
22698SETFILE=$ac_cv_path_SETFILE
22699if test -n "$SETFILE"; then
22700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22701$as_echo "$SETFILE" >&6; }
22702else
22703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22704$as_echo "no" >&6; }
22705fi
22706
22707
22708  test -n "$SETFILE" && break
22709done
22710
22711  else
22712    # The variable is set, but is it from the command line or the environment?
22713
22714    # Try to remove the string !SETFILE! from our list.
22715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22717      # If it failed, the variable was not from the command line. Ignore it,
22718      # but warn the user (except for BASH, which is always set by the calling BASH).
22719      if test "xSETFILE" != xBASH; then
22720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22721$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22722      fi
22723      # Try to locate tool using the code snippet
22724      for ac_prog in SetFile
22725do
22726  # Extract the first word of "$ac_prog", so it can be a program name with args.
22727set dummy $ac_prog; ac_word=$2
22728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22729$as_echo_n "checking for $ac_word... " >&6; }
22730if ${ac_cv_path_SETFILE+:} false; then :
22731  $as_echo_n "(cached) " >&6
22732else
22733  case $SETFILE in
22734  [\\/]* | ?:[\\/]*)
22735  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22736  ;;
22737  *)
22738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22739for as_dir in $PATH
22740do
22741  IFS=$as_save_IFS
22742  test -z "$as_dir" && as_dir=.
22743    for ac_exec_ext in '' $ac_executable_extensions; do
22744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22745    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22747    break 2
22748  fi
22749done
22750  done
22751IFS=$as_save_IFS
22752
22753  ;;
22754esac
22755fi
22756SETFILE=$ac_cv_path_SETFILE
22757if test -n "$SETFILE"; then
22758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22759$as_echo "$SETFILE" >&6; }
22760else
22761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22762$as_echo "no" >&6; }
22763fi
22764
22765
22766  test -n "$SETFILE" && break
22767done
22768
22769    else
22770      # If it succeeded, then it was overridden by the user. We will use it
22771      # for the tool.
22772
22773      # First remove it from the list of overridden variables, so we can test
22774      # for unknown variables in the end.
22775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22776
22777      # Check if we try to supply an empty value
22778      if test "x$SETFILE" = x; then
22779        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22780$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22782$as_echo_n "checking for SETFILE... " >&6; }
22783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22784$as_echo "disabled" >&6; }
22785      else
22786        # Check if the provided tool contains a complete path.
22787        tool_specified="$SETFILE"
22788        tool_basename="${tool_specified##*/}"
22789        if test "x$tool_basename" = "x$tool_specified"; then
22790          # A command without a complete path is provided, search $PATH.
22791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22792$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22793          # Extract the first word of "$tool_basename", so it can be a program name with args.
22794set dummy $tool_basename; ac_word=$2
22795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22796$as_echo_n "checking for $ac_word... " >&6; }
22797if ${ac_cv_path_SETFILE+:} false; then :
22798  $as_echo_n "(cached) " >&6
22799else
22800  case $SETFILE in
22801  [\\/]* | ?:[\\/]*)
22802  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22803  ;;
22804  *)
22805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22806for as_dir in $PATH
22807do
22808  IFS=$as_save_IFS
22809  test -z "$as_dir" && as_dir=.
22810    for ac_exec_ext in '' $ac_executable_extensions; do
22811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22812    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22814    break 2
22815  fi
22816done
22817  done
22818IFS=$as_save_IFS
22819
22820  ;;
22821esac
22822fi
22823SETFILE=$ac_cv_path_SETFILE
22824if test -n "$SETFILE"; then
22825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22826$as_echo "$SETFILE" >&6; }
22827else
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22829$as_echo "no" >&6; }
22830fi
22831
22832
22833          if test "x$SETFILE" = x; then
22834            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22835          fi
22836        else
22837          # Otherwise we believe it is a complete path. Use it as it is.
22838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22839$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22840          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22841$as_echo_n "checking for SETFILE... " >&6; }
22842          if test ! -x "$tool_specified"; then
22843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22844$as_echo "not found" >&6; }
22845            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22846          fi
22847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22848$as_echo "$tool_specified" >&6; }
22849        fi
22850      fi
22851    fi
22852
22853  fi
22854
22855
22856
22857  if test "x$SETFILE" = x; then
22858    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22859  fi
22860
22861
22862  fi
22863
22864
22865  # Test if bash supports pipefail.
22866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22867$as_echo_n "checking if bash supports pipefail... " >&6; }
22868  if ${BASH} -c 'set -o pipefail'; then
22869    BASH_ARGS="$BASH_ARGS -o pipefail"
22870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22871$as_echo "yes" >&6; }
22872  else
22873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22874$as_echo "no" >&6; }
22875  fi
22876
22877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22878$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22879  if ${BASH} -e -c 'true'; then
22880    BASH_ARGS="$BASH_ARGS -e"
22881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22882$as_echo "yes" >&6; }
22883  else
22884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22885$as_echo "no" >&6; }
22886  fi
22887
22888
22889
22890
22891# Check if pkg-config is available.
22892
22893
22894if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22895	if test -n "$ac_tool_prefix"; then
22896  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22897set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22899$as_echo_n "checking for $ac_word... " >&6; }
22900if ${ac_cv_path_PKG_CONFIG+:} false; then :
22901  $as_echo_n "(cached) " >&6
22902else
22903  case $PKG_CONFIG in
22904  [\\/]* | ?:[\\/]*)
22905  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22906  ;;
22907  *)
22908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22909for as_dir in $PATH
22910do
22911  IFS=$as_save_IFS
22912  test -z "$as_dir" && as_dir=.
22913    for ac_exec_ext in '' $ac_executable_extensions; do
22914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22915    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22917    break 2
22918  fi
22919done
22920  done
22921IFS=$as_save_IFS
22922
22923  ;;
22924esac
22925fi
22926PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22927if test -n "$PKG_CONFIG"; then
22928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22929$as_echo "$PKG_CONFIG" >&6; }
22930else
22931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22932$as_echo "no" >&6; }
22933fi
22934
22935
22936fi
22937if test -z "$ac_cv_path_PKG_CONFIG"; then
22938  ac_pt_PKG_CONFIG=$PKG_CONFIG
22939  # Extract the first word of "pkg-config", so it can be a program name with args.
22940set dummy pkg-config; ac_word=$2
22941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22942$as_echo_n "checking for $ac_word... " >&6; }
22943if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22944  $as_echo_n "(cached) " >&6
22945else
22946  case $ac_pt_PKG_CONFIG in
22947  [\\/]* | ?:[\\/]*)
22948  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22949  ;;
22950  *)
22951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22952for as_dir in $PATH
22953do
22954  IFS=$as_save_IFS
22955  test -z "$as_dir" && as_dir=.
22956    for ac_exec_ext in '' $ac_executable_extensions; do
22957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22958    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22960    break 2
22961  fi
22962done
22963  done
22964IFS=$as_save_IFS
22965
22966  ;;
22967esac
22968fi
22969ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22970if test -n "$ac_pt_PKG_CONFIG"; then
22971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22972$as_echo "$ac_pt_PKG_CONFIG" >&6; }
22973else
22974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22975$as_echo "no" >&6; }
22976fi
22977
22978  if test "x$ac_pt_PKG_CONFIG" = x; then
22979    PKG_CONFIG=""
22980  else
22981    case $cross_compiling:$ac_tool_warned in
22982yes:)
22983{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22984$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22985ac_tool_warned=yes ;;
22986esac
22987    PKG_CONFIG=$ac_pt_PKG_CONFIG
22988  fi
22989else
22990  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22991fi
22992
22993fi
22994if test -n "$PKG_CONFIG"; then
22995	_pkg_min_version=0.9.0
22996	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22997$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22998	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22999		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23000$as_echo "yes" >&6; }
23001	else
23002		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23003$as_echo "no" >&6; }
23004		PKG_CONFIG=""
23005	fi
23006
23007fi
23008
23009# After basic tools have been setup, we can check build os specific details.
23010
23011  ###############################################################################
23012
23013  # Note that this is the build platform OS version!
23014
23015  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23016  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23017  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23018  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23019
23020
23021
23022
23023
23024###############################################################################
23025#
23026# Determine OpenJDK variants, options and version numbers.
23027#
23028###############################################################################
23029
23030# We need build & target for this.
23031
23032
23033  ###############################################################################
23034  #
23035  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23036  # We always build headless support.
23037  #
23038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23039$as_echo_n "checking headful support... " >&6; }
23040  # Check whether --enable-headful was given.
23041if test "${enable_headful+set}" = set; then :
23042  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23043else
23044  SUPPORT_HEADFUL=yes
23045fi
23046
23047
23048  SUPPORT_HEADLESS=yes
23049  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23050
23051  if test "x$SUPPORT_HEADFUL" = xyes; then
23052    # We are building both headful and headless.
23053    headful_msg="include support for both headful and headless"
23054  fi
23055
23056  if test "x$SUPPORT_HEADFUL" = xno; then
23057    # Thus we are building headless only.
23058    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23059    headful_msg="headless only"
23060  fi
23061
23062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23063$as_echo "$headful_msg" >&6; }
23064
23065
23066
23067
23068
23069  # Control wether Hotspot runs Queens test after build.
23070  # Check whether --enable-hotspot-test-in-build was given.
23071if test "${enable_hotspot_test_in_build+set}" = set; then :
23072  enableval=$enable_hotspot_test_in_build;
23073else
23074  enable_hotspot_test_in_build=no
23075fi
23076
23077  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23078    TEST_IN_BUILD=true
23079  else
23080    TEST_IN_BUILD=false
23081  fi
23082
23083
23084  ###############################################################################
23085  #
23086  # Choose cacerts source file
23087  #
23088
23089# Check whether --with-cacerts-file was given.
23090if test "${with_cacerts_file+set}" = set; then :
23091  withval=$with_cacerts_file;
23092fi
23093
23094  if test "x$with_cacerts_file" != x; then
23095    CACERTS_FILE=$with_cacerts_file
23096  fi
23097
23098
23099  ###############################################################################
23100  #
23101  # Enable or disable unlimited crypto
23102  #
23103  # Check whether --enable-unlimited-crypto was given.
23104if test "${enable_unlimited_crypto+set}" = set; then :
23105  enableval=$enable_unlimited_crypto;
23106else
23107  enable_unlimited_crypto=no
23108fi
23109
23110  if test "x$enable_unlimited_crypto" = "xyes"; then
23111    UNLIMITED_CRYPTO=true
23112  else
23113    UNLIMITED_CRYPTO=false
23114  fi
23115
23116
23117  ###############################################################################
23118  #
23119  # Compress jars
23120  #
23121  COMPRESS_JARS=false
23122
23123
23124
23125  # Setup default copyright year. Mostly overridden when building close to a new year.
23126
23127# Check whether --with-copyright-year was given.
23128if test "${with_copyright_year+set}" = set; then :
23129  withval=$with_copyright_year;
23130fi
23131
23132  if test "x$with_copyright_year" = xyes; then
23133    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23134  elif test "x$with_copyright_year" != x; then
23135    COPYRIGHT_YEAR="$with_copyright_year"
23136  else
23137    COPYRIGHT_YEAR=`date +'%Y'`
23138  fi
23139
23140
23141
23142  # Warn user that old version arguments are deprecated.
23143
23144
23145# Check whether --with-milestone was given.
23146if test "${with_milestone+set}" = set; then :
23147  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23148$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23149fi
23150
23151
23152
23153
23154# Check whether --with-update-version was given.
23155if test "${with_update_version+set}" = set; then :
23156  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23157$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23158fi
23159
23160
23161
23162
23163# Check whether --with-user-release-suffix was given.
23164if test "${with_user_release_suffix+set}" = set; then :
23165  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
23166$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23167fi
23168
23169
23170
23171
23172# Check whether --with-build-number was given.
23173if test "${with_build_number+set}" = set; then :
23174  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23175$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23176fi
23177
23178
23179
23180  # Source the version numbers file
23181  . $AUTOCONF_DIR/version-numbers
23182
23183  # Some non-version number information is set in that file
23184
23185
23186
23187
23188
23189
23190
23191
23192  # Override version from arguments
23193
23194  # If --with-version-string is set, process it first. It is possible to
23195  # override parts with more specific flags, since these are processed later.
23196
23197# Check whether --with-version-string was given.
23198if test "${with_version_string+set}" = set; then :
23199  withval=$with_version_string;
23200fi
23201
23202  if test "x$with_version_string" = xyes; then
23203    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23204  elif test "x$with_version_string" != x; then
23205    # Additional [] needed to keep m4 from mangling shell constructs.
23206    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23207      VERSION_MAJOR=${BASH_REMATCH[1]}
23208      VERSION_MINOR=${BASH_REMATCH[3]}
23209      VERSION_SECURITY=${BASH_REMATCH[5]}
23210      VERSION_PATCH=${BASH_REMATCH[7]}
23211      VERSION_PRE=${BASH_REMATCH[9]}
23212      version_plus_separator=${BASH_REMATCH[11]}
23213      VERSION_BUILD=${BASH_REMATCH[12]}
23214      VERSION_OPT=${BASH_REMATCH[14]}
23215      # Unspecified numerical fields are interpreted as 0.
23216      if test "x$VERSION_MINOR" = x; then
23217        VERSION_MINOR=0
23218      fi
23219      if test "x$VERSION_SECURITY" = x; then
23220        VERSION_SECURITY=0
23221      fi
23222      if test "x$VERSION_PATCH" = x; then
23223        VERSION_PATCH=0
23224      fi
23225      if test "x$version_plus_separator" != x \
23226          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23227        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23228      fi
23229      # Stop the version part process from setting default values.
23230      # We still allow them to explicitely override though.
23231      NO_DEFAULT_VERSION_PARTS=true
23232    else
23233      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23234    fi
23235  fi
23236
23237
23238# Check whether --with-version-pre was given.
23239if test "${with_version_pre+set}" = set; then :
23240  withval=$with_version_pre; with_version_pre_present=true
23241else
23242  with_version_pre_present=false
23243fi
23244
23245
23246  if test "x$with_version_pre_present" = xtrue; then
23247    if test "x$with_version_pre" = xyes; then
23248      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23249    elif test "x$with_version_pre" = xno; then
23250      # Interpret --without-* as empty string instead of the literal "no"
23251      VERSION_PRE=
23252    else
23253      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23254       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23255      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23257$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23258      fi
23259    fi
23260  else
23261    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23262      # Default is to use "internal" as pre
23263      VERSION_PRE="internal"
23264    fi
23265  fi
23266
23267
23268# Check whether --with-version-opt was given.
23269if test "${with_version_opt+set}" = set; then :
23270  withval=$with_version_opt; with_version_opt_present=true
23271else
23272  with_version_opt_present=false
23273fi
23274
23275
23276  if test "x$with_version_opt_present" = xtrue; then
23277    if test "x$with_version_opt" = xyes; then
23278      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23279    elif test "x$with_version_opt" = xno; then
23280      # Interpret --without-* as empty string instead of the literal "no"
23281      VERSION_OPT=
23282    else
23283      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23284       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23285      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23286        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23287$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23288      fi
23289    fi
23290  else
23291    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23292      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23293      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23294      # Outer [ ] to quote m4.
23295       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23296       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23297      VERSION_OPT="$timestamp.$username.$basedirname"
23298    fi
23299  fi
23300
23301
23302# Check whether --with-version-build was given.
23303if test "${with_version_build+set}" = set; then :
23304  withval=$with_version_build; with_version_build_present=true
23305else
23306  with_version_build_present=false
23307fi
23308
23309
23310  if test "x$with_version_build_present" = xtrue; then
23311    if test "x$with_version_build" = xyes; then
23312      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23313    elif test "x$with_version_build" = xno; then
23314      # Interpret --without-* as empty string instead of the literal "no"
23315      VERSION_BUILD=
23316    elif test "x$with_version_build" = x; then
23317      VERSION_BUILD=
23318    else
23319
23320  # Additional [] needed to keep m4 from mangling shell constructs.
23321  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23322    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23323  fi
23324  # Extract the version number without leading zeros.
23325  cleaned_value=${BASH_REMATCH[1]}
23326  if test "x$cleaned_value" = x; then
23327    # Special case for zero
23328    cleaned_value=${BASH_REMATCH[2]}
23329  fi
23330
23331  if test $cleaned_value -gt 255; then
23332    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23333  fi
23334  if test "x$cleaned_value" != "x$with_version_build"; then
23335    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23336$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23337  fi
23338  VERSION_BUILD=$cleaned_value
23339
23340    fi
23341  else
23342    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23343      # Default is to not have a build number.
23344      VERSION_BUILD=""
23345      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23346      VERSION_BUILD=0
23347    fi
23348  fi
23349
23350
23351# Check whether --with-version-major was given.
23352if test "${with_version_major+set}" = set; then :
23353  withval=$with_version_major; with_version_major_present=true
23354else
23355  with_version_major_present=false
23356fi
23357
23358
23359  if test "x$with_version_major_present" = xtrue; then
23360    if test "x$with_version_major" = xyes; then
23361      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23362    else
23363
23364  # Additional [] needed to keep m4 from mangling shell constructs.
23365  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23366    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23367  fi
23368  # Extract the version number without leading zeros.
23369  cleaned_value=${BASH_REMATCH[1]}
23370  if test "x$cleaned_value" = x; then
23371    # Special case for zero
23372    cleaned_value=${BASH_REMATCH[2]}
23373  fi
23374
23375  if test $cleaned_value -gt 255; then
23376    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23377  fi
23378  if test "x$cleaned_value" != "x$with_version_major"; then
23379    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23380$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23381  fi
23382  VERSION_MAJOR=$cleaned_value
23383
23384    fi
23385  else
23386    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23387      # Default is to get value from version-numbers
23388      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23389    fi
23390  fi
23391
23392
23393# Check whether --with-version-minor was given.
23394if test "${with_version_minor+set}" = set; then :
23395  withval=$with_version_minor; with_version_minor_present=true
23396else
23397  with_version_minor_present=false
23398fi
23399
23400
23401  if test "x$with_version_minor_present" = xtrue; then
23402    if test "x$with_version_minor" = xyes; then
23403      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23404    elif test "x$with_version_minor" = xno; then
23405      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23406      VERSION_MINOR=0
23407    elif test "x$with_version_minor" = x; then
23408      VERSION_MINOR=0
23409    else
23410
23411  # Additional [] needed to keep m4 from mangling shell constructs.
23412  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23413    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23414  fi
23415  # Extract the version number without leading zeros.
23416  cleaned_value=${BASH_REMATCH[1]}
23417  if test "x$cleaned_value" = x; then
23418    # Special case for zero
23419    cleaned_value=${BASH_REMATCH[2]}
23420  fi
23421
23422  if test $cleaned_value -gt 255; then
23423    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23424  fi
23425  if test "x$cleaned_value" != "x$with_version_minor"; then
23426    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23427$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23428  fi
23429  VERSION_MINOR=$cleaned_value
23430
23431    fi
23432  else
23433    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23434      # Default is 0, if unspecified
23435      VERSION_MINOR=0
23436    fi
23437  fi
23438
23439
23440# Check whether --with-version-security was given.
23441if test "${with_version_security+set}" = set; then :
23442  withval=$with_version_security; with_version_security_present=true
23443else
23444  with_version_security_present=false
23445fi
23446
23447
23448  if test "x$with_version_security_present" = xtrue; then
23449    if test "x$with_version_security" = xyes; then
23450      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23451    elif test "x$with_version_security" = xno; then
23452      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23453      VERSION_SECURITY=0
23454    elif test "x$with_version_security" = x; then
23455      VERSION_SECURITY=0
23456    else
23457
23458  # Additional [] needed to keep m4 from mangling shell constructs.
23459  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23460    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23461  fi
23462  # Extract the version number without leading zeros.
23463  cleaned_value=${BASH_REMATCH[1]}
23464  if test "x$cleaned_value" = x; then
23465    # Special case for zero
23466    cleaned_value=${BASH_REMATCH[2]}
23467  fi
23468
23469  if test $cleaned_value -gt 255; then
23470    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23471  fi
23472  if test "x$cleaned_value" != "x$with_version_security"; then
23473    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23474$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23475  fi
23476  VERSION_SECURITY=$cleaned_value
23477
23478    fi
23479  else
23480    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23481      # Default is 0, if unspecified
23482      VERSION_SECURITY=0
23483    fi
23484  fi
23485
23486
23487# Check whether --with-version-patch was given.
23488if test "${with_version_patch+set}" = set; then :
23489  withval=$with_version_patch; with_version_patch_present=true
23490else
23491  with_version_patch_present=false
23492fi
23493
23494
23495  if test "x$with_version_patch_present" = xtrue; then
23496    if test "x$with_version_patch" = xyes; then
23497      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23498    elif test "x$with_version_patch" = xno; then
23499      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23500      VERSION_PATCH=0
23501    elif test "x$with_version_patch" = x; then
23502      VERSION_PATCH=0
23503    else
23504
23505  # Additional [] needed to keep m4 from mangling shell constructs.
23506  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23507    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23508  fi
23509  # Extract the version number without leading zeros.
23510  cleaned_value=${BASH_REMATCH[1]}
23511  if test "x$cleaned_value" = x; then
23512    # Special case for zero
23513    cleaned_value=${BASH_REMATCH[2]}
23514  fi
23515
23516  if test $cleaned_value -gt 255; then
23517    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23518  fi
23519  if test "x$cleaned_value" != "x$with_version_patch"; then
23520    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23521$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23522  fi
23523  VERSION_PATCH=$cleaned_value
23524
23525    fi
23526  else
23527    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23528      # Default is 0, if unspecified
23529      VERSION_PATCH=0
23530    fi
23531  fi
23532
23533  # Calculate derived version properties
23534
23535  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23536  if test "x$VERSION_PRE" = x; then
23537    VERSION_IS_GA=true
23538  else
23539    VERSION_IS_GA=false
23540  fi
23541
23542  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23543  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23544
23545  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23546  # Strip trailing zeroes from stripped_version_number
23547  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23548  VERSION_NUMBER=$stripped_version_number
23549
23550  # The complete version string, with additional build information
23551  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23552    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23553  else
23554    # If either build or opt is set, we need a + separator
23555    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23556  fi
23557
23558  # The short version string, just VERSION_NUMBER and PRE, if present.
23559  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23560
23561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23562$as_echo_n "checking for version string... " >&6; }
23563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23564$as_echo "$VERSION_STRING" >&6; }
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580###############################################################################
23581#
23582# Setup BootJDK, used to bootstrap the build.
23583#
23584###############################################################################
23585
23586
23587  BOOT_JDK_FOUND=no
23588
23589# Check whether --with-boot-jdk was given.
23590if test "${with_boot_jdk+set}" = set; then :
23591  withval=$with_boot_jdk;
23592fi
23593
23594
23595  # We look for the Boot JDK through various means, going from more certain to
23596  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23597  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23598  # must check if this is indeed valid; otherwise we'll continue looking.
23599
23600  # Test: Is bootjdk explicitely set by command line arguments?
23601
23602  if test "x$BOOT_JDK_FOUND" = xno; then
23603    # Now execute the test
23604
23605  if test "x$with_boot_jdk" != x; then
23606    BOOT_JDK=$with_boot_jdk
23607    BOOT_JDK_FOUND=maybe
23608    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23609$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23610  fi
23611
23612
23613    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23614    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23615      # Do we have a bin/java?
23616      if test ! -x "$BOOT_JDK/bin/java"; then
23617        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23619        BOOT_JDK_FOUND=no
23620      else
23621        # Do we have a bin/javac?
23622        if test ! -x "$BOOT_JDK/bin/javac"; then
23623          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23625          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23626$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23627          BOOT_JDK_FOUND=no
23628        else
23629          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23630          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23631
23632          # Extra M4 quote needed to protect [] in grep expression.
23633          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23634          if test "x$FOUND_CORRECT_VERSION" = x; then
23635            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23637            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23638$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23639            BOOT_JDK_FOUND=no
23640          else
23641            # We're done! :-)
23642            BOOT_JDK_FOUND=yes
23643
23644  # Only process if variable expands to non-empty
23645
23646  if test "x$BOOT_JDK" != x; then
23647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23648
23649  # Input might be given as Windows format, start by converting to
23650  # unix format.
23651  path="$BOOT_JDK"
23652  new_path=`$CYGPATH -u "$path"`
23653
23654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23657  # "foo.exe" is OK but "foo" is an error.
23658  #
23659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23660  # It is also a way to make sure we got the proper file name for the real test later on.
23661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23662  if test "x$test_shortpath" = x; then
23663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23665    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23666  fi
23667
23668  # Call helper function which possibly converts this using DOS-style short mode.
23669  # If so, the updated path is stored in $new_path.
23670
23671  input_path="$new_path"
23672  # Check if we need to convert this using DOS-style short mode. If the path
23673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23674  # take no chances and rewrite it.
23675  # Note: m4 eats our [], so we need to use [ and ] instead.
23676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23677  if test "x$has_forbidden_chars" != x; then
23678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23682      # Going to short mode and back again did indeed matter. Since short mode is
23683      # case insensitive, let's make it lowercase to improve readability.
23684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23685      # Now convert it back to Unix-style (cygpath)
23686      input_path=`$CYGPATH -u "$shortmode_path"`
23687      new_path="$input_path"
23688    fi
23689  fi
23690
23691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23692  if test "x$test_cygdrive_prefix" = x; then
23693    # As a simple fix, exclude /usr/bin since it's not a real path.
23694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23696      # a path prefixed by /cygdrive for fixpath to work.
23697      new_path="$CYGWIN_ROOT_PATH$input_path"
23698    fi
23699  fi
23700
23701
23702  if test "x$path" != "x$new_path"; then
23703    BOOT_JDK="$new_path"
23704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23706  fi
23707
23708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23709
23710  path="$BOOT_JDK"
23711  has_colon=`$ECHO $path | $GREP ^.:`
23712  new_path="$path"
23713  if test "x$has_colon" = x; then
23714    # Not in mixed or Windows style, start by that.
23715    new_path=`cmd //c echo $path`
23716  fi
23717
23718
23719  input_path="$new_path"
23720  # Check if we need to convert this using DOS-style short mode. If the path
23721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23722  # take no chances and rewrite it.
23723  # Note: m4 eats our [], so we need to use [ and ] instead.
23724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23725  if test "x$has_forbidden_chars" != x; then
23726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23728  fi
23729
23730
23731  windows_path="$new_path"
23732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23733    unix_path=`$CYGPATH -u "$windows_path"`
23734    new_path="$unix_path"
23735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23737    new_path="$unix_path"
23738  fi
23739
23740  if test "x$path" != "x$new_path"; then
23741    BOOT_JDK="$new_path"
23742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23744  fi
23745
23746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23748
23749    else
23750      # We're on a unix platform. Hooray! :)
23751      path="$BOOT_JDK"
23752      has_space=`$ECHO "$path" | $GREP " "`
23753      if test "x$has_space" != x; then
23754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23756        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23757      fi
23758
23759      # Use eval to expand a potential ~
23760      eval path="$path"
23761      if test ! -f "$path" && test ! -d "$path"; then
23762        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23763      fi
23764
23765      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23766    fi
23767  fi
23768
23769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23770$as_echo_n "checking for Boot JDK... " >&6; }
23771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23772$as_echo "$BOOT_JDK" >&6; }
23773            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23774$as_echo_n "checking Boot JDK version... " >&6; }
23775            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23777$as_echo "$BOOT_JDK_VERSION" >&6; }
23778          fi # end check jdk version
23779        fi # end check javac
23780      fi # end check java
23781    fi # end check boot jdk found
23782  fi
23783
23784  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23785    # Having specified an argument which is incorrect will produce an instant failure;
23786    # we should not go on looking
23787    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23788  fi
23789
23790  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23791
23792  if test "x$BOOT_JDK_FOUND" = xno; then
23793    # Now execute the test
23794
23795  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23796    # First check at user selected default
23797
23798  if test "x$BOOT_JDK_FOUND" = xno; then
23799    # Now execute the test
23800
23801  if test -x /usr/libexec/java_home; then
23802    BOOT_JDK=`/usr/libexec/java_home `
23803    BOOT_JDK_FOUND=maybe
23804    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23805$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23806  fi
23807
23808
23809    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23810    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23811      # Do we have a bin/java?
23812      if test ! -x "$BOOT_JDK/bin/java"; then
23813        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23815        BOOT_JDK_FOUND=no
23816      else
23817        # Do we have a bin/javac?
23818        if test ! -x "$BOOT_JDK/bin/javac"; then
23819          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23821          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23822$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23823          BOOT_JDK_FOUND=no
23824        else
23825          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23826          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23827
23828          # Extra M4 quote needed to protect [] in grep expression.
23829          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23830          if test "x$FOUND_CORRECT_VERSION" = x; then
23831            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23833            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23834$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23835            BOOT_JDK_FOUND=no
23836          else
23837            # We're done! :-)
23838            BOOT_JDK_FOUND=yes
23839
23840  # Only process if variable expands to non-empty
23841
23842  if test "x$BOOT_JDK" != x; then
23843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23844
23845  # Input might be given as Windows format, start by converting to
23846  # unix format.
23847  path="$BOOT_JDK"
23848  new_path=`$CYGPATH -u "$path"`
23849
23850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23853  # "foo.exe" is OK but "foo" is an error.
23854  #
23855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23856  # It is also a way to make sure we got the proper file name for the real test later on.
23857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23858  if test "x$test_shortpath" = x; then
23859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23861    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23862  fi
23863
23864  # Call helper function which possibly converts this using DOS-style short mode.
23865  # If so, the updated path is stored in $new_path.
23866
23867  input_path="$new_path"
23868  # Check if we need to convert this using DOS-style short mode. If the path
23869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23870  # take no chances and rewrite it.
23871  # Note: m4 eats our [], so we need to use [ and ] instead.
23872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23873  if test "x$has_forbidden_chars" != x; then
23874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23878      # Going to short mode and back again did indeed matter. Since short mode is
23879      # case insensitive, let's make it lowercase to improve readability.
23880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23881      # Now convert it back to Unix-style (cygpath)
23882      input_path=`$CYGPATH -u "$shortmode_path"`
23883      new_path="$input_path"
23884    fi
23885  fi
23886
23887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23888  if test "x$test_cygdrive_prefix" = x; then
23889    # As a simple fix, exclude /usr/bin since it's not a real path.
23890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23892      # a path prefixed by /cygdrive for fixpath to work.
23893      new_path="$CYGWIN_ROOT_PATH$input_path"
23894    fi
23895  fi
23896
23897
23898  if test "x$path" != "x$new_path"; then
23899    BOOT_JDK="$new_path"
23900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23902  fi
23903
23904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23905
23906  path="$BOOT_JDK"
23907  has_colon=`$ECHO $path | $GREP ^.:`
23908  new_path="$path"
23909  if test "x$has_colon" = x; then
23910    # Not in mixed or Windows style, start by that.
23911    new_path=`cmd //c echo $path`
23912  fi
23913
23914
23915  input_path="$new_path"
23916  # Check if we need to convert this using DOS-style short mode. If the path
23917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23918  # take no chances and rewrite it.
23919  # Note: m4 eats our [], so we need to use [ and ] instead.
23920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23921  if test "x$has_forbidden_chars" != x; then
23922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23924  fi
23925
23926
23927  windows_path="$new_path"
23928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23929    unix_path=`$CYGPATH -u "$windows_path"`
23930    new_path="$unix_path"
23931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23933    new_path="$unix_path"
23934  fi
23935
23936  if test "x$path" != "x$new_path"; then
23937    BOOT_JDK="$new_path"
23938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23940  fi
23941
23942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23944
23945    else
23946      # We're on a unix platform. Hooray! :)
23947      path="$BOOT_JDK"
23948      has_space=`$ECHO "$path" | $GREP " "`
23949      if test "x$has_space" != x; then
23950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23952        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23953      fi
23954
23955      # Use eval to expand a potential ~
23956      eval path="$path"
23957      if test ! -f "$path" && test ! -d "$path"; then
23958        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23959      fi
23960
23961      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23962    fi
23963  fi
23964
23965            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23966$as_echo_n "checking for Boot JDK... " >&6; }
23967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23968$as_echo "$BOOT_JDK" >&6; }
23969            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23970$as_echo_n "checking Boot JDK version... " >&6; }
23971            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23973$as_echo "$BOOT_JDK_VERSION" >&6; }
23974          fi # end check jdk version
23975        fi # end check javac
23976      fi # end check java
23977    fi # end check boot jdk found
23978  fi
23979
23980    # If that did not work out (e.g. too old), try explicit versions instead
23981
23982  if test "x$BOOT_JDK_FOUND" = xno; then
23983    # Now execute the test
23984
23985  if test -x /usr/libexec/java_home; then
23986    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23987    BOOT_JDK_FOUND=maybe
23988    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23989$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23990  fi
23991
23992
23993    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23994    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23995      # Do we have a bin/java?
23996      if test ! -x "$BOOT_JDK/bin/java"; then
23997        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23999        BOOT_JDK_FOUND=no
24000      else
24001        # Do we have a bin/javac?
24002        if test ! -x "$BOOT_JDK/bin/javac"; then
24003          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24005          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24006$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24007          BOOT_JDK_FOUND=no
24008        else
24009          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24010          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24011
24012          # Extra M4 quote needed to protect [] in grep expression.
24013          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24014          if test "x$FOUND_CORRECT_VERSION" = x; then
24015            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24017            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24018$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24019            BOOT_JDK_FOUND=no
24020          else
24021            # We're done! :-)
24022            BOOT_JDK_FOUND=yes
24023
24024  # Only process if variable expands to non-empty
24025
24026  if test "x$BOOT_JDK" != x; then
24027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24028
24029  # Input might be given as Windows format, start by converting to
24030  # unix format.
24031  path="$BOOT_JDK"
24032  new_path=`$CYGPATH -u "$path"`
24033
24034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24037  # "foo.exe" is OK but "foo" is an error.
24038  #
24039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24040  # It is also a way to make sure we got the proper file name for the real test later on.
24041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24042  if test "x$test_shortpath" = x; then
24043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24045    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24046  fi
24047
24048  # Call helper function which possibly converts this using DOS-style short mode.
24049  # If so, the updated path is stored in $new_path.
24050
24051  input_path="$new_path"
24052  # Check if we need to convert this using DOS-style short mode. If the path
24053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24054  # take no chances and rewrite it.
24055  # Note: m4 eats our [], so we need to use [ and ] instead.
24056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24057  if test "x$has_forbidden_chars" != x; then
24058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24062      # Going to short mode and back again did indeed matter. Since short mode is
24063      # case insensitive, let's make it lowercase to improve readability.
24064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24065      # Now convert it back to Unix-style (cygpath)
24066      input_path=`$CYGPATH -u "$shortmode_path"`
24067      new_path="$input_path"
24068    fi
24069  fi
24070
24071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24072  if test "x$test_cygdrive_prefix" = x; then
24073    # As a simple fix, exclude /usr/bin since it's not a real path.
24074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24076      # a path prefixed by /cygdrive for fixpath to work.
24077      new_path="$CYGWIN_ROOT_PATH$input_path"
24078    fi
24079  fi
24080
24081
24082  if test "x$path" != "x$new_path"; then
24083    BOOT_JDK="$new_path"
24084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24086  fi
24087
24088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24089
24090  path="$BOOT_JDK"
24091  has_colon=`$ECHO $path | $GREP ^.:`
24092  new_path="$path"
24093  if test "x$has_colon" = x; then
24094    # Not in mixed or Windows style, start by that.
24095    new_path=`cmd //c echo $path`
24096  fi
24097
24098
24099  input_path="$new_path"
24100  # Check if we need to convert this using DOS-style short mode. If the path
24101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24102  # take no chances and rewrite it.
24103  # Note: m4 eats our [], so we need to use [ and ] instead.
24104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24105  if test "x$has_forbidden_chars" != x; then
24106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24108  fi
24109
24110
24111  windows_path="$new_path"
24112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24113    unix_path=`$CYGPATH -u "$windows_path"`
24114    new_path="$unix_path"
24115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24117    new_path="$unix_path"
24118  fi
24119
24120  if test "x$path" != "x$new_path"; then
24121    BOOT_JDK="$new_path"
24122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24124  fi
24125
24126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24128
24129    else
24130      # We're on a unix platform. Hooray! :)
24131      path="$BOOT_JDK"
24132      has_space=`$ECHO "$path" | $GREP " "`
24133      if test "x$has_space" != x; then
24134        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24136        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24137      fi
24138
24139      # Use eval to expand a potential ~
24140      eval path="$path"
24141      if test ! -f "$path" && test ! -d "$path"; then
24142        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24143      fi
24144
24145      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24146    fi
24147  fi
24148
24149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24150$as_echo_n "checking for Boot JDK... " >&6; }
24151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24152$as_echo "$BOOT_JDK" >&6; }
24153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24154$as_echo_n "checking Boot JDK version... " >&6; }
24155            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24157$as_echo "$BOOT_JDK_VERSION" >&6; }
24158          fi # end check jdk version
24159        fi # end check javac
24160      fi # end check java
24161    fi # end check boot jdk found
24162  fi
24163
24164
24165  if test "x$BOOT_JDK_FOUND" = xno; then
24166    # Now execute the test
24167
24168  if test -x /usr/libexec/java_home; then
24169    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24170    BOOT_JDK_FOUND=maybe
24171    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24172$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24173  fi
24174
24175
24176    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24177    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24178      # Do we have a bin/java?
24179      if test ! -x "$BOOT_JDK/bin/java"; then
24180        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24182        BOOT_JDK_FOUND=no
24183      else
24184        # Do we have a bin/javac?
24185        if test ! -x "$BOOT_JDK/bin/javac"; then
24186          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24188          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24189$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24190          BOOT_JDK_FOUND=no
24191        else
24192          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24193          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24194
24195          # Extra M4 quote needed to protect [] in grep expression.
24196          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24197          if test "x$FOUND_CORRECT_VERSION" = x; then
24198            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24200            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24201$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24202            BOOT_JDK_FOUND=no
24203          else
24204            # We're done! :-)
24205            BOOT_JDK_FOUND=yes
24206
24207  # Only process if variable expands to non-empty
24208
24209  if test "x$BOOT_JDK" != x; then
24210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24211
24212  # Input might be given as Windows format, start by converting to
24213  # unix format.
24214  path="$BOOT_JDK"
24215  new_path=`$CYGPATH -u "$path"`
24216
24217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24220  # "foo.exe" is OK but "foo" is an error.
24221  #
24222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24223  # It is also a way to make sure we got the proper file name for the real test later on.
24224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24225  if test "x$test_shortpath" = x; then
24226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24228    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24229  fi
24230
24231  # Call helper function which possibly converts this using DOS-style short mode.
24232  # If so, the updated path is stored in $new_path.
24233
24234  input_path="$new_path"
24235  # Check if we need to convert this using DOS-style short mode. If the path
24236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24237  # take no chances and rewrite it.
24238  # Note: m4 eats our [], so we need to use [ and ] instead.
24239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24240  if test "x$has_forbidden_chars" != x; then
24241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24245      # Going to short mode and back again did indeed matter. Since short mode is
24246      # case insensitive, let's make it lowercase to improve readability.
24247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24248      # Now convert it back to Unix-style (cygpath)
24249      input_path=`$CYGPATH -u "$shortmode_path"`
24250      new_path="$input_path"
24251    fi
24252  fi
24253
24254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24255  if test "x$test_cygdrive_prefix" = x; then
24256    # As a simple fix, exclude /usr/bin since it's not a real path.
24257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24259      # a path prefixed by /cygdrive for fixpath to work.
24260      new_path="$CYGWIN_ROOT_PATH$input_path"
24261    fi
24262  fi
24263
24264
24265  if test "x$path" != "x$new_path"; then
24266    BOOT_JDK="$new_path"
24267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24269  fi
24270
24271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24272
24273  path="$BOOT_JDK"
24274  has_colon=`$ECHO $path | $GREP ^.:`
24275  new_path="$path"
24276  if test "x$has_colon" = x; then
24277    # Not in mixed or Windows style, start by that.
24278    new_path=`cmd //c echo $path`
24279  fi
24280
24281
24282  input_path="$new_path"
24283  # Check if we need to convert this using DOS-style short mode. If the path
24284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24285  # take no chances and rewrite it.
24286  # Note: m4 eats our [], so we need to use [ and ] instead.
24287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24288  if test "x$has_forbidden_chars" != x; then
24289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24291  fi
24292
24293
24294  windows_path="$new_path"
24295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24296    unix_path=`$CYGPATH -u "$windows_path"`
24297    new_path="$unix_path"
24298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24300    new_path="$unix_path"
24301  fi
24302
24303  if test "x$path" != "x$new_path"; then
24304    BOOT_JDK="$new_path"
24305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24307  fi
24308
24309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24311
24312    else
24313      # We're on a unix platform. Hooray! :)
24314      path="$BOOT_JDK"
24315      has_space=`$ECHO "$path" | $GREP " "`
24316      if test "x$has_space" != x; then
24317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24319        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24320      fi
24321
24322      # Use eval to expand a potential ~
24323      eval path="$path"
24324      if test ! -f "$path" && test ! -d "$path"; then
24325        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24326      fi
24327
24328      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24329    fi
24330  fi
24331
24332            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24333$as_echo_n "checking for Boot JDK... " >&6; }
24334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24335$as_echo "$BOOT_JDK" >&6; }
24336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24337$as_echo_n "checking Boot JDK version... " >&6; }
24338            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24340$as_echo "$BOOT_JDK_VERSION" >&6; }
24341          fi # end check jdk version
24342        fi # end check javac
24343      fi # end check java
24344    fi # end check boot jdk found
24345  fi
24346
24347
24348  if test "x$BOOT_JDK_FOUND" = xno; then
24349    # Now execute the test
24350
24351  if test -x /usr/libexec/java_home; then
24352    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24353    BOOT_JDK_FOUND=maybe
24354    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24355$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24356  fi
24357
24358
24359    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24360    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24361      # Do we have a bin/java?
24362      if test ! -x "$BOOT_JDK/bin/java"; then
24363        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24365        BOOT_JDK_FOUND=no
24366      else
24367        # Do we have a bin/javac?
24368        if test ! -x "$BOOT_JDK/bin/javac"; then
24369          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24371          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24372$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24373          BOOT_JDK_FOUND=no
24374        else
24375          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24376          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24377
24378          # Extra M4 quote needed to protect [] in grep expression.
24379          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24380          if test "x$FOUND_CORRECT_VERSION" = x; then
24381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24383            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24384$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24385            BOOT_JDK_FOUND=no
24386          else
24387            # We're done! :-)
24388            BOOT_JDK_FOUND=yes
24389
24390  # Only process if variable expands to non-empty
24391
24392  if test "x$BOOT_JDK" != x; then
24393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24394
24395  # Input might be given as Windows format, start by converting to
24396  # unix format.
24397  path="$BOOT_JDK"
24398  new_path=`$CYGPATH -u "$path"`
24399
24400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24403  # "foo.exe" is OK but "foo" is an error.
24404  #
24405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24406  # It is also a way to make sure we got the proper file name for the real test later on.
24407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24408  if test "x$test_shortpath" = x; then
24409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24410$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24411    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24412  fi
24413
24414  # Call helper function which possibly converts this using DOS-style short mode.
24415  # If so, the updated path is stored in $new_path.
24416
24417  input_path="$new_path"
24418  # Check if we need to convert this using DOS-style short mode. If the path
24419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24420  # take no chances and rewrite it.
24421  # Note: m4 eats our [], so we need to use [ and ] instead.
24422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24423  if test "x$has_forbidden_chars" != x; then
24424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24428      # Going to short mode and back again did indeed matter. Since short mode is
24429      # case insensitive, let's make it lowercase to improve readability.
24430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24431      # Now convert it back to Unix-style (cygpath)
24432      input_path=`$CYGPATH -u "$shortmode_path"`
24433      new_path="$input_path"
24434    fi
24435  fi
24436
24437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24438  if test "x$test_cygdrive_prefix" = x; then
24439    # As a simple fix, exclude /usr/bin since it's not a real path.
24440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24442      # a path prefixed by /cygdrive for fixpath to work.
24443      new_path="$CYGWIN_ROOT_PATH$input_path"
24444    fi
24445  fi
24446
24447
24448  if test "x$path" != "x$new_path"; then
24449    BOOT_JDK="$new_path"
24450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24452  fi
24453
24454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24455
24456  path="$BOOT_JDK"
24457  has_colon=`$ECHO $path | $GREP ^.:`
24458  new_path="$path"
24459  if test "x$has_colon" = x; then
24460    # Not in mixed or Windows style, start by that.
24461    new_path=`cmd //c echo $path`
24462  fi
24463
24464
24465  input_path="$new_path"
24466  # Check if we need to convert this using DOS-style short mode. If the path
24467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24468  # take no chances and rewrite it.
24469  # Note: m4 eats our [], so we need to use [ and ] instead.
24470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24471  if test "x$has_forbidden_chars" != x; then
24472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24474  fi
24475
24476
24477  windows_path="$new_path"
24478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24479    unix_path=`$CYGPATH -u "$windows_path"`
24480    new_path="$unix_path"
24481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24483    new_path="$unix_path"
24484  fi
24485
24486  if test "x$path" != "x$new_path"; then
24487    BOOT_JDK="$new_path"
24488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24490  fi
24491
24492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24494
24495    else
24496      # We're on a unix platform. Hooray! :)
24497      path="$BOOT_JDK"
24498      has_space=`$ECHO "$path" | $GREP " "`
24499      if test "x$has_space" != x; then
24500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24503      fi
24504
24505      # Use eval to expand a potential ~
24506      eval path="$path"
24507      if test ! -f "$path" && test ! -d "$path"; then
24508        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24509      fi
24510
24511      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24512    fi
24513  fi
24514
24515            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24516$as_echo_n "checking for Boot JDK... " >&6; }
24517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24518$as_echo "$BOOT_JDK" >&6; }
24519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24520$as_echo_n "checking Boot JDK version... " >&6; }
24521            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24523$as_echo "$BOOT_JDK_VERSION" >&6; }
24524          fi # end check jdk version
24525        fi # end check javac
24526      fi # end check java
24527    fi # end check boot jdk found
24528  fi
24529
24530  fi
24531
24532
24533    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24534    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24535      # Do we have a bin/java?
24536      if test ! -x "$BOOT_JDK/bin/java"; then
24537        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24539        BOOT_JDK_FOUND=no
24540      else
24541        # Do we have a bin/javac?
24542        if test ! -x "$BOOT_JDK/bin/javac"; then
24543          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24545          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24546$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24547          BOOT_JDK_FOUND=no
24548        else
24549          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24550          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24551
24552          # Extra M4 quote needed to protect [] in grep expression.
24553          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24554          if test "x$FOUND_CORRECT_VERSION" = x; then
24555            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24557            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24558$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24559            BOOT_JDK_FOUND=no
24560          else
24561            # We're done! :-)
24562            BOOT_JDK_FOUND=yes
24563
24564  # Only process if variable expands to non-empty
24565
24566  if test "x$BOOT_JDK" != x; then
24567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24568
24569  # Input might be given as Windows format, start by converting to
24570  # unix format.
24571  path="$BOOT_JDK"
24572  new_path=`$CYGPATH -u "$path"`
24573
24574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24577  # "foo.exe" is OK but "foo" is an error.
24578  #
24579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24580  # It is also a way to make sure we got the proper file name for the real test later on.
24581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24582  if test "x$test_shortpath" = x; then
24583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24585    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24586  fi
24587
24588  # Call helper function which possibly converts this using DOS-style short mode.
24589  # If so, the updated path is stored in $new_path.
24590
24591  input_path="$new_path"
24592  # Check if we need to convert this using DOS-style short mode. If the path
24593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24594  # take no chances and rewrite it.
24595  # Note: m4 eats our [], so we need to use [ and ] instead.
24596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24597  if test "x$has_forbidden_chars" != x; then
24598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24602      # Going to short mode and back again did indeed matter. Since short mode is
24603      # case insensitive, let's make it lowercase to improve readability.
24604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24605      # Now convert it back to Unix-style (cygpath)
24606      input_path=`$CYGPATH -u "$shortmode_path"`
24607      new_path="$input_path"
24608    fi
24609  fi
24610
24611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24612  if test "x$test_cygdrive_prefix" = x; then
24613    # As a simple fix, exclude /usr/bin since it's not a real path.
24614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24616      # a path prefixed by /cygdrive for fixpath to work.
24617      new_path="$CYGWIN_ROOT_PATH$input_path"
24618    fi
24619  fi
24620
24621
24622  if test "x$path" != "x$new_path"; then
24623    BOOT_JDK="$new_path"
24624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24626  fi
24627
24628    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24629
24630  path="$BOOT_JDK"
24631  has_colon=`$ECHO $path | $GREP ^.:`
24632  new_path="$path"
24633  if test "x$has_colon" = x; then
24634    # Not in mixed or Windows style, start by that.
24635    new_path=`cmd //c echo $path`
24636  fi
24637
24638
24639  input_path="$new_path"
24640  # Check if we need to convert this using DOS-style short mode. If the path
24641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24642  # take no chances and rewrite it.
24643  # Note: m4 eats our [], so we need to use [ and ] instead.
24644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24645  if test "x$has_forbidden_chars" != x; then
24646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24648  fi
24649
24650
24651  windows_path="$new_path"
24652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24653    unix_path=`$CYGPATH -u "$windows_path"`
24654    new_path="$unix_path"
24655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24657    new_path="$unix_path"
24658  fi
24659
24660  if test "x$path" != "x$new_path"; then
24661    BOOT_JDK="$new_path"
24662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24664  fi
24665
24666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24668
24669    else
24670      # We're on a unix platform. Hooray! :)
24671      path="$BOOT_JDK"
24672      has_space=`$ECHO "$path" | $GREP " "`
24673      if test "x$has_space" != x; then
24674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24675$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24676        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24677      fi
24678
24679      # Use eval to expand a potential ~
24680      eval path="$path"
24681      if test ! -f "$path" && test ! -d "$path"; then
24682        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24683      fi
24684
24685      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24686    fi
24687  fi
24688
24689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24690$as_echo_n "checking for Boot JDK... " >&6; }
24691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24692$as_echo "$BOOT_JDK" >&6; }
24693            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24694$as_echo_n "checking Boot JDK version... " >&6; }
24695            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24697$as_echo "$BOOT_JDK_VERSION" >&6; }
24698          fi # end check jdk version
24699        fi # end check javac
24700      fi # end check java
24701    fi # end check boot jdk found
24702  fi
24703
24704
24705  # Test: Is $JAVA_HOME set?
24706
24707  if test "x$BOOT_JDK_FOUND" = xno; then
24708    # Now execute the test
24709
24710  if test "x$JAVA_HOME" != x; then
24711    JAVA_HOME_PROCESSED="$JAVA_HOME"
24712
24713  # Only process if variable expands to non-empty
24714
24715  if test "x$JAVA_HOME_PROCESSED" != x; then
24716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24717
24718  # Input might be given as Windows format, start by converting to
24719  # unix format.
24720  path="$JAVA_HOME_PROCESSED"
24721  new_path=`$CYGPATH -u "$path"`
24722
24723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24726  # "foo.exe" is OK but "foo" is an error.
24727  #
24728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24729  # It is also a way to make sure we got the proper file name for the real test later on.
24730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24731  if test "x$test_shortpath" = x; then
24732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24733$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24734    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24735  fi
24736
24737  # Call helper function which possibly converts this using DOS-style short mode.
24738  # If so, the updated path is stored in $new_path.
24739
24740  input_path="$new_path"
24741  # Check if we need to convert this using DOS-style short mode. If the path
24742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24743  # take no chances and rewrite it.
24744  # Note: m4 eats our [], so we need to use [ and ] instead.
24745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24746  if test "x$has_forbidden_chars" != x; then
24747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24751      # Going to short mode and back again did indeed matter. Since short mode is
24752      # case insensitive, let's make it lowercase to improve readability.
24753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24754      # Now convert it back to Unix-style (cygpath)
24755      input_path=`$CYGPATH -u "$shortmode_path"`
24756      new_path="$input_path"
24757    fi
24758  fi
24759
24760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24761  if test "x$test_cygdrive_prefix" = x; then
24762    # As a simple fix, exclude /usr/bin since it's not a real path.
24763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24765      # a path prefixed by /cygdrive for fixpath to work.
24766      new_path="$CYGWIN_ROOT_PATH$input_path"
24767    fi
24768  fi
24769
24770
24771  if test "x$path" != "x$new_path"; then
24772    JAVA_HOME_PROCESSED="$new_path"
24773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24774$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24775  fi
24776
24777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24778
24779  path="$JAVA_HOME_PROCESSED"
24780  has_colon=`$ECHO $path | $GREP ^.:`
24781  new_path="$path"
24782  if test "x$has_colon" = x; then
24783    # Not in mixed or Windows style, start by that.
24784    new_path=`cmd //c echo $path`
24785  fi
24786
24787
24788  input_path="$new_path"
24789  # Check if we need to convert this using DOS-style short mode. If the path
24790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24791  # take no chances and rewrite it.
24792  # Note: m4 eats our [], so we need to use [ and ] instead.
24793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24794  if test "x$has_forbidden_chars" != x; then
24795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24797  fi
24798
24799
24800  windows_path="$new_path"
24801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24802    unix_path=`$CYGPATH -u "$windows_path"`
24803    new_path="$unix_path"
24804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24806    new_path="$unix_path"
24807  fi
24808
24809  if test "x$path" != "x$new_path"; then
24810    JAVA_HOME_PROCESSED="$new_path"
24811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24812$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24813  fi
24814
24815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24817
24818    else
24819      # We're on a unix platform. Hooray! :)
24820      path="$JAVA_HOME_PROCESSED"
24821      has_space=`$ECHO "$path" | $GREP " "`
24822      if test "x$has_space" != x; then
24823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24824$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24826      fi
24827
24828      # Use eval to expand a potential ~
24829      eval path="$path"
24830      if test ! -f "$path" && test ! -d "$path"; then
24831        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24832      fi
24833
24834      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24835    fi
24836  fi
24837
24838    if test ! -d "$JAVA_HOME_PROCESSED"; then
24839      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24840$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24841    else
24842      # Aha, the user has set a JAVA_HOME
24843      # let us use that as the Boot JDK.
24844      BOOT_JDK="$JAVA_HOME_PROCESSED"
24845      BOOT_JDK_FOUND=maybe
24846      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24847$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24848    fi
24849  fi
24850
24851
24852    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24853    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24854      # Do we have a bin/java?
24855      if test ! -x "$BOOT_JDK/bin/java"; then
24856        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24858        BOOT_JDK_FOUND=no
24859      else
24860        # Do we have a bin/javac?
24861        if test ! -x "$BOOT_JDK/bin/javac"; then
24862          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24864          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24865$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24866          BOOT_JDK_FOUND=no
24867        else
24868          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24869          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24870
24871          # Extra M4 quote needed to protect [] in grep expression.
24872          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24873          if test "x$FOUND_CORRECT_VERSION" = x; then
24874            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24876            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24877$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24878            BOOT_JDK_FOUND=no
24879          else
24880            # We're done! :-)
24881            BOOT_JDK_FOUND=yes
24882
24883  # Only process if variable expands to non-empty
24884
24885  if test "x$BOOT_JDK" != x; then
24886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24887
24888  # Input might be given as Windows format, start by converting to
24889  # unix format.
24890  path="$BOOT_JDK"
24891  new_path=`$CYGPATH -u "$path"`
24892
24893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24896  # "foo.exe" is OK but "foo" is an error.
24897  #
24898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24899  # It is also a way to make sure we got the proper file name for the real test later on.
24900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24901  if test "x$test_shortpath" = x; then
24902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24904    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24905  fi
24906
24907  # Call helper function which possibly converts this using DOS-style short mode.
24908  # If so, the updated path is stored in $new_path.
24909
24910  input_path="$new_path"
24911  # Check if we need to convert this using DOS-style short mode. If the path
24912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24913  # take no chances and rewrite it.
24914  # Note: m4 eats our [], so we need to use [ and ] instead.
24915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24916  if test "x$has_forbidden_chars" != x; then
24917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24921      # Going to short mode and back again did indeed matter. Since short mode is
24922      # case insensitive, let's make it lowercase to improve readability.
24923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24924      # Now convert it back to Unix-style (cygpath)
24925      input_path=`$CYGPATH -u "$shortmode_path"`
24926      new_path="$input_path"
24927    fi
24928  fi
24929
24930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24931  if test "x$test_cygdrive_prefix" = x; then
24932    # As a simple fix, exclude /usr/bin since it's not a real path.
24933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24935      # a path prefixed by /cygdrive for fixpath to work.
24936      new_path="$CYGWIN_ROOT_PATH$input_path"
24937    fi
24938  fi
24939
24940
24941  if test "x$path" != "x$new_path"; then
24942    BOOT_JDK="$new_path"
24943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24945  fi
24946
24947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24948
24949  path="$BOOT_JDK"
24950  has_colon=`$ECHO $path | $GREP ^.:`
24951  new_path="$path"
24952  if test "x$has_colon" = x; then
24953    # Not in mixed or Windows style, start by that.
24954    new_path=`cmd //c echo $path`
24955  fi
24956
24957
24958  input_path="$new_path"
24959  # Check if we need to convert this using DOS-style short mode. If the path
24960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24961  # take no chances and rewrite it.
24962  # Note: m4 eats our [], so we need to use [ and ] instead.
24963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24964  if test "x$has_forbidden_chars" != x; then
24965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24967  fi
24968
24969
24970  windows_path="$new_path"
24971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24972    unix_path=`$CYGPATH -u "$windows_path"`
24973    new_path="$unix_path"
24974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24976    new_path="$unix_path"
24977  fi
24978
24979  if test "x$path" != "x$new_path"; then
24980    BOOT_JDK="$new_path"
24981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24982$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24983  fi
24984
24985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24987
24988    else
24989      # We're on a unix platform. Hooray! :)
24990      path="$BOOT_JDK"
24991      has_space=`$ECHO "$path" | $GREP " "`
24992      if test "x$has_space" != x; then
24993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24994$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24996      fi
24997
24998      # Use eval to expand a potential ~
24999      eval path="$path"
25000      if test ! -f "$path" && test ! -d "$path"; then
25001        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25002      fi
25003
25004      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25005    fi
25006  fi
25007
25008            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25009$as_echo_n "checking for Boot JDK... " >&6; }
25010            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25011$as_echo "$BOOT_JDK" >&6; }
25012            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25013$as_echo_n "checking Boot JDK version... " >&6; }
25014            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25016$as_echo "$BOOT_JDK_VERSION" >&6; }
25017          fi # end check jdk version
25018        fi # end check javac
25019      fi # end check java
25020    fi # end check boot jdk found
25021  fi
25022
25023
25024  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25025
25026  if test "x$BOOT_JDK_FOUND" = xno; then
25027    # Now execute the test
25028
25029  # Extract the first word of "javac", so it can be a program name with args.
25030set dummy javac; ac_word=$2
25031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25032$as_echo_n "checking for $ac_word... " >&6; }
25033if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25034  $as_echo_n "(cached) " >&6
25035else
25036  case $JAVAC_CHECK in
25037  [\\/]* | ?:[\\/]*)
25038  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25039  ;;
25040  *)
25041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25042for as_dir in $PATH
25043do
25044  IFS=$as_save_IFS
25045  test -z "$as_dir" && as_dir=.
25046    for ac_exec_ext in '' $ac_executable_extensions; do
25047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25048    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25050    break 2
25051  fi
25052done
25053  done
25054IFS=$as_save_IFS
25055
25056  ;;
25057esac
25058fi
25059JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25060if test -n "$JAVAC_CHECK"; then
25061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25062$as_echo "$JAVAC_CHECK" >&6; }
25063else
25064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25065$as_echo "no" >&6; }
25066fi
25067
25068
25069  # Extract the first word of "java", so it can be a program name with args.
25070set dummy java; ac_word=$2
25071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25072$as_echo_n "checking for $ac_word... " >&6; }
25073if ${ac_cv_path_JAVA_CHECK+:} false; then :
25074  $as_echo_n "(cached) " >&6
25075else
25076  case $JAVA_CHECK in
25077  [\\/]* | ?:[\\/]*)
25078  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25079  ;;
25080  *)
25081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25082for as_dir in $PATH
25083do
25084  IFS=$as_save_IFS
25085  test -z "$as_dir" && as_dir=.
25086    for ac_exec_ext in '' $ac_executable_extensions; do
25087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25088    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25090    break 2
25091  fi
25092done
25093  done
25094IFS=$as_save_IFS
25095
25096  ;;
25097esac
25098fi
25099JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25100if test -n "$JAVA_CHECK"; then
25101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25102$as_echo "$JAVA_CHECK" >&6; }
25103else
25104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25105$as_echo "no" >&6; }
25106fi
25107
25108
25109  BINARY="$JAVAC_CHECK"
25110  if test "x$JAVAC_CHECK" = x; then
25111    BINARY="$JAVA_CHECK"
25112  fi
25113  if test "x$BINARY" != x; then
25114    # So there is a java(c) binary, it might be part of a JDK.
25115    # Lets find the JDK/JRE directory by following symbolic links.
25116    # Linux/GNU systems often have links from /usr/bin/java to
25117    # /etc/alternatives/java to the real JDK binary.
25118
25119  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25120    # Follow a chain of symbolic links. Use readlink
25121    # where it exists, else fall back to horribly
25122    # complicated shell code.
25123    if test "x$READLINK_TESTED" != yes; then
25124      # On MacOSX there is a readlink tool with a different
25125      # purpose than the GNU readlink tool. Check the found readlink.
25126      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25127      if test "x$ISGNU" = x; then
25128        # A readlink that we do not know how to use.
25129        # Are there other non-GNU readlinks out there?
25130        READLINK_TESTED=yes
25131        READLINK=
25132      fi
25133    fi
25134
25135    if test "x$READLINK" != x; then
25136      BINARY=`$READLINK -f $BINARY`
25137    else
25138      # Save the current directory for restoring afterwards
25139      STARTDIR=$PWD
25140      COUNTER=0
25141      sym_link_dir=`$DIRNAME $BINARY`
25142      sym_link_file=`$BASENAME $BINARY`
25143      cd $sym_link_dir
25144      # Use -P flag to resolve symlinks in directories.
25145      cd `$THEPWDCMD -P`
25146      sym_link_dir=`$THEPWDCMD -P`
25147      # Resolve file symlinks
25148      while test $COUNTER -lt 20; do
25149        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25150        if test "x$ISLINK" == x; then
25151          # This is not a symbolic link! We are done!
25152          break
25153        fi
25154        # Again resolve directory symlinks since the target of the just found
25155        # link could be in a different directory
25156        cd `$DIRNAME $ISLINK`
25157        sym_link_dir=`$THEPWDCMD -P`
25158        sym_link_file=`$BASENAME $ISLINK`
25159        let COUNTER=COUNTER+1
25160      done
25161      cd $STARTDIR
25162      BINARY=$sym_link_dir/$sym_link_file
25163    fi
25164  fi
25165
25166    BOOT_JDK=`dirname "$BINARY"`
25167    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25168    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25169      # Looks like we found ourselves an JDK
25170      BOOT_JDK_FOUND=maybe
25171      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25172$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25173    fi
25174  fi
25175
25176
25177    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25178    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25179      # Do we have a bin/java?
25180      if test ! -x "$BOOT_JDK/bin/java"; then
25181        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25183        BOOT_JDK_FOUND=no
25184      else
25185        # Do we have a bin/javac?
25186        if test ! -x "$BOOT_JDK/bin/javac"; then
25187          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25189          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25190$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25191          BOOT_JDK_FOUND=no
25192        else
25193          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25194          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25195
25196          # Extra M4 quote needed to protect [] in grep expression.
25197          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25198          if test "x$FOUND_CORRECT_VERSION" = x; then
25199            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25201            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25202$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25203            BOOT_JDK_FOUND=no
25204          else
25205            # We're done! :-)
25206            BOOT_JDK_FOUND=yes
25207
25208  # Only process if variable expands to non-empty
25209
25210  if test "x$BOOT_JDK" != x; then
25211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25212
25213  # Input might be given as Windows format, start by converting to
25214  # unix format.
25215  path="$BOOT_JDK"
25216  new_path=`$CYGPATH -u "$path"`
25217
25218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25221  # "foo.exe" is OK but "foo" is an error.
25222  #
25223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25224  # It is also a way to make sure we got the proper file name for the real test later on.
25225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25226  if test "x$test_shortpath" = x; then
25227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25228$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25229    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25230  fi
25231
25232  # Call helper function which possibly converts this using DOS-style short mode.
25233  # If so, the updated path is stored in $new_path.
25234
25235  input_path="$new_path"
25236  # Check if we need to convert this using DOS-style short mode. If the path
25237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25238  # take no chances and rewrite it.
25239  # Note: m4 eats our [], so we need to use [ and ] instead.
25240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25241  if test "x$has_forbidden_chars" != x; then
25242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25246      # Going to short mode and back again did indeed matter. Since short mode is
25247      # case insensitive, let's make it lowercase to improve readability.
25248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25249      # Now convert it back to Unix-style (cygpath)
25250      input_path=`$CYGPATH -u "$shortmode_path"`
25251      new_path="$input_path"
25252    fi
25253  fi
25254
25255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25256  if test "x$test_cygdrive_prefix" = x; then
25257    # As a simple fix, exclude /usr/bin since it's not a real path.
25258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25260      # a path prefixed by /cygdrive for fixpath to work.
25261      new_path="$CYGWIN_ROOT_PATH$input_path"
25262    fi
25263  fi
25264
25265
25266  if test "x$path" != "x$new_path"; then
25267    BOOT_JDK="$new_path"
25268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25270  fi
25271
25272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25273
25274  path="$BOOT_JDK"
25275  has_colon=`$ECHO $path | $GREP ^.:`
25276  new_path="$path"
25277  if test "x$has_colon" = x; then
25278    # Not in mixed or Windows style, start by that.
25279    new_path=`cmd //c echo $path`
25280  fi
25281
25282
25283  input_path="$new_path"
25284  # Check if we need to convert this using DOS-style short mode. If the path
25285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25286  # take no chances and rewrite it.
25287  # Note: m4 eats our [], so we need to use [ and ] instead.
25288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25289  if test "x$has_forbidden_chars" != x; then
25290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25292  fi
25293
25294
25295  windows_path="$new_path"
25296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25297    unix_path=`$CYGPATH -u "$windows_path"`
25298    new_path="$unix_path"
25299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25301    new_path="$unix_path"
25302  fi
25303
25304  if test "x$path" != "x$new_path"; then
25305    BOOT_JDK="$new_path"
25306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25308  fi
25309
25310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25312
25313    else
25314      # We're on a unix platform. Hooray! :)
25315      path="$BOOT_JDK"
25316      has_space=`$ECHO "$path" | $GREP " "`
25317      if test "x$has_space" != x; then
25318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25319$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25321      fi
25322
25323      # Use eval to expand a potential ~
25324      eval path="$path"
25325      if test ! -f "$path" && test ! -d "$path"; then
25326        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25327      fi
25328
25329      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25330    fi
25331  fi
25332
25333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25334$as_echo_n "checking for Boot JDK... " >&6; }
25335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25336$as_echo "$BOOT_JDK" >&6; }
25337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25338$as_echo_n "checking Boot JDK version... " >&6; }
25339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25341$as_echo "$BOOT_JDK_VERSION" >&6; }
25342          fi # end check jdk version
25343        fi # end check javac
25344      fi # end check java
25345    fi # end check boot jdk found
25346  fi
25347
25348
25349  # Test: Is there a JDK installed in default, well-known locations?
25350
25351  if test "x$BOOT_JDK_FOUND" = xno; then
25352    # Now execute the test
25353
25354  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25355
25356  if test "x$BOOT_JDK_FOUND" = xno; then
25357    # Now execute the test
25358
25359  if test "x$ProgramW6432" != x; then
25360    VIRTUAL_DIR="$ProgramW6432/Java"
25361
25362  windows_path="$VIRTUAL_DIR"
25363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25364    unix_path=`$CYGPATH -u "$windows_path"`
25365    VIRTUAL_DIR="$unix_path"
25366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25368    VIRTUAL_DIR="$unix_path"
25369  fi
25370
25371
25372  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25373  BOOT_JDK_SUFFIX=""
25374  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25375  if test "x$ALL_JDKS_FOUND" != x; then
25376    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25377
25378  if test "x$BOOT_JDK_FOUND" = xno; then
25379    # Now execute the test
25380
25381        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25382        if test -d "$BOOT_JDK"; then
25383          BOOT_JDK_FOUND=maybe
25384          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25385$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25386        fi
25387
25388
25389    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25390    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25391      # Do we have a bin/java?
25392      if test ! -x "$BOOT_JDK/bin/java"; then
25393        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25395        BOOT_JDK_FOUND=no
25396      else
25397        # Do we have a bin/javac?
25398        if test ! -x "$BOOT_JDK/bin/javac"; then
25399          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25401          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25402$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25403          BOOT_JDK_FOUND=no
25404        else
25405          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25406          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25407
25408          # Extra M4 quote needed to protect [] in grep expression.
25409          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25410          if test "x$FOUND_CORRECT_VERSION" = x; then
25411            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25413            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25414$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25415            BOOT_JDK_FOUND=no
25416          else
25417            # We're done! :-)
25418            BOOT_JDK_FOUND=yes
25419
25420  # Only process if variable expands to non-empty
25421
25422  if test "x$BOOT_JDK" != x; then
25423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25424
25425  # Input might be given as Windows format, start by converting to
25426  # unix format.
25427  path="$BOOT_JDK"
25428  new_path=`$CYGPATH -u "$path"`
25429
25430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25433  # "foo.exe" is OK but "foo" is an error.
25434  #
25435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25436  # It is also a way to make sure we got the proper file name for the real test later on.
25437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25438  if test "x$test_shortpath" = x; then
25439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25441    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25442  fi
25443
25444  # Call helper function which possibly converts this using DOS-style short mode.
25445  # If so, the updated path is stored in $new_path.
25446
25447  input_path="$new_path"
25448  # Check if we need to convert this using DOS-style short mode. If the path
25449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25450  # take no chances and rewrite it.
25451  # Note: m4 eats our [], so we need to use [ and ] instead.
25452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25453  if test "x$has_forbidden_chars" != x; then
25454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25458      # Going to short mode and back again did indeed matter. Since short mode is
25459      # case insensitive, let's make it lowercase to improve readability.
25460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25461      # Now convert it back to Unix-style (cygpath)
25462      input_path=`$CYGPATH -u "$shortmode_path"`
25463      new_path="$input_path"
25464    fi
25465  fi
25466
25467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25468  if test "x$test_cygdrive_prefix" = x; then
25469    # As a simple fix, exclude /usr/bin since it's not a real path.
25470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25472      # a path prefixed by /cygdrive for fixpath to work.
25473      new_path="$CYGWIN_ROOT_PATH$input_path"
25474    fi
25475  fi
25476
25477
25478  if test "x$path" != "x$new_path"; then
25479    BOOT_JDK="$new_path"
25480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25482  fi
25483
25484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25485
25486  path="$BOOT_JDK"
25487  has_colon=`$ECHO $path | $GREP ^.:`
25488  new_path="$path"
25489  if test "x$has_colon" = x; then
25490    # Not in mixed or Windows style, start by that.
25491    new_path=`cmd //c echo $path`
25492  fi
25493
25494
25495  input_path="$new_path"
25496  # Check if we need to convert this using DOS-style short mode. If the path
25497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25498  # take no chances and rewrite it.
25499  # Note: m4 eats our [], so we need to use [ and ] instead.
25500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25501  if test "x$has_forbidden_chars" != x; then
25502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25504  fi
25505
25506
25507  windows_path="$new_path"
25508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25509    unix_path=`$CYGPATH -u "$windows_path"`
25510    new_path="$unix_path"
25511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25513    new_path="$unix_path"
25514  fi
25515
25516  if test "x$path" != "x$new_path"; then
25517    BOOT_JDK="$new_path"
25518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25519$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25520  fi
25521
25522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25524
25525    else
25526      # We're on a unix platform. Hooray! :)
25527      path="$BOOT_JDK"
25528      has_space=`$ECHO "$path" | $GREP " "`
25529      if test "x$has_space" != x; then
25530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25532        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25533      fi
25534
25535      # Use eval to expand a potential ~
25536      eval path="$path"
25537      if test ! -f "$path" && test ! -d "$path"; then
25538        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25539      fi
25540
25541      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25542    fi
25543  fi
25544
25545            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25546$as_echo_n "checking for Boot JDK... " >&6; }
25547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25548$as_echo "$BOOT_JDK" >&6; }
25549            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25550$as_echo_n "checking Boot JDK version... " >&6; }
25551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25553$as_echo "$BOOT_JDK_VERSION" >&6; }
25554          fi # end check jdk version
25555        fi # end check javac
25556      fi # end check java
25557    fi # end check boot jdk found
25558  fi
25559
25560    done
25561  fi
25562
25563  fi
25564
25565
25566    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25567    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25568      # Do we have a bin/java?
25569      if test ! -x "$BOOT_JDK/bin/java"; then
25570        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25572        BOOT_JDK_FOUND=no
25573      else
25574        # Do we have a bin/javac?
25575        if test ! -x "$BOOT_JDK/bin/javac"; then
25576          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25578          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25579$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25580          BOOT_JDK_FOUND=no
25581        else
25582          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25583          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25584
25585          # Extra M4 quote needed to protect [] in grep expression.
25586          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25587          if test "x$FOUND_CORRECT_VERSION" = x; then
25588            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25590            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25591$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25592            BOOT_JDK_FOUND=no
25593          else
25594            # We're done! :-)
25595            BOOT_JDK_FOUND=yes
25596
25597  # Only process if variable expands to non-empty
25598
25599  if test "x$BOOT_JDK" != x; then
25600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25601
25602  # Input might be given as Windows format, start by converting to
25603  # unix format.
25604  path="$BOOT_JDK"
25605  new_path=`$CYGPATH -u "$path"`
25606
25607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25610  # "foo.exe" is OK but "foo" is an error.
25611  #
25612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25613  # It is also a way to make sure we got the proper file name for the real test later on.
25614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25615  if test "x$test_shortpath" = x; then
25616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25618    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25619  fi
25620
25621  # Call helper function which possibly converts this using DOS-style short mode.
25622  # If so, the updated path is stored in $new_path.
25623
25624  input_path="$new_path"
25625  # Check if we need to convert this using DOS-style short mode. If the path
25626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25627  # take no chances and rewrite it.
25628  # Note: m4 eats our [], so we need to use [ and ] instead.
25629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25630  if test "x$has_forbidden_chars" != x; then
25631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25635      # Going to short mode and back again did indeed matter. Since short mode is
25636      # case insensitive, let's make it lowercase to improve readability.
25637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25638      # Now convert it back to Unix-style (cygpath)
25639      input_path=`$CYGPATH -u "$shortmode_path"`
25640      new_path="$input_path"
25641    fi
25642  fi
25643
25644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25645  if test "x$test_cygdrive_prefix" = x; then
25646    # As a simple fix, exclude /usr/bin since it's not a real path.
25647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25649      # a path prefixed by /cygdrive for fixpath to work.
25650      new_path="$CYGWIN_ROOT_PATH$input_path"
25651    fi
25652  fi
25653
25654
25655  if test "x$path" != "x$new_path"; then
25656    BOOT_JDK="$new_path"
25657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25659  fi
25660
25661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25662
25663  path="$BOOT_JDK"
25664  has_colon=`$ECHO $path | $GREP ^.:`
25665  new_path="$path"
25666  if test "x$has_colon" = x; then
25667    # Not in mixed or Windows style, start by that.
25668    new_path=`cmd //c echo $path`
25669  fi
25670
25671
25672  input_path="$new_path"
25673  # Check if we need to convert this using DOS-style short mode. If the path
25674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25675  # take no chances and rewrite it.
25676  # Note: m4 eats our [], so we need to use [ and ] instead.
25677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25678  if test "x$has_forbidden_chars" != x; then
25679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25681  fi
25682
25683
25684  windows_path="$new_path"
25685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25686    unix_path=`$CYGPATH -u "$windows_path"`
25687    new_path="$unix_path"
25688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25690    new_path="$unix_path"
25691  fi
25692
25693  if test "x$path" != "x$new_path"; then
25694    BOOT_JDK="$new_path"
25695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25697  fi
25698
25699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25701
25702    else
25703      # We're on a unix platform. Hooray! :)
25704      path="$BOOT_JDK"
25705      has_space=`$ECHO "$path" | $GREP " "`
25706      if test "x$has_space" != x; then
25707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25710      fi
25711
25712      # Use eval to expand a potential ~
25713      eval path="$path"
25714      if test ! -f "$path" && test ! -d "$path"; then
25715        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25716      fi
25717
25718      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25719    fi
25720  fi
25721
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25723$as_echo_n "checking for Boot JDK... " >&6; }
25724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25725$as_echo "$BOOT_JDK" >&6; }
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25727$as_echo_n "checking Boot JDK version... " >&6; }
25728            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25730$as_echo "$BOOT_JDK_VERSION" >&6; }
25731          fi # end check jdk version
25732        fi # end check javac
25733      fi # end check java
25734    fi # end check boot jdk found
25735  fi
25736
25737
25738  if test "x$BOOT_JDK_FOUND" = xno; then
25739    # Now execute the test
25740
25741  if test "x$PROGRAMW6432" != x; then
25742    VIRTUAL_DIR="$PROGRAMW6432/Java"
25743
25744  windows_path="$VIRTUAL_DIR"
25745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25746    unix_path=`$CYGPATH -u "$windows_path"`
25747    VIRTUAL_DIR="$unix_path"
25748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25750    VIRTUAL_DIR="$unix_path"
25751  fi
25752
25753
25754  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25755  BOOT_JDK_SUFFIX=""
25756  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25757  if test "x$ALL_JDKS_FOUND" != x; then
25758    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25759
25760  if test "x$BOOT_JDK_FOUND" = xno; then
25761    # Now execute the test
25762
25763        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25764        if test -d "$BOOT_JDK"; then
25765          BOOT_JDK_FOUND=maybe
25766          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25767$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25768        fi
25769
25770
25771    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25772    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25773      # Do we have a bin/java?
25774      if test ! -x "$BOOT_JDK/bin/java"; then
25775        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25777        BOOT_JDK_FOUND=no
25778      else
25779        # Do we have a bin/javac?
25780        if test ! -x "$BOOT_JDK/bin/javac"; then
25781          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25783          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25784$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25785          BOOT_JDK_FOUND=no
25786        else
25787          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25788          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25789
25790          # Extra M4 quote needed to protect [] in grep expression.
25791          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25792          if test "x$FOUND_CORRECT_VERSION" = x; then
25793            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25795            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25796$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25797            BOOT_JDK_FOUND=no
25798          else
25799            # We're done! :-)
25800            BOOT_JDK_FOUND=yes
25801
25802  # Only process if variable expands to non-empty
25803
25804  if test "x$BOOT_JDK" != x; then
25805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25806
25807  # Input might be given as Windows format, start by converting to
25808  # unix format.
25809  path="$BOOT_JDK"
25810  new_path=`$CYGPATH -u "$path"`
25811
25812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25815  # "foo.exe" is OK but "foo" is an error.
25816  #
25817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25818  # It is also a way to make sure we got the proper file name for the real test later on.
25819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25820  if test "x$test_shortpath" = x; then
25821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25823    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25824  fi
25825
25826  # Call helper function which possibly converts this using DOS-style short mode.
25827  # If so, the updated path is stored in $new_path.
25828
25829  input_path="$new_path"
25830  # Check if we need to convert this using DOS-style short mode. If the path
25831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25832  # take no chances and rewrite it.
25833  # Note: m4 eats our [], so we need to use [ and ] instead.
25834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25835  if test "x$has_forbidden_chars" != x; then
25836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25840      # Going to short mode and back again did indeed matter. Since short mode is
25841      # case insensitive, let's make it lowercase to improve readability.
25842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25843      # Now convert it back to Unix-style (cygpath)
25844      input_path=`$CYGPATH -u "$shortmode_path"`
25845      new_path="$input_path"
25846    fi
25847  fi
25848
25849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25850  if test "x$test_cygdrive_prefix" = x; then
25851    # As a simple fix, exclude /usr/bin since it's not a real path.
25852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25854      # a path prefixed by /cygdrive for fixpath to work.
25855      new_path="$CYGWIN_ROOT_PATH$input_path"
25856    fi
25857  fi
25858
25859
25860  if test "x$path" != "x$new_path"; then
25861    BOOT_JDK="$new_path"
25862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25864  fi
25865
25866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25867
25868  path="$BOOT_JDK"
25869  has_colon=`$ECHO $path | $GREP ^.:`
25870  new_path="$path"
25871  if test "x$has_colon" = x; then
25872    # Not in mixed or Windows style, start by that.
25873    new_path=`cmd //c echo $path`
25874  fi
25875
25876
25877  input_path="$new_path"
25878  # Check if we need to convert this using DOS-style short mode. If the path
25879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25880  # take no chances and rewrite it.
25881  # Note: m4 eats our [], so we need to use [ and ] instead.
25882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25883  if test "x$has_forbidden_chars" != x; then
25884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25886  fi
25887
25888
25889  windows_path="$new_path"
25890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25891    unix_path=`$CYGPATH -u "$windows_path"`
25892    new_path="$unix_path"
25893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25895    new_path="$unix_path"
25896  fi
25897
25898  if test "x$path" != "x$new_path"; then
25899    BOOT_JDK="$new_path"
25900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25902  fi
25903
25904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25906
25907    else
25908      # We're on a unix platform. Hooray! :)
25909      path="$BOOT_JDK"
25910      has_space=`$ECHO "$path" | $GREP " "`
25911      if test "x$has_space" != x; then
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25914        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25915      fi
25916
25917      # Use eval to expand a potential ~
25918      eval path="$path"
25919      if test ! -f "$path" && test ! -d "$path"; then
25920        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25921      fi
25922
25923      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25924    fi
25925  fi
25926
25927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25928$as_echo_n "checking for Boot JDK... " >&6; }
25929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25930$as_echo "$BOOT_JDK" >&6; }
25931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25932$as_echo_n "checking Boot JDK version... " >&6; }
25933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25935$as_echo "$BOOT_JDK_VERSION" >&6; }
25936          fi # end check jdk version
25937        fi # end check javac
25938      fi # end check java
25939    fi # end check boot jdk found
25940  fi
25941
25942    done
25943  fi
25944
25945  fi
25946
25947
25948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25950      # Do we have a bin/java?
25951      if test ! -x "$BOOT_JDK/bin/java"; then
25952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25954        BOOT_JDK_FOUND=no
25955      else
25956        # Do we have a bin/javac?
25957        if test ! -x "$BOOT_JDK/bin/javac"; then
25958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25962          BOOT_JDK_FOUND=no
25963        else
25964          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25965          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25966
25967          # Extra M4 quote needed to protect [] in grep expression.
25968          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25969          if test "x$FOUND_CORRECT_VERSION" = x; then
25970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25972            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25973$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25974            BOOT_JDK_FOUND=no
25975          else
25976            # We're done! :-)
25977            BOOT_JDK_FOUND=yes
25978
25979  # Only process if variable expands to non-empty
25980
25981  if test "x$BOOT_JDK" != x; then
25982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25983
25984  # Input might be given as Windows format, start by converting to
25985  # unix format.
25986  path="$BOOT_JDK"
25987  new_path=`$CYGPATH -u "$path"`
25988
25989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25992  # "foo.exe" is OK but "foo" is an error.
25993  #
25994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25995  # It is also a way to make sure we got the proper file name for the real test later on.
25996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25997  if test "x$test_shortpath" = x; then
25998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26000    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26001  fi
26002
26003  # Call helper function which possibly converts this using DOS-style short mode.
26004  # If so, the updated path is stored in $new_path.
26005
26006  input_path="$new_path"
26007  # Check if we need to convert this using DOS-style short mode. If the path
26008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26009  # take no chances and rewrite it.
26010  # Note: m4 eats our [], so we need to use [ and ] instead.
26011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26012  if test "x$has_forbidden_chars" != x; then
26013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26017      # Going to short mode and back again did indeed matter. Since short mode is
26018      # case insensitive, let's make it lowercase to improve readability.
26019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26020      # Now convert it back to Unix-style (cygpath)
26021      input_path=`$CYGPATH -u "$shortmode_path"`
26022      new_path="$input_path"
26023    fi
26024  fi
26025
26026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26027  if test "x$test_cygdrive_prefix" = x; then
26028    # As a simple fix, exclude /usr/bin since it's not a real path.
26029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26031      # a path prefixed by /cygdrive for fixpath to work.
26032      new_path="$CYGWIN_ROOT_PATH$input_path"
26033    fi
26034  fi
26035
26036
26037  if test "x$path" != "x$new_path"; then
26038    BOOT_JDK="$new_path"
26039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26041  fi
26042
26043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26044
26045  path="$BOOT_JDK"
26046  has_colon=`$ECHO $path | $GREP ^.:`
26047  new_path="$path"
26048  if test "x$has_colon" = x; then
26049    # Not in mixed or Windows style, start by that.
26050    new_path=`cmd //c echo $path`
26051  fi
26052
26053
26054  input_path="$new_path"
26055  # Check if we need to convert this using DOS-style short mode. If the path
26056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26057  # take no chances and rewrite it.
26058  # Note: m4 eats our [], so we need to use [ and ] instead.
26059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26060  if test "x$has_forbidden_chars" != x; then
26061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26063  fi
26064
26065
26066  windows_path="$new_path"
26067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26068    unix_path=`$CYGPATH -u "$windows_path"`
26069    new_path="$unix_path"
26070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26072    new_path="$unix_path"
26073  fi
26074
26075  if test "x$path" != "x$new_path"; then
26076    BOOT_JDK="$new_path"
26077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26079  fi
26080
26081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26083
26084    else
26085      # We're on a unix platform. Hooray! :)
26086      path="$BOOT_JDK"
26087      has_space=`$ECHO "$path" | $GREP " "`
26088      if test "x$has_space" != x; then
26089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26092      fi
26093
26094      # Use eval to expand a potential ~
26095      eval path="$path"
26096      if test ! -f "$path" && test ! -d "$path"; then
26097        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26098      fi
26099
26100      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26101    fi
26102  fi
26103
26104            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26105$as_echo_n "checking for Boot JDK... " >&6; }
26106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26107$as_echo "$BOOT_JDK" >&6; }
26108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26109$as_echo_n "checking Boot JDK version... " >&6; }
26110            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26111            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26112$as_echo "$BOOT_JDK_VERSION" >&6; }
26113          fi # end check jdk version
26114        fi # end check javac
26115      fi # end check java
26116    fi # end check boot jdk found
26117  fi
26118
26119
26120  if test "x$BOOT_JDK_FOUND" = xno; then
26121    # Now execute the test
26122
26123  if test "x$PROGRAMFILES" != x; then
26124    VIRTUAL_DIR="$PROGRAMFILES/Java"
26125
26126  windows_path="$VIRTUAL_DIR"
26127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26128    unix_path=`$CYGPATH -u "$windows_path"`
26129    VIRTUAL_DIR="$unix_path"
26130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26132    VIRTUAL_DIR="$unix_path"
26133  fi
26134
26135
26136  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26137  BOOT_JDK_SUFFIX=""
26138  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26139  if test "x$ALL_JDKS_FOUND" != x; then
26140    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26141
26142  if test "x$BOOT_JDK_FOUND" = xno; then
26143    # Now execute the test
26144
26145        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26146        if test -d "$BOOT_JDK"; then
26147          BOOT_JDK_FOUND=maybe
26148          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26149$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26150        fi
26151
26152
26153    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26154    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26155      # Do we have a bin/java?
26156      if test ! -x "$BOOT_JDK/bin/java"; then
26157        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26159        BOOT_JDK_FOUND=no
26160      else
26161        # Do we have a bin/javac?
26162        if test ! -x "$BOOT_JDK/bin/javac"; then
26163          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26165          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26166$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26167          BOOT_JDK_FOUND=no
26168        else
26169          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26170          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26171
26172          # Extra M4 quote needed to protect [] in grep expression.
26173          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26174          if test "x$FOUND_CORRECT_VERSION" = x; then
26175            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26177            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26178$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26179            BOOT_JDK_FOUND=no
26180          else
26181            # We're done! :-)
26182            BOOT_JDK_FOUND=yes
26183
26184  # Only process if variable expands to non-empty
26185
26186  if test "x$BOOT_JDK" != x; then
26187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26188
26189  # Input might be given as Windows format, start by converting to
26190  # unix format.
26191  path="$BOOT_JDK"
26192  new_path=`$CYGPATH -u "$path"`
26193
26194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26197  # "foo.exe" is OK but "foo" is an error.
26198  #
26199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26200  # It is also a way to make sure we got the proper file name for the real test later on.
26201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26202  if test "x$test_shortpath" = x; then
26203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26204$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26205    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26206  fi
26207
26208  # Call helper function which possibly converts this using DOS-style short mode.
26209  # If so, the updated path is stored in $new_path.
26210
26211  input_path="$new_path"
26212  # Check if we need to convert this using DOS-style short mode. If the path
26213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26214  # take no chances and rewrite it.
26215  # Note: m4 eats our [], so we need to use [ and ] instead.
26216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26217  if test "x$has_forbidden_chars" != x; then
26218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26222      # Going to short mode and back again did indeed matter. Since short mode is
26223      # case insensitive, let's make it lowercase to improve readability.
26224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26225      # Now convert it back to Unix-style (cygpath)
26226      input_path=`$CYGPATH -u "$shortmode_path"`
26227      new_path="$input_path"
26228    fi
26229  fi
26230
26231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26232  if test "x$test_cygdrive_prefix" = x; then
26233    # As a simple fix, exclude /usr/bin since it's not a real path.
26234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26236      # a path prefixed by /cygdrive for fixpath to work.
26237      new_path="$CYGWIN_ROOT_PATH$input_path"
26238    fi
26239  fi
26240
26241
26242  if test "x$path" != "x$new_path"; then
26243    BOOT_JDK="$new_path"
26244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26245$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26246  fi
26247
26248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26249
26250  path="$BOOT_JDK"
26251  has_colon=`$ECHO $path | $GREP ^.:`
26252  new_path="$path"
26253  if test "x$has_colon" = x; then
26254    # Not in mixed or Windows style, start by that.
26255    new_path=`cmd //c echo $path`
26256  fi
26257
26258
26259  input_path="$new_path"
26260  # Check if we need to convert this using DOS-style short mode. If the path
26261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26262  # take no chances and rewrite it.
26263  # Note: m4 eats our [], so we need to use [ and ] instead.
26264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26265  if test "x$has_forbidden_chars" != x; then
26266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26268  fi
26269
26270
26271  windows_path="$new_path"
26272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26273    unix_path=`$CYGPATH -u "$windows_path"`
26274    new_path="$unix_path"
26275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26277    new_path="$unix_path"
26278  fi
26279
26280  if test "x$path" != "x$new_path"; then
26281    BOOT_JDK="$new_path"
26282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26284  fi
26285
26286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26288
26289    else
26290      # We're on a unix platform. Hooray! :)
26291      path="$BOOT_JDK"
26292      has_space=`$ECHO "$path" | $GREP " "`
26293      if test "x$has_space" != x; then
26294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26295$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26296        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26297      fi
26298
26299      # Use eval to expand a potential ~
26300      eval path="$path"
26301      if test ! -f "$path" && test ! -d "$path"; then
26302        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26303      fi
26304
26305      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26306    fi
26307  fi
26308
26309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26310$as_echo_n "checking for Boot JDK... " >&6; }
26311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26312$as_echo "$BOOT_JDK" >&6; }
26313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26314$as_echo_n "checking Boot JDK version... " >&6; }
26315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26317$as_echo "$BOOT_JDK_VERSION" >&6; }
26318          fi # end check jdk version
26319        fi # end check javac
26320      fi # end check java
26321    fi # end check boot jdk found
26322  fi
26323
26324    done
26325  fi
26326
26327  fi
26328
26329
26330    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26331    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26332      # Do we have a bin/java?
26333      if test ! -x "$BOOT_JDK/bin/java"; then
26334        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26336        BOOT_JDK_FOUND=no
26337      else
26338        # Do we have a bin/javac?
26339        if test ! -x "$BOOT_JDK/bin/javac"; then
26340          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26342          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26343$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26344          BOOT_JDK_FOUND=no
26345        else
26346          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26347          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26348
26349          # Extra M4 quote needed to protect [] in grep expression.
26350          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26351          if test "x$FOUND_CORRECT_VERSION" = x; then
26352            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26354            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26355$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26356            BOOT_JDK_FOUND=no
26357          else
26358            # We're done! :-)
26359            BOOT_JDK_FOUND=yes
26360
26361  # Only process if variable expands to non-empty
26362
26363  if test "x$BOOT_JDK" != x; then
26364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26365
26366  # Input might be given as Windows format, start by converting to
26367  # unix format.
26368  path="$BOOT_JDK"
26369  new_path=`$CYGPATH -u "$path"`
26370
26371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26374  # "foo.exe" is OK but "foo" is an error.
26375  #
26376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26377  # It is also a way to make sure we got the proper file name for the real test later on.
26378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26379  if test "x$test_shortpath" = x; then
26380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26382    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26383  fi
26384
26385  # Call helper function which possibly converts this using DOS-style short mode.
26386  # If so, the updated path is stored in $new_path.
26387
26388  input_path="$new_path"
26389  # Check if we need to convert this using DOS-style short mode. If the path
26390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26391  # take no chances and rewrite it.
26392  # Note: m4 eats our [], so we need to use [ and ] instead.
26393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26394  if test "x$has_forbidden_chars" != x; then
26395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26399      # Going to short mode and back again did indeed matter. Since short mode is
26400      # case insensitive, let's make it lowercase to improve readability.
26401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26402      # Now convert it back to Unix-style (cygpath)
26403      input_path=`$CYGPATH -u "$shortmode_path"`
26404      new_path="$input_path"
26405    fi
26406  fi
26407
26408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26409  if test "x$test_cygdrive_prefix" = x; then
26410    # As a simple fix, exclude /usr/bin since it's not a real path.
26411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26413      # a path prefixed by /cygdrive for fixpath to work.
26414      new_path="$CYGWIN_ROOT_PATH$input_path"
26415    fi
26416  fi
26417
26418
26419  if test "x$path" != "x$new_path"; then
26420    BOOT_JDK="$new_path"
26421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26423  fi
26424
26425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26426
26427  path="$BOOT_JDK"
26428  has_colon=`$ECHO $path | $GREP ^.:`
26429  new_path="$path"
26430  if test "x$has_colon" = x; then
26431    # Not in mixed or Windows style, start by that.
26432    new_path=`cmd //c echo $path`
26433  fi
26434
26435
26436  input_path="$new_path"
26437  # Check if we need to convert this using DOS-style short mode. If the path
26438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26439  # take no chances and rewrite it.
26440  # Note: m4 eats our [], so we need to use [ and ] instead.
26441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26442  if test "x$has_forbidden_chars" != x; then
26443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26445  fi
26446
26447
26448  windows_path="$new_path"
26449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26450    unix_path=`$CYGPATH -u "$windows_path"`
26451    new_path="$unix_path"
26452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26454    new_path="$unix_path"
26455  fi
26456
26457  if test "x$path" != "x$new_path"; then
26458    BOOT_JDK="$new_path"
26459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26461  fi
26462
26463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26465
26466    else
26467      # We're on a unix platform. Hooray! :)
26468      path="$BOOT_JDK"
26469      has_space=`$ECHO "$path" | $GREP " "`
26470      if test "x$has_space" != x; then
26471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26474      fi
26475
26476      # Use eval to expand a potential ~
26477      eval path="$path"
26478      if test ! -f "$path" && test ! -d "$path"; then
26479        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26480      fi
26481
26482      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26483    fi
26484  fi
26485
26486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26487$as_echo_n "checking for Boot JDK... " >&6; }
26488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26489$as_echo "$BOOT_JDK" >&6; }
26490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26491$as_echo_n "checking Boot JDK version... " >&6; }
26492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26494$as_echo "$BOOT_JDK_VERSION" >&6; }
26495          fi # end check jdk version
26496        fi # end check javac
26497      fi # end check java
26498    fi # end check boot jdk found
26499  fi
26500
26501
26502  if test "x$BOOT_JDK_FOUND" = xno; then
26503    # Now execute the test
26504
26505  if test "x$ProgramFiles" != x; then
26506    VIRTUAL_DIR="$ProgramFiles/Java"
26507
26508  windows_path="$VIRTUAL_DIR"
26509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26510    unix_path=`$CYGPATH -u "$windows_path"`
26511    VIRTUAL_DIR="$unix_path"
26512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26514    VIRTUAL_DIR="$unix_path"
26515  fi
26516
26517
26518  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26519  BOOT_JDK_SUFFIX=""
26520  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26521  if test "x$ALL_JDKS_FOUND" != x; then
26522    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26523
26524  if test "x$BOOT_JDK_FOUND" = xno; then
26525    # Now execute the test
26526
26527        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26528        if test -d "$BOOT_JDK"; then
26529          BOOT_JDK_FOUND=maybe
26530          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26531$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26532        fi
26533
26534
26535    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26536    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26537      # Do we have a bin/java?
26538      if test ! -x "$BOOT_JDK/bin/java"; then
26539        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26541        BOOT_JDK_FOUND=no
26542      else
26543        # Do we have a bin/javac?
26544        if test ! -x "$BOOT_JDK/bin/javac"; then
26545          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26547          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26548$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26549          BOOT_JDK_FOUND=no
26550        else
26551          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26552          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26553
26554          # Extra M4 quote needed to protect [] in grep expression.
26555          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26556          if test "x$FOUND_CORRECT_VERSION" = x; then
26557            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26559            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26560$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26561            BOOT_JDK_FOUND=no
26562          else
26563            # We're done! :-)
26564            BOOT_JDK_FOUND=yes
26565
26566  # Only process if variable expands to non-empty
26567
26568  if test "x$BOOT_JDK" != x; then
26569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26570
26571  # Input might be given as Windows format, start by converting to
26572  # unix format.
26573  path="$BOOT_JDK"
26574  new_path=`$CYGPATH -u "$path"`
26575
26576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26579  # "foo.exe" is OK but "foo" is an error.
26580  #
26581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26582  # It is also a way to make sure we got the proper file name for the real test later on.
26583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26584  if test "x$test_shortpath" = x; then
26585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26587    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26588  fi
26589
26590  # Call helper function which possibly converts this using DOS-style short mode.
26591  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26604      # Going to short mode and back again did indeed matter. Since short mode is
26605      # case insensitive, let's make it lowercase to improve readability.
26606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26607      # Now convert it back to Unix-style (cygpath)
26608      input_path=`$CYGPATH -u "$shortmode_path"`
26609      new_path="$input_path"
26610    fi
26611  fi
26612
26613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26614  if test "x$test_cygdrive_prefix" = x; then
26615    # As a simple fix, exclude /usr/bin since it's not a real path.
26616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26618      # a path prefixed by /cygdrive for fixpath to work.
26619      new_path="$CYGWIN_ROOT_PATH$input_path"
26620    fi
26621  fi
26622
26623
26624  if test "x$path" != "x$new_path"; then
26625    BOOT_JDK="$new_path"
26626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26627$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26628  fi
26629
26630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26631
26632  path="$BOOT_JDK"
26633  has_colon=`$ECHO $path | $GREP ^.:`
26634  new_path="$path"
26635  if test "x$has_colon" = x; then
26636    # Not in mixed or Windows style, start by that.
26637    new_path=`cmd //c echo $path`
26638  fi
26639
26640
26641  input_path="$new_path"
26642  # Check if we need to convert this using DOS-style short mode. If the path
26643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26644  # take no chances and rewrite it.
26645  # Note: m4 eats our [], so we need to use [ and ] instead.
26646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26647  if test "x$has_forbidden_chars" != x; then
26648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26650  fi
26651
26652
26653  windows_path="$new_path"
26654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26655    unix_path=`$CYGPATH -u "$windows_path"`
26656    new_path="$unix_path"
26657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26659    new_path="$unix_path"
26660  fi
26661
26662  if test "x$path" != "x$new_path"; then
26663    BOOT_JDK="$new_path"
26664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26665$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26666  fi
26667
26668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26670
26671    else
26672      # We're on a unix platform. Hooray! :)
26673      path="$BOOT_JDK"
26674      has_space=`$ECHO "$path" | $GREP " "`
26675      if test "x$has_space" != x; then
26676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26677$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26678        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26679      fi
26680
26681      # Use eval to expand a potential ~
26682      eval path="$path"
26683      if test ! -f "$path" && test ! -d "$path"; then
26684        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26685      fi
26686
26687      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26688    fi
26689  fi
26690
26691            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26692$as_echo_n "checking for Boot JDK... " >&6; }
26693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26694$as_echo "$BOOT_JDK" >&6; }
26695            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26696$as_echo_n "checking Boot JDK version... " >&6; }
26697            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26698            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26699$as_echo "$BOOT_JDK_VERSION" >&6; }
26700          fi # end check jdk version
26701        fi # end check javac
26702      fi # end check java
26703    fi # end check boot jdk found
26704  fi
26705
26706    done
26707  fi
26708
26709  fi
26710
26711
26712    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26713    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26714      # Do we have a bin/java?
26715      if test ! -x "$BOOT_JDK/bin/java"; then
26716        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26718        BOOT_JDK_FOUND=no
26719      else
26720        # Do we have a bin/javac?
26721        if test ! -x "$BOOT_JDK/bin/javac"; then
26722          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26724          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26725$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26726          BOOT_JDK_FOUND=no
26727        else
26728          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26729          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26730
26731          # Extra M4 quote needed to protect [] in grep expression.
26732          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26733          if test "x$FOUND_CORRECT_VERSION" = x; then
26734            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26736            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26737$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26738            BOOT_JDK_FOUND=no
26739          else
26740            # We're done! :-)
26741            BOOT_JDK_FOUND=yes
26742
26743  # Only process if variable expands to non-empty
26744
26745  if test "x$BOOT_JDK" != x; then
26746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26747
26748  # Input might be given as Windows format, start by converting to
26749  # unix format.
26750  path="$BOOT_JDK"
26751  new_path=`$CYGPATH -u "$path"`
26752
26753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26756  # "foo.exe" is OK but "foo" is an error.
26757  #
26758  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26759  # It is also a way to make sure we got the proper file name for the real test later on.
26760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26761  if test "x$test_shortpath" = x; then
26762    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26763$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26764    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26765  fi
26766
26767  # Call helper function which possibly converts this using DOS-style short mode.
26768  # If so, the updated path is stored in $new_path.
26769
26770  input_path="$new_path"
26771  # Check if we need to convert this using DOS-style short mode. If the path
26772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26773  # take no chances and rewrite it.
26774  # Note: m4 eats our [], so we need to use [ and ] instead.
26775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26776  if test "x$has_forbidden_chars" != x; then
26777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26781      # Going to short mode and back again did indeed matter. Since short mode is
26782      # case insensitive, let's make it lowercase to improve readability.
26783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26784      # Now convert it back to Unix-style (cygpath)
26785      input_path=`$CYGPATH -u "$shortmode_path"`
26786      new_path="$input_path"
26787    fi
26788  fi
26789
26790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26791  if test "x$test_cygdrive_prefix" = x; then
26792    # As a simple fix, exclude /usr/bin since it's not a real path.
26793    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26795      # a path prefixed by /cygdrive for fixpath to work.
26796      new_path="$CYGWIN_ROOT_PATH$input_path"
26797    fi
26798  fi
26799
26800
26801  if test "x$path" != "x$new_path"; then
26802    BOOT_JDK="$new_path"
26803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26805  fi
26806
26807    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26808
26809  path="$BOOT_JDK"
26810  has_colon=`$ECHO $path | $GREP ^.:`
26811  new_path="$path"
26812  if test "x$has_colon" = x; then
26813    # Not in mixed or Windows style, start by that.
26814    new_path=`cmd //c echo $path`
26815  fi
26816
26817
26818  input_path="$new_path"
26819  # Check if we need to convert this using DOS-style short mode. If the path
26820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26821  # take no chances and rewrite it.
26822  # Note: m4 eats our [], so we need to use [ and ] instead.
26823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26824  if test "x$has_forbidden_chars" != x; then
26825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26827  fi
26828
26829
26830  windows_path="$new_path"
26831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26832    unix_path=`$CYGPATH -u "$windows_path"`
26833    new_path="$unix_path"
26834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26836    new_path="$unix_path"
26837  fi
26838
26839  if test "x$path" != "x$new_path"; then
26840    BOOT_JDK="$new_path"
26841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26843  fi
26844
26845  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26846  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26847
26848    else
26849      # We're on a unix platform. Hooray! :)
26850      path="$BOOT_JDK"
26851      has_space=`$ECHO "$path" | $GREP " "`
26852      if test "x$has_space" != x; then
26853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26855        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26856      fi
26857
26858      # Use eval to expand a potential ~
26859      eval path="$path"
26860      if test ! -f "$path" && test ! -d "$path"; then
26861        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26862      fi
26863
26864      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26865    fi
26866  fi
26867
26868            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26869$as_echo_n "checking for Boot JDK... " >&6; }
26870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26871$as_echo "$BOOT_JDK" >&6; }
26872            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26873$as_echo_n "checking Boot JDK version... " >&6; }
26874            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26876$as_echo "$BOOT_JDK_VERSION" >&6; }
26877          fi # end check jdk version
26878        fi # end check javac
26879      fi # end check java
26880    fi # end check boot jdk found
26881  fi
26882
26883
26884  if test "x$BOOT_JDK_FOUND" = xno; then
26885    # Now execute the test
26886
26887  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26888  BOOT_JDK_SUFFIX=""
26889  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26890  if test "x$ALL_JDKS_FOUND" != x; then
26891    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26892
26893  if test "x$BOOT_JDK_FOUND" = xno; then
26894    # Now execute the test
26895
26896        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26897        if test -d "$BOOT_JDK"; then
26898          BOOT_JDK_FOUND=maybe
26899          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26900$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26901        fi
26902
26903
26904    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26905    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26906      # Do we have a bin/java?
26907      if test ! -x "$BOOT_JDK/bin/java"; then
26908        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26910        BOOT_JDK_FOUND=no
26911      else
26912        # Do we have a bin/javac?
26913        if test ! -x "$BOOT_JDK/bin/javac"; then
26914          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26916          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26917$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26918          BOOT_JDK_FOUND=no
26919        else
26920          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26921          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26922
26923          # Extra M4 quote needed to protect [] in grep expression.
26924          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26925          if test "x$FOUND_CORRECT_VERSION" = x; then
26926            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26928            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26929$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26930            BOOT_JDK_FOUND=no
26931          else
26932            # We're done! :-)
26933            BOOT_JDK_FOUND=yes
26934
26935  # Only process if variable expands to non-empty
26936
26937  if test "x$BOOT_JDK" != x; then
26938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26939
26940  # Input might be given as Windows format, start by converting to
26941  # unix format.
26942  path="$BOOT_JDK"
26943  new_path=`$CYGPATH -u "$path"`
26944
26945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26948  # "foo.exe" is OK but "foo" is an error.
26949  #
26950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26951  # It is also a way to make sure we got the proper file name for the real test later on.
26952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26953  if test "x$test_shortpath" = x; then
26954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26956    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26957  fi
26958
26959  # Call helper function which possibly converts this using DOS-style short mode.
26960  # If so, the updated path is stored in $new_path.
26961
26962  input_path="$new_path"
26963  # Check if we need to convert this using DOS-style short mode. If the path
26964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26965  # take no chances and rewrite it.
26966  # Note: m4 eats our [], so we need to use [ and ] instead.
26967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26968  if test "x$has_forbidden_chars" != x; then
26969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26973      # Going to short mode and back again did indeed matter. Since short mode is
26974      # case insensitive, let's make it lowercase to improve readability.
26975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26976      # Now convert it back to Unix-style (cygpath)
26977      input_path=`$CYGPATH -u "$shortmode_path"`
26978      new_path="$input_path"
26979    fi
26980  fi
26981
26982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26983  if test "x$test_cygdrive_prefix" = x; then
26984    # As a simple fix, exclude /usr/bin since it's not a real path.
26985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26987      # a path prefixed by /cygdrive for fixpath to work.
26988      new_path="$CYGWIN_ROOT_PATH$input_path"
26989    fi
26990  fi
26991
26992
26993  if test "x$path" != "x$new_path"; then
26994    BOOT_JDK="$new_path"
26995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26997  fi
26998
26999    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27000
27001  path="$BOOT_JDK"
27002  has_colon=`$ECHO $path | $GREP ^.:`
27003  new_path="$path"
27004  if test "x$has_colon" = x; then
27005    # Not in mixed or Windows style, start by that.
27006    new_path=`cmd //c echo $path`
27007  fi
27008
27009
27010  input_path="$new_path"
27011  # Check if we need to convert this using DOS-style short mode. If the path
27012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27013  # take no chances and rewrite it.
27014  # Note: m4 eats our [], so we need to use [ and ] instead.
27015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27016  if test "x$has_forbidden_chars" != x; then
27017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27019  fi
27020
27021
27022  windows_path="$new_path"
27023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27024    unix_path=`$CYGPATH -u "$windows_path"`
27025    new_path="$unix_path"
27026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27028    new_path="$unix_path"
27029  fi
27030
27031  if test "x$path" != "x$new_path"; then
27032    BOOT_JDK="$new_path"
27033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27035  fi
27036
27037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27039
27040    else
27041      # We're on a unix platform. Hooray! :)
27042      path="$BOOT_JDK"
27043      has_space=`$ECHO "$path" | $GREP " "`
27044      if test "x$has_space" != x; then
27045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27047        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27048      fi
27049
27050      # Use eval to expand a potential ~
27051      eval path="$path"
27052      if test ! -f "$path" && test ! -d "$path"; then
27053        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27054      fi
27055
27056      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27057    fi
27058  fi
27059
27060            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27061$as_echo_n "checking for Boot JDK... " >&6; }
27062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27063$as_echo "$BOOT_JDK" >&6; }
27064            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27065$as_echo_n "checking Boot JDK version... " >&6; }
27066            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27068$as_echo "$BOOT_JDK_VERSION" >&6; }
27069          fi # end check jdk version
27070        fi # end check javac
27071      fi # end check java
27072    fi # end check boot jdk found
27073  fi
27074
27075    done
27076  fi
27077
27078
27079    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27080    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27081      # Do we have a bin/java?
27082      if test ! -x "$BOOT_JDK/bin/java"; then
27083        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27085        BOOT_JDK_FOUND=no
27086      else
27087        # Do we have a bin/javac?
27088        if test ! -x "$BOOT_JDK/bin/javac"; then
27089          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27091          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27092$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27093          BOOT_JDK_FOUND=no
27094        else
27095          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27096          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27097
27098          # Extra M4 quote needed to protect [] in grep expression.
27099          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27100          if test "x$FOUND_CORRECT_VERSION" = x; then
27101            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27103            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27104$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27105            BOOT_JDK_FOUND=no
27106          else
27107            # We're done! :-)
27108            BOOT_JDK_FOUND=yes
27109
27110  # Only process if variable expands to non-empty
27111
27112  if test "x$BOOT_JDK" != x; then
27113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27114
27115  # Input might be given as Windows format, start by converting to
27116  # unix format.
27117  path="$BOOT_JDK"
27118  new_path=`$CYGPATH -u "$path"`
27119
27120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27123  # "foo.exe" is OK but "foo" is an error.
27124  #
27125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27126  # It is also a way to make sure we got the proper file name for the real test later on.
27127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27128  if test "x$test_shortpath" = x; then
27129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27131    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27132  fi
27133
27134  # Call helper function which possibly converts this using DOS-style short mode.
27135  # If so, the updated path is stored in $new_path.
27136
27137  input_path="$new_path"
27138  # Check if we need to convert this using DOS-style short mode. If the path
27139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27140  # take no chances and rewrite it.
27141  # Note: m4 eats our [], so we need to use [ and ] instead.
27142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27143  if test "x$has_forbidden_chars" != x; then
27144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27148      # Going to short mode and back again did indeed matter. Since short mode is
27149      # case insensitive, let's make it lowercase to improve readability.
27150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27151      # Now convert it back to Unix-style (cygpath)
27152      input_path=`$CYGPATH -u "$shortmode_path"`
27153      new_path="$input_path"
27154    fi
27155  fi
27156
27157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27158  if test "x$test_cygdrive_prefix" = x; then
27159    # As a simple fix, exclude /usr/bin since it's not a real path.
27160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27162      # a path prefixed by /cygdrive for fixpath to work.
27163      new_path="$CYGWIN_ROOT_PATH$input_path"
27164    fi
27165  fi
27166
27167
27168  if test "x$path" != "x$new_path"; then
27169    BOOT_JDK="$new_path"
27170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27171$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27172  fi
27173
27174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27175
27176  path="$BOOT_JDK"
27177  has_colon=`$ECHO $path | $GREP ^.:`
27178  new_path="$path"
27179  if test "x$has_colon" = x; then
27180    # Not in mixed or Windows style, start by that.
27181    new_path=`cmd //c echo $path`
27182  fi
27183
27184
27185  input_path="$new_path"
27186  # Check if we need to convert this using DOS-style short mode. If the path
27187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27188  # take no chances and rewrite it.
27189  # Note: m4 eats our [], so we need to use [ and ] instead.
27190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27191  if test "x$has_forbidden_chars" != x; then
27192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27194  fi
27195
27196
27197  windows_path="$new_path"
27198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27199    unix_path=`$CYGPATH -u "$windows_path"`
27200    new_path="$unix_path"
27201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27203    new_path="$unix_path"
27204  fi
27205
27206  if test "x$path" != "x$new_path"; then
27207    BOOT_JDK="$new_path"
27208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27209$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27210  fi
27211
27212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27214
27215    else
27216      # We're on a unix platform. Hooray! :)
27217      path="$BOOT_JDK"
27218      has_space=`$ECHO "$path" | $GREP " "`
27219      if test "x$has_space" != x; then
27220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27221$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27222        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27223      fi
27224
27225      # Use eval to expand a potential ~
27226      eval path="$path"
27227      if test ! -f "$path" && test ! -d "$path"; then
27228        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27229      fi
27230
27231      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27232    fi
27233  fi
27234
27235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27236$as_echo_n "checking for Boot JDK... " >&6; }
27237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27238$as_echo "$BOOT_JDK" >&6; }
27239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27240$as_echo_n "checking Boot JDK version... " >&6; }
27241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27243$as_echo "$BOOT_JDK_VERSION" >&6; }
27244          fi # end check jdk version
27245        fi # end check javac
27246      fi # end check java
27247    fi # end check boot jdk found
27248  fi
27249
27250  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27251
27252  if test "x$BOOT_JDK_FOUND" = xno; then
27253    # Now execute the test
27254
27255  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27256  BOOT_JDK_SUFFIX="/Contents/Home"
27257  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27258  if test "x$ALL_JDKS_FOUND" != x; then
27259    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27260
27261  if test "x$BOOT_JDK_FOUND" = xno; then
27262    # Now execute the test
27263
27264        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27265        if test -d "$BOOT_JDK"; then
27266          BOOT_JDK_FOUND=maybe
27267          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27268$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27269        fi
27270
27271
27272    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27273    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27274      # Do we have a bin/java?
27275      if test ! -x "$BOOT_JDK/bin/java"; then
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27278        BOOT_JDK_FOUND=no
27279      else
27280        # Do we have a bin/javac?
27281        if test ! -x "$BOOT_JDK/bin/javac"; then
27282          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27284          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27285$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27286          BOOT_JDK_FOUND=no
27287        else
27288          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27289          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27290
27291          # Extra M4 quote needed to protect [] in grep expression.
27292          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27293          if test "x$FOUND_CORRECT_VERSION" = x; then
27294            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27296            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27297$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27298            BOOT_JDK_FOUND=no
27299          else
27300            # We're done! :-)
27301            BOOT_JDK_FOUND=yes
27302
27303  # Only process if variable expands to non-empty
27304
27305  if test "x$BOOT_JDK" != x; then
27306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27307
27308  # Input might be given as Windows format, start by converting to
27309  # unix format.
27310  path="$BOOT_JDK"
27311  new_path=`$CYGPATH -u "$path"`
27312
27313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27316  # "foo.exe" is OK but "foo" is an error.
27317  #
27318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27319  # It is also a way to make sure we got the proper file name for the real test later on.
27320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27321  if test "x$test_shortpath" = x; then
27322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27324    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27325  fi
27326
27327  # Call helper function which possibly converts this using DOS-style short mode.
27328  # If so, the updated path is stored in $new_path.
27329
27330  input_path="$new_path"
27331  # Check if we need to convert this using DOS-style short mode. If the path
27332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27333  # take no chances and rewrite it.
27334  # Note: m4 eats our [], so we need to use [ and ] instead.
27335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27336  if test "x$has_forbidden_chars" != x; then
27337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27341      # Going to short mode and back again did indeed matter. Since short mode is
27342      # case insensitive, let's make it lowercase to improve readability.
27343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27344      # Now convert it back to Unix-style (cygpath)
27345      input_path=`$CYGPATH -u "$shortmode_path"`
27346      new_path="$input_path"
27347    fi
27348  fi
27349
27350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27351  if test "x$test_cygdrive_prefix" = x; then
27352    # As a simple fix, exclude /usr/bin since it's not a real path.
27353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27355      # a path prefixed by /cygdrive for fixpath to work.
27356      new_path="$CYGWIN_ROOT_PATH$input_path"
27357    fi
27358  fi
27359
27360
27361  if test "x$path" != "x$new_path"; then
27362    BOOT_JDK="$new_path"
27363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27365  fi
27366
27367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27368
27369  path="$BOOT_JDK"
27370  has_colon=`$ECHO $path | $GREP ^.:`
27371  new_path="$path"
27372  if test "x$has_colon" = x; then
27373    # Not in mixed or Windows style, start by that.
27374    new_path=`cmd //c echo $path`
27375  fi
27376
27377
27378  input_path="$new_path"
27379  # Check if we need to convert this using DOS-style short mode. If the path
27380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27381  # take no chances and rewrite it.
27382  # Note: m4 eats our [], so we need to use [ and ] instead.
27383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27384  if test "x$has_forbidden_chars" != x; then
27385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27387  fi
27388
27389
27390  windows_path="$new_path"
27391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27392    unix_path=`$CYGPATH -u "$windows_path"`
27393    new_path="$unix_path"
27394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27396    new_path="$unix_path"
27397  fi
27398
27399  if test "x$path" != "x$new_path"; then
27400    BOOT_JDK="$new_path"
27401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27402$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27403  fi
27404
27405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27407
27408    else
27409      # We're on a unix platform. Hooray! :)
27410      path="$BOOT_JDK"
27411      has_space=`$ECHO "$path" | $GREP " "`
27412      if test "x$has_space" != x; then
27413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27415        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27416      fi
27417
27418      # Use eval to expand a potential ~
27419      eval path="$path"
27420      if test ! -f "$path" && test ! -d "$path"; then
27421        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27422      fi
27423
27424      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27425    fi
27426  fi
27427
27428            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27429$as_echo_n "checking for Boot JDK... " >&6; }
27430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27431$as_echo "$BOOT_JDK" >&6; }
27432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27433$as_echo_n "checking Boot JDK version... " >&6; }
27434            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27436$as_echo "$BOOT_JDK_VERSION" >&6; }
27437          fi # end check jdk version
27438        fi # end check javac
27439      fi # end check java
27440    fi # end check boot jdk found
27441  fi
27442
27443    done
27444  fi
27445
27446
27447    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27448    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27449      # Do we have a bin/java?
27450      if test ! -x "$BOOT_JDK/bin/java"; then
27451        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27453        BOOT_JDK_FOUND=no
27454      else
27455        # Do we have a bin/javac?
27456        if test ! -x "$BOOT_JDK/bin/javac"; then
27457          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27459          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27460$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27461          BOOT_JDK_FOUND=no
27462        else
27463          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27464          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27465
27466          # Extra M4 quote needed to protect [] in grep expression.
27467          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27468          if test "x$FOUND_CORRECT_VERSION" = x; then
27469            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27471            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27472$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27473            BOOT_JDK_FOUND=no
27474          else
27475            # We're done! :-)
27476            BOOT_JDK_FOUND=yes
27477
27478  # Only process if variable expands to non-empty
27479
27480  if test "x$BOOT_JDK" != x; then
27481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27482
27483  # Input might be given as Windows format, start by converting to
27484  # unix format.
27485  path="$BOOT_JDK"
27486  new_path=`$CYGPATH -u "$path"`
27487
27488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27491  # "foo.exe" is OK but "foo" is an error.
27492  #
27493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27494  # It is also a way to make sure we got the proper file name for the real test later on.
27495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27496  if test "x$test_shortpath" = x; then
27497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27499    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27500  fi
27501
27502  # Call helper function which possibly converts this using DOS-style short mode.
27503  # If so, the updated path is stored in $new_path.
27504
27505  input_path="$new_path"
27506  # Check if we need to convert this using DOS-style short mode. If the path
27507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27508  # take no chances and rewrite it.
27509  # Note: m4 eats our [], so we need to use [ and ] instead.
27510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27511  if test "x$has_forbidden_chars" != x; then
27512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27516      # Going to short mode and back again did indeed matter. Since short mode is
27517      # case insensitive, let's make it lowercase to improve readability.
27518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27519      # Now convert it back to Unix-style (cygpath)
27520      input_path=`$CYGPATH -u "$shortmode_path"`
27521      new_path="$input_path"
27522    fi
27523  fi
27524
27525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27526  if test "x$test_cygdrive_prefix" = x; then
27527    # As a simple fix, exclude /usr/bin since it's not a real path.
27528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27530      # a path prefixed by /cygdrive for fixpath to work.
27531      new_path="$CYGWIN_ROOT_PATH$input_path"
27532    fi
27533  fi
27534
27535
27536  if test "x$path" != "x$new_path"; then
27537    BOOT_JDK="$new_path"
27538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27540  fi
27541
27542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27543
27544  path="$BOOT_JDK"
27545  has_colon=`$ECHO $path | $GREP ^.:`
27546  new_path="$path"
27547  if test "x$has_colon" = x; then
27548    # Not in mixed or Windows style, start by that.
27549    new_path=`cmd //c echo $path`
27550  fi
27551
27552
27553  input_path="$new_path"
27554  # Check if we need to convert this using DOS-style short mode. If the path
27555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27556  # take no chances and rewrite it.
27557  # Note: m4 eats our [], so we need to use [ and ] instead.
27558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27559  if test "x$has_forbidden_chars" != x; then
27560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27562  fi
27563
27564
27565  windows_path="$new_path"
27566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27567    unix_path=`$CYGPATH -u "$windows_path"`
27568    new_path="$unix_path"
27569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27571    new_path="$unix_path"
27572  fi
27573
27574  if test "x$path" != "x$new_path"; then
27575    BOOT_JDK="$new_path"
27576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27578  fi
27579
27580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27582
27583    else
27584      # We're on a unix platform. Hooray! :)
27585      path="$BOOT_JDK"
27586      has_space=`$ECHO "$path" | $GREP " "`
27587      if test "x$has_space" != x; then
27588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27589$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27591      fi
27592
27593      # Use eval to expand a potential ~
27594      eval path="$path"
27595      if test ! -f "$path" && test ! -d "$path"; then
27596        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27597      fi
27598
27599      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27600    fi
27601  fi
27602
27603            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27604$as_echo_n "checking for Boot JDK... " >&6; }
27605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27606$as_echo "$BOOT_JDK" >&6; }
27607            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27608$as_echo_n "checking Boot JDK version... " >&6; }
27609            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27610            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27611$as_echo "$BOOT_JDK_VERSION" >&6; }
27612          fi # end check jdk version
27613        fi # end check javac
27614      fi # end check java
27615    fi # end check boot jdk found
27616  fi
27617
27618
27619  if test "x$BOOT_JDK_FOUND" = xno; then
27620    # Now execute the test
27621
27622  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27623  BOOT_JDK_SUFFIX="/Contents/Home"
27624  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27625  if test "x$ALL_JDKS_FOUND" != x; then
27626    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27627
27628  if test "x$BOOT_JDK_FOUND" = xno; then
27629    # Now execute the test
27630
27631        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27632        if test -d "$BOOT_JDK"; then
27633          BOOT_JDK_FOUND=maybe
27634          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27635$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27636        fi
27637
27638
27639    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27640    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27641      # Do we have a bin/java?
27642      if test ! -x "$BOOT_JDK/bin/java"; then
27643        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27645        BOOT_JDK_FOUND=no
27646      else
27647        # Do we have a bin/javac?
27648        if test ! -x "$BOOT_JDK/bin/javac"; then
27649          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27651          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27652$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27653          BOOT_JDK_FOUND=no
27654        else
27655          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27656          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27657
27658          # Extra M4 quote needed to protect [] in grep expression.
27659          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27660          if test "x$FOUND_CORRECT_VERSION" = x; then
27661            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27663            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27664$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27665            BOOT_JDK_FOUND=no
27666          else
27667            # We're done! :-)
27668            BOOT_JDK_FOUND=yes
27669
27670  # Only process if variable expands to non-empty
27671
27672  if test "x$BOOT_JDK" != x; then
27673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27674
27675  # Input might be given as Windows format, start by converting to
27676  # unix format.
27677  path="$BOOT_JDK"
27678  new_path=`$CYGPATH -u "$path"`
27679
27680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27683  # "foo.exe" is OK but "foo" is an error.
27684  #
27685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27686  # It is also a way to make sure we got the proper file name for the real test later on.
27687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27688  if test "x$test_shortpath" = x; then
27689    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27691    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27692  fi
27693
27694  # Call helper function which possibly converts this using DOS-style short mode.
27695  # If so, the updated path is stored in $new_path.
27696
27697  input_path="$new_path"
27698  # Check if we need to convert this using DOS-style short mode. If the path
27699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27700  # take no chances and rewrite it.
27701  # Note: m4 eats our [], so we need to use [ and ] instead.
27702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27703  if test "x$has_forbidden_chars" != x; then
27704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27708      # Going to short mode and back again did indeed matter. Since short mode is
27709      # case insensitive, let's make it lowercase to improve readability.
27710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27711      # Now convert it back to Unix-style (cygpath)
27712      input_path=`$CYGPATH -u "$shortmode_path"`
27713      new_path="$input_path"
27714    fi
27715  fi
27716
27717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27718  if test "x$test_cygdrive_prefix" = x; then
27719    # As a simple fix, exclude /usr/bin since it's not a real path.
27720    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27722      # a path prefixed by /cygdrive for fixpath to work.
27723      new_path="$CYGWIN_ROOT_PATH$input_path"
27724    fi
27725  fi
27726
27727
27728  if test "x$path" != "x$new_path"; then
27729    BOOT_JDK="$new_path"
27730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27732  fi
27733
27734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27735
27736  path="$BOOT_JDK"
27737  has_colon=`$ECHO $path | $GREP ^.:`
27738  new_path="$path"
27739  if test "x$has_colon" = x; then
27740    # Not in mixed or Windows style, start by that.
27741    new_path=`cmd //c echo $path`
27742  fi
27743
27744
27745  input_path="$new_path"
27746  # Check if we need to convert this using DOS-style short mode. If the path
27747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27748  # take no chances and rewrite it.
27749  # Note: m4 eats our [], so we need to use [ and ] instead.
27750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27751  if test "x$has_forbidden_chars" != x; then
27752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27754  fi
27755
27756
27757  windows_path="$new_path"
27758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27759    unix_path=`$CYGPATH -u "$windows_path"`
27760    new_path="$unix_path"
27761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27763    new_path="$unix_path"
27764  fi
27765
27766  if test "x$path" != "x$new_path"; then
27767    BOOT_JDK="$new_path"
27768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27770  fi
27771
27772  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27773  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27774
27775    else
27776      # We're on a unix platform. Hooray! :)
27777      path="$BOOT_JDK"
27778      has_space=`$ECHO "$path" | $GREP " "`
27779      if test "x$has_space" != x; then
27780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27781$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27782        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27783      fi
27784
27785      # Use eval to expand a potential ~
27786      eval path="$path"
27787      if test ! -f "$path" && test ! -d "$path"; then
27788        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27789      fi
27790
27791      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27792    fi
27793  fi
27794
27795            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27796$as_echo_n "checking for Boot JDK... " >&6; }
27797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27798$as_echo "$BOOT_JDK" >&6; }
27799            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27800$as_echo_n "checking Boot JDK version... " >&6; }
27801            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27803$as_echo "$BOOT_JDK_VERSION" >&6; }
27804          fi # end check jdk version
27805        fi # end check javac
27806      fi # end check java
27807    fi # end check boot jdk found
27808  fi
27809
27810    done
27811  fi
27812
27813
27814    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27815    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27816      # Do we have a bin/java?
27817      if test ! -x "$BOOT_JDK/bin/java"; then
27818        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27820        BOOT_JDK_FOUND=no
27821      else
27822        # Do we have a bin/javac?
27823        if test ! -x "$BOOT_JDK/bin/javac"; then
27824          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27826          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27827$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27828          BOOT_JDK_FOUND=no
27829        else
27830          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27831          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27832
27833          # Extra M4 quote needed to protect [] in grep expression.
27834          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27835          if test "x$FOUND_CORRECT_VERSION" = x; then
27836            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27838            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27839$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27840            BOOT_JDK_FOUND=no
27841          else
27842            # We're done! :-)
27843            BOOT_JDK_FOUND=yes
27844
27845  # Only process if variable expands to non-empty
27846
27847  if test "x$BOOT_JDK" != x; then
27848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27849
27850  # Input might be given as Windows format, start by converting to
27851  # unix format.
27852  path="$BOOT_JDK"
27853  new_path=`$CYGPATH -u "$path"`
27854
27855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27858  # "foo.exe" is OK but "foo" is an error.
27859  #
27860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27861  # It is also a way to make sure we got the proper file name for the real test later on.
27862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27863  if test "x$test_shortpath" = x; then
27864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27866    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27867  fi
27868
27869  # Call helper function which possibly converts this using DOS-style short mode.
27870  # If so, the updated path is stored in $new_path.
27871
27872  input_path="$new_path"
27873  # Check if we need to convert this using DOS-style short mode. If the path
27874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27875  # take no chances and rewrite it.
27876  # Note: m4 eats our [], so we need to use [ and ] instead.
27877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27878  if test "x$has_forbidden_chars" != x; then
27879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27883      # Going to short mode and back again did indeed matter. Since short mode is
27884      # case insensitive, let's make it lowercase to improve readability.
27885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27886      # Now convert it back to Unix-style (cygpath)
27887      input_path=`$CYGPATH -u "$shortmode_path"`
27888      new_path="$input_path"
27889    fi
27890  fi
27891
27892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27893  if test "x$test_cygdrive_prefix" = x; then
27894    # As a simple fix, exclude /usr/bin since it's not a real path.
27895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27897      # a path prefixed by /cygdrive for fixpath to work.
27898      new_path="$CYGWIN_ROOT_PATH$input_path"
27899    fi
27900  fi
27901
27902
27903  if test "x$path" != "x$new_path"; then
27904    BOOT_JDK="$new_path"
27905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27907  fi
27908
27909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27910
27911  path="$BOOT_JDK"
27912  has_colon=`$ECHO $path | $GREP ^.:`
27913  new_path="$path"
27914  if test "x$has_colon" = x; then
27915    # Not in mixed or Windows style, start by that.
27916    new_path=`cmd //c echo $path`
27917  fi
27918
27919
27920  input_path="$new_path"
27921  # Check if we need to convert this using DOS-style short mode. If the path
27922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27923  # take no chances and rewrite it.
27924  # Note: m4 eats our [], so we need to use [ and ] instead.
27925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27926  if test "x$has_forbidden_chars" != x; then
27927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27929  fi
27930
27931
27932  windows_path="$new_path"
27933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27934    unix_path=`$CYGPATH -u "$windows_path"`
27935    new_path="$unix_path"
27936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27938    new_path="$unix_path"
27939  fi
27940
27941  if test "x$path" != "x$new_path"; then
27942    BOOT_JDK="$new_path"
27943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27945  fi
27946
27947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27949
27950    else
27951      # We're on a unix platform. Hooray! :)
27952      path="$BOOT_JDK"
27953      has_space=`$ECHO "$path" | $GREP " "`
27954      if test "x$has_space" != x; then
27955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27958      fi
27959
27960      # Use eval to expand a potential ~
27961      eval path="$path"
27962      if test ! -f "$path" && test ! -d "$path"; then
27963        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27964      fi
27965
27966      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27967    fi
27968  fi
27969
27970            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27971$as_echo_n "checking for Boot JDK... " >&6; }
27972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27973$as_echo "$BOOT_JDK" >&6; }
27974            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27975$as_echo_n "checking Boot JDK version... " >&6; }
27976            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27978$as_echo "$BOOT_JDK_VERSION" >&6; }
27979          fi # end check jdk version
27980        fi # end check javac
27981      fi # end check java
27982    fi # end check boot jdk found
27983  fi
27984
27985  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27986
27987  if test "x$BOOT_JDK_FOUND" = xno; then
27988    # Now execute the test
27989
27990  BOOT_JDK_PREFIX="/usr/lib/jvm"
27991  BOOT_JDK_SUFFIX=""
27992  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27993  if test "x$ALL_JDKS_FOUND" != x; then
27994    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27995
27996  if test "x$BOOT_JDK_FOUND" = xno; then
27997    # Now execute the test
27998
27999        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28000        if test -d "$BOOT_JDK"; then
28001          BOOT_JDK_FOUND=maybe
28002          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28003$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28004        fi
28005
28006
28007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28009      # Do we have a bin/java?
28010      if test ! -x "$BOOT_JDK/bin/java"; then
28011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28013        BOOT_JDK_FOUND=no
28014      else
28015        # Do we have a bin/javac?
28016        if test ! -x "$BOOT_JDK/bin/javac"; then
28017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28021          BOOT_JDK_FOUND=no
28022        else
28023          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28024          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28025
28026          # Extra M4 quote needed to protect [] in grep expression.
28027          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28028          if test "x$FOUND_CORRECT_VERSION" = x; then
28029            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28031            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28032$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28033            BOOT_JDK_FOUND=no
28034          else
28035            # We're done! :-)
28036            BOOT_JDK_FOUND=yes
28037
28038  # Only process if variable expands to non-empty
28039
28040  if test "x$BOOT_JDK" != x; then
28041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28042
28043  # Input might be given as Windows format, start by converting to
28044  # unix format.
28045  path="$BOOT_JDK"
28046  new_path=`$CYGPATH -u "$path"`
28047
28048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28051  # "foo.exe" is OK but "foo" is an error.
28052  #
28053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28054  # It is also a way to make sure we got the proper file name for the real test later on.
28055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28056  if test "x$test_shortpath" = x; then
28057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28059    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28060  fi
28061
28062  # Call helper function which possibly converts this using DOS-style short mode.
28063  # If so, the updated path is stored in $new_path.
28064
28065  input_path="$new_path"
28066  # Check if we need to convert this using DOS-style short mode. If the path
28067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28068  # take no chances and rewrite it.
28069  # Note: m4 eats our [], so we need to use [ and ] instead.
28070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28071  if test "x$has_forbidden_chars" != x; then
28072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28076      # Going to short mode and back again did indeed matter. Since short mode is
28077      # case insensitive, let's make it lowercase to improve readability.
28078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28079      # Now convert it back to Unix-style (cygpath)
28080      input_path=`$CYGPATH -u "$shortmode_path"`
28081      new_path="$input_path"
28082    fi
28083  fi
28084
28085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28086  if test "x$test_cygdrive_prefix" = x; then
28087    # As a simple fix, exclude /usr/bin since it's not a real path.
28088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28090      # a path prefixed by /cygdrive for fixpath to work.
28091      new_path="$CYGWIN_ROOT_PATH$input_path"
28092    fi
28093  fi
28094
28095
28096  if test "x$path" != "x$new_path"; then
28097    BOOT_JDK="$new_path"
28098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28100  fi
28101
28102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28103
28104  path="$BOOT_JDK"
28105  has_colon=`$ECHO $path | $GREP ^.:`
28106  new_path="$path"
28107  if test "x$has_colon" = x; then
28108    # Not in mixed or Windows style, start by that.
28109    new_path=`cmd //c echo $path`
28110  fi
28111
28112
28113  input_path="$new_path"
28114  # Check if we need to convert this using DOS-style short mode. If the path
28115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28116  # take no chances and rewrite it.
28117  # Note: m4 eats our [], so we need to use [ and ] instead.
28118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28119  if test "x$has_forbidden_chars" != x; then
28120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28122  fi
28123
28124
28125  windows_path="$new_path"
28126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28127    unix_path=`$CYGPATH -u "$windows_path"`
28128    new_path="$unix_path"
28129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28131    new_path="$unix_path"
28132  fi
28133
28134  if test "x$path" != "x$new_path"; then
28135    BOOT_JDK="$new_path"
28136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28138  fi
28139
28140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28142
28143    else
28144      # We're on a unix platform. Hooray! :)
28145      path="$BOOT_JDK"
28146      has_space=`$ECHO "$path" | $GREP " "`
28147      if test "x$has_space" != x; then
28148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28151      fi
28152
28153      # Use eval to expand a potential ~
28154      eval path="$path"
28155      if test ! -f "$path" && test ! -d "$path"; then
28156        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28157      fi
28158
28159      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28160    fi
28161  fi
28162
28163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28164$as_echo_n "checking for Boot JDK... " >&6; }
28165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28166$as_echo "$BOOT_JDK" >&6; }
28167            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28168$as_echo_n "checking Boot JDK version... " >&6; }
28169            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28171$as_echo "$BOOT_JDK_VERSION" >&6; }
28172          fi # end check jdk version
28173        fi # end check javac
28174      fi # end check java
28175    fi # end check boot jdk found
28176  fi
28177
28178    done
28179  fi
28180
28181
28182    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28183    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28184      # Do we have a bin/java?
28185      if test ! -x "$BOOT_JDK/bin/java"; then
28186        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28188        BOOT_JDK_FOUND=no
28189      else
28190        # Do we have a bin/javac?
28191        if test ! -x "$BOOT_JDK/bin/javac"; then
28192          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28194          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28195$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28196          BOOT_JDK_FOUND=no
28197        else
28198          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28199          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28200
28201          # Extra M4 quote needed to protect [] in grep expression.
28202          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28203          if test "x$FOUND_CORRECT_VERSION" = x; then
28204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28206            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28207$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28208            BOOT_JDK_FOUND=no
28209          else
28210            # We're done! :-)
28211            BOOT_JDK_FOUND=yes
28212
28213  # Only process if variable expands to non-empty
28214
28215  if test "x$BOOT_JDK" != x; then
28216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28217
28218  # Input might be given as Windows format, start by converting to
28219  # unix format.
28220  path="$BOOT_JDK"
28221  new_path=`$CYGPATH -u "$path"`
28222
28223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28226  # "foo.exe" is OK but "foo" is an error.
28227  #
28228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28229  # It is also a way to make sure we got the proper file name for the real test later on.
28230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28231  if test "x$test_shortpath" = x; then
28232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28233$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28234    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28235  fi
28236
28237  # Call helper function which possibly converts this using DOS-style short mode.
28238  # If so, the updated path is stored in $new_path.
28239
28240  input_path="$new_path"
28241  # Check if we need to convert this using DOS-style short mode. If the path
28242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28243  # take no chances and rewrite it.
28244  # Note: m4 eats our [], so we need to use [ and ] instead.
28245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28246  if test "x$has_forbidden_chars" != x; then
28247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28251      # Going to short mode and back again did indeed matter. Since short mode is
28252      # case insensitive, let's make it lowercase to improve readability.
28253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28254      # Now convert it back to Unix-style (cygpath)
28255      input_path=`$CYGPATH -u "$shortmode_path"`
28256      new_path="$input_path"
28257    fi
28258  fi
28259
28260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28261  if test "x$test_cygdrive_prefix" = x; then
28262    # As a simple fix, exclude /usr/bin since it's not a real path.
28263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28265      # a path prefixed by /cygdrive for fixpath to work.
28266      new_path="$CYGWIN_ROOT_PATH$input_path"
28267    fi
28268  fi
28269
28270
28271  if test "x$path" != "x$new_path"; then
28272    BOOT_JDK="$new_path"
28273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28275  fi
28276
28277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28278
28279  path="$BOOT_JDK"
28280  has_colon=`$ECHO $path | $GREP ^.:`
28281  new_path="$path"
28282  if test "x$has_colon" = x; then
28283    # Not in mixed or Windows style, start by that.
28284    new_path=`cmd //c echo $path`
28285  fi
28286
28287
28288  input_path="$new_path"
28289  # Check if we need to convert this using DOS-style short mode. If the path
28290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28291  # take no chances and rewrite it.
28292  # Note: m4 eats our [], so we need to use [ and ] instead.
28293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28294  if test "x$has_forbidden_chars" != x; then
28295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28297  fi
28298
28299
28300  windows_path="$new_path"
28301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28302    unix_path=`$CYGPATH -u "$windows_path"`
28303    new_path="$unix_path"
28304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28306    new_path="$unix_path"
28307  fi
28308
28309  if test "x$path" != "x$new_path"; then
28310    BOOT_JDK="$new_path"
28311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28313  fi
28314
28315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28317
28318    else
28319      # We're on a unix platform. Hooray! :)
28320      path="$BOOT_JDK"
28321      has_space=`$ECHO "$path" | $GREP " "`
28322      if test "x$has_space" != x; then
28323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28326      fi
28327
28328      # Use eval to expand a potential ~
28329      eval path="$path"
28330      if test ! -f "$path" && test ! -d "$path"; then
28331        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28332      fi
28333
28334      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28335    fi
28336  fi
28337
28338            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28339$as_echo_n "checking for Boot JDK... " >&6; }
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28341$as_echo "$BOOT_JDK" >&6; }
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28343$as_echo_n "checking Boot JDK version... " >&6; }
28344            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28346$as_echo "$BOOT_JDK_VERSION" >&6; }
28347          fi # end check jdk version
28348        fi # end check javac
28349      fi # end check java
28350    fi # end check boot jdk found
28351  fi
28352
28353  fi
28354
28355
28356    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28357    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28358      # Do we have a bin/java?
28359      if test ! -x "$BOOT_JDK/bin/java"; then
28360        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28362        BOOT_JDK_FOUND=no
28363      else
28364        # Do we have a bin/javac?
28365        if test ! -x "$BOOT_JDK/bin/javac"; then
28366          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28368          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28369$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28370          BOOT_JDK_FOUND=no
28371        else
28372          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28373          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28374
28375          # Extra M4 quote needed to protect [] in grep expression.
28376          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28377          if test "x$FOUND_CORRECT_VERSION" = x; then
28378            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28380            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28381$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28382            BOOT_JDK_FOUND=no
28383          else
28384            # We're done! :-)
28385            BOOT_JDK_FOUND=yes
28386
28387  # Only process if variable expands to non-empty
28388
28389  if test "x$BOOT_JDK" != x; then
28390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28391
28392  # Input might be given as Windows format, start by converting to
28393  # unix format.
28394  path="$BOOT_JDK"
28395  new_path=`$CYGPATH -u "$path"`
28396
28397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28400  # "foo.exe" is OK but "foo" is an error.
28401  #
28402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28403  # It is also a way to make sure we got the proper file name for the real test later on.
28404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28405  if test "x$test_shortpath" = x; then
28406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28408    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28409  fi
28410
28411  # Call helper function which possibly converts this using DOS-style short mode.
28412  # If so, the updated path is stored in $new_path.
28413
28414  input_path="$new_path"
28415  # Check if we need to convert this using DOS-style short mode. If the path
28416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28417  # take no chances and rewrite it.
28418  # Note: m4 eats our [], so we need to use [ and ] instead.
28419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28420  if test "x$has_forbidden_chars" != x; then
28421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28425      # Going to short mode and back again did indeed matter. Since short mode is
28426      # case insensitive, let's make it lowercase to improve readability.
28427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28428      # Now convert it back to Unix-style (cygpath)
28429      input_path=`$CYGPATH -u "$shortmode_path"`
28430      new_path="$input_path"
28431    fi
28432  fi
28433
28434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28435  if test "x$test_cygdrive_prefix" = x; then
28436    # As a simple fix, exclude /usr/bin since it's not a real path.
28437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28439      # a path prefixed by /cygdrive for fixpath to work.
28440      new_path="$CYGWIN_ROOT_PATH$input_path"
28441    fi
28442  fi
28443
28444
28445  if test "x$path" != "x$new_path"; then
28446    BOOT_JDK="$new_path"
28447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28449  fi
28450
28451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28452
28453  path="$BOOT_JDK"
28454  has_colon=`$ECHO $path | $GREP ^.:`
28455  new_path="$path"
28456  if test "x$has_colon" = x; then
28457    # Not in mixed or Windows style, start by that.
28458    new_path=`cmd //c echo $path`
28459  fi
28460
28461
28462  input_path="$new_path"
28463  # Check if we need to convert this using DOS-style short mode. If the path
28464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28465  # take no chances and rewrite it.
28466  # Note: m4 eats our [], so we need to use [ and ] instead.
28467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28468  if test "x$has_forbidden_chars" != x; then
28469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28471  fi
28472
28473
28474  windows_path="$new_path"
28475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28476    unix_path=`$CYGPATH -u "$windows_path"`
28477    new_path="$unix_path"
28478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28480    new_path="$unix_path"
28481  fi
28482
28483  if test "x$path" != "x$new_path"; then
28484    BOOT_JDK="$new_path"
28485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28487  fi
28488
28489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28491
28492    else
28493      # We're on a unix platform. Hooray! :)
28494      path="$BOOT_JDK"
28495      has_space=`$ECHO "$path" | $GREP " "`
28496      if test "x$has_space" != x; then
28497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28500      fi
28501
28502      # Use eval to expand a potential ~
28503      eval path="$path"
28504      if test ! -f "$path" && test ! -d "$path"; then
28505        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28506      fi
28507
28508      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28509    fi
28510  fi
28511
28512            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28513$as_echo_n "checking for Boot JDK... " >&6; }
28514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28515$as_echo "$BOOT_JDK" >&6; }
28516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28517$as_echo_n "checking Boot JDK version... " >&6; }
28518            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28520$as_echo "$BOOT_JDK_VERSION" >&6; }
28521          fi # end check jdk version
28522        fi # end check javac
28523      fi # end check java
28524    fi # end check boot jdk found
28525  fi
28526
28527
28528  # If we haven't found anything yet, we've truly lost. Give up.
28529  if test "x$BOOT_JDK_FOUND" = xno; then
28530
28531  # Print a helpful message on how to acquire the necessary build dependency.
28532  # openjdk is the help tag: freetype, cups, alsa etc
28533  MISSING_DEPENDENCY=openjdk
28534
28535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28536    cygwin_help $MISSING_DEPENDENCY
28537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28538    msys_help $MISSING_DEPENDENCY
28539  else
28540    PKGHANDLER_COMMAND=
28541
28542    case $PKGHANDLER in
28543      apt-get)
28544        apt_help     $MISSING_DEPENDENCY ;;
28545      yum)
28546        yum_help     $MISSING_DEPENDENCY ;;
28547      port)
28548        port_help    $MISSING_DEPENDENCY ;;
28549      pkgutil)
28550        pkgutil_help $MISSING_DEPENDENCY ;;
28551      pkgadd)
28552        pkgadd_help  $MISSING_DEPENDENCY ;;
28553    esac
28554
28555    if test "x$PKGHANDLER_COMMAND" != x; then
28556      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28557    fi
28558  fi
28559
28560    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28561$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28562    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28563$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28564    as_fn_error $? "Cannot continue" "$LINENO" 5
28565  fi
28566
28567
28568
28569  # Setup tools from the Boot JDK.
28570
28571  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28572
28573  # Publish this variable in the help.
28574
28575
28576  if [ -z "${JAVA+x}" ]; then
28577    # The variable is not set by user, try to locate tool using the code snippet
28578
28579      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28580$as_echo_n "checking for java in Boot JDK... " >&6; }
28581      JAVA=$BOOT_JDK/bin/java
28582      if test ! -x $JAVA; then
28583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28584$as_echo "not found" >&6; }
28585        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28586$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28587        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28588      fi
28589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28590$as_echo "ok" >&6; }
28591
28592
28593  else
28594    # The variable is set, but is it from the command line or the environment?
28595
28596    # Try to remove the string !JAVA! from our list.
28597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28599      # If it failed, the variable was not from the command line. Ignore it,
28600      # but warn the user (except for BASH, which is always set by the calling BASH).
28601      if test "xJAVA" != xBASH; then
28602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28603$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28604      fi
28605      # Try to locate tool using the code snippet
28606
28607      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28608$as_echo_n "checking for java in Boot JDK... " >&6; }
28609      JAVA=$BOOT_JDK/bin/java
28610      if test ! -x $JAVA; then
28611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28612$as_echo "not found" >&6; }
28613        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28614$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28615        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28616      fi
28617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28618$as_echo "ok" >&6; }
28619
28620
28621    else
28622      # If it succeeded, then it was overridden by the user. We will use it
28623      # for the tool.
28624
28625      # First remove it from the list of overridden variables, so we can test
28626      # for unknown variables in the end.
28627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28628
28629      # Check if we try to supply an empty value
28630      if test "x$JAVA" = x; then
28631        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28632$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28634$as_echo_n "checking for JAVA... " >&6; }
28635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28636$as_echo "disabled" >&6; }
28637      else
28638        # Check if the provided tool contains a complete path.
28639        tool_specified="$JAVA"
28640        tool_basename="${tool_specified##*/}"
28641        if test "x$tool_basename" = "x$tool_specified"; then
28642          # A command without a complete path is provided, search $PATH.
28643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28644$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28645          # Extract the first word of "$tool_basename", so it can be a program name with args.
28646set dummy $tool_basename; ac_word=$2
28647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28648$as_echo_n "checking for $ac_word... " >&6; }
28649if ${ac_cv_path_JAVA+:} false; then :
28650  $as_echo_n "(cached) " >&6
28651else
28652  case $JAVA in
28653  [\\/]* | ?:[\\/]*)
28654  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28655  ;;
28656  *)
28657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28658for as_dir in $PATH
28659do
28660  IFS=$as_save_IFS
28661  test -z "$as_dir" && as_dir=.
28662    for ac_exec_ext in '' $ac_executable_extensions; do
28663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28664    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28666    break 2
28667  fi
28668done
28669  done
28670IFS=$as_save_IFS
28671
28672  ;;
28673esac
28674fi
28675JAVA=$ac_cv_path_JAVA
28676if test -n "$JAVA"; then
28677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28678$as_echo "$JAVA" >&6; }
28679else
28680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28681$as_echo "no" >&6; }
28682fi
28683
28684
28685          if test "x$JAVA" = x; then
28686            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28687          fi
28688        else
28689          # Otherwise we believe it is a complete path. Use it as it is.
28690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28691$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28692          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28693$as_echo_n "checking for JAVA... " >&6; }
28694          if test ! -x "$tool_specified"; then
28695            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28696$as_echo "not found" >&6; }
28697            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28698          fi
28699          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28700$as_echo "$tool_specified" >&6; }
28701        fi
28702      fi
28703    fi
28704
28705  fi
28706
28707
28708
28709  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28710
28711  # Publish this variable in the help.
28712
28713
28714  if [ -z "${JAVAC+x}" ]; then
28715    # The variable is not set by user, try to locate tool using the code snippet
28716
28717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28718$as_echo_n "checking for javac in Boot JDK... " >&6; }
28719      JAVAC=$BOOT_JDK/bin/javac
28720      if test ! -x $JAVAC; then
28721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28722$as_echo "not found" >&6; }
28723        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28724$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28725        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28726      fi
28727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28728$as_echo "ok" >&6; }
28729
28730
28731  else
28732    # The variable is set, but is it from the command line or the environment?
28733
28734    # Try to remove the string !JAVAC! from our list.
28735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28737      # If it failed, the variable was not from the command line. Ignore it,
28738      # but warn the user (except for BASH, which is always set by the calling BASH).
28739      if test "xJAVAC" != xBASH; then
28740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28741$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28742      fi
28743      # Try to locate tool using the code snippet
28744
28745      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28746$as_echo_n "checking for javac in Boot JDK... " >&6; }
28747      JAVAC=$BOOT_JDK/bin/javac
28748      if test ! -x $JAVAC; then
28749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28750$as_echo "not found" >&6; }
28751        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28752$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28753        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28754      fi
28755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28756$as_echo "ok" >&6; }
28757
28758
28759    else
28760      # If it succeeded, then it was overridden by the user. We will use it
28761      # for the tool.
28762
28763      # First remove it from the list of overridden variables, so we can test
28764      # for unknown variables in the end.
28765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28766
28767      # Check if we try to supply an empty value
28768      if test "x$JAVAC" = x; then
28769        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28770$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28772$as_echo_n "checking for JAVAC... " >&6; }
28773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28774$as_echo "disabled" >&6; }
28775      else
28776        # Check if the provided tool contains a complete path.
28777        tool_specified="$JAVAC"
28778        tool_basename="${tool_specified##*/}"
28779        if test "x$tool_basename" = "x$tool_specified"; then
28780          # A command without a complete path is provided, search $PATH.
28781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28782$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28783          # Extract the first word of "$tool_basename", so it can be a program name with args.
28784set dummy $tool_basename; ac_word=$2
28785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28786$as_echo_n "checking for $ac_word... " >&6; }
28787if ${ac_cv_path_JAVAC+:} false; then :
28788  $as_echo_n "(cached) " >&6
28789else
28790  case $JAVAC in
28791  [\\/]* | ?:[\\/]*)
28792  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28793  ;;
28794  *)
28795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28796for as_dir in $PATH
28797do
28798  IFS=$as_save_IFS
28799  test -z "$as_dir" && as_dir=.
28800    for ac_exec_ext in '' $ac_executable_extensions; do
28801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28802    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28804    break 2
28805  fi
28806done
28807  done
28808IFS=$as_save_IFS
28809
28810  ;;
28811esac
28812fi
28813JAVAC=$ac_cv_path_JAVAC
28814if test -n "$JAVAC"; then
28815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28816$as_echo "$JAVAC" >&6; }
28817else
28818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28819$as_echo "no" >&6; }
28820fi
28821
28822
28823          if test "x$JAVAC" = x; then
28824            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28825          fi
28826        else
28827          # Otherwise we believe it is a complete path. Use it as it is.
28828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28829$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28830          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28831$as_echo_n "checking for JAVAC... " >&6; }
28832          if test ! -x "$tool_specified"; then
28833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28834$as_echo "not found" >&6; }
28835            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28836          fi
28837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28838$as_echo "$tool_specified" >&6; }
28839        fi
28840      fi
28841    fi
28842
28843  fi
28844
28845
28846
28847  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28848
28849  # Publish this variable in the help.
28850
28851
28852  if [ -z "${JAVAH+x}" ]; then
28853    # The variable is not set by user, try to locate tool using the code snippet
28854
28855      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28856$as_echo_n "checking for javah in Boot JDK... " >&6; }
28857      JAVAH=$BOOT_JDK/bin/javah
28858      if test ! -x $JAVAH; then
28859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28860$as_echo "not found" >&6; }
28861        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28862$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28863        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28864      fi
28865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28866$as_echo "ok" >&6; }
28867
28868
28869  else
28870    # The variable is set, but is it from the command line or the environment?
28871
28872    # Try to remove the string !JAVAH! from our list.
28873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28875      # If it failed, the variable was not from the command line. Ignore it,
28876      # but warn the user (except for BASH, which is always set by the calling BASH).
28877      if test "xJAVAH" != xBASH; then
28878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28879$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28880      fi
28881      # Try to locate tool using the code snippet
28882
28883      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28884$as_echo_n "checking for javah in Boot JDK... " >&6; }
28885      JAVAH=$BOOT_JDK/bin/javah
28886      if test ! -x $JAVAH; then
28887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28888$as_echo "not found" >&6; }
28889        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28890$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28891        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28892      fi
28893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28894$as_echo "ok" >&6; }
28895
28896
28897    else
28898      # If it succeeded, then it was overridden by the user. We will use it
28899      # for the tool.
28900
28901      # First remove it from the list of overridden variables, so we can test
28902      # for unknown variables in the end.
28903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28904
28905      # Check if we try to supply an empty value
28906      if test "x$JAVAH" = x; then
28907        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28908$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28910$as_echo_n "checking for JAVAH... " >&6; }
28911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28912$as_echo "disabled" >&6; }
28913      else
28914        # Check if the provided tool contains a complete path.
28915        tool_specified="$JAVAH"
28916        tool_basename="${tool_specified##*/}"
28917        if test "x$tool_basename" = "x$tool_specified"; then
28918          # A command without a complete path is provided, search $PATH.
28919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28920$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28921          # Extract the first word of "$tool_basename", so it can be a program name with args.
28922set dummy $tool_basename; ac_word=$2
28923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28924$as_echo_n "checking for $ac_word... " >&6; }
28925if ${ac_cv_path_JAVAH+:} false; then :
28926  $as_echo_n "(cached) " >&6
28927else
28928  case $JAVAH in
28929  [\\/]* | ?:[\\/]*)
28930  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28931  ;;
28932  *)
28933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28934for as_dir in $PATH
28935do
28936  IFS=$as_save_IFS
28937  test -z "$as_dir" && as_dir=.
28938    for ac_exec_ext in '' $ac_executable_extensions; do
28939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28940    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28942    break 2
28943  fi
28944done
28945  done
28946IFS=$as_save_IFS
28947
28948  ;;
28949esac
28950fi
28951JAVAH=$ac_cv_path_JAVAH
28952if test -n "$JAVAH"; then
28953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28954$as_echo "$JAVAH" >&6; }
28955else
28956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28957$as_echo "no" >&6; }
28958fi
28959
28960
28961          if test "x$JAVAH" = x; then
28962            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28963          fi
28964        else
28965          # Otherwise we believe it is a complete path. Use it as it is.
28966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28967$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28968          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28969$as_echo_n "checking for JAVAH... " >&6; }
28970          if test ! -x "$tool_specified"; then
28971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28972$as_echo "not found" >&6; }
28973            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28974          fi
28975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28976$as_echo "$tool_specified" >&6; }
28977        fi
28978      fi
28979    fi
28980
28981  fi
28982
28983
28984
28985  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28986
28987  # Publish this variable in the help.
28988
28989
28990  if [ -z "${JAR+x}" ]; then
28991    # The variable is not set by user, try to locate tool using the code snippet
28992
28993      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28994$as_echo_n "checking for jar in Boot JDK... " >&6; }
28995      JAR=$BOOT_JDK/bin/jar
28996      if test ! -x $JAR; then
28997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28998$as_echo "not found" >&6; }
28999        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29000$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29001        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29002      fi
29003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29004$as_echo "ok" >&6; }
29005
29006
29007  else
29008    # The variable is set, but is it from the command line or the environment?
29009
29010    # Try to remove the string !JAR! from our list.
29011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29013      # If it failed, the variable was not from the command line. Ignore it,
29014      # but warn the user (except for BASH, which is always set by the calling BASH).
29015      if test "xJAR" != xBASH; then
29016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29017$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29018      fi
29019      # Try to locate tool using the code snippet
29020
29021      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29022$as_echo_n "checking for jar in Boot JDK... " >&6; }
29023      JAR=$BOOT_JDK/bin/jar
29024      if test ! -x $JAR; then
29025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29026$as_echo "not found" >&6; }
29027        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29028$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29029        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29030      fi
29031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29032$as_echo "ok" >&6; }
29033
29034
29035    else
29036      # If it succeeded, then it was overridden by the user. We will use it
29037      # for the tool.
29038
29039      # First remove it from the list of overridden variables, so we can test
29040      # for unknown variables in the end.
29041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29042
29043      # Check if we try to supply an empty value
29044      if test "x$JAR" = x; then
29045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29046$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29048$as_echo_n "checking for JAR... " >&6; }
29049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29050$as_echo "disabled" >&6; }
29051      else
29052        # Check if the provided tool contains a complete path.
29053        tool_specified="$JAR"
29054        tool_basename="${tool_specified##*/}"
29055        if test "x$tool_basename" = "x$tool_specified"; then
29056          # A command without a complete path is provided, search $PATH.
29057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29058$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29059          # Extract the first word of "$tool_basename", so it can be a program name with args.
29060set dummy $tool_basename; ac_word=$2
29061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29062$as_echo_n "checking for $ac_word... " >&6; }
29063if ${ac_cv_path_JAR+:} false; then :
29064  $as_echo_n "(cached) " >&6
29065else
29066  case $JAR in
29067  [\\/]* | ?:[\\/]*)
29068  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29069  ;;
29070  *)
29071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29072for as_dir in $PATH
29073do
29074  IFS=$as_save_IFS
29075  test -z "$as_dir" && as_dir=.
29076    for ac_exec_ext in '' $ac_executable_extensions; do
29077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29078    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29080    break 2
29081  fi
29082done
29083  done
29084IFS=$as_save_IFS
29085
29086  ;;
29087esac
29088fi
29089JAR=$ac_cv_path_JAR
29090if test -n "$JAR"; then
29091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29092$as_echo "$JAR" >&6; }
29093else
29094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29095$as_echo "no" >&6; }
29096fi
29097
29098
29099          if test "x$JAR" = x; then
29100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29101          fi
29102        else
29103          # Otherwise we believe it is a complete path. Use it as it is.
29104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29105$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29107$as_echo_n "checking for JAR... " >&6; }
29108          if test ! -x "$tool_specified"; then
29109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29110$as_echo "not found" >&6; }
29111            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29112          fi
29113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29114$as_echo "$tool_specified" >&6; }
29115        fi
29116      fi
29117    fi
29118
29119  fi
29120
29121
29122
29123  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29124
29125  # Publish this variable in the help.
29126
29127
29128  if [ -z "${JARSIGNER+x}" ]; then
29129    # The variable is not set by user, try to locate tool using the code snippet
29130
29131      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29132$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29133      JARSIGNER=$BOOT_JDK/bin/jarsigner
29134      if test ! -x $JARSIGNER; then
29135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29136$as_echo "not found" >&6; }
29137        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29138$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29139        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29140      fi
29141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29142$as_echo "ok" >&6; }
29143
29144
29145  else
29146    # The variable is set, but is it from the command line or the environment?
29147
29148    # Try to remove the string !JARSIGNER! from our list.
29149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29151      # If it failed, the variable was not from the command line. Ignore it,
29152      # but warn the user (except for BASH, which is always set by the calling BASH).
29153      if test "xJARSIGNER" != xBASH; then
29154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29155$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29156      fi
29157      # Try to locate tool using the code snippet
29158
29159      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29160$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29161      JARSIGNER=$BOOT_JDK/bin/jarsigner
29162      if test ! -x $JARSIGNER; then
29163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29164$as_echo "not found" >&6; }
29165        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29166$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29167        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29168      fi
29169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29170$as_echo "ok" >&6; }
29171
29172
29173    else
29174      # If it succeeded, then it was overridden by the user. We will use it
29175      # for the tool.
29176
29177      # First remove it from the list of overridden variables, so we can test
29178      # for unknown variables in the end.
29179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29180
29181      # Check if we try to supply an empty value
29182      if test "x$JARSIGNER" = x; then
29183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29184$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29186$as_echo_n "checking for JARSIGNER... " >&6; }
29187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29188$as_echo "disabled" >&6; }
29189      else
29190        # Check if the provided tool contains a complete path.
29191        tool_specified="$JARSIGNER"
29192        tool_basename="${tool_specified##*/}"
29193        if test "x$tool_basename" = "x$tool_specified"; then
29194          # A command without a complete path is provided, search $PATH.
29195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29196$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29197          # Extract the first word of "$tool_basename", so it can be a program name with args.
29198set dummy $tool_basename; ac_word=$2
29199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29200$as_echo_n "checking for $ac_word... " >&6; }
29201if ${ac_cv_path_JARSIGNER+:} false; then :
29202  $as_echo_n "(cached) " >&6
29203else
29204  case $JARSIGNER in
29205  [\\/]* | ?:[\\/]*)
29206  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29207  ;;
29208  *)
29209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29210for as_dir in $PATH
29211do
29212  IFS=$as_save_IFS
29213  test -z "$as_dir" && as_dir=.
29214    for ac_exec_ext in '' $ac_executable_extensions; do
29215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29216    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29218    break 2
29219  fi
29220done
29221  done
29222IFS=$as_save_IFS
29223
29224  ;;
29225esac
29226fi
29227JARSIGNER=$ac_cv_path_JARSIGNER
29228if test -n "$JARSIGNER"; then
29229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29230$as_echo "$JARSIGNER" >&6; }
29231else
29232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29233$as_echo "no" >&6; }
29234fi
29235
29236
29237          if test "x$JARSIGNER" = x; then
29238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29239          fi
29240        else
29241          # Otherwise we believe it is a complete path. Use it as it is.
29242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29243$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29245$as_echo_n "checking for JARSIGNER... " >&6; }
29246          if test ! -x "$tool_specified"; then
29247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29248$as_echo "not found" >&6; }
29249            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29250          fi
29251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29252$as_echo "$tool_specified" >&6; }
29253        fi
29254      fi
29255    fi
29256
29257  fi
29258
29259
29260
29261  # Finally, set some other options...
29262
29263  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29264  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29265
29266
29267
29268  # Check if the boot jdk is 32 or 64 bit
29269  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29270    BOOT_JDK_BITS="64"
29271  else
29272    BOOT_JDK_BITS="32"
29273  fi
29274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29275$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29277$as_echo "$BOOT_JDK_BITS" >&6; }
29278
29279
29280
29281###############################################################################
29282#
29283# Configure the sources to use. We can add or override individual directories.
29284#
29285###############################################################################
29286
29287
29288  # Where are the sources.
29289  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29290  CORBA_TOPDIR="$SRC_ROOT/corba"
29291  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29292  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29293  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29294  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29295  JDK_TOPDIR="$SRC_ROOT/jdk"
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305  # This feature is no longer supported.
29306
29307
29308
29309# Check whether --with-add-source-root was given.
29310if test "${with_add_source_root+set}" = set; then :
29311  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
29312$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29313fi
29314
29315
29316
29317
29318# Check whether --with-override-source-root was given.
29319if test "${with_override_source_root+set}" = set; then :
29320  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
29321$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29322fi
29323
29324
29325
29326
29327# Check whether --with-adds-and-overrides was given.
29328if test "${with_adds_and_overrides+set}" = set; then :
29329  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
29330$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29331fi
29332
29333
29334
29335
29336# Check whether --with-override-langtools was given.
29337if test "${with_override_langtools+set}" = set; then :
29338  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29339$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29340fi
29341
29342
29343
29344
29345# Check whether --with-override-corba was given.
29346if test "${with_override_corba+set}" = set; then :
29347  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29348$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29349fi
29350
29351
29352
29353
29354# Check whether --with-override-jaxp was given.
29355if test "${with_override_jaxp+set}" = set; then :
29356  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29357$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29358fi
29359
29360
29361
29362
29363# Check whether --with-override-jaxws was given.
29364if test "${with_override_jaxws+set}" = set; then :
29365  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29366$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29367fi
29368
29369
29370
29371
29372# Check whether --with-override-hotspot was given.
29373if test "${with_override_hotspot+set}" = set; then :
29374  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29375$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29376fi
29377
29378
29379
29380
29381# Check whether --with-override-nashorn was given.
29382if test "${with_override_nashorn+set}" = set; then :
29383  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29384$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29385fi
29386
29387
29388
29389
29390# Check whether --with-override-jdk was given.
29391if test "${with_override_jdk+set}" = set; then :
29392  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29393$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29394fi
29395
29396
29397
29398
29399  BUILD_OUTPUT="$OUTPUT_ROOT"
29400
29401
29402  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29403  BUILD_HOTSPOT=true
29404
29405
29406
29407# Check whether --with-import-hotspot was given.
29408if test "${with_import_hotspot+set}" = set; then :
29409  withval=$with_import_hotspot;
29410fi
29411
29412  if test "x$with_import_hotspot" != x; then
29413    CURDIR="$PWD"
29414    cd "$with_import_hotspot"
29415    HOTSPOT_DIST="`pwd`"
29416    cd "$CURDIR"
29417    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29418      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29419    fi
29420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29421$as_echo_n "checking if hotspot should be imported... " >&6; }
29422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29423$as_echo "yes from $HOTSPOT_DIST" >&6; }
29424    BUILD_HOTSPOT=false
29425  fi
29426
29427  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29428
29429
29430###############################################################################
29431#
29432# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29433# native code.
29434#
29435###############################################################################
29436
29437# See if we are doing a complete static build or not
29438
29439  # Check whether --enable-static-build was given.
29440if test "${enable_static_build+set}" = set; then :
29441  enableval=$enable_static_build;
29442fi
29443
29444  STATIC_BUILD=false
29445  if test "x$enable_static_build" = "xyes"; then
29446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29447$as_echo_n "checking if static build is enabled... " >&6; }
29448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29449$as_echo "yes" >&6; }
29450    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29451      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29452    fi
29453    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29454    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29455    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29456    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29457    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29458    STATIC_BUILD=true
29459  elif test "x$enable_static_build" = "xno"; then
29460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29461$as_echo_n "checking if static build is enabled... " >&6; }
29462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29463$as_echo "no" >&6; }
29464  elif test "x$enable_static_build" != "x"; then
29465    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29466  fi
29467
29468
29469
29470
29471# First determine the toolchain type (compiler family)
29472
29473
29474# Check whether --with-toolchain-type was given.
29475if test "${with_toolchain_type+set}" = set; then :
29476  withval=$with_toolchain_type;
29477fi
29478
29479
29480  # Use indirect variable referencing
29481  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29482  VALID_TOOLCHAINS=${!toolchain_var_name}
29483
29484  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29485    if test -n "$XCODEBUILD"; then
29486      # On Mac OS X, default toolchain to clang after Xcode 5
29487      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29488      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29489      if test $? -ne 0; then
29490        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29491      fi
29492      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29493          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29494          $CUT -f 1 -d .`
29495      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29496$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29497      if test $XCODE_MAJOR_VERSION -ge 5; then
29498          DEFAULT_TOOLCHAIN="clang"
29499      else
29500          DEFAULT_TOOLCHAIN="gcc"
29501      fi
29502    else
29503      # If Xcode is not installed, but the command line tools are
29504      # then we can't run xcodebuild. On these systems we should
29505      # default to clang
29506      DEFAULT_TOOLCHAIN="clang"
29507    fi
29508  else
29509    # First toolchain type in the list is the default
29510    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29511  fi
29512
29513  if test "x$with_toolchain_type" = xlist; then
29514    # List all toolchains
29515    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29516$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29517    for toolchain in $VALID_TOOLCHAINS; do
29518      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29519      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29520      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29521    done
29522
29523    exit 0
29524  elif test "x$with_toolchain_type" != x; then
29525    # User override; check that it is valid
29526    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29527      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29528$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29529      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29530$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29531      as_fn_error $? "Cannot continue." "$LINENO" 5
29532    fi
29533    TOOLCHAIN_TYPE=$with_toolchain_type
29534  else
29535    # No flag given, use default
29536    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29537  fi
29538
29539
29540  TOOLCHAIN_CC_BINARY_clang="clang"
29541  TOOLCHAIN_CC_BINARY_gcc="gcc"
29542  TOOLCHAIN_CC_BINARY_microsoft="cl"
29543  TOOLCHAIN_CC_BINARY_solstudio="cc"
29544  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29545
29546  TOOLCHAIN_CXX_BINARY_clang="clang++"
29547  TOOLCHAIN_CXX_BINARY_gcc="g++"
29548  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29549  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29550  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29551
29552  # Use indirect variable referencing
29553  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29554  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29555  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29556  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29557  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29558  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29559
29560
29561  # Define filename patterns
29562  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29563    LIBRARY_PREFIX=
29564    SHARED_LIBRARY_SUFFIX='.dll'
29565    STATIC_LIBRARY_SUFFIX='.lib'
29566    SHARED_LIBRARY='$1.dll'
29567    STATIC_LIBRARY='$1.lib'
29568    OBJ_SUFFIX='.obj'
29569    EXE_SUFFIX='.exe'
29570  else
29571    LIBRARY_PREFIX=lib
29572    SHARED_LIBRARY_SUFFIX='.so'
29573    STATIC_LIBRARY_SUFFIX='.a'
29574    SHARED_LIBRARY='lib$1.so'
29575    STATIC_LIBRARY='lib$1.a'
29576    OBJ_SUFFIX='.o'
29577    EXE_SUFFIX=''
29578    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29579      # For full static builds, we're overloading the SHARED_LIBRARY
29580      # variables in order to limit the amount of changes required.
29581      # It would be better to remove SHARED and just use LIBRARY and
29582      # LIBRARY_SUFFIX for libraries that can be built either
29583      # shared or static and use STATIC_* for libraries that are
29584      # always built statically.
29585      if test "x$STATIC_BUILD" = xtrue; then
29586        SHARED_LIBRARY='lib$1.a'
29587        SHARED_LIBRARY_SUFFIX='.a'
29588      else
29589        SHARED_LIBRARY='lib$1.dylib'
29590        SHARED_LIBRARY_SUFFIX='.dylib'
29591      fi
29592    fi
29593  fi
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29605    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29606$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29607  else
29608    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29609$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29610  fi
29611
29612
29613# User supplied flags should be used when configure detects compilers
29614
29615  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29616    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29617$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29618  fi
29619
29620  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29621    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29622$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29623  fi
29624
29625  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29626    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29627$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29628  fi
29629
29630
29631# Check whether --with-extra-cflags was given.
29632if test "${with_extra_cflags+set}" = set; then :
29633  withval=$with_extra_cflags;
29634fi
29635
29636
29637
29638# Check whether --with-extra-cxxflags was given.
29639if test "${with_extra_cxxflags+set}" = set; then :
29640  withval=$with_extra_cxxflags;
29641fi
29642
29643
29644
29645# Check whether --with-extra-ldflags was given.
29646if test "${with_extra_ldflags+set}" = set; then :
29647  withval=$with_extra_ldflags;
29648fi
29649
29650
29651  EXTRA_CFLAGS="$with_extra_cflags"
29652  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29653  EXTRA_LDFLAGS="$with_extra_ldflags"
29654
29655  # Hotspot needs these set in their legacy form
29656  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29657  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29658  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29659
29660
29661
29662
29663
29664  # The global CFLAGS and LDLAGS variables are used by configure tests and
29665  # should include the extra parameters
29666  CFLAGS="$EXTRA_CFLAGS"
29667  CXXFLAGS="$EXTRA_CXXFLAGS"
29668  LDFLAGS="$EXTRA_LDFLAGS"
29669  CPPFLAGS=""
29670
29671# The sysroot cflags are needed for configure to be able to run the compilers
29672
29673  if test "x$SYSROOT" != "x"; then
29674    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29675      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29676        # Solaris Studio does not have a concept of sysroot. Instead we must
29677        # make sure the default include and lib dirs are appended to each
29678        # compile and link command line.
29679        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29680        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29681            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29682            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29683      fi
29684    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29685      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29686      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29687    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29688      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29689      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29690    fi
29691    # Propagate the sysroot args to hotspot
29692    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29693    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29694    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29695    # The global CFLAGS and LDFLAGS variables need these for configure to function
29696    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29697    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29698    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29699    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29700  fi
29701
29702  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29703    # We also need -iframework<path>/System/Library/Frameworks
29704    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29705    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29706    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29707    # set this here so it doesn't have to be peppered throughout the forest
29708    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29709    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29710  fi
29711
29712
29713
29714
29715
29716# Then detect the actual binaries needed
29717
29718  # FIXME: Is this needed?
29719  ac_ext=cpp
29720ac_cpp='$CXXCPP $CPPFLAGS'
29721ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29722ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29723ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29724
29725
29726  # Store the CFLAGS etc passed to the configure script.
29727  ORG_CFLAGS="$CFLAGS"
29728  ORG_CXXFLAGS="$CXXFLAGS"
29729
29730  # autoconf magic only relies on PATH, so update it if tools dir is specified
29731  OLD_PATH="$PATH"
29732
29733  # On Windows, we need to detect the visual studio installation first.
29734  # This will change the PATH, but we need to keep that new PATH even
29735  # after toolchain detection is done, since the compiler (on x86) uses
29736  # it for DLL resolution in runtime.
29737  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29738      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29739
29740  # Store path to cygwin link.exe to help excluding it when searching for
29741  # VS linker. This must be done before changing the PATH when looking for VS.
29742  # Extract the first word of "link", so it can be a program name with args.
29743set dummy link; ac_word=$2
29744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29745$as_echo_n "checking for $ac_word... " >&6; }
29746if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29747  $as_echo_n "(cached) " >&6
29748else
29749  case $CYGWIN_LINK in
29750  [\\/]* | ?:[\\/]*)
29751  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29752  ;;
29753  *)
29754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29755for as_dir in $PATH
29756do
29757  IFS=$as_save_IFS
29758  test -z "$as_dir" && as_dir=.
29759    for ac_exec_ext in '' $ac_executable_extensions; do
29760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29761    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29763    break 2
29764  fi
29765done
29766  done
29767IFS=$as_save_IFS
29768
29769  ;;
29770esac
29771fi
29772CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29773if test -n "$CYGWIN_LINK"; then
29774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29775$as_echo "$CYGWIN_LINK" >&6; }
29776else
29777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29778$as_echo "no" >&6; }
29779fi
29780
29781
29782  if test "x$CYGWIN_LINK" != x; then
29783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29784$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29785    "$CYGWIN_LINK" --version > /dev/null
29786    if test $? -eq 0 ; then
29787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29788$as_echo "yes" >&6; }
29789    else
29790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29791$as_echo "no" >&6; }
29792      # This might be the VS linker. Don't exclude it later on.
29793      CYGWIN_LINK=""
29794    fi
29795  fi
29796
29797  # First-hand choice is to locate and run the vsvars bat file.
29798
29799
29800# Check whether --with-toolchain-version was given.
29801if test "${with_toolchain_version+set}" = set; then :
29802  withval=$with_toolchain_version;
29803fi
29804
29805
29806  if test "x$with_toolchain_version" = xlist; then
29807    # List all toolchains
29808    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29809$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29810    for version in $VALID_VS_VERSIONS; do
29811      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29812      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29813    done
29814
29815    exit 0
29816  elif test "x$DEVKIT_VS_VERSION" != x; then
29817    VS_VERSION=$DEVKIT_VS_VERSION
29818    TOOLCHAIN_VERSION=$VS_VERSION
29819    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29820    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29821    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29822    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29823    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29824    VS_PATH="$TOOLCHAIN_PATH:$PATH"
29825
29826    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29827    # can still be exported as INCLUDE for compiler invocations without
29828    # SYSROOT_CFLAGS
29829    OLDIFS="$IFS"
29830    IFS=";"
29831    for i in $DEVKIT_VS_INCLUDE; do
29832      ipath=$i
29833
29834  unix_path="$ipath"
29835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29836    windows_path=`$CYGPATH -m "$unix_path"`
29837    ipath="$windows_path"
29838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29839    windows_path=`cmd //c echo $unix_path`
29840    ipath="$windows_path"
29841  fi
29842
29843      VS_INCLUDE="$VS_INCLUDE;$ipath"
29844    done
29845    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29846    # as LIB for compiler invocations without SYSROOT_LDFLAGS
29847    for i in $DEVKIT_VS_LIB; do
29848      libpath=$i
29849
29850  unix_path="$libpath"
29851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29852    windows_path=`$CYGPATH -m "$unix_path"`
29853    libpath="$windows_path"
29854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29855    windows_path=`cmd //c echo $unix_path`
29856    libpath="$windows_path"
29857  fi
29858
29859      VS_LIB="$VS_LIB;$libpath"
29860    done
29861    IFS="$OLDIFS"
29862
29863    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29864$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29865
29866  elif test "x$with_toolchain_version" != x; then
29867    # User override; check that it is valid
29868    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29869      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29870$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29871      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29872$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29873      as_fn_error $? "Cannot continue." "$LINENO" 5
29874    fi
29875    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29876  else
29877    # No flag given, use default
29878    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29879  fi
29880
29881  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29882
29883  VS_VERSION="$VS_VERSION"
29884  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29885  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29886  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29887  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29888
29889  # When using --with-tools-dir, assume it points to the correct and default
29890  # version of Visual Studio or that --with-toolchain-version was also set.
29891  if test "x$with_tools_dir" != x; then
29892
29893  if test "x$VS_ENV_CMD" = x; then
29894    VS_VERSION="${VS_VERSION}"
29895    VS_BASE="$with_tools_dir/../.."
29896    METHOD="--with-tools-dir"
29897
29898    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29899      VCVARSFILE="vc/bin/vcvars32.bat"
29900    else
29901      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29902    fi
29903
29904
29905  windows_path="$VS_BASE"
29906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29907    unix_path=`$CYGPATH -u "$windows_path"`
29908    VS_BASE="$unix_path"
29909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29911    VS_BASE="$unix_path"
29912  fi
29913
29914    if test -d "$VS_BASE"; then
29915      if test -f "$VS_BASE/$VCVARSFILE"; then
29916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29917$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29918        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29919        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29920        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29921        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29922      else
29923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29924$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29925        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29926$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29927      fi
29928    fi
29929  fi
29930
29931
29932  if test "x$VS_ENV_CMD" = x; then
29933    VS_VERSION="${VS_VERSION}"
29934    VS_BASE="$with_tools_dir/../../.."
29935    METHOD="--with-tools-dir"
29936
29937    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29938      VCVARSFILE="vc/bin/vcvars32.bat"
29939    else
29940      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29941    fi
29942
29943
29944  windows_path="$VS_BASE"
29945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29946    unix_path=`$CYGPATH -u "$windows_path"`
29947    VS_BASE="$unix_path"
29948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29950    VS_BASE="$unix_path"
29951  fi
29952
29953    if test -d "$VS_BASE"; then
29954      if test -f "$VS_BASE/$VCVARSFILE"; then
29955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29956$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29957        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29958        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29959        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29960        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29961      else
29962        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29963$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29964        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29965$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29966      fi
29967    fi
29968  fi
29969
29970    if test "x$VS_ENV_CMD" = x; then
29971      # Having specified an argument which is incorrect will produce an instant failure;
29972      # we should not go on looking
29973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29974$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29975      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29976$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29977      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29978$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29979      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29980    fi
29981  fi
29982
29983  VS_ENV_CMD=""
29984  VS_ENV_ARGS=""
29985
29986  if test "x$VS_COMNTOOLS" != x; then
29987
29988  if test "x$VS_ENV_CMD" = x; then
29989    VS_VERSION="${VS_VERSION}"
29990    VS_BASE="$VS_COMNTOOLS/../.."
29991    METHOD="$VS_COMNTOOLS_VAR variable"
29992
29993    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29994      VCVARSFILE="vc/bin/vcvars32.bat"
29995    else
29996      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29997    fi
29998
29999
30000  windows_path="$VS_BASE"
30001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30002    unix_path=`$CYGPATH -u "$windows_path"`
30003    VS_BASE="$unix_path"
30004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30006    VS_BASE="$unix_path"
30007  fi
30008
30009    if test -d "$VS_BASE"; then
30010      if test -f "$VS_BASE/$VCVARSFILE"; then
30011        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30012$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30013        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30014        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30015        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30016        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30017      else
30018        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30019$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30020        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30021$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30022      fi
30023    fi
30024  fi
30025
30026  fi
30027  if test "x$PROGRAMFILES" != x; then
30028
30029  if test "x$VS_ENV_CMD" = x; then
30030    VS_VERSION="${VS_VERSION}"
30031    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30032    METHOD="well-known name"
30033
30034    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30035      VCVARSFILE="vc/bin/vcvars32.bat"
30036    else
30037      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30038    fi
30039
30040
30041  windows_path="$VS_BASE"
30042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30043    unix_path=`$CYGPATH -u "$windows_path"`
30044    VS_BASE="$unix_path"
30045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30047    VS_BASE="$unix_path"
30048  fi
30049
30050    if test -d "$VS_BASE"; then
30051      if test -f "$VS_BASE/$VCVARSFILE"; then
30052        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30053$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30054        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30055        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30056        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30057        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30058      else
30059        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30060$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30061        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30062$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30063      fi
30064    fi
30065  fi
30066
30067  fi
30068  # Work around the insanely named ProgramFiles(x86) env variable
30069  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30070  if test "x$PROGRAMFILES_X86" != x; then
30071
30072  if test "x$VS_ENV_CMD" = x; then
30073    VS_VERSION="${VS_VERSION}"
30074    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30075    METHOD="well-known name"
30076
30077    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30078      VCVARSFILE="vc/bin/vcvars32.bat"
30079    else
30080      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30081    fi
30082
30083
30084  windows_path="$VS_BASE"
30085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30086    unix_path=`$CYGPATH -u "$windows_path"`
30087    VS_BASE="$unix_path"
30088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30090    VS_BASE="$unix_path"
30091  fi
30092
30093    if test -d "$VS_BASE"; then
30094      if test -f "$VS_BASE/$VCVARSFILE"; then
30095        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30096$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30097        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30098        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30099        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30100        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30101      else
30102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30103$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30104        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30105$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30106      fi
30107    fi
30108  fi
30109
30110  fi
30111
30112  if test "x$VS_ENV_CMD" = x; then
30113    VS_VERSION="${VS_VERSION}"
30114    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30115    METHOD="well-known name"
30116
30117    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30118      VCVARSFILE="vc/bin/vcvars32.bat"
30119    else
30120      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30121    fi
30122
30123
30124  windows_path="$VS_BASE"
30125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30126    unix_path=`$CYGPATH -u "$windows_path"`
30127    VS_BASE="$unix_path"
30128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30130    VS_BASE="$unix_path"
30131  fi
30132
30133    if test -d "$VS_BASE"; then
30134      if test -f "$VS_BASE/$VCVARSFILE"; then
30135        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30136$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30137        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30138        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30139        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30140        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30141      else
30142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30143$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30144        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30145$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30146      fi
30147    fi
30148  fi
30149
30150
30151  if test "x$VS_ENV_CMD" = x; then
30152    VS_VERSION="${VS_VERSION}"
30153    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30154    METHOD="well-known name"
30155
30156    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30157      VCVARSFILE="vc/bin/vcvars32.bat"
30158    else
30159      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30160    fi
30161
30162
30163  windows_path="$VS_BASE"
30164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30165    unix_path=`$CYGPATH -u "$windows_path"`
30166    VS_BASE="$unix_path"
30167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30169    VS_BASE="$unix_path"
30170  fi
30171
30172    if test -d "$VS_BASE"; then
30173      if test -f "$VS_BASE/$VCVARSFILE"; then
30174        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30175$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30176        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30177        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30178        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30179        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30180      else
30181        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30182$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30183        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30184$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30185      fi
30186    fi
30187  fi
30188
30189
30190  if test "x$SDK_INSTALL_DIR" != x; then
30191    if test "x$ProgramW6432" != x; then
30192
30193  if test "x$VS_ENV_CMD" = x; then
30194    VS_VERSION="${VS_VERSION}"
30195    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30196    METHOD="well-known name"
30197
30198  windows_path="$WIN_SDK_BASE"
30199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30200    unix_path=`$CYGPATH -u "$windows_path"`
30201    WIN_SDK_BASE="$unix_path"
30202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30204    WIN_SDK_BASE="$unix_path"
30205  fi
30206
30207    if test -d "$WIN_SDK_BASE"; then
30208      # There have been cases of partial or broken SDK installations. A missing
30209      # lib dir is not going to work.
30210      if test ! -d "$WIN_SDK_BASE/lib"; then
30211        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30212$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30214$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30215      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30216        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30217$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30218        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30219        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30220          VS_ENV_ARGS="/x86"
30221        else
30222          VS_ENV_ARGS="/x64"
30223        fi
30224        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30225        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30226        # TODO: improve detection for other versions of SDK
30227        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30228      else
30229        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30230$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30231        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30232$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30233      fi
30234    fi
30235  fi
30236
30237    fi
30238    if test "x$PROGRAMW6432" != x; then
30239
30240  if test "x$VS_ENV_CMD" = x; then
30241    VS_VERSION="${VS_VERSION}"
30242    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30243    METHOD="well-known name"
30244
30245  windows_path="$WIN_SDK_BASE"
30246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30247    unix_path=`$CYGPATH -u "$windows_path"`
30248    WIN_SDK_BASE="$unix_path"
30249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30251    WIN_SDK_BASE="$unix_path"
30252  fi
30253
30254    if test -d "$WIN_SDK_BASE"; then
30255      # There have been cases of partial or broken SDK installations. A missing
30256      # lib dir is not going to work.
30257      if test ! -d "$WIN_SDK_BASE/lib"; then
30258        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30259$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30260        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30261$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30262      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30263        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30264$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30265        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30266        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30267          VS_ENV_ARGS="/x86"
30268        else
30269          VS_ENV_ARGS="/x64"
30270        fi
30271        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30272        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30273        # TODO: improve detection for other versions of SDK
30274        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30275      else
30276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30277$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30278        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30279$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30280      fi
30281    fi
30282  fi
30283
30284    fi
30285    if test "x$PROGRAMFILES" != x; then
30286
30287  if test "x$VS_ENV_CMD" = x; then
30288    VS_VERSION="${VS_VERSION}"
30289    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30290    METHOD="well-known name"
30291
30292  windows_path="$WIN_SDK_BASE"
30293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30294    unix_path=`$CYGPATH -u "$windows_path"`
30295    WIN_SDK_BASE="$unix_path"
30296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30298    WIN_SDK_BASE="$unix_path"
30299  fi
30300
30301    if test -d "$WIN_SDK_BASE"; then
30302      # There have been cases of partial or broken SDK installations. A missing
30303      # lib dir is not going to work.
30304      if test ! -d "$WIN_SDK_BASE/lib"; then
30305        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30306$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30307        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30308$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30309      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30310        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30311$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30312        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30313        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30314          VS_ENV_ARGS="/x86"
30315        else
30316          VS_ENV_ARGS="/x64"
30317        fi
30318        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30319        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30320        # TODO: improve detection for other versions of SDK
30321        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30322      else
30323        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30324$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30325        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30326$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30327      fi
30328    fi
30329  fi
30330
30331    fi
30332
30333  if test "x$VS_ENV_CMD" = x; then
30334    VS_VERSION="${VS_VERSION}"
30335    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30336    METHOD="well-known name"
30337
30338  windows_path="$WIN_SDK_BASE"
30339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30340    unix_path=`$CYGPATH -u "$windows_path"`
30341    WIN_SDK_BASE="$unix_path"
30342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30344    WIN_SDK_BASE="$unix_path"
30345  fi
30346
30347    if test -d "$WIN_SDK_BASE"; then
30348      # There have been cases of partial or broken SDK installations. A missing
30349      # lib dir is not going to work.
30350      if test ! -d "$WIN_SDK_BASE/lib"; then
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30352$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30353        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30354$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30355      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30356        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30357$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30358        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30359        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30360          VS_ENV_ARGS="/x86"
30361        else
30362          VS_ENV_ARGS="/x64"
30363        fi
30364        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30365        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30366        # TODO: improve detection for other versions of SDK
30367        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30368      else
30369        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30370$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30371        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30372$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30373      fi
30374    fi
30375  fi
30376
30377
30378  if test "x$VS_ENV_CMD" = x; then
30379    VS_VERSION="${VS_VERSION}"
30380    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30381    METHOD="well-known name"
30382
30383  windows_path="$WIN_SDK_BASE"
30384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30385    unix_path=`$CYGPATH -u "$windows_path"`
30386    WIN_SDK_BASE="$unix_path"
30387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30389    WIN_SDK_BASE="$unix_path"
30390  fi
30391
30392    if test -d "$WIN_SDK_BASE"; then
30393      # There have been cases of partial or broken SDK installations. A missing
30394      # lib dir is not going to work.
30395      if test ! -d "$WIN_SDK_BASE/lib"; then
30396        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30397$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30398        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30399$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30400      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30402$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30403        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30404        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30405          VS_ENV_ARGS="/x86"
30406        else
30407          VS_ENV_ARGS="/x64"
30408        fi
30409        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30410        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30411        # TODO: improve detection for other versions of SDK
30412        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30413      else
30414        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30415$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30416        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30417$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30418      fi
30419    fi
30420  fi
30421
30422  fi
30423
30424    if test "x$VS_ENV_CMD" != x; then
30425      TOOLCHAIN_VERSION=$VS_VERSION
30426      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30427      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30428      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30429      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30430      # The rest of the variables are already evaled while probing
30431      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30432$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30433      break
30434    fi
30435  done
30436
30437
30438  # If we have a devkit, skip all of the below.
30439  if test "x$DEVKIT_VS_VERSION" = x; then
30440    if test "x$VS_ENV_CMD" != x; then
30441      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30442
30443  # Only process if variable expands to non-empty
30444
30445  if test "x$VS_ENV_CMD" != x; then
30446    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30447
30448  # First separate the path from the arguments. This will split at the first
30449  # space.
30450  complete="$VS_ENV_CMD"
30451  path="${complete%% *}"
30452  tmp="$complete EOL"
30453  arguments="${tmp#* }"
30454
30455  # Input might be given as Windows format, start by converting to
30456  # unix format.
30457  new_path=`$CYGPATH -u "$path"`
30458
30459  # Now try to locate executable using which
30460  new_path=`$WHICH "$new_path" 2> /dev/null`
30461  # bat and cmd files are not always considered executable in cygwin causing which
30462  # to not find them
30463  if test "x$new_path" = x \
30464      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30465      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30466    new_path=`$CYGPATH -u "$path"`
30467  fi
30468  if test "x$new_path" = x; then
30469    # Oops. Which didn't find the executable.
30470    # The splitting of arguments from the executable at a space might have been incorrect,
30471    # since paths with space are more likely in Windows. Give it another try with the whole
30472    # argument.
30473    path="$complete"
30474    arguments="EOL"
30475    new_path=`$CYGPATH -u "$path"`
30476    new_path=`$WHICH "$new_path" 2> /dev/null`
30477    # bat and cmd files are not always considered executable in cygwin causing which
30478    # to not find them
30479    if test "x$new_path" = x \
30480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30482      new_path=`$CYGPATH -u "$path"`
30483    fi
30484    if test "x$new_path" = x; then
30485      # It's still not found. Now this is an unrecoverable error.
30486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30487$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30488      has_space=`$ECHO "$complete" | $GREP " "`
30489      if test "x$has_space" != x; then
30490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30492      fi
30493      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30494    fi
30495  fi
30496
30497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30500  # "foo.exe" is OK but "foo" is an error.
30501  #
30502  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30503  # It is also a way to make sure we got the proper file name for the real test later on.
30504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30505  if test "x$test_shortpath" = x; then
30506    # Short path failed, file does not exist as specified.
30507    # Try adding .exe or .cmd
30508    if test -f "${new_path}.exe"; then
30509      input_to_shortpath="${new_path}.exe"
30510    elif test -f "${new_path}.cmd"; then
30511      input_to_shortpath="${new_path}.cmd"
30512    else
30513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30514$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30515      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30516$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30517      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30518    fi
30519  else
30520    input_to_shortpath="$new_path"
30521  fi
30522
30523  # Call helper function which possibly converts this using DOS-style short mode.
30524  # If so, the updated path is stored in $new_path.
30525  new_path="$input_to_shortpath"
30526
30527  input_path="$input_to_shortpath"
30528  # Check if we need to convert this using DOS-style short mode. If the path
30529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30530  # take no chances and rewrite it.
30531  # Note: m4 eats our [], so we need to use [ and ] instead.
30532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30533  if test "x$has_forbidden_chars" != x; then
30534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30538      # Going to short mode and back again did indeed matter. Since short mode is
30539      # case insensitive, let's make it lowercase to improve readability.
30540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30541      # Now convert it back to Unix-style (cygpath)
30542      input_path=`$CYGPATH -u "$shortmode_path"`
30543      new_path="$input_path"
30544    fi
30545  fi
30546
30547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30548  if test "x$test_cygdrive_prefix" = x; then
30549    # As a simple fix, exclude /usr/bin since it's not a real path.
30550    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30552      # a path prefixed by /cygdrive for fixpath to work.
30553      new_path="$CYGWIN_ROOT_PATH$input_path"
30554    fi
30555  fi
30556
30557  # remove trailing .exe if any
30558  new_path="${new_path/%.exe/}"
30559
30560    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30561
30562  # First separate the path from the arguments. This will split at the first
30563  # space.
30564  complete="$VS_ENV_CMD"
30565  path="${complete%% *}"
30566  tmp="$complete EOL"
30567  arguments="${tmp#* }"
30568
30569  # Input might be given as Windows format, start by converting to
30570  # unix format.
30571  new_path="$path"
30572
30573  windows_path="$new_path"
30574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30575    unix_path=`$CYGPATH -u "$windows_path"`
30576    new_path="$unix_path"
30577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30579    new_path="$unix_path"
30580  fi
30581
30582
30583  # Now try to locate executable using which
30584  new_path=`$WHICH "$new_path" 2> /dev/null`
30585
30586  if test "x$new_path" = x; then
30587    # Oops. Which didn't find the executable.
30588    # The splitting of arguments from the executable at a space might have been incorrect,
30589    # since paths with space are more likely in Windows. Give it another try with the whole
30590    # argument.
30591    path="$complete"
30592    arguments="EOL"
30593    new_path="$path"
30594
30595  windows_path="$new_path"
30596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30597    unix_path=`$CYGPATH -u "$windows_path"`
30598    new_path="$unix_path"
30599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30601    new_path="$unix_path"
30602  fi
30603
30604
30605    new_path=`$WHICH "$new_path" 2> /dev/null`
30606    # bat and cmd files are not always considered executable in MSYS causing which
30607    # to not find them
30608    if test "x$new_path" = x \
30609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30611      new_path="$path"
30612
30613  windows_path="$new_path"
30614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30615    unix_path=`$CYGPATH -u "$windows_path"`
30616    new_path="$unix_path"
30617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30619    new_path="$unix_path"
30620  fi
30621
30622    fi
30623
30624    if test "x$new_path" = x; then
30625      # It's still not found. Now this is an unrecoverable error.
30626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30627$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30628      has_space=`$ECHO "$complete" | $GREP " "`
30629      if test "x$has_space" != x; then
30630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30632      fi
30633      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30634    fi
30635  fi
30636
30637  # Now new_path has a complete unix path to the binary
30638  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30639    # Keep paths in /bin as-is, but remove trailing .exe if any
30640    new_path="${new_path/%.exe/}"
30641    # Do not save /bin paths to all_fixpath_prefixes!
30642  else
30643    # Not in mixed or Windows style, start by that.
30644    new_path=`cmd //c echo $new_path`
30645
30646  input_path="$new_path"
30647  # Check if we need to convert this using DOS-style short mode. If the path
30648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30649  # take no chances and rewrite it.
30650  # Note: m4 eats our [], so we need to use [ and ] instead.
30651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30652  if test "x$has_forbidden_chars" != x; then
30653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30655  fi
30656
30657    # Output is in $new_path
30658
30659  windows_path="$new_path"
30660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30661    unix_path=`$CYGPATH -u "$windows_path"`
30662    new_path="$unix_path"
30663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30665    new_path="$unix_path"
30666  fi
30667
30668    # remove trailing .exe if any
30669    new_path="${new_path/%.exe/}"
30670
30671    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30672    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30673  fi
30674
30675    else
30676      # We're on a unix platform. Hooray! :)
30677      # First separate the path from the arguments. This will split at the first
30678      # space.
30679      complete="$VS_ENV_CMD"
30680      path="${complete%% *}"
30681      tmp="$complete EOL"
30682      arguments="${tmp#* }"
30683
30684      # Cannot rely on the command "which" here since it doesn't always work.
30685      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30686      if test -z "$is_absolute_path"; then
30687        # Path to executable is not absolute. Find it.
30688        IFS_save="$IFS"
30689        IFS=:
30690        for p in $PATH; do
30691          if test -f "$p/$path" && test -x "$p/$path"; then
30692            new_path="$p/$path"
30693            break
30694          fi
30695        done
30696        IFS="$IFS_save"
30697      else
30698        # This is an absolute path, we can use it without further modifications.
30699        new_path="$path"
30700      fi
30701
30702      if test "x$new_path" = x; then
30703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30704$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30705        has_space=`$ECHO "$complete" | $GREP " "`
30706        if test "x$has_space" != x; then
30707          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30708$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30709        fi
30710        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30711      fi
30712    fi
30713
30714    # Now join together the path and the arguments once again
30715    if test "x$arguments" != xEOL; then
30716      new_complete="$new_path ${arguments% *}"
30717    else
30718      new_complete="$new_path"
30719    fi
30720
30721    if test "x$complete" != "x$new_complete"; then
30722      VS_ENV_CMD="$new_complete"
30723      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30724$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30725    fi
30726  fi
30727
30728
30729      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30730      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30731$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30732
30733      # We need to create a couple of temporary files.
30734      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30735      $MKDIR -p $VS_ENV_TMP_DIR
30736
30737      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30738      # Instead create a shell script which will set the relevant variables when run.
30739      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30740
30741  unix_path="$WINPATH_VS_ENV_CMD"
30742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30743    windows_path=`$CYGPATH -m "$unix_path"`
30744    WINPATH_VS_ENV_CMD="$windows_path"
30745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30746    windows_path=`cmd //c echo $unix_path`
30747    WINPATH_VS_ENV_CMD="$windows_path"
30748  fi
30749
30750      WINPATH_BASH="$BASH"
30751
30752  unix_path="$WINPATH_BASH"
30753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30754    windows_path=`$CYGPATH -m "$unix_path"`
30755    WINPATH_BASH="$windows_path"
30756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30757    windows_path=`cmd //c echo $unix_path`
30758    WINPATH_BASH="$windows_path"
30759  fi
30760
30761
30762      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30763      # script (executable by bash) that will setup the important variables.
30764      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30765      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30766      # This will end up something like:
30767      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30768      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30769      # These will end up something like:
30770      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30771      # The trailing space for everyone except PATH is no typo, but is needed due
30772      # to trailing \ in the Windows paths. These will be stripped later.
30773      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30774          >> $EXTRACT_VC_ENV_BAT_FILE
30775      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30776          >> $EXTRACT_VC_ENV_BAT_FILE
30777      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30778          >> $EXTRACT_VC_ENV_BAT_FILE
30779      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30780          >> $EXTRACT_VC_ENV_BAT_FILE
30781      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30782          >> $EXTRACT_VC_ENV_BAT_FILE
30783      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30784          >> $EXTRACT_VC_ENV_BAT_FILE
30785
30786      # Now execute the newly created bat file.
30787      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30788      # Change directory so we don't need to mess with Windows paths in redirects.
30789      cd $VS_ENV_TMP_DIR
30790      cmd /c extract-vs-env.bat | $CAT
30791      cd $CURDIR
30792
30793      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30794        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30795$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30796        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30797$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30798        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30799$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30800        as_fn_error $? "Cannot continue" "$LINENO" 5
30801      fi
30802
30803      # Now set all paths and other env variables. This will allow the rest of
30804      # the configure script to find and run the compiler in the proper way.
30805      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30806$as_echo "$as_me: Setting extracted environment variables" >&6;}
30807      . $VS_ENV_TMP_DIR/set-vs-env.sh
30808      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30809      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30810    else
30811      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30812      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30813$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30814    fi
30815  fi
30816
30817  # At this point, we should have correct variables in the environment, or we can't continue.
30818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30819$as_echo_n "checking for Visual Studio variables... " >&6; }
30820
30821  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30822      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30823    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30825$as_echo "present but broken" >&6; }
30826      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30827    else
30828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30829$as_echo "ok" >&6; }
30830      # Remove any trailing "\" ";" and " " from the variables.
30831      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30832      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30833      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30834      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30835      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30836      # Remove any paths containing # (typically F#) as that messes up make. This
30837      # is needed if visual studio was installed with F# support.
30838      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30839
30840
30841
30842
30843
30844      # Convert VS_INCLUDE into SYSROOT_CFLAGS
30845      OLDIFS="$IFS"
30846      IFS=";"
30847      for i in $VS_INCLUDE; do
30848        ipath=$i
30849        # Only process non-empty elements
30850        if test "x$ipath" != x; then
30851          IFS="$OLDIFS"
30852          # Check that directory exists before calling fixup_path
30853          testpath=$ipath
30854
30855  windows_path="$testpath"
30856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30857    unix_path=`$CYGPATH -u "$windows_path"`
30858    testpath="$unix_path"
30859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30861    testpath="$unix_path"
30862  fi
30863
30864          if test -d "$testpath"; then
30865
30866  # Only process if variable expands to non-empty
30867
30868  if test "x$ipath" != x; then
30869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30870
30871  # Input might be given as Windows format, start by converting to
30872  # unix format.
30873  path="$ipath"
30874  new_path=`$CYGPATH -u "$path"`
30875
30876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30879  # "foo.exe" is OK but "foo" is an error.
30880  #
30881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30882  # It is also a way to make sure we got the proper file name for the real test later on.
30883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30884  if test "x$test_shortpath" = x; then
30885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30886$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30887    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30888  fi
30889
30890  # Call helper function which possibly converts this using DOS-style short mode.
30891  # If so, the updated path is stored in $new_path.
30892
30893  input_path="$new_path"
30894  # Check if we need to convert this using DOS-style short mode. If the path
30895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30896  # take no chances and rewrite it.
30897  # Note: m4 eats our [], so we need to use [ and ] instead.
30898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30899  if test "x$has_forbidden_chars" != x; then
30900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30904      # Going to short mode and back again did indeed matter. Since short mode is
30905      # case insensitive, let's make it lowercase to improve readability.
30906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30907      # Now convert it back to Unix-style (cygpath)
30908      input_path=`$CYGPATH -u "$shortmode_path"`
30909      new_path="$input_path"
30910    fi
30911  fi
30912
30913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30914  if test "x$test_cygdrive_prefix" = x; then
30915    # As a simple fix, exclude /usr/bin since it's not a real path.
30916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30918      # a path prefixed by /cygdrive for fixpath to work.
30919      new_path="$CYGWIN_ROOT_PATH$input_path"
30920    fi
30921  fi
30922
30923
30924  if test "x$path" != "x$new_path"; then
30925    ipath="$new_path"
30926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30927$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30928  fi
30929
30930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30931
30932  path="$ipath"
30933  has_colon=`$ECHO $path | $GREP ^.:`
30934  new_path="$path"
30935  if test "x$has_colon" = x; then
30936    # Not in mixed or Windows style, start by that.
30937    new_path=`cmd //c echo $path`
30938  fi
30939
30940
30941  input_path="$new_path"
30942  # Check if we need to convert this using DOS-style short mode. If the path
30943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30944  # take no chances and rewrite it.
30945  # Note: m4 eats our [], so we need to use [ and ] instead.
30946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30947  if test "x$has_forbidden_chars" != x; then
30948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30950  fi
30951
30952
30953  windows_path="$new_path"
30954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30955    unix_path=`$CYGPATH -u "$windows_path"`
30956    new_path="$unix_path"
30957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30959    new_path="$unix_path"
30960  fi
30961
30962  if test "x$path" != "x$new_path"; then
30963    ipath="$new_path"
30964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30965$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30966  fi
30967
30968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30970
30971    else
30972      # We're on a unix platform. Hooray! :)
30973      path="$ipath"
30974      has_space=`$ECHO "$path" | $GREP " "`
30975      if test "x$has_space" != x; then
30976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30977$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30978        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30979      fi
30980
30981      # Use eval to expand a potential ~
30982      eval path="$path"
30983      if test ! -f "$path" && test ! -d "$path"; then
30984        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30985      fi
30986
30987      ipath="`cd "$path"; $THEPWDCMD -L`"
30988    fi
30989  fi
30990
30991            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30992          fi
30993          IFS=";"
30994        fi
30995      done
30996      # Convert VS_LIB into SYSROOT_LDFLAGS
30997      for i in $VS_LIB; do
30998        libpath=$i
30999        # Only process non-empty elements
31000        if test "x$libpath" != x; then
31001          IFS="$OLDIFS"
31002          # Check that directory exists before calling fixup_path
31003          testpath=$libpath
31004
31005  windows_path="$testpath"
31006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31007    unix_path=`$CYGPATH -u "$windows_path"`
31008    testpath="$unix_path"
31009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31011    testpath="$unix_path"
31012  fi
31013
31014          if test -d "$testpath"; then
31015
31016  # Only process if variable expands to non-empty
31017
31018  if test "x$libpath" != x; then
31019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31020
31021  # Input might be given as Windows format, start by converting to
31022  # unix format.
31023  path="$libpath"
31024  new_path=`$CYGPATH -u "$path"`
31025
31026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31029  # "foo.exe" is OK but "foo" is an error.
31030  #
31031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31032  # It is also a way to make sure we got the proper file name for the real test later on.
31033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31034  if test "x$test_shortpath" = x; then
31035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31036$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31037    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31038  fi
31039
31040  # Call helper function which possibly converts this using DOS-style short mode.
31041  # If so, the updated path is stored in $new_path.
31042
31043  input_path="$new_path"
31044  # Check if we need to convert this using DOS-style short mode. If the path
31045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31046  # take no chances and rewrite it.
31047  # Note: m4 eats our [], so we need to use [ and ] instead.
31048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31049  if test "x$has_forbidden_chars" != x; then
31050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31054      # Going to short mode and back again did indeed matter. Since short mode is
31055      # case insensitive, let's make it lowercase to improve readability.
31056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31057      # Now convert it back to Unix-style (cygpath)
31058      input_path=`$CYGPATH -u "$shortmode_path"`
31059      new_path="$input_path"
31060    fi
31061  fi
31062
31063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31064  if test "x$test_cygdrive_prefix" = x; then
31065    # As a simple fix, exclude /usr/bin since it's not a real path.
31066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31068      # a path prefixed by /cygdrive for fixpath to work.
31069      new_path="$CYGWIN_ROOT_PATH$input_path"
31070    fi
31071  fi
31072
31073
31074  if test "x$path" != "x$new_path"; then
31075    libpath="$new_path"
31076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31077$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31078  fi
31079
31080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31081
31082  path="$libpath"
31083  has_colon=`$ECHO $path | $GREP ^.:`
31084  new_path="$path"
31085  if test "x$has_colon" = x; then
31086    # Not in mixed or Windows style, start by that.
31087    new_path=`cmd //c echo $path`
31088  fi
31089
31090
31091  input_path="$new_path"
31092  # Check if we need to convert this using DOS-style short mode. If the path
31093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31094  # take no chances and rewrite it.
31095  # Note: m4 eats our [], so we need to use [ and ] instead.
31096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31097  if test "x$has_forbidden_chars" != x; then
31098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31100  fi
31101
31102
31103  windows_path="$new_path"
31104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31105    unix_path=`$CYGPATH -u "$windows_path"`
31106    new_path="$unix_path"
31107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31109    new_path="$unix_path"
31110  fi
31111
31112  if test "x$path" != "x$new_path"; then
31113    libpath="$new_path"
31114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31115$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31116  fi
31117
31118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31120
31121    else
31122      # We're on a unix platform. Hooray! :)
31123      path="$libpath"
31124      has_space=`$ECHO "$path" | $GREP " "`
31125      if test "x$has_space" != x; then
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31127$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31129      fi
31130
31131      # Use eval to expand a potential ~
31132      eval path="$path"
31133      if test ! -f "$path" && test ! -d "$path"; then
31134        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31135      fi
31136
31137      libpath="`cd "$path"; $THEPWDCMD -L`"
31138    fi
31139  fi
31140
31141            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31142          fi
31143          IFS=";"
31144        fi
31145      done
31146      IFS="$OLDIFS"
31147    fi
31148  else
31149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31150$as_echo "not found" >&6; }
31151
31152    if test "x$VS_ENV_CMD" = x; then
31153      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31154$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31155      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31156$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31157    else
31158      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31159$as_echo "$as_me: Running the extraction script failed." >&6;}
31160    fi
31161    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31162$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31163    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31164$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31165    as_fn_error $? "Cannot continue" "$LINENO" 5
31166  fi
31167
31168    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31169    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31170    PATH="$VS_PATH"
31171    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31172    export INCLUDE="$VS_INCLUDE"
31173    export LIB="$VS_LIB"
31174  fi
31175
31176  # For solaris we really need solaris tools, and not the GNU equivalent.
31177  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31178  # so add that to path before starting to probe.
31179  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31180  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31181    PATH="/usr/ccs/bin:$PATH"
31182  fi
31183
31184  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31185  # override all other locations.
31186  if test "x$TOOLCHAIN_PATH" != x; then
31187    PATH=$TOOLCHAIN_PATH:$PATH
31188  fi
31189
31190
31191  #
31192  # Setup the compilers (CC and CXX)
31193  #
31194
31195  COMPILER_NAME=C
31196  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31197
31198  if test "x$CC" != x; then
31199    # User has supplied compiler name already, always let that override.
31200    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31201$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31202    if test "x`basename $CC`" = "x$CC"; then
31203      # A command without a complete path is provided, search $PATH.
31204
31205      for ac_prog in $CC
31206do
31207  # Extract the first word of "$ac_prog", so it can be a program name with args.
31208set dummy $ac_prog; ac_word=$2
31209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31210$as_echo_n "checking for $ac_word... " >&6; }
31211if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31212  $as_echo_n "(cached) " >&6
31213else
31214  case $POTENTIAL_CC in
31215  [\\/]* | ?:[\\/]*)
31216  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31217  ;;
31218  *)
31219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31220for as_dir in $PATH
31221do
31222  IFS=$as_save_IFS
31223  test -z "$as_dir" && as_dir=.
31224    for ac_exec_ext in '' $ac_executable_extensions; do
31225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31226    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31228    break 2
31229  fi
31230done
31231  done
31232IFS=$as_save_IFS
31233
31234  ;;
31235esac
31236fi
31237POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31238if test -n "$POTENTIAL_CC"; then
31239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31240$as_echo "$POTENTIAL_CC" >&6; }
31241else
31242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31243$as_echo "no" >&6; }
31244fi
31245
31246
31247  test -n "$POTENTIAL_CC" && break
31248done
31249
31250      if test "x$POTENTIAL_CC" != x; then
31251        CC=$POTENTIAL_CC
31252      else
31253        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31254      fi
31255    else
31256      # Otherwise it might already be a complete path
31257      if test ! -x "$CC"; then
31258        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31259      fi
31260    fi
31261  else
31262    # No user supplied value. Locate compiler ourselves.
31263
31264    # If we are cross compiling, assume cross compilation tools follows the
31265    # cross compilation standard where they are prefixed with the autoconf
31266    # standard name for the target. For example the binary
31267    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31268    # If we are not cross compiling, then the default compiler name will be
31269    # used.
31270
31271    CC=
31272    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31273    # before checking the rest of the PATH.
31274    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31275    # step, this should not be necessary.
31276    if test -n "$TOOLCHAIN_PATH"; then
31277      PATH_save="$PATH"
31278      PATH="$TOOLCHAIN_PATH"
31279      for ac_prog in $SEARCH_LIST
31280do
31281  # Extract the first word of "$ac_prog", so it can be a program name with args.
31282set dummy $ac_prog; ac_word=$2
31283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31284$as_echo_n "checking for $ac_word... " >&6; }
31285if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31286  $as_echo_n "(cached) " >&6
31287else
31288  case $TOOLCHAIN_PATH_CC in
31289  [\\/]* | ?:[\\/]*)
31290  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31291  ;;
31292  *)
31293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31294for as_dir in $PATH
31295do
31296  IFS=$as_save_IFS
31297  test -z "$as_dir" && as_dir=.
31298    for ac_exec_ext in '' $ac_executable_extensions; do
31299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31300    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31302    break 2
31303  fi
31304done
31305  done
31306IFS=$as_save_IFS
31307
31308  ;;
31309esac
31310fi
31311TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31312if test -n "$TOOLCHAIN_PATH_CC"; then
31313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31314$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31315else
31316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31317$as_echo "no" >&6; }
31318fi
31319
31320
31321  test -n "$TOOLCHAIN_PATH_CC" && break
31322done
31323
31324      CC=$TOOLCHAIN_PATH_CC
31325      PATH="$PATH_save"
31326    fi
31327
31328    # AC_PATH_PROGS can't be run multiple times with the same variable,
31329    # so create a new name for this run.
31330    if test "x$CC" = x; then
31331      for ac_prog in $SEARCH_LIST
31332do
31333  # Extract the first word of "$ac_prog", so it can be a program name with args.
31334set dummy $ac_prog; ac_word=$2
31335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31336$as_echo_n "checking for $ac_word... " >&6; }
31337if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31338  $as_echo_n "(cached) " >&6
31339else
31340  case $POTENTIAL_CC in
31341  [\\/]* | ?:[\\/]*)
31342  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31343  ;;
31344  *)
31345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31346for as_dir in $PATH
31347do
31348  IFS=$as_save_IFS
31349  test -z "$as_dir" && as_dir=.
31350    for ac_exec_ext in '' $ac_executable_extensions; do
31351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31352    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31354    break 2
31355  fi
31356done
31357  done
31358IFS=$as_save_IFS
31359
31360  ;;
31361esac
31362fi
31363POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31364if test -n "$POTENTIAL_CC"; then
31365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31366$as_echo "$POTENTIAL_CC" >&6; }
31367else
31368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31369$as_echo "no" >&6; }
31370fi
31371
31372
31373  test -n "$POTENTIAL_CC" && break
31374done
31375
31376      CC=$POTENTIAL_CC
31377    fi
31378
31379    if test "x$CC" = x; then
31380
31381  # Print a helpful message on how to acquire the necessary build dependency.
31382  # devkit is the help tag: freetype, cups, alsa etc
31383  MISSING_DEPENDENCY=devkit
31384
31385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31386    cygwin_help $MISSING_DEPENDENCY
31387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31388    msys_help $MISSING_DEPENDENCY
31389  else
31390    PKGHANDLER_COMMAND=
31391
31392    case $PKGHANDLER in
31393      apt-get)
31394        apt_help     $MISSING_DEPENDENCY ;;
31395      yum)
31396        yum_help     $MISSING_DEPENDENCY ;;
31397      port)
31398        port_help    $MISSING_DEPENDENCY ;;
31399      pkgutil)
31400        pkgutil_help $MISSING_DEPENDENCY ;;
31401      pkgadd)
31402        pkgadd_help  $MISSING_DEPENDENCY ;;
31403    esac
31404
31405    if test "x$PKGHANDLER_COMMAND" != x; then
31406      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31407    fi
31408  fi
31409
31410      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31411    fi
31412  fi
31413
31414  # Now we have a compiler binary in CC. Make sure it's okay.
31415
31416  # Only process if variable expands to non-empty
31417
31418  if test "x$CC" != x; then
31419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31420
31421  # First separate the path from the arguments. This will split at the first
31422  # space.
31423  complete="$CC"
31424  path="${complete%% *}"
31425  tmp="$complete EOL"
31426  arguments="${tmp#* }"
31427
31428  # Input might be given as Windows format, start by converting to
31429  # unix format.
31430  new_path=`$CYGPATH -u "$path"`
31431
31432  # Now try to locate executable using which
31433  new_path=`$WHICH "$new_path" 2> /dev/null`
31434  # bat and cmd files are not always considered executable in cygwin causing which
31435  # to not find them
31436  if test "x$new_path" = x \
31437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31439    new_path=`$CYGPATH -u "$path"`
31440  fi
31441  if test "x$new_path" = x; then
31442    # Oops. Which didn't find the executable.
31443    # The splitting of arguments from the executable at a space might have been incorrect,
31444    # since paths with space are more likely in Windows. Give it another try with the whole
31445    # argument.
31446    path="$complete"
31447    arguments="EOL"
31448    new_path=`$CYGPATH -u "$path"`
31449    new_path=`$WHICH "$new_path" 2> /dev/null`
31450    # bat and cmd files are not always considered executable in cygwin causing which
31451    # to not find them
31452    if test "x$new_path" = x \
31453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31455      new_path=`$CYGPATH -u "$path"`
31456    fi
31457    if test "x$new_path" = x; then
31458      # It's still not found. Now this is an unrecoverable error.
31459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31460$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31461      has_space=`$ECHO "$complete" | $GREP " "`
31462      if test "x$has_space" != x; then
31463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31465      fi
31466      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31467    fi
31468  fi
31469
31470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31473  # "foo.exe" is OK but "foo" is an error.
31474  #
31475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31476  # It is also a way to make sure we got the proper file name for the real test later on.
31477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31478  if test "x$test_shortpath" = x; then
31479    # Short path failed, file does not exist as specified.
31480    # Try adding .exe or .cmd
31481    if test -f "${new_path}.exe"; then
31482      input_to_shortpath="${new_path}.exe"
31483    elif test -f "${new_path}.cmd"; then
31484      input_to_shortpath="${new_path}.cmd"
31485    else
31486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31487$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31490      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31491    fi
31492  else
31493    input_to_shortpath="$new_path"
31494  fi
31495
31496  # Call helper function which possibly converts this using DOS-style short mode.
31497  # If so, the updated path is stored in $new_path.
31498  new_path="$input_to_shortpath"
31499
31500  input_path="$input_to_shortpath"
31501  # Check if we need to convert this using DOS-style short mode. If the path
31502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31503  # take no chances and rewrite it.
31504  # Note: m4 eats our [], so we need to use [ and ] instead.
31505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31506  if test "x$has_forbidden_chars" != x; then
31507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31511      # Going to short mode and back again did indeed matter. Since short mode is
31512      # case insensitive, let's make it lowercase to improve readability.
31513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31514      # Now convert it back to Unix-style (cygpath)
31515      input_path=`$CYGPATH -u "$shortmode_path"`
31516      new_path="$input_path"
31517    fi
31518  fi
31519
31520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31521  if test "x$test_cygdrive_prefix" = x; then
31522    # As a simple fix, exclude /usr/bin since it's not a real path.
31523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31525      # a path prefixed by /cygdrive for fixpath to work.
31526      new_path="$CYGWIN_ROOT_PATH$input_path"
31527    fi
31528  fi
31529
31530  # remove trailing .exe if any
31531  new_path="${new_path/%.exe/}"
31532
31533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31534
31535  # First separate the path from the arguments. This will split at the first
31536  # space.
31537  complete="$CC"
31538  path="${complete%% *}"
31539  tmp="$complete EOL"
31540  arguments="${tmp#* }"
31541
31542  # Input might be given as Windows format, start by converting to
31543  # unix format.
31544  new_path="$path"
31545
31546  windows_path="$new_path"
31547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31548    unix_path=`$CYGPATH -u "$windows_path"`
31549    new_path="$unix_path"
31550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31552    new_path="$unix_path"
31553  fi
31554
31555
31556  # Now try to locate executable using which
31557  new_path=`$WHICH "$new_path" 2> /dev/null`
31558
31559  if test "x$new_path" = x; then
31560    # Oops. Which didn't find the executable.
31561    # The splitting of arguments from the executable at a space might have been incorrect,
31562    # since paths with space are more likely in Windows. Give it another try with the whole
31563    # argument.
31564    path="$complete"
31565    arguments="EOL"
31566    new_path="$path"
31567
31568  windows_path="$new_path"
31569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31570    unix_path=`$CYGPATH -u "$windows_path"`
31571    new_path="$unix_path"
31572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31574    new_path="$unix_path"
31575  fi
31576
31577
31578    new_path=`$WHICH "$new_path" 2> /dev/null`
31579    # bat and cmd files are not always considered executable in MSYS causing which
31580    # to not find them
31581    if test "x$new_path" = x \
31582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31584      new_path="$path"
31585
31586  windows_path="$new_path"
31587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31588    unix_path=`$CYGPATH -u "$windows_path"`
31589    new_path="$unix_path"
31590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31592    new_path="$unix_path"
31593  fi
31594
31595    fi
31596
31597    if test "x$new_path" = x; then
31598      # It's still not found. Now this is an unrecoverable error.
31599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31600$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31601      has_space=`$ECHO "$complete" | $GREP " "`
31602      if test "x$has_space" != x; then
31603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31605      fi
31606      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31607    fi
31608  fi
31609
31610  # Now new_path has a complete unix path to the binary
31611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31612    # Keep paths in /bin as-is, but remove trailing .exe if any
31613    new_path="${new_path/%.exe/}"
31614    # Do not save /bin paths to all_fixpath_prefixes!
31615  else
31616    # Not in mixed or Windows style, start by that.
31617    new_path=`cmd //c echo $new_path`
31618
31619  input_path="$new_path"
31620  # Check if we need to convert this using DOS-style short mode. If the path
31621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31622  # take no chances and rewrite it.
31623  # Note: m4 eats our [], so we need to use [ and ] instead.
31624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31625  if test "x$has_forbidden_chars" != x; then
31626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31628  fi
31629
31630    # Output is in $new_path
31631
31632  windows_path="$new_path"
31633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31634    unix_path=`$CYGPATH -u "$windows_path"`
31635    new_path="$unix_path"
31636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31638    new_path="$unix_path"
31639  fi
31640
31641    # remove trailing .exe if any
31642    new_path="${new_path/%.exe/}"
31643
31644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31646  fi
31647
31648    else
31649      # We're on a unix platform. Hooray! :)
31650      # First separate the path from the arguments. This will split at the first
31651      # space.
31652      complete="$CC"
31653      path="${complete%% *}"
31654      tmp="$complete EOL"
31655      arguments="${tmp#* }"
31656
31657      # Cannot rely on the command "which" here since it doesn't always work.
31658      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31659      if test -z "$is_absolute_path"; then
31660        # Path to executable is not absolute. Find it.
31661        IFS_save="$IFS"
31662        IFS=:
31663        for p in $PATH; do
31664          if test -f "$p/$path" && test -x "$p/$path"; then
31665            new_path="$p/$path"
31666            break
31667          fi
31668        done
31669        IFS="$IFS_save"
31670      else
31671        # This is an absolute path, we can use it without further modifications.
31672        new_path="$path"
31673      fi
31674
31675      if test "x$new_path" = x; then
31676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31677$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31678        has_space=`$ECHO "$complete" | $GREP " "`
31679        if test "x$has_space" != x; then
31680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31682        fi
31683        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31684      fi
31685    fi
31686
31687    # Now join together the path and the arguments once again
31688    if test "x$arguments" != xEOL; then
31689      new_complete="$new_path ${arguments% *}"
31690    else
31691      new_complete="$new_path"
31692    fi
31693
31694    if test "x$complete" != "x$new_complete"; then
31695      CC="$new_complete"
31696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31697$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31698    fi
31699  fi
31700
31701  TEST_COMPILER="$CC"
31702  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31703  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31704  if test "x$OPENJDK_BUILD_OS" != xaix; then
31705    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31707$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31708
31709  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31710    # Follow a chain of symbolic links. Use readlink
31711    # where it exists, else fall back to horribly
31712    # complicated shell code.
31713    if test "x$READLINK_TESTED" != yes; then
31714      # On MacOSX there is a readlink tool with a different
31715      # purpose than the GNU readlink tool. Check the found readlink.
31716      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31717      if test "x$ISGNU" = x; then
31718        # A readlink that we do not know how to use.
31719        # Are there other non-GNU readlinks out there?
31720        READLINK_TESTED=yes
31721        READLINK=
31722      fi
31723    fi
31724
31725    if test "x$READLINK" != x; then
31726      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31727    else
31728      # Save the current directory for restoring afterwards
31729      STARTDIR=$PWD
31730      COUNTER=0
31731      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31732      sym_link_file=`$BASENAME $TEST_COMPILER`
31733      cd $sym_link_dir
31734      # Use -P flag to resolve symlinks in directories.
31735      cd `$THEPWDCMD -P`
31736      sym_link_dir=`$THEPWDCMD -P`
31737      # Resolve file symlinks
31738      while test $COUNTER -lt 20; do
31739        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31740        if test "x$ISLINK" == x; then
31741          # This is not a symbolic link! We are done!
31742          break
31743        fi
31744        # Again resolve directory symlinks since the target of the just found
31745        # link could be in a different directory
31746        cd `$DIRNAME $ISLINK`
31747        sym_link_dir=`$THEPWDCMD -P`
31748        sym_link_file=`$BASENAME $ISLINK`
31749        let COUNTER=COUNTER+1
31750      done
31751      cd $STARTDIR
31752      TEST_COMPILER=$sym_link_dir/$sym_link_file
31753    fi
31754  fi
31755
31756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31757$as_echo "$TEST_COMPILER" >&6; }
31758  fi
31759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31760$as_echo_n "checking if CC is disguised ccache... " >&6; }
31761
31762  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31763  if test "x$COMPILER_BASENAME" = "xccache"; then
31764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31765$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31766    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31767    # We want to control ccache invocation ourselves, so ignore this cc and try
31768    # searching again.
31769
31770    # Remove the path to the fake ccache cc from the PATH
31771    RETRY_COMPILER_SAVED_PATH="$PATH"
31772    COMPILER_DIRNAME=`$DIRNAME $CC`
31773    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31774
31775    # Try again looking for our compiler
31776    if test -n "$ac_tool_prefix"; then
31777  for ac_prog in $TOOLCHAIN_CC_BINARY
31778  do
31779    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31780set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31782$as_echo_n "checking for $ac_word... " >&6; }
31783if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31784  $as_echo_n "(cached) " >&6
31785else
31786  if test -n "$PROPER_COMPILER_CC"; then
31787  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31788else
31789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31790for as_dir in $PATH
31791do
31792  IFS=$as_save_IFS
31793  test -z "$as_dir" && as_dir=.
31794    for ac_exec_ext in '' $ac_executable_extensions; do
31795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31796    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31798    break 2
31799  fi
31800done
31801  done
31802IFS=$as_save_IFS
31803
31804fi
31805fi
31806PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31807if test -n "$PROPER_COMPILER_CC"; then
31808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31809$as_echo "$PROPER_COMPILER_CC" >&6; }
31810else
31811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31812$as_echo "no" >&6; }
31813fi
31814
31815
31816    test -n "$PROPER_COMPILER_CC" && break
31817  done
31818fi
31819if test -z "$PROPER_COMPILER_CC"; then
31820  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31821  for ac_prog in $TOOLCHAIN_CC_BINARY
31822do
31823  # Extract the first word of "$ac_prog", so it can be a program name with args.
31824set dummy $ac_prog; ac_word=$2
31825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31826$as_echo_n "checking for $ac_word... " >&6; }
31827if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31828  $as_echo_n "(cached) " >&6
31829else
31830  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31831  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31832else
31833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31834for as_dir in $PATH
31835do
31836  IFS=$as_save_IFS
31837  test -z "$as_dir" && as_dir=.
31838    for ac_exec_ext in '' $ac_executable_extensions; do
31839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31840    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31842    break 2
31843  fi
31844done
31845  done
31846IFS=$as_save_IFS
31847
31848fi
31849fi
31850ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31851if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31853$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31854else
31855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31856$as_echo "no" >&6; }
31857fi
31858
31859
31860  test -n "$ac_ct_PROPER_COMPILER_CC" && break
31861done
31862
31863  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31864    PROPER_COMPILER_CC=""
31865  else
31866    case $cross_compiling:$ac_tool_warned in
31867yes:)
31868{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31869$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31870ac_tool_warned=yes ;;
31871esac
31872    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31873  fi
31874fi
31875
31876
31877  # Only process if variable expands to non-empty
31878
31879  if test "x$PROPER_COMPILER_CC" != x; then
31880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31881
31882  # First separate the path from the arguments. This will split at the first
31883  # space.
31884  complete="$PROPER_COMPILER_CC"
31885  path="${complete%% *}"
31886  tmp="$complete EOL"
31887  arguments="${tmp#* }"
31888
31889  # Input might be given as Windows format, start by converting to
31890  # unix format.
31891  new_path=`$CYGPATH -u "$path"`
31892
31893  # Now try to locate executable using which
31894  new_path=`$WHICH "$new_path" 2> /dev/null`
31895  # bat and cmd files are not always considered executable in cygwin causing which
31896  # to not find them
31897  if test "x$new_path" = x \
31898      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31899      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31900    new_path=`$CYGPATH -u "$path"`
31901  fi
31902  if test "x$new_path" = x; then
31903    # Oops. Which didn't find the executable.
31904    # The splitting of arguments from the executable at a space might have been incorrect,
31905    # since paths with space are more likely in Windows. Give it another try with the whole
31906    # argument.
31907    path="$complete"
31908    arguments="EOL"
31909    new_path=`$CYGPATH -u "$path"`
31910    new_path=`$WHICH "$new_path" 2> /dev/null`
31911    # bat and cmd files are not always considered executable in cygwin causing which
31912    # to not find them
31913    if test "x$new_path" = x \
31914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31916      new_path=`$CYGPATH -u "$path"`
31917    fi
31918    if test "x$new_path" = x; then
31919      # It's still not found. Now this is an unrecoverable error.
31920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31921$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31922      has_space=`$ECHO "$complete" | $GREP " "`
31923      if test "x$has_space" != x; then
31924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31926      fi
31927      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31928    fi
31929  fi
31930
31931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31934  # "foo.exe" is OK but "foo" is an error.
31935  #
31936  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31937  # It is also a way to make sure we got the proper file name for the real test later on.
31938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31939  if test "x$test_shortpath" = x; then
31940    # Short path failed, file does not exist as specified.
31941    # Try adding .exe or .cmd
31942    if test -f "${new_path}.exe"; then
31943      input_to_shortpath="${new_path}.exe"
31944    elif test -f "${new_path}.cmd"; then
31945      input_to_shortpath="${new_path}.cmd"
31946    else
31947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31948$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31951      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31952    fi
31953  else
31954    input_to_shortpath="$new_path"
31955  fi
31956
31957  # Call helper function which possibly converts this using DOS-style short mode.
31958  # If so, the updated path is stored in $new_path.
31959  new_path="$input_to_shortpath"
31960
31961  input_path="$input_to_shortpath"
31962  # Check if we need to convert this using DOS-style short mode. If the path
31963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31964  # take no chances and rewrite it.
31965  # Note: m4 eats our [], so we need to use [ and ] instead.
31966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31967  if test "x$has_forbidden_chars" != x; then
31968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31972      # Going to short mode and back again did indeed matter. Since short mode is
31973      # case insensitive, let's make it lowercase to improve readability.
31974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31975      # Now convert it back to Unix-style (cygpath)
31976      input_path=`$CYGPATH -u "$shortmode_path"`
31977      new_path="$input_path"
31978    fi
31979  fi
31980
31981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31982  if test "x$test_cygdrive_prefix" = x; then
31983    # As a simple fix, exclude /usr/bin since it's not a real path.
31984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31986      # a path prefixed by /cygdrive for fixpath to work.
31987      new_path="$CYGWIN_ROOT_PATH$input_path"
31988    fi
31989  fi
31990
31991  # remove trailing .exe if any
31992  new_path="${new_path/%.exe/}"
31993
31994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31995
31996  # First separate the path from the arguments. This will split at the first
31997  # space.
31998  complete="$PROPER_COMPILER_CC"
31999  path="${complete%% *}"
32000  tmp="$complete EOL"
32001  arguments="${tmp#* }"
32002
32003  # Input might be given as Windows format, start by converting to
32004  # unix format.
32005  new_path="$path"
32006
32007  windows_path="$new_path"
32008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32009    unix_path=`$CYGPATH -u "$windows_path"`
32010    new_path="$unix_path"
32011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32013    new_path="$unix_path"
32014  fi
32015
32016
32017  # Now try to locate executable using which
32018  new_path=`$WHICH "$new_path" 2> /dev/null`
32019
32020  if test "x$new_path" = x; then
32021    # Oops. Which didn't find the executable.
32022    # The splitting of arguments from the executable at a space might have been incorrect,
32023    # since paths with space are more likely in Windows. Give it another try with the whole
32024    # argument.
32025    path="$complete"
32026    arguments="EOL"
32027    new_path="$path"
32028
32029  windows_path="$new_path"
32030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32031    unix_path=`$CYGPATH -u "$windows_path"`
32032    new_path="$unix_path"
32033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32035    new_path="$unix_path"
32036  fi
32037
32038
32039    new_path=`$WHICH "$new_path" 2> /dev/null`
32040    # bat and cmd files are not always considered executable in MSYS causing which
32041    # to not find them
32042    if test "x$new_path" = x \
32043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32045      new_path="$path"
32046
32047  windows_path="$new_path"
32048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32049    unix_path=`$CYGPATH -u "$windows_path"`
32050    new_path="$unix_path"
32051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32053    new_path="$unix_path"
32054  fi
32055
32056    fi
32057
32058    if test "x$new_path" = x; then
32059      # It's still not found. Now this is an unrecoverable error.
32060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32061$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32062      has_space=`$ECHO "$complete" | $GREP " "`
32063      if test "x$has_space" != x; then
32064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32066      fi
32067      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32068    fi
32069  fi
32070
32071  # Now new_path has a complete unix path to the binary
32072  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32073    # Keep paths in /bin as-is, but remove trailing .exe if any
32074    new_path="${new_path/%.exe/}"
32075    # Do not save /bin paths to all_fixpath_prefixes!
32076  else
32077    # Not in mixed or Windows style, start by that.
32078    new_path=`cmd //c echo $new_path`
32079
32080  input_path="$new_path"
32081  # Check if we need to convert this using DOS-style short mode. If the path
32082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32083  # take no chances and rewrite it.
32084  # Note: m4 eats our [], so we need to use [ and ] instead.
32085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32086  if test "x$has_forbidden_chars" != x; then
32087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32089  fi
32090
32091    # Output is in $new_path
32092
32093  windows_path="$new_path"
32094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32095    unix_path=`$CYGPATH -u "$windows_path"`
32096    new_path="$unix_path"
32097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32099    new_path="$unix_path"
32100  fi
32101
32102    # remove trailing .exe if any
32103    new_path="${new_path/%.exe/}"
32104
32105    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32106    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32107  fi
32108
32109    else
32110      # We're on a unix platform. Hooray! :)
32111      # First separate the path from the arguments. This will split at the first
32112      # space.
32113      complete="$PROPER_COMPILER_CC"
32114      path="${complete%% *}"
32115      tmp="$complete EOL"
32116      arguments="${tmp#* }"
32117
32118      # Cannot rely on the command "which" here since it doesn't always work.
32119      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32120      if test -z "$is_absolute_path"; then
32121        # Path to executable is not absolute. Find it.
32122        IFS_save="$IFS"
32123        IFS=:
32124        for p in $PATH; do
32125          if test -f "$p/$path" && test -x "$p/$path"; then
32126            new_path="$p/$path"
32127            break
32128          fi
32129        done
32130        IFS="$IFS_save"
32131      else
32132        # This is an absolute path, we can use it without further modifications.
32133        new_path="$path"
32134      fi
32135
32136      if test "x$new_path" = x; then
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32138$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32139        has_space=`$ECHO "$complete" | $GREP " "`
32140        if test "x$has_space" != x; then
32141          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32142$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32143        fi
32144        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32145      fi
32146    fi
32147
32148    # Now join together the path and the arguments once again
32149    if test "x$arguments" != xEOL; then
32150      new_complete="$new_path ${arguments% *}"
32151    else
32152      new_complete="$new_path"
32153    fi
32154
32155    if test "x$complete" != "x$new_complete"; then
32156      PROPER_COMPILER_CC="$new_complete"
32157      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32158$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32159    fi
32160  fi
32161
32162    PATH="$RETRY_COMPILER_SAVED_PATH"
32163
32164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32165$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32166
32167  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32168    # Follow a chain of symbolic links. Use readlink
32169    # where it exists, else fall back to horribly
32170    # complicated shell code.
32171    if test "x$READLINK_TESTED" != yes; then
32172      # On MacOSX there is a readlink tool with a different
32173      # purpose than the GNU readlink tool. Check the found readlink.
32174      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32175      if test "x$ISGNU" = x; then
32176        # A readlink that we do not know how to use.
32177        # Are there other non-GNU readlinks out there?
32178        READLINK_TESTED=yes
32179        READLINK=
32180      fi
32181    fi
32182
32183    if test "x$READLINK" != x; then
32184      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32185    else
32186      # Save the current directory for restoring afterwards
32187      STARTDIR=$PWD
32188      COUNTER=0
32189      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32190      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32191      cd $sym_link_dir
32192      # Use -P flag to resolve symlinks in directories.
32193      cd `$THEPWDCMD -P`
32194      sym_link_dir=`$THEPWDCMD -P`
32195      # Resolve file symlinks
32196      while test $COUNTER -lt 20; do
32197        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32198        if test "x$ISLINK" == x; then
32199          # This is not a symbolic link! We are done!
32200          break
32201        fi
32202        # Again resolve directory symlinks since the target of the just found
32203        # link could be in a different directory
32204        cd `$DIRNAME $ISLINK`
32205        sym_link_dir=`$THEPWDCMD -P`
32206        sym_link_file=`$BASENAME $ISLINK`
32207        let COUNTER=COUNTER+1
32208      done
32209      cd $STARTDIR
32210      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32211    fi
32212  fi
32213
32214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32215$as_echo "$PROPER_COMPILER_CC" >&6; }
32216    CC="$PROPER_COMPILER_CC"
32217  else
32218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32219$as_echo "no, keeping CC" >&6; }
32220  fi
32221
32222
32223  COMPILER=$CC
32224  COMPILER_NAME=$COMPILER_NAME
32225
32226  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32227    # cc -V output typically looks like
32228    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32229    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32230    # Check that this is likely to be the Solaris Studio cc.
32231    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32232    if test $? -ne 0; then
32233      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32234      { $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
32235$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32236      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32237$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32238      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32239$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32240      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32241    fi
32242    # Remove usage instructions (if present), and
32243    # collapse compiler output into a single line
32244    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32245        $SED -e 's/ *[Uu]sage:.*//'`
32246    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32247        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32248  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32249    # xlc -qversion output typically looks like
32250    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32251    #     Version: 11.01.0000.0015
32252    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32253    # Check that this is likely to be the IBM XL C compiler.
32254    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32255    if test $? -ne 0; then
32256      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32257      { $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
32258$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32259      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32260$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32261      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32262$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32263      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32264    fi
32265    # Collapse compiler output into a single line
32266    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32267    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32268        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32269  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32270    # There is no specific version flag, but all output starts with a version string.
32271    # First line typically looks something like:
32272    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32273    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32274    # Check that this is likely to be Microsoft CL.EXE.
32275    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32276    if test $? -ne 0; then
32277      { $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
32278$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32279      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32280$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32281      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32282    fi
32283    # Collapse compiler output into a single line
32284    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32285    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32286        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32287  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32288    # gcc --version output typically looks like
32289    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32290    #     Copyright (C) 2013 Free Software Foundation, Inc.
32291    #     This is free software; see the source for copying conditions.  There is NO
32292    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32293    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32294    # Check that this is likely to be GCC.
32295    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32296    if test $? -ne 0; then
32297      { $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
32298$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32299      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32300$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32301      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32302    fi
32303    # Remove Copyright and legalese from version string, and
32304    # collapse into a single line
32305    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32306        $SED -e 's/ *Copyright .*//'`
32307    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32308        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32309  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32310    # clang --version output typically looks like
32311    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32312    #    clang version 3.3 (tags/RELEASE_33/final)
32313    # or
32314    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32315    #    Target: x86_64-pc-linux-gnu
32316    #    Thread model: posix
32317    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32318    # Check that this is likely to be clang
32319    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32320    if test $? -ne 0; then
32321      { $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
32322$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32323      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32324$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32325      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32326    fi
32327    # Collapse compiler output into a single line
32328    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32329    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32330        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32331  else
32332      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32333  fi
32334  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32335  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32336  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32337  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32338
32339  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32340$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32341
32342
32343  # Now that we have resolved CC ourself, let autoconf have its go at it
32344  ac_ext=c
32345ac_cpp='$CPP $CPPFLAGS'
32346ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32347ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32348ac_compiler_gnu=$ac_cv_c_compiler_gnu
32349if test -n "$ac_tool_prefix"; then
32350  for ac_prog in $CC
32351  do
32352    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32353set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32355$as_echo_n "checking for $ac_word... " >&6; }
32356if ${ac_cv_prog_CC+:} false; then :
32357  $as_echo_n "(cached) " >&6
32358else
32359  if test -n "$CC"; then
32360  ac_cv_prog_CC="$CC" # Let the user override the test.
32361else
32362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32363for as_dir in $PATH
32364do
32365  IFS=$as_save_IFS
32366  test -z "$as_dir" && as_dir=.
32367    for ac_exec_ext in '' $ac_executable_extensions; do
32368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32369    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32371    break 2
32372  fi
32373done
32374  done
32375IFS=$as_save_IFS
32376
32377fi
32378fi
32379CC=$ac_cv_prog_CC
32380if test -n "$CC"; then
32381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32382$as_echo "$CC" >&6; }
32383else
32384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32385$as_echo "no" >&6; }
32386fi
32387
32388
32389    test -n "$CC" && break
32390  done
32391fi
32392if test -z "$CC"; then
32393  ac_ct_CC=$CC
32394  for ac_prog in $CC
32395do
32396  # Extract the first word of "$ac_prog", so it can be a program name with args.
32397set dummy $ac_prog; ac_word=$2
32398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32399$as_echo_n "checking for $ac_word... " >&6; }
32400if ${ac_cv_prog_ac_ct_CC+:} false; then :
32401  $as_echo_n "(cached) " >&6
32402else
32403  if test -n "$ac_ct_CC"; then
32404  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32405else
32406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32407for as_dir in $PATH
32408do
32409  IFS=$as_save_IFS
32410  test -z "$as_dir" && as_dir=.
32411    for ac_exec_ext in '' $ac_executable_extensions; do
32412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32413    ac_cv_prog_ac_ct_CC="$ac_prog"
32414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32415    break 2
32416  fi
32417done
32418  done
32419IFS=$as_save_IFS
32420
32421fi
32422fi
32423ac_ct_CC=$ac_cv_prog_ac_ct_CC
32424if test -n "$ac_ct_CC"; then
32425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32426$as_echo "$ac_ct_CC" >&6; }
32427else
32428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32429$as_echo "no" >&6; }
32430fi
32431
32432
32433  test -n "$ac_ct_CC" && break
32434done
32435
32436  if test "x$ac_ct_CC" = x; then
32437    CC=""
32438  else
32439    case $cross_compiling:$ac_tool_warned in
32440yes:)
32441{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32442$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32443ac_tool_warned=yes ;;
32444esac
32445    CC=$ac_ct_CC
32446  fi
32447fi
32448
32449
32450test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32452as_fn_error $? "no acceptable C compiler found in \$PATH
32453See \`config.log' for more details" "$LINENO" 5; }
32454
32455# Provide some information about the compiler.
32456$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32457set X $ac_compile
32458ac_compiler=$2
32459for ac_option in --version -v -V -qversion; do
32460  { { ac_try="$ac_compiler $ac_option >&5"
32461case "(($ac_try" in
32462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32463  *) ac_try_echo=$ac_try;;
32464esac
32465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32466$as_echo "$ac_try_echo"; } >&5
32467  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32468  ac_status=$?
32469  if test -s conftest.err; then
32470    sed '10a\
32471... rest of stderr output deleted ...
32472         10q' conftest.err >conftest.er1
32473    cat conftest.er1 >&5
32474  fi
32475  rm -f conftest.er1 conftest.err
32476  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32477  test $ac_status = 0; }
32478done
32479
32480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32481/* end confdefs.h.  */
32482
32483int
32484main ()
32485{
32486
32487  ;
32488  return 0;
32489}
32490_ACEOF
32491ac_clean_files_save=$ac_clean_files
32492ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32493# Try to create an executable without -o first, disregard a.out.
32494# It will help us diagnose broken compilers, and finding out an intuition
32495# of exeext.
32496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32497$as_echo_n "checking whether the C compiler works... " >&6; }
32498ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32499
32500# The possible output files:
32501ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32502
32503ac_rmfiles=
32504for ac_file in $ac_files
32505do
32506  case $ac_file in
32507    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32508    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32509  esac
32510done
32511rm -f $ac_rmfiles
32512
32513if { { ac_try="$ac_link_default"
32514case "(($ac_try" in
32515  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32516  *) ac_try_echo=$ac_try;;
32517esac
32518eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32519$as_echo "$ac_try_echo"; } >&5
32520  (eval "$ac_link_default") 2>&5
32521  ac_status=$?
32522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32523  test $ac_status = 0; }; then :
32524  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32525# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32526# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32527# so that the user can short-circuit this test for compilers unknown to
32528# Autoconf.
32529for ac_file in $ac_files ''
32530do
32531  test -f "$ac_file" || continue
32532  case $ac_file in
32533    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32534	;;
32535    [ab].out )
32536	# We found the default executable, but exeext='' is most
32537	# certainly right.
32538	break;;
32539    *.* )
32540	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32541	then :; else
32542	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32543	fi
32544	# We set ac_cv_exeext here because the later test for it is not
32545	# safe: cross compilers may not add the suffix if given an `-o'
32546	# argument, so we may need to know it at that point already.
32547	# Even if this section looks crufty: it has the advantage of
32548	# actually working.
32549	break;;
32550    * )
32551	break;;
32552  esac
32553done
32554test "$ac_cv_exeext" = no && ac_cv_exeext=
32555
32556else
32557  ac_file=''
32558fi
32559if test -z "$ac_file"; then :
32560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32561$as_echo "no" >&6; }
32562$as_echo "$as_me: failed program was:" >&5
32563sed 's/^/| /' conftest.$ac_ext >&5
32564
32565{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32567as_fn_error 77 "C compiler cannot create executables
32568See \`config.log' for more details" "$LINENO" 5; }
32569else
32570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32571$as_echo "yes" >&6; }
32572fi
32573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32574$as_echo_n "checking for C compiler default output file name... " >&6; }
32575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32576$as_echo "$ac_file" >&6; }
32577ac_exeext=$ac_cv_exeext
32578
32579rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32580ac_clean_files=$ac_clean_files_save
32581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32582$as_echo_n "checking for suffix of executables... " >&6; }
32583if { { ac_try="$ac_link"
32584case "(($ac_try" in
32585  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32586  *) ac_try_echo=$ac_try;;
32587esac
32588eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32589$as_echo "$ac_try_echo"; } >&5
32590  (eval "$ac_link") 2>&5
32591  ac_status=$?
32592  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32593  test $ac_status = 0; }; then :
32594  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32595# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32596# work properly (i.e., refer to `conftest.exe'), while it won't with
32597# `rm'.
32598for ac_file in conftest.exe conftest conftest.*; do
32599  test -f "$ac_file" || continue
32600  case $ac_file in
32601    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32602    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32603	  break;;
32604    * ) break;;
32605  esac
32606done
32607else
32608  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32610as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32611See \`config.log' for more details" "$LINENO" 5; }
32612fi
32613rm -f conftest conftest$ac_cv_exeext
32614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32615$as_echo "$ac_cv_exeext" >&6; }
32616
32617rm -f conftest.$ac_ext
32618EXEEXT=$ac_cv_exeext
32619ac_exeext=$EXEEXT
32620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32621/* end confdefs.h.  */
32622#include <stdio.h>
32623int
32624main ()
32625{
32626FILE *f = fopen ("conftest.out", "w");
32627 return ferror (f) || fclose (f) != 0;
32628
32629  ;
32630  return 0;
32631}
32632_ACEOF
32633ac_clean_files="$ac_clean_files conftest.out"
32634# Check that the compiler produces executables we can run.  If not, either
32635# the compiler is broken, or we cross compile.
32636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32637$as_echo_n "checking whether we are cross compiling... " >&6; }
32638if test "$cross_compiling" != yes; then
32639  { { ac_try="$ac_link"
32640case "(($ac_try" in
32641  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32642  *) ac_try_echo=$ac_try;;
32643esac
32644eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32645$as_echo "$ac_try_echo"; } >&5
32646  (eval "$ac_link") 2>&5
32647  ac_status=$?
32648  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32649  test $ac_status = 0; }
32650  if { ac_try='./conftest$ac_cv_exeext'
32651  { { case "(($ac_try" in
32652  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32653  *) ac_try_echo=$ac_try;;
32654esac
32655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32656$as_echo "$ac_try_echo"; } >&5
32657  (eval "$ac_try") 2>&5
32658  ac_status=$?
32659  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32660  test $ac_status = 0; }; }; then
32661    cross_compiling=no
32662  else
32663    if test "$cross_compiling" = maybe; then
32664	cross_compiling=yes
32665    else
32666	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32668as_fn_error $? "cannot run C compiled programs.
32669If you meant to cross compile, use \`--host'.
32670See \`config.log' for more details" "$LINENO" 5; }
32671    fi
32672  fi
32673fi
32674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32675$as_echo "$cross_compiling" >&6; }
32676
32677rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32678ac_clean_files=$ac_clean_files_save
32679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32680$as_echo_n "checking for suffix of object files... " >&6; }
32681if ${ac_cv_objext+:} false; then :
32682  $as_echo_n "(cached) " >&6
32683else
32684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32685/* end confdefs.h.  */
32686
32687int
32688main ()
32689{
32690
32691  ;
32692  return 0;
32693}
32694_ACEOF
32695rm -f conftest.o conftest.obj
32696if { { ac_try="$ac_compile"
32697case "(($ac_try" in
32698  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32699  *) ac_try_echo=$ac_try;;
32700esac
32701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32702$as_echo "$ac_try_echo"; } >&5
32703  (eval "$ac_compile") 2>&5
32704  ac_status=$?
32705  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32706  test $ac_status = 0; }; then :
32707  for ac_file in conftest.o conftest.obj conftest.*; do
32708  test -f "$ac_file" || continue;
32709  case $ac_file in
32710    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32711    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32712       break;;
32713  esac
32714done
32715else
32716  $as_echo "$as_me: failed program was:" >&5
32717sed 's/^/| /' conftest.$ac_ext >&5
32718
32719{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32721as_fn_error $? "cannot compute suffix of object files: cannot compile
32722See \`config.log' for more details" "$LINENO" 5; }
32723fi
32724rm -f conftest.$ac_cv_objext conftest.$ac_ext
32725fi
32726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32727$as_echo "$ac_cv_objext" >&6; }
32728OBJEXT=$ac_cv_objext
32729ac_objext=$OBJEXT
32730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32731$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32732if ${ac_cv_c_compiler_gnu+:} false; then :
32733  $as_echo_n "(cached) " >&6
32734else
32735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32736/* end confdefs.h.  */
32737
32738int
32739main ()
32740{
32741#ifndef __GNUC__
32742       choke me
32743#endif
32744
32745  ;
32746  return 0;
32747}
32748_ACEOF
32749if ac_fn_c_try_compile "$LINENO"; then :
32750  ac_compiler_gnu=yes
32751else
32752  ac_compiler_gnu=no
32753fi
32754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32755ac_cv_c_compiler_gnu=$ac_compiler_gnu
32756
32757fi
32758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32759$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32760if test $ac_compiler_gnu = yes; then
32761  GCC=yes
32762else
32763  GCC=
32764fi
32765ac_test_CFLAGS=${CFLAGS+set}
32766ac_save_CFLAGS=$CFLAGS
32767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32768$as_echo_n "checking whether $CC accepts -g... " >&6; }
32769if ${ac_cv_prog_cc_g+:} false; then :
32770  $as_echo_n "(cached) " >&6
32771else
32772  ac_save_c_werror_flag=$ac_c_werror_flag
32773   ac_c_werror_flag=yes
32774   ac_cv_prog_cc_g=no
32775   CFLAGS="-g"
32776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32777/* end confdefs.h.  */
32778
32779int
32780main ()
32781{
32782
32783  ;
32784  return 0;
32785}
32786_ACEOF
32787if ac_fn_c_try_compile "$LINENO"; then :
32788  ac_cv_prog_cc_g=yes
32789else
32790  CFLAGS=""
32791      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32792/* end confdefs.h.  */
32793
32794int
32795main ()
32796{
32797
32798  ;
32799  return 0;
32800}
32801_ACEOF
32802if ac_fn_c_try_compile "$LINENO"; then :
32803
32804else
32805  ac_c_werror_flag=$ac_save_c_werror_flag
32806	 CFLAGS="-g"
32807	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32808/* end confdefs.h.  */
32809
32810int
32811main ()
32812{
32813
32814  ;
32815  return 0;
32816}
32817_ACEOF
32818if ac_fn_c_try_compile "$LINENO"; then :
32819  ac_cv_prog_cc_g=yes
32820fi
32821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32822fi
32823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32824fi
32825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32826   ac_c_werror_flag=$ac_save_c_werror_flag
32827fi
32828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32829$as_echo "$ac_cv_prog_cc_g" >&6; }
32830if test "$ac_test_CFLAGS" = set; then
32831  CFLAGS=$ac_save_CFLAGS
32832elif test $ac_cv_prog_cc_g = yes; then
32833  if test "$GCC" = yes; then
32834    CFLAGS="-g -O2"
32835  else
32836    CFLAGS="-g"
32837  fi
32838else
32839  if test "$GCC" = yes; then
32840    CFLAGS="-O2"
32841  else
32842    CFLAGS=
32843  fi
32844fi
32845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32846$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32847if ${ac_cv_prog_cc_c89+:} false; then :
32848  $as_echo_n "(cached) " >&6
32849else
32850  ac_cv_prog_cc_c89=no
32851ac_save_CC=$CC
32852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32853/* end confdefs.h.  */
32854#include <stdarg.h>
32855#include <stdio.h>
32856struct stat;
32857/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32858struct buf { int x; };
32859FILE * (*rcsopen) (struct buf *, struct stat *, int);
32860static char *e (p, i)
32861     char **p;
32862     int i;
32863{
32864  return p[i];
32865}
32866static char *f (char * (*g) (char **, int), char **p, ...)
32867{
32868  char *s;
32869  va_list v;
32870  va_start (v,p);
32871  s = g (p, va_arg (v,int));
32872  va_end (v);
32873  return s;
32874}
32875
32876/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32877   function prototypes and stuff, but not '\xHH' hex character constants.
32878   These don't provoke an error unfortunately, instead are silently treated
32879   as 'x'.  The following induces an error, until -std is added to get
32880   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32881   array size at least.  It's necessary to write '\x00'==0 to get something
32882   that's true only with -std.  */
32883int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32884
32885/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32886   inside strings and character constants.  */
32887#define FOO(x) 'x'
32888int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32889
32890int test (int i, double x);
32891struct s1 {int (*f) (int a);};
32892struct s2 {int (*f) (double a);};
32893int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32894int argc;
32895char **argv;
32896int
32897main ()
32898{
32899return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32900  ;
32901  return 0;
32902}
32903_ACEOF
32904for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32905	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32906do
32907  CC="$ac_save_CC $ac_arg"
32908  if ac_fn_c_try_compile "$LINENO"; then :
32909  ac_cv_prog_cc_c89=$ac_arg
32910fi
32911rm -f core conftest.err conftest.$ac_objext
32912  test "x$ac_cv_prog_cc_c89" != "xno" && break
32913done
32914rm -f conftest.$ac_ext
32915CC=$ac_save_CC
32916
32917fi
32918# AC_CACHE_VAL
32919case "x$ac_cv_prog_cc_c89" in
32920  x)
32921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32922$as_echo "none needed" >&6; } ;;
32923  xno)
32924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32925$as_echo "unsupported" >&6; } ;;
32926  *)
32927    CC="$CC $ac_cv_prog_cc_c89"
32928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32929$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32930esac
32931if test "x$ac_cv_prog_cc_c89" != xno; then :
32932
32933fi
32934
32935ac_ext=cpp
32936ac_cpp='$CXXCPP $CPPFLAGS'
32937ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32938ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32939ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32940
32941
32942
32943  COMPILER_NAME=C++
32944  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32945
32946  if test "x$CXX" != x; then
32947    # User has supplied compiler name already, always let that override.
32948    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32949$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32950    if test "x`basename $CXX`" = "x$CXX"; then
32951      # A command without a complete path is provided, search $PATH.
32952
32953      for ac_prog in $CXX
32954do
32955  # Extract the first word of "$ac_prog", so it can be a program name with args.
32956set dummy $ac_prog; ac_word=$2
32957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32958$as_echo_n "checking for $ac_word... " >&6; }
32959if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32960  $as_echo_n "(cached) " >&6
32961else
32962  case $POTENTIAL_CXX in
32963  [\\/]* | ?:[\\/]*)
32964  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32965  ;;
32966  *)
32967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32968for as_dir in $PATH
32969do
32970  IFS=$as_save_IFS
32971  test -z "$as_dir" && as_dir=.
32972    for ac_exec_ext in '' $ac_executable_extensions; do
32973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32974    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32976    break 2
32977  fi
32978done
32979  done
32980IFS=$as_save_IFS
32981
32982  ;;
32983esac
32984fi
32985POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32986if test -n "$POTENTIAL_CXX"; then
32987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32988$as_echo "$POTENTIAL_CXX" >&6; }
32989else
32990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32991$as_echo "no" >&6; }
32992fi
32993
32994
32995  test -n "$POTENTIAL_CXX" && break
32996done
32997
32998      if test "x$POTENTIAL_CXX" != x; then
32999        CXX=$POTENTIAL_CXX
33000      else
33001        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33002      fi
33003    else
33004      # Otherwise it might already be a complete path
33005      if test ! -x "$CXX"; then
33006        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33007      fi
33008    fi
33009  else
33010    # No user supplied value. Locate compiler ourselves.
33011
33012    # If we are cross compiling, assume cross compilation tools follows the
33013    # cross compilation standard where they are prefixed with the autoconf
33014    # standard name for the target. For example the binary
33015    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33016    # If we are not cross compiling, then the default compiler name will be
33017    # used.
33018
33019    CXX=
33020    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33021    # before checking the rest of the PATH.
33022    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33023    # step, this should not be necessary.
33024    if test -n "$TOOLCHAIN_PATH"; then
33025      PATH_save="$PATH"
33026      PATH="$TOOLCHAIN_PATH"
33027      for ac_prog in $SEARCH_LIST
33028do
33029  # Extract the first word of "$ac_prog", so it can be a program name with args.
33030set dummy $ac_prog; ac_word=$2
33031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33032$as_echo_n "checking for $ac_word... " >&6; }
33033if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33034  $as_echo_n "(cached) " >&6
33035else
33036  case $TOOLCHAIN_PATH_CXX in
33037  [\\/]* | ?:[\\/]*)
33038  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33039  ;;
33040  *)
33041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33042for as_dir in $PATH
33043do
33044  IFS=$as_save_IFS
33045  test -z "$as_dir" && as_dir=.
33046    for ac_exec_ext in '' $ac_executable_extensions; do
33047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33048    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33050    break 2
33051  fi
33052done
33053  done
33054IFS=$as_save_IFS
33055
33056  ;;
33057esac
33058fi
33059TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33060if test -n "$TOOLCHAIN_PATH_CXX"; then
33061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33062$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33063else
33064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33065$as_echo "no" >&6; }
33066fi
33067
33068
33069  test -n "$TOOLCHAIN_PATH_CXX" && break
33070done
33071
33072      CXX=$TOOLCHAIN_PATH_CXX
33073      PATH="$PATH_save"
33074    fi
33075
33076    # AC_PATH_PROGS can't be run multiple times with the same variable,
33077    # so create a new name for this run.
33078    if test "x$CXX" = x; then
33079      for ac_prog in $SEARCH_LIST
33080do
33081  # Extract the first word of "$ac_prog", so it can be a program name with args.
33082set dummy $ac_prog; ac_word=$2
33083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33084$as_echo_n "checking for $ac_word... " >&6; }
33085if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33086  $as_echo_n "(cached) " >&6
33087else
33088  case $POTENTIAL_CXX in
33089  [\\/]* | ?:[\\/]*)
33090  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33091  ;;
33092  *)
33093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33094for as_dir in $PATH
33095do
33096  IFS=$as_save_IFS
33097  test -z "$as_dir" && as_dir=.
33098    for ac_exec_ext in '' $ac_executable_extensions; do
33099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33100    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33102    break 2
33103  fi
33104done
33105  done
33106IFS=$as_save_IFS
33107
33108  ;;
33109esac
33110fi
33111POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33112if test -n "$POTENTIAL_CXX"; then
33113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33114$as_echo "$POTENTIAL_CXX" >&6; }
33115else
33116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33117$as_echo "no" >&6; }
33118fi
33119
33120
33121  test -n "$POTENTIAL_CXX" && break
33122done
33123
33124      CXX=$POTENTIAL_CXX
33125    fi
33126
33127    if test "x$CXX" = x; then
33128
33129  # Print a helpful message on how to acquire the necessary build dependency.
33130  # devkit is the help tag: freetype, cups, alsa etc
33131  MISSING_DEPENDENCY=devkit
33132
33133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33134    cygwin_help $MISSING_DEPENDENCY
33135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33136    msys_help $MISSING_DEPENDENCY
33137  else
33138    PKGHANDLER_COMMAND=
33139
33140    case $PKGHANDLER in
33141      apt-get)
33142        apt_help     $MISSING_DEPENDENCY ;;
33143      yum)
33144        yum_help     $MISSING_DEPENDENCY ;;
33145      port)
33146        port_help    $MISSING_DEPENDENCY ;;
33147      pkgutil)
33148        pkgutil_help $MISSING_DEPENDENCY ;;
33149      pkgadd)
33150        pkgadd_help  $MISSING_DEPENDENCY ;;
33151    esac
33152
33153    if test "x$PKGHANDLER_COMMAND" != x; then
33154      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33155    fi
33156  fi
33157
33158      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33159    fi
33160  fi
33161
33162  # Now we have a compiler binary in CXX. Make sure it's okay.
33163
33164  # Only process if variable expands to non-empty
33165
33166  if test "x$CXX" != x; then
33167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33168
33169  # First separate the path from the arguments. This will split at the first
33170  # space.
33171  complete="$CXX"
33172  path="${complete%% *}"
33173  tmp="$complete EOL"
33174  arguments="${tmp#* }"
33175
33176  # Input might be given as Windows format, start by converting to
33177  # unix format.
33178  new_path=`$CYGPATH -u "$path"`
33179
33180  # Now try to locate executable using which
33181  new_path=`$WHICH "$new_path" 2> /dev/null`
33182  # bat and cmd files are not always considered executable in cygwin causing which
33183  # to not find them
33184  if test "x$new_path" = x \
33185      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33186      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33187    new_path=`$CYGPATH -u "$path"`
33188  fi
33189  if test "x$new_path" = x; then
33190    # Oops. Which didn't find the executable.
33191    # The splitting of arguments from the executable at a space might have been incorrect,
33192    # since paths with space are more likely in Windows. Give it another try with the whole
33193    # argument.
33194    path="$complete"
33195    arguments="EOL"
33196    new_path=`$CYGPATH -u "$path"`
33197    new_path=`$WHICH "$new_path" 2> /dev/null`
33198    # bat and cmd files are not always considered executable in cygwin causing which
33199    # to not find them
33200    if test "x$new_path" = x \
33201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33203      new_path=`$CYGPATH -u "$path"`
33204    fi
33205    if test "x$new_path" = x; then
33206      # It's still not found. Now this is an unrecoverable error.
33207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33208$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33209      has_space=`$ECHO "$complete" | $GREP " "`
33210      if test "x$has_space" != x; then
33211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33213      fi
33214      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33215    fi
33216  fi
33217
33218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33221  # "foo.exe" is OK but "foo" is an error.
33222  #
33223  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33224  # It is also a way to make sure we got the proper file name for the real test later on.
33225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33226  if test "x$test_shortpath" = x; then
33227    # Short path failed, file does not exist as specified.
33228    # Try adding .exe or .cmd
33229    if test -f "${new_path}.exe"; then
33230      input_to_shortpath="${new_path}.exe"
33231    elif test -f "${new_path}.cmd"; then
33232      input_to_shortpath="${new_path}.cmd"
33233    else
33234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33235$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33238      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33239    fi
33240  else
33241    input_to_shortpath="$new_path"
33242  fi
33243
33244  # Call helper function which possibly converts this using DOS-style short mode.
33245  # If so, the updated path is stored in $new_path.
33246  new_path="$input_to_shortpath"
33247
33248  input_path="$input_to_shortpath"
33249  # Check if we need to convert this using DOS-style short mode. If the path
33250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33251  # take no chances and rewrite it.
33252  # Note: m4 eats our [], so we need to use [ and ] instead.
33253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33254  if test "x$has_forbidden_chars" != x; then
33255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33259      # Going to short mode and back again did indeed matter. Since short mode is
33260      # case insensitive, let's make it lowercase to improve readability.
33261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33262      # Now convert it back to Unix-style (cygpath)
33263      input_path=`$CYGPATH -u "$shortmode_path"`
33264      new_path="$input_path"
33265    fi
33266  fi
33267
33268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33269  if test "x$test_cygdrive_prefix" = x; then
33270    # As a simple fix, exclude /usr/bin since it's not a real path.
33271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33273      # a path prefixed by /cygdrive for fixpath to work.
33274      new_path="$CYGWIN_ROOT_PATH$input_path"
33275    fi
33276  fi
33277
33278  # remove trailing .exe if any
33279  new_path="${new_path/%.exe/}"
33280
33281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33282
33283  # First separate the path from the arguments. This will split at the first
33284  # space.
33285  complete="$CXX"
33286  path="${complete%% *}"
33287  tmp="$complete EOL"
33288  arguments="${tmp#* }"
33289
33290  # Input might be given as Windows format, start by converting to
33291  # unix format.
33292  new_path="$path"
33293
33294  windows_path="$new_path"
33295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33296    unix_path=`$CYGPATH -u "$windows_path"`
33297    new_path="$unix_path"
33298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33300    new_path="$unix_path"
33301  fi
33302
33303
33304  # Now try to locate executable using which
33305  new_path=`$WHICH "$new_path" 2> /dev/null`
33306
33307  if test "x$new_path" = x; then
33308    # Oops. Which didn't find the executable.
33309    # The splitting of arguments from the executable at a space might have been incorrect,
33310    # since paths with space are more likely in Windows. Give it another try with the whole
33311    # argument.
33312    path="$complete"
33313    arguments="EOL"
33314    new_path="$path"
33315
33316  windows_path="$new_path"
33317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33318    unix_path=`$CYGPATH -u "$windows_path"`
33319    new_path="$unix_path"
33320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33322    new_path="$unix_path"
33323  fi
33324
33325
33326    new_path=`$WHICH "$new_path" 2> /dev/null`
33327    # bat and cmd files are not always considered executable in MSYS causing which
33328    # to not find them
33329    if test "x$new_path" = x \
33330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33332      new_path="$path"
33333
33334  windows_path="$new_path"
33335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33336    unix_path=`$CYGPATH -u "$windows_path"`
33337    new_path="$unix_path"
33338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33340    new_path="$unix_path"
33341  fi
33342
33343    fi
33344
33345    if test "x$new_path" = x; then
33346      # It's still not found. Now this is an unrecoverable error.
33347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33348$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33349      has_space=`$ECHO "$complete" | $GREP " "`
33350      if test "x$has_space" != x; then
33351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33353      fi
33354      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33355    fi
33356  fi
33357
33358  # Now new_path has a complete unix path to the binary
33359  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33360    # Keep paths in /bin as-is, but remove trailing .exe if any
33361    new_path="${new_path/%.exe/}"
33362    # Do not save /bin paths to all_fixpath_prefixes!
33363  else
33364    # Not in mixed or Windows style, start by that.
33365    new_path=`cmd //c echo $new_path`
33366
33367  input_path="$new_path"
33368  # Check if we need to convert this using DOS-style short mode. If the path
33369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33370  # take no chances and rewrite it.
33371  # Note: m4 eats our [], so we need to use [ and ] instead.
33372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33373  if test "x$has_forbidden_chars" != x; then
33374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33376  fi
33377
33378    # Output is in $new_path
33379
33380  windows_path="$new_path"
33381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33382    unix_path=`$CYGPATH -u "$windows_path"`
33383    new_path="$unix_path"
33384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33386    new_path="$unix_path"
33387  fi
33388
33389    # remove trailing .exe if any
33390    new_path="${new_path/%.exe/}"
33391
33392    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33393    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33394  fi
33395
33396    else
33397      # We're on a unix platform. Hooray! :)
33398      # First separate the path from the arguments. This will split at the first
33399      # space.
33400      complete="$CXX"
33401      path="${complete%% *}"
33402      tmp="$complete EOL"
33403      arguments="${tmp#* }"
33404
33405      # Cannot rely on the command "which" here since it doesn't always work.
33406      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33407      if test -z "$is_absolute_path"; then
33408        # Path to executable is not absolute. Find it.
33409        IFS_save="$IFS"
33410        IFS=:
33411        for p in $PATH; do
33412          if test -f "$p/$path" && test -x "$p/$path"; then
33413            new_path="$p/$path"
33414            break
33415          fi
33416        done
33417        IFS="$IFS_save"
33418      else
33419        # This is an absolute path, we can use it without further modifications.
33420        new_path="$path"
33421      fi
33422
33423      if test "x$new_path" = x; then
33424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33425$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33426        has_space=`$ECHO "$complete" | $GREP " "`
33427        if test "x$has_space" != x; then
33428          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33430        fi
33431        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33432      fi
33433    fi
33434
33435    # Now join together the path and the arguments once again
33436    if test "x$arguments" != xEOL; then
33437      new_complete="$new_path ${arguments% *}"
33438    else
33439      new_complete="$new_path"
33440    fi
33441
33442    if test "x$complete" != "x$new_complete"; then
33443      CXX="$new_complete"
33444      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33445$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33446    fi
33447  fi
33448
33449  TEST_COMPILER="$CXX"
33450  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33451  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33452  if test "x$OPENJDK_BUILD_OS" != xaix; then
33453    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33455$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33456
33457  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33458    # Follow a chain of symbolic links. Use readlink
33459    # where it exists, else fall back to horribly
33460    # complicated shell code.
33461    if test "x$READLINK_TESTED" != yes; then
33462      # On MacOSX there is a readlink tool with a different
33463      # purpose than the GNU readlink tool. Check the found readlink.
33464      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33465      if test "x$ISGNU" = x; then
33466        # A readlink that we do not know how to use.
33467        # Are there other non-GNU readlinks out there?
33468        READLINK_TESTED=yes
33469        READLINK=
33470      fi
33471    fi
33472
33473    if test "x$READLINK" != x; then
33474      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33475    else
33476      # Save the current directory for restoring afterwards
33477      STARTDIR=$PWD
33478      COUNTER=0
33479      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33480      sym_link_file=`$BASENAME $TEST_COMPILER`
33481      cd $sym_link_dir
33482      # Use -P flag to resolve symlinks in directories.
33483      cd `$THEPWDCMD -P`
33484      sym_link_dir=`$THEPWDCMD -P`
33485      # Resolve file symlinks
33486      while test $COUNTER -lt 20; do
33487        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33488        if test "x$ISLINK" == x; then
33489          # This is not a symbolic link! We are done!
33490          break
33491        fi
33492        # Again resolve directory symlinks since the target of the just found
33493        # link could be in a different directory
33494        cd `$DIRNAME $ISLINK`
33495        sym_link_dir=`$THEPWDCMD -P`
33496        sym_link_file=`$BASENAME $ISLINK`
33497        let COUNTER=COUNTER+1
33498      done
33499      cd $STARTDIR
33500      TEST_COMPILER=$sym_link_dir/$sym_link_file
33501    fi
33502  fi
33503
33504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33505$as_echo "$TEST_COMPILER" >&6; }
33506  fi
33507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33508$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33509
33510  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33511  if test "x$COMPILER_BASENAME" = "xccache"; then
33512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33513$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33514    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33515    # We want to control ccache invocation ourselves, so ignore this cc and try
33516    # searching again.
33517
33518    # Remove the path to the fake ccache cc from the PATH
33519    RETRY_COMPILER_SAVED_PATH="$PATH"
33520    COMPILER_DIRNAME=`$DIRNAME $CXX`
33521    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33522
33523    # Try again looking for our compiler
33524    if test -n "$ac_tool_prefix"; then
33525  for ac_prog in $TOOLCHAIN_CXX_BINARY
33526  do
33527    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33528set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33530$as_echo_n "checking for $ac_word... " >&6; }
33531if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33532  $as_echo_n "(cached) " >&6
33533else
33534  if test -n "$PROPER_COMPILER_CXX"; then
33535  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33536else
33537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33538for as_dir in $PATH
33539do
33540  IFS=$as_save_IFS
33541  test -z "$as_dir" && as_dir=.
33542    for ac_exec_ext in '' $ac_executable_extensions; do
33543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33544    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33546    break 2
33547  fi
33548done
33549  done
33550IFS=$as_save_IFS
33551
33552fi
33553fi
33554PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33555if test -n "$PROPER_COMPILER_CXX"; then
33556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33557$as_echo "$PROPER_COMPILER_CXX" >&6; }
33558else
33559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33560$as_echo "no" >&6; }
33561fi
33562
33563
33564    test -n "$PROPER_COMPILER_CXX" && break
33565  done
33566fi
33567if test -z "$PROPER_COMPILER_CXX"; then
33568  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33569  for ac_prog in $TOOLCHAIN_CXX_BINARY
33570do
33571  # Extract the first word of "$ac_prog", so it can be a program name with args.
33572set dummy $ac_prog; ac_word=$2
33573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33574$as_echo_n "checking for $ac_word... " >&6; }
33575if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33576  $as_echo_n "(cached) " >&6
33577else
33578  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33579  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33580else
33581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33582for as_dir in $PATH
33583do
33584  IFS=$as_save_IFS
33585  test -z "$as_dir" && as_dir=.
33586    for ac_exec_ext in '' $ac_executable_extensions; do
33587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33588    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33590    break 2
33591  fi
33592done
33593  done
33594IFS=$as_save_IFS
33595
33596fi
33597fi
33598ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33599if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33601$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33602else
33603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33604$as_echo "no" >&6; }
33605fi
33606
33607
33608  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33609done
33610
33611  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33612    PROPER_COMPILER_CXX=""
33613  else
33614    case $cross_compiling:$ac_tool_warned in
33615yes:)
33616{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33617$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33618ac_tool_warned=yes ;;
33619esac
33620    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33621  fi
33622fi
33623
33624
33625  # Only process if variable expands to non-empty
33626
33627  if test "x$PROPER_COMPILER_CXX" != x; then
33628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33629
33630  # First separate the path from the arguments. This will split at the first
33631  # space.
33632  complete="$PROPER_COMPILER_CXX"
33633  path="${complete%% *}"
33634  tmp="$complete EOL"
33635  arguments="${tmp#* }"
33636
33637  # Input might be given as Windows format, start by converting to
33638  # unix format.
33639  new_path=`$CYGPATH -u "$path"`
33640
33641  # Now try to locate executable using which
33642  new_path=`$WHICH "$new_path" 2> /dev/null`
33643  # bat and cmd files are not always considered executable in cygwin causing which
33644  # to not find them
33645  if test "x$new_path" = x \
33646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33648    new_path=`$CYGPATH -u "$path"`
33649  fi
33650  if test "x$new_path" = x; then
33651    # Oops. Which didn't find the executable.
33652    # The splitting of arguments from the executable at a space might have been incorrect,
33653    # since paths with space are more likely in Windows. Give it another try with the whole
33654    # argument.
33655    path="$complete"
33656    arguments="EOL"
33657    new_path=`$CYGPATH -u "$path"`
33658    new_path=`$WHICH "$new_path" 2> /dev/null`
33659    # bat and cmd files are not always considered executable in cygwin causing which
33660    # to not find them
33661    if test "x$new_path" = x \
33662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33664      new_path=`$CYGPATH -u "$path"`
33665    fi
33666    if test "x$new_path" = x; then
33667      # It's still not found. Now this is an unrecoverable error.
33668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33669$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33670      has_space=`$ECHO "$complete" | $GREP " "`
33671      if test "x$has_space" != x; then
33672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33674      fi
33675      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33676    fi
33677  fi
33678
33679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33682  # "foo.exe" is OK but "foo" is an error.
33683  #
33684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33685  # It is also a way to make sure we got the proper file name for the real test later on.
33686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33687  if test "x$test_shortpath" = x; then
33688    # Short path failed, file does not exist as specified.
33689    # Try adding .exe or .cmd
33690    if test -f "${new_path}.exe"; then
33691      input_to_shortpath="${new_path}.exe"
33692    elif test -f "${new_path}.cmd"; then
33693      input_to_shortpath="${new_path}.cmd"
33694    else
33695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33696$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33699      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33700    fi
33701  else
33702    input_to_shortpath="$new_path"
33703  fi
33704
33705  # Call helper function which possibly converts this using DOS-style short mode.
33706  # If so, the updated path is stored in $new_path.
33707  new_path="$input_to_shortpath"
33708
33709  input_path="$input_to_shortpath"
33710  # Check if we need to convert this using DOS-style short mode. If the path
33711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33712  # take no chances and rewrite it.
33713  # Note: m4 eats our [], so we need to use [ and ] instead.
33714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33715  if test "x$has_forbidden_chars" != x; then
33716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33720      # Going to short mode and back again did indeed matter. Since short mode is
33721      # case insensitive, let's make it lowercase to improve readability.
33722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33723      # Now convert it back to Unix-style (cygpath)
33724      input_path=`$CYGPATH -u "$shortmode_path"`
33725      new_path="$input_path"
33726    fi
33727  fi
33728
33729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33730  if test "x$test_cygdrive_prefix" = x; then
33731    # As a simple fix, exclude /usr/bin since it's not a real path.
33732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33734      # a path prefixed by /cygdrive for fixpath to work.
33735      new_path="$CYGWIN_ROOT_PATH$input_path"
33736    fi
33737  fi
33738
33739  # remove trailing .exe if any
33740  new_path="${new_path/%.exe/}"
33741
33742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33743
33744  # First separate the path from the arguments. This will split at the first
33745  # space.
33746  complete="$PROPER_COMPILER_CXX"
33747  path="${complete%% *}"
33748  tmp="$complete EOL"
33749  arguments="${tmp#* }"
33750
33751  # Input might be given as Windows format, start by converting to
33752  # unix format.
33753  new_path="$path"
33754
33755  windows_path="$new_path"
33756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33757    unix_path=`$CYGPATH -u "$windows_path"`
33758    new_path="$unix_path"
33759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33761    new_path="$unix_path"
33762  fi
33763
33764
33765  # Now try to locate executable using which
33766  new_path=`$WHICH "$new_path" 2> /dev/null`
33767
33768  if test "x$new_path" = x; then
33769    # Oops. Which didn't find the executable.
33770    # The splitting of arguments from the executable at a space might have been incorrect,
33771    # since paths with space are more likely in Windows. Give it another try with the whole
33772    # argument.
33773    path="$complete"
33774    arguments="EOL"
33775    new_path="$path"
33776
33777  windows_path="$new_path"
33778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33779    unix_path=`$CYGPATH -u "$windows_path"`
33780    new_path="$unix_path"
33781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33783    new_path="$unix_path"
33784  fi
33785
33786
33787    new_path=`$WHICH "$new_path" 2> /dev/null`
33788    # bat and cmd files are not always considered executable in MSYS causing which
33789    # to not find them
33790    if test "x$new_path" = x \
33791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33793      new_path="$path"
33794
33795  windows_path="$new_path"
33796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33797    unix_path=`$CYGPATH -u "$windows_path"`
33798    new_path="$unix_path"
33799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33801    new_path="$unix_path"
33802  fi
33803
33804    fi
33805
33806    if test "x$new_path" = x; then
33807      # It's still not found. Now this is an unrecoverable error.
33808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33809$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33810      has_space=`$ECHO "$complete" | $GREP " "`
33811      if test "x$has_space" != x; then
33812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33814      fi
33815      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33816    fi
33817  fi
33818
33819  # Now new_path has a complete unix path to the binary
33820  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33821    # Keep paths in /bin as-is, but remove trailing .exe if any
33822    new_path="${new_path/%.exe/}"
33823    # Do not save /bin paths to all_fixpath_prefixes!
33824  else
33825    # Not in mixed or Windows style, start by that.
33826    new_path=`cmd //c echo $new_path`
33827
33828  input_path="$new_path"
33829  # Check if we need to convert this using DOS-style short mode. If the path
33830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33831  # take no chances and rewrite it.
33832  # Note: m4 eats our [], so we need to use [ and ] instead.
33833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33834  if test "x$has_forbidden_chars" != x; then
33835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33837  fi
33838
33839    # Output is in $new_path
33840
33841  windows_path="$new_path"
33842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33843    unix_path=`$CYGPATH -u "$windows_path"`
33844    new_path="$unix_path"
33845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33847    new_path="$unix_path"
33848  fi
33849
33850    # remove trailing .exe if any
33851    new_path="${new_path/%.exe/}"
33852
33853    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33854    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33855  fi
33856
33857    else
33858      # We're on a unix platform. Hooray! :)
33859      # First separate the path from the arguments. This will split at the first
33860      # space.
33861      complete="$PROPER_COMPILER_CXX"
33862      path="${complete%% *}"
33863      tmp="$complete EOL"
33864      arguments="${tmp#* }"
33865
33866      # Cannot rely on the command "which" here since it doesn't always work.
33867      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33868      if test -z "$is_absolute_path"; then
33869        # Path to executable is not absolute. Find it.
33870        IFS_save="$IFS"
33871        IFS=:
33872        for p in $PATH; do
33873          if test -f "$p/$path" && test -x "$p/$path"; then
33874            new_path="$p/$path"
33875            break
33876          fi
33877        done
33878        IFS="$IFS_save"
33879      else
33880        # This is an absolute path, we can use it without further modifications.
33881        new_path="$path"
33882      fi
33883
33884      if test "x$new_path" = x; then
33885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33886$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33887        has_space=`$ECHO "$complete" | $GREP " "`
33888        if test "x$has_space" != x; then
33889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33891        fi
33892        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33893      fi
33894    fi
33895
33896    # Now join together the path and the arguments once again
33897    if test "x$arguments" != xEOL; then
33898      new_complete="$new_path ${arguments% *}"
33899    else
33900      new_complete="$new_path"
33901    fi
33902
33903    if test "x$complete" != "x$new_complete"; then
33904      PROPER_COMPILER_CXX="$new_complete"
33905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33906$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33907    fi
33908  fi
33909
33910    PATH="$RETRY_COMPILER_SAVED_PATH"
33911
33912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33913$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33914
33915  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33916    # Follow a chain of symbolic links. Use readlink
33917    # where it exists, else fall back to horribly
33918    # complicated shell code.
33919    if test "x$READLINK_TESTED" != yes; then
33920      # On MacOSX there is a readlink tool with a different
33921      # purpose than the GNU readlink tool. Check the found readlink.
33922      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33923      if test "x$ISGNU" = x; then
33924        # A readlink that we do not know how to use.
33925        # Are there other non-GNU readlinks out there?
33926        READLINK_TESTED=yes
33927        READLINK=
33928      fi
33929    fi
33930
33931    if test "x$READLINK" != x; then
33932      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33933    else
33934      # Save the current directory for restoring afterwards
33935      STARTDIR=$PWD
33936      COUNTER=0
33937      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33938      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33939      cd $sym_link_dir
33940      # Use -P flag to resolve symlinks in directories.
33941      cd `$THEPWDCMD -P`
33942      sym_link_dir=`$THEPWDCMD -P`
33943      # Resolve file symlinks
33944      while test $COUNTER -lt 20; do
33945        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33946        if test "x$ISLINK" == x; then
33947          # This is not a symbolic link! We are done!
33948          break
33949        fi
33950        # Again resolve directory symlinks since the target of the just found
33951        # link could be in a different directory
33952        cd `$DIRNAME $ISLINK`
33953        sym_link_dir=`$THEPWDCMD -P`
33954        sym_link_file=`$BASENAME $ISLINK`
33955        let COUNTER=COUNTER+1
33956      done
33957      cd $STARTDIR
33958      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33959    fi
33960  fi
33961
33962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33963$as_echo "$PROPER_COMPILER_CXX" >&6; }
33964    CXX="$PROPER_COMPILER_CXX"
33965  else
33966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33967$as_echo "no, keeping CXX" >&6; }
33968  fi
33969
33970
33971  COMPILER=$CXX
33972  COMPILER_NAME=$COMPILER_NAME
33973
33974  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33975    # cc -V output typically looks like
33976    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33977    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33978    # Check that this is likely to be the Solaris Studio cc.
33979    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33980    if test $? -ne 0; then
33981      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33982      { $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
33983$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33984      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33985$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33986      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33987$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33988      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33989    fi
33990    # Remove usage instructions (if present), and
33991    # collapse compiler output into a single line
33992    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33993        $SED -e 's/ *[Uu]sage:.*//'`
33994    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33995        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33996  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33997    # xlc -qversion output typically looks like
33998    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33999    #     Version: 11.01.0000.0015
34000    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34001    # Check that this is likely to be the IBM XL C compiler.
34002    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34003    if test $? -ne 0; then
34004      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34005      { $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
34006$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34007      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34008$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34009      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34010$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34011      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34012    fi
34013    # Collapse compiler output into a single line
34014    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34015    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34016        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34017  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34018    # There is no specific version flag, but all output starts with a version string.
34019    # First line typically looks something like:
34020    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34021    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34022    # Check that this is likely to be Microsoft CL.EXE.
34023    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34024    if test $? -ne 0; then
34025      { $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
34026$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34027      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34028$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34029      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34030    fi
34031    # Collapse compiler output into a single line
34032    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34033    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34034        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34035  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34036    # gcc --version output typically looks like
34037    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34038    #     Copyright (C) 2013 Free Software Foundation, Inc.
34039    #     This is free software; see the source for copying conditions.  There is NO
34040    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34041    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34042    # Check that this is likely to be GCC.
34043    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34044    if test $? -ne 0; then
34045      { $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
34046$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34047      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34048$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34049      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34050    fi
34051    # Remove Copyright and legalese from version string, and
34052    # collapse into a single line
34053    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34054        $SED -e 's/ *Copyright .*//'`
34055    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34056        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34057  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34058    # clang --version output typically looks like
34059    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34060    #    clang version 3.3 (tags/RELEASE_33/final)
34061    # or
34062    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34063    #    Target: x86_64-pc-linux-gnu
34064    #    Thread model: posix
34065    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34066    # Check that this is likely to be clang
34067    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34068    if test $? -ne 0; then
34069      { $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
34070$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34071      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34072$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34073      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34074    fi
34075    # Collapse compiler output into a single line
34076    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34077    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34078        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34079  else
34080      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34081  fi
34082  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34083  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34084  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34085  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34086
34087  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34088$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34089
34090
34091  # Now that we have resolved CXX ourself, let autoconf have its go at it
34092  ac_ext=cpp
34093ac_cpp='$CXXCPP $CPPFLAGS'
34094ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34095ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34096ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34097if test -z "$CXX"; then
34098  if test -n "$CCC"; then
34099    CXX=$CCC
34100  else
34101    if test -n "$ac_tool_prefix"; then
34102  for ac_prog in $CXX
34103  do
34104    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34105set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34107$as_echo_n "checking for $ac_word... " >&6; }
34108if ${ac_cv_prog_CXX+:} false; then :
34109  $as_echo_n "(cached) " >&6
34110else
34111  if test -n "$CXX"; then
34112  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34113else
34114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34115for as_dir in $PATH
34116do
34117  IFS=$as_save_IFS
34118  test -z "$as_dir" && as_dir=.
34119    for ac_exec_ext in '' $ac_executable_extensions; do
34120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34121    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34123    break 2
34124  fi
34125done
34126  done
34127IFS=$as_save_IFS
34128
34129fi
34130fi
34131CXX=$ac_cv_prog_CXX
34132if test -n "$CXX"; then
34133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34134$as_echo "$CXX" >&6; }
34135else
34136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34137$as_echo "no" >&6; }
34138fi
34139
34140
34141    test -n "$CXX" && break
34142  done
34143fi
34144if test -z "$CXX"; then
34145  ac_ct_CXX=$CXX
34146  for ac_prog in $CXX
34147do
34148  # Extract the first word of "$ac_prog", so it can be a program name with args.
34149set dummy $ac_prog; ac_word=$2
34150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34151$as_echo_n "checking for $ac_word... " >&6; }
34152if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34153  $as_echo_n "(cached) " >&6
34154else
34155  if test -n "$ac_ct_CXX"; then
34156  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34157else
34158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34159for as_dir in $PATH
34160do
34161  IFS=$as_save_IFS
34162  test -z "$as_dir" && as_dir=.
34163    for ac_exec_ext in '' $ac_executable_extensions; do
34164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34165    ac_cv_prog_ac_ct_CXX="$ac_prog"
34166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34167    break 2
34168  fi
34169done
34170  done
34171IFS=$as_save_IFS
34172
34173fi
34174fi
34175ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34176if test -n "$ac_ct_CXX"; then
34177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34178$as_echo "$ac_ct_CXX" >&6; }
34179else
34180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34181$as_echo "no" >&6; }
34182fi
34183
34184
34185  test -n "$ac_ct_CXX" && break
34186done
34187
34188  if test "x$ac_ct_CXX" = x; then
34189    CXX="g++"
34190  else
34191    case $cross_compiling:$ac_tool_warned in
34192yes:)
34193{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34194$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34195ac_tool_warned=yes ;;
34196esac
34197    CXX=$ac_ct_CXX
34198  fi
34199fi
34200
34201  fi
34202fi
34203# Provide some information about the compiler.
34204$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34205set X $ac_compile
34206ac_compiler=$2
34207for ac_option in --version -v -V -qversion; do
34208  { { ac_try="$ac_compiler $ac_option >&5"
34209case "(($ac_try" in
34210  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34211  *) ac_try_echo=$ac_try;;
34212esac
34213eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34214$as_echo "$ac_try_echo"; } >&5
34215  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34216  ac_status=$?
34217  if test -s conftest.err; then
34218    sed '10a\
34219... rest of stderr output deleted ...
34220         10q' conftest.err >conftest.er1
34221    cat conftest.er1 >&5
34222  fi
34223  rm -f conftest.er1 conftest.err
34224  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34225  test $ac_status = 0; }
34226done
34227
34228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34229$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34230if ${ac_cv_cxx_compiler_gnu+:} false; then :
34231  $as_echo_n "(cached) " >&6
34232else
34233  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34234/* end confdefs.h.  */
34235
34236int
34237main ()
34238{
34239#ifndef __GNUC__
34240       choke me
34241#endif
34242
34243  ;
34244  return 0;
34245}
34246_ACEOF
34247if ac_fn_cxx_try_compile "$LINENO"; then :
34248  ac_compiler_gnu=yes
34249else
34250  ac_compiler_gnu=no
34251fi
34252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34253ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34254
34255fi
34256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34257$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34258if test $ac_compiler_gnu = yes; then
34259  GXX=yes
34260else
34261  GXX=
34262fi
34263ac_test_CXXFLAGS=${CXXFLAGS+set}
34264ac_save_CXXFLAGS=$CXXFLAGS
34265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34266$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34267if ${ac_cv_prog_cxx_g+:} false; then :
34268  $as_echo_n "(cached) " >&6
34269else
34270  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34271   ac_cxx_werror_flag=yes
34272   ac_cv_prog_cxx_g=no
34273   CXXFLAGS="-g"
34274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34275/* end confdefs.h.  */
34276
34277int
34278main ()
34279{
34280
34281  ;
34282  return 0;
34283}
34284_ACEOF
34285if ac_fn_cxx_try_compile "$LINENO"; then :
34286  ac_cv_prog_cxx_g=yes
34287else
34288  CXXFLAGS=""
34289      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34290/* end confdefs.h.  */
34291
34292int
34293main ()
34294{
34295
34296  ;
34297  return 0;
34298}
34299_ACEOF
34300if ac_fn_cxx_try_compile "$LINENO"; then :
34301
34302else
34303  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34304	 CXXFLAGS="-g"
34305	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34306/* end confdefs.h.  */
34307
34308int
34309main ()
34310{
34311
34312  ;
34313  return 0;
34314}
34315_ACEOF
34316if ac_fn_cxx_try_compile "$LINENO"; then :
34317  ac_cv_prog_cxx_g=yes
34318fi
34319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34320fi
34321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34322fi
34323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34324   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34325fi
34326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34327$as_echo "$ac_cv_prog_cxx_g" >&6; }
34328if test "$ac_test_CXXFLAGS" = set; then
34329  CXXFLAGS=$ac_save_CXXFLAGS
34330elif test $ac_cv_prog_cxx_g = yes; then
34331  if test "$GXX" = yes; then
34332    CXXFLAGS="-g -O2"
34333  else
34334    CXXFLAGS="-g"
34335  fi
34336else
34337  if test "$GXX" = yes; then
34338    CXXFLAGS="-O2"
34339  else
34340    CXXFLAGS=
34341  fi
34342fi
34343ac_ext=cpp
34344ac_cpp='$CXXCPP $CPPFLAGS'
34345ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34346ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34347ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34348
34349
34350  #
34351  # Setup the preprocessor (CPP and CXXCPP)
34352  #
34353  ac_ext=c
34354ac_cpp='$CPP $CPPFLAGS'
34355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34357ac_compiler_gnu=$ac_cv_c_compiler_gnu
34358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34359$as_echo_n "checking how to run the C preprocessor... " >&6; }
34360# On Suns, sometimes $CPP names a directory.
34361if test -n "$CPP" && test -d "$CPP"; then
34362  CPP=
34363fi
34364if test -z "$CPP"; then
34365  if ${ac_cv_prog_CPP+:} false; then :
34366  $as_echo_n "(cached) " >&6
34367else
34368      # Double quotes because CPP needs to be expanded
34369    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34370    do
34371      ac_preproc_ok=false
34372for ac_c_preproc_warn_flag in '' yes
34373do
34374  # Use a header file that comes with gcc, so configuring glibc
34375  # with a fresh cross-compiler works.
34376  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34377  # <limits.h> exists even on freestanding compilers.
34378  # On the NeXT, cc -E runs the code through the compiler's parser,
34379  # not just through cpp. "Syntax error" is here to catch this case.
34380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34381/* end confdefs.h.  */
34382#ifdef __STDC__
34383# include <limits.h>
34384#else
34385# include <assert.h>
34386#endif
34387		     Syntax error
34388_ACEOF
34389if ac_fn_c_try_cpp "$LINENO"; then :
34390
34391else
34392  # Broken: fails on valid input.
34393continue
34394fi
34395rm -f conftest.err conftest.i conftest.$ac_ext
34396
34397  # OK, works on sane cases.  Now check whether nonexistent headers
34398  # can be detected and how.
34399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34400/* end confdefs.h.  */
34401#include <ac_nonexistent.h>
34402_ACEOF
34403if ac_fn_c_try_cpp "$LINENO"; then :
34404  # Broken: success on invalid input.
34405continue
34406else
34407  # Passes both tests.
34408ac_preproc_ok=:
34409break
34410fi
34411rm -f conftest.err conftest.i conftest.$ac_ext
34412
34413done
34414# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34415rm -f conftest.i conftest.err conftest.$ac_ext
34416if $ac_preproc_ok; then :
34417  break
34418fi
34419
34420    done
34421    ac_cv_prog_CPP=$CPP
34422
34423fi
34424  CPP=$ac_cv_prog_CPP
34425else
34426  ac_cv_prog_CPP=$CPP
34427fi
34428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34429$as_echo "$CPP" >&6; }
34430ac_preproc_ok=false
34431for ac_c_preproc_warn_flag in '' yes
34432do
34433  # Use a header file that comes with gcc, so configuring glibc
34434  # with a fresh cross-compiler works.
34435  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34436  # <limits.h> exists even on freestanding compilers.
34437  # On the NeXT, cc -E runs the code through the compiler's parser,
34438  # not just through cpp. "Syntax error" is here to catch this case.
34439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34440/* end confdefs.h.  */
34441#ifdef __STDC__
34442# include <limits.h>
34443#else
34444# include <assert.h>
34445#endif
34446		     Syntax error
34447_ACEOF
34448if ac_fn_c_try_cpp "$LINENO"; then :
34449
34450else
34451  # Broken: fails on valid input.
34452continue
34453fi
34454rm -f conftest.err conftest.i conftest.$ac_ext
34455
34456  # OK, works on sane cases.  Now check whether nonexistent headers
34457  # can be detected and how.
34458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34459/* end confdefs.h.  */
34460#include <ac_nonexistent.h>
34461_ACEOF
34462if ac_fn_c_try_cpp "$LINENO"; then :
34463  # Broken: success on invalid input.
34464continue
34465else
34466  # Passes both tests.
34467ac_preproc_ok=:
34468break
34469fi
34470rm -f conftest.err conftest.i conftest.$ac_ext
34471
34472done
34473# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34474rm -f conftest.i conftest.err conftest.$ac_ext
34475if $ac_preproc_ok; then :
34476
34477else
34478  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34480as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34481See \`config.log' for more details" "$LINENO" 5; }
34482fi
34483
34484ac_ext=cpp
34485ac_cpp='$CXXCPP $CPPFLAGS'
34486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34489
34490
34491  # Only process if variable expands to non-empty
34492
34493  if test "x$CPP" != x; then
34494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34495
34496  # First separate the path from the arguments. This will split at the first
34497  # space.
34498  complete="$CPP"
34499  path="${complete%% *}"
34500  tmp="$complete EOL"
34501  arguments="${tmp#* }"
34502
34503  # Input might be given as Windows format, start by converting to
34504  # unix format.
34505  new_path=`$CYGPATH -u "$path"`
34506
34507  # Now try to locate executable using which
34508  new_path=`$WHICH "$new_path" 2> /dev/null`
34509  # bat and cmd files are not always considered executable in cygwin causing which
34510  # to not find them
34511  if test "x$new_path" = x \
34512      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34513      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34514    new_path=`$CYGPATH -u "$path"`
34515  fi
34516  if test "x$new_path" = x; then
34517    # Oops. Which didn't find the executable.
34518    # The splitting of arguments from the executable at a space might have been incorrect,
34519    # since paths with space are more likely in Windows. Give it another try with the whole
34520    # argument.
34521    path="$complete"
34522    arguments="EOL"
34523    new_path=`$CYGPATH -u "$path"`
34524    new_path=`$WHICH "$new_path" 2> /dev/null`
34525    # bat and cmd files are not always considered executable in cygwin causing which
34526    # to not find them
34527    if test "x$new_path" = x \
34528        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34529        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34530      new_path=`$CYGPATH -u "$path"`
34531    fi
34532    if test "x$new_path" = x; then
34533      # It's still not found. Now this is an unrecoverable error.
34534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34535$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34536      has_space=`$ECHO "$complete" | $GREP " "`
34537      if test "x$has_space" != x; then
34538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34540      fi
34541      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34542    fi
34543  fi
34544
34545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34548  # "foo.exe" is OK but "foo" is an error.
34549  #
34550  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34551  # It is also a way to make sure we got the proper file name for the real test later on.
34552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34553  if test "x$test_shortpath" = x; then
34554    # Short path failed, file does not exist as specified.
34555    # Try adding .exe or .cmd
34556    if test -f "${new_path}.exe"; then
34557      input_to_shortpath="${new_path}.exe"
34558    elif test -f "${new_path}.cmd"; then
34559      input_to_shortpath="${new_path}.cmd"
34560    else
34561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34562$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34563      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34564$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34565      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34566    fi
34567  else
34568    input_to_shortpath="$new_path"
34569  fi
34570
34571  # Call helper function which possibly converts this using DOS-style short mode.
34572  # If so, the updated path is stored in $new_path.
34573  new_path="$input_to_shortpath"
34574
34575  input_path="$input_to_shortpath"
34576  # Check if we need to convert this using DOS-style short mode. If the path
34577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34578  # take no chances and rewrite it.
34579  # Note: m4 eats our [], so we need to use [ and ] instead.
34580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34581  if test "x$has_forbidden_chars" != x; then
34582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34586      # Going to short mode and back again did indeed matter. Since short mode is
34587      # case insensitive, let's make it lowercase to improve readability.
34588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34589      # Now convert it back to Unix-style (cygpath)
34590      input_path=`$CYGPATH -u "$shortmode_path"`
34591      new_path="$input_path"
34592    fi
34593  fi
34594
34595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34596  if test "x$test_cygdrive_prefix" = x; then
34597    # As a simple fix, exclude /usr/bin since it's not a real path.
34598    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34600      # a path prefixed by /cygdrive for fixpath to work.
34601      new_path="$CYGWIN_ROOT_PATH$input_path"
34602    fi
34603  fi
34604
34605  # remove trailing .exe if any
34606  new_path="${new_path/%.exe/}"
34607
34608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34609
34610  # First separate the path from the arguments. This will split at the first
34611  # space.
34612  complete="$CPP"
34613  path="${complete%% *}"
34614  tmp="$complete EOL"
34615  arguments="${tmp#* }"
34616
34617  # Input might be given as Windows format, start by converting to
34618  # unix format.
34619  new_path="$path"
34620
34621  windows_path="$new_path"
34622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34623    unix_path=`$CYGPATH -u "$windows_path"`
34624    new_path="$unix_path"
34625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34627    new_path="$unix_path"
34628  fi
34629
34630
34631  # Now try to locate executable using which
34632  new_path=`$WHICH "$new_path" 2> /dev/null`
34633
34634  if test "x$new_path" = x; then
34635    # Oops. Which didn't find the executable.
34636    # The splitting of arguments from the executable at a space might have been incorrect,
34637    # since paths with space are more likely in Windows. Give it another try with the whole
34638    # argument.
34639    path="$complete"
34640    arguments="EOL"
34641    new_path="$path"
34642
34643  windows_path="$new_path"
34644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34645    unix_path=`$CYGPATH -u "$windows_path"`
34646    new_path="$unix_path"
34647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34649    new_path="$unix_path"
34650  fi
34651
34652
34653    new_path=`$WHICH "$new_path" 2> /dev/null`
34654    # bat and cmd files are not always considered executable in MSYS causing which
34655    # to not find them
34656    if test "x$new_path" = x \
34657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34659      new_path="$path"
34660
34661  windows_path="$new_path"
34662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34663    unix_path=`$CYGPATH -u "$windows_path"`
34664    new_path="$unix_path"
34665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34667    new_path="$unix_path"
34668  fi
34669
34670    fi
34671
34672    if test "x$new_path" = x; then
34673      # It's still not found. Now this is an unrecoverable error.
34674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34675$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34676      has_space=`$ECHO "$complete" | $GREP " "`
34677      if test "x$has_space" != x; then
34678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34680      fi
34681      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34682    fi
34683  fi
34684
34685  # Now new_path has a complete unix path to the binary
34686  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34687    # Keep paths in /bin as-is, but remove trailing .exe if any
34688    new_path="${new_path/%.exe/}"
34689    # Do not save /bin paths to all_fixpath_prefixes!
34690  else
34691    # Not in mixed or Windows style, start by that.
34692    new_path=`cmd //c echo $new_path`
34693
34694  input_path="$new_path"
34695  # Check if we need to convert this using DOS-style short mode. If the path
34696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34697  # take no chances and rewrite it.
34698  # Note: m4 eats our [], so we need to use [ and ] instead.
34699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34700  if test "x$has_forbidden_chars" != x; then
34701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34703  fi
34704
34705    # Output is in $new_path
34706
34707  windows_path="$new_path"
34708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34709    unix_path=`$CYGPATH -u "$windows_path"`
34710    new_path="$unix_path"
34711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34713    new_path="$unix_path"
34714  fi
34715
34716    # remove trailing .exe if any
34717    new_path="${new_path/%.exe/}"
34718
34719    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34720    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34721  fi
34722
34723    else
34724      # We're on a unix platform. Hooray! :)
34725      # First separate the path from the arguments. This will split at the first
34726      # space.
34727      complete="$CPP"
34728      path="${complete%% *}"
34729      tmp="$complete EOL"
34730      arguments="${tmp#* }"
34731
34732      # Cannot rely on the command "which" here since it doesn't always work.
34733      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34734      if test -z "$is_absolute_path"; then
34735        # Path to executable is not absolute. Find it.
34736        IFS_save="$IFS"
34737        IFS=:
34738        for p in $PATH; do
34739          if test -f "$p/$path" && test -x "$p/$path"; then
34740            new_path="$p/$path"
34741            break
34742          fi
34743        done
34744        IFS="$IFS_save"
34745      else
34746        # This is an absolute path, we can use it without further modifications.
34747        new_path="$path"
34748      fi
34749
34750      if test "x$new_path" = x; then
34751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34752$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34753        has_space=`$ECHO "$complete" | $GREP " "`
34754        if test "x$has_space" != x; then
34755          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34756$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34757        fi
34758        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34759      fi
34760    fi
34761
34762    # Now join together the path and the arguments once again
34763    if test "x$arguments" != xEOL; then
34764      new_complete="$new_path ${arguments% *}"
34765    else
34766      new_complete="$new_path"
34767    fi
34768
34769    if test "x$complete" != "x$new_complete"; then
34770      CPP="$new_complete"
34771      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34772$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34773    fi
34774  fi
34775
34776  ac_ext=cpp
34777ac_cpp='$CXXCPP $CPPFLAGS'
34778ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34779ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34780ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34782$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34783if test -z "$CXXCPP"; then
34784  if ${ac_cv_prog_CXXCPP+:} false; then :
34785  $as_echo_n "(cached) " >&6
34786else
34787      # Double quotes because CXXCPP needs to be expanded
34788    for CXXCPP in "$CXX -E" "/lib/cpp"
34789    do
34790      ac_preproc_ok=false
34791for ac_cxx_preproc_warn_flag in '' yes
34792do
34793  # Use a header file that comes with gcc, so configuring glibc
34794  # with a fresh cross-compiler works.
34795  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34796  # <limits.h> exists even on freestanding compilers.
34797  # On the NeXT, cc -E runs the code through the compiler's parser,
34798  # not just through cpp. "Syntax error" is here to catch this case.
34799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34800/* end confdefs.h.  */
34801#ifdef __STDC__
34802# include <limits.h>
34803#else
34804# include <assert.h>
34805#endif
34806		     Syntax error
34807_ACEOF
34808if ac_fn_cxx_try_cpp "$LINENO"; then :
34809
34810else
34811  # Broken: fails on valid input.
34812continue
34813fi
34814rm -f conftest.err conftest.i conftest.$ac_ext
34815
34816  # OK, works on sane cases.  Now check whether nonexistent headers
34817  # can be detected and how.
34818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34819/* end confdefs.h.  */
34820#include <ac_nonexistent.h>
34821_ACEOF
34822if ac_fn_cxx_try_cpp "$LINENO"; then :
34823  # Broken: success on invalid input.
34824continue
34825else
34826  # Passes both tests.
34827ac_preproc_ok=:
34828break
34829fi
34830rm -f conftest.err conftest.i conftest.$ac_ext
34831
34832done
34833# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34834rm -f conftest.i conftest.err conftest.$ac_ext
34835if $ac_preproc_ok; then :
34836  break
34837fi
34838
34839    done
34840    ac_cv_prog_CXXCPP=$CXXCPP
34841
34842fi
34843  CXXCPP=$ac_cv_prog_CXXCPP
34844else
34845  ac_cv_prog_CXXCPP=$CXXCPP
34846fi
34847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34848$as_echo "$CXXCPP" >&6; }
34849ac_preproc_ok=false
34850for ac_cxx_preproc_warn_flag in '' yes
34851do
34852  # Use a header file that comes with gcc, so configuring glibc
34853  # with a fresh cross-compiler works.
34854  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34855  # <limits.h> exists even on freestanding compilers.
34856  # On the NeXT, cc -E runs the code through the compiler's parser,
34857  # not just through cpp. "Syntax error" is here to catch this case.
34858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34859/* end confdefs.h.  */
34860#ifdef __STDC__
34861# include <limits.h>
34862#else
34863# include <assert.h>
34864#endif
34865		     Syntax error
34866_ACEOF
34867if ac_fn_cxx_try_cpp "$LINENO"; then :
34868
34869else
34870  # Broken: fails on valid input.
34871continue
34872fi
34873rm -f conftest.err conftest.i conftest.$ac_ext
34874
34875  # OK, works on sane cases.  Now check whether nonexistent headers
34876  # can be detected and how.
34877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34878/* end confdefs.h.  */
34879#include <ac_nonexistent.h>
34880_ACEOF
34881if ac_fn_cxx_try_cpp "$LINENO"; then :
34882  # Broken: success on invalid input.
34883continue
34884else
34885  # Passes both tests.
34886ac_preproc_ok=:
34887break
34888fi
34889rm -f conftest.err conftest.i conftest.$ac_ext
34890
34891done
34892# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34893rm -f conftest.i conftest.err conftest.$ac_ext
34894if $ac_preproc_ok; then :
34895
34896else
34897  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34899as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34900See \`config.log' for more details" "$LINENO" 5; }
34901fi
34902
34903ac_ext=cpp
34904ac_cpp='$CXXCPP $CPPFLAGS'
34905ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34906ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34907ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34908
34909
34910  # Only process if variable expands to non-empty
34911
34912  if test "x$CXXCPP" != x; then
34913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34914
34915  # First separate the path from the arguments. This will split at the first
34916  # space.
34917  complete="$CXXCPP"
34918  path="${complete%% *}"
34919  tmp="$complete EOL"
34920  arguments="${tmp#* }"
34921
34922  # Input might be given as Windows format, start by converting to
34923  # unix format.
34924  new_path=`$CYGPATH -u "$path"`
34925
34926  # Now try to locate executable using which
34927  new_path=`$WHICH "$new_path" 2> /dev/null`
34928  # bat and cmd files are not always considered executable in cygwin causing which
34929  # to not find them
34930  if test "x$new_path" = x \
34931      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34932      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34933    new_path=`$CYGPATH -u "$path"`
34934  fi
34935  if test "x$new_path" = x; then
34936    # Oops. Which didn't find the executable.
34937    # The splitting of arguments from the executable at a space might have been incorrect,
34938    # since paths with space are more likely in Windows. Give it another try with the whole
34939    # argument.
34940    path="$complete"
34941    arguments="EOL"
34942    new_path=`$CYGPATH -u "$path"`
34943    new_path=`$WHICH "$new_path" 2> /dev/null`
34944    # bat and cmd files are not always considered executable in cygwin causing which
34945    # to not find them
34946    if test "x$new_path" = x \
34947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34949      new_path=`$CYGPATH -u "$path"`
34950    fi
34951    if test "x$new_path" = x; then
34952      # It's still not found. Now this is an unrecoverable error.
34953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34954$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34955      has_space=`$ECHO "$complete" | $GREP " "`
34956      if test "x$has_space" != x; then
34957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34959      fi
34960      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34961    fi
34962  fi
34963
34964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34967  # "foo.exe" is OK but "foo" is an error.
34968  #
34969  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34970  # It is also a way to make sure we got the proper file name for the real test later on.
34971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34972  if test "x$test_shortpath" = x; then
34973    # Short path failed, file does not exist as specified.
34974    # Try adding .exe or .cmd
34975    if test -f "${new_path}.exe"; then
34976      input_to_shortpath="${new_path}.exe"
34977    elif test -f "${new_path}.cmd"; then
34978      input_to_shortpath="${new_path}.cmd"
34979    else
34980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34981$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34982      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34983$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34984      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34985    fi
34986  else
34987    input_to_shortpath="$new_path"
34988  fi
34989
34990  # Call helper function which possibly converts this using DOS-style short mode.
34991  # If so, the updated path is stored in $new_path.
34992  new_path="$input_to_shortpath"
34993
34994  input_path="$input_to_shortpath"
34995  # Check if we need to convert this using DOS-style short mode. If the path
34996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34997  # take no chances and rewrite it.
34998  # Note: m4 eats our [], so we need to use [ and ] instead.
34999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35000  if test "x$has_forbidden_chars" != x; then
35001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35005      # Going to short mode and back again did indeed matter. Since short mode is
35006      # case insensitive, let's make it lowercase to improve readability.
35007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35008      # Now convert it back to Unix-style (cygpath)
35009      input_path=`$CYGPATH -u "$shortmode_path"`
35010      new_path="$input_path"
35011    fi
35012  fi
35013
35014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35015  if test "x$test_cygdrive_prefix" = x; then
35016    # As a simple fix, exclude /usr/bin since it's not a real path.
35017    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35019      # a path prefixed by /cygdrive for fixpath to work.
35020      new_path="$CYGWIN_ROOT_PATH$input_path"
35021    fi
35022  fi
35023
35024  # remove trailing .exe if any
35025  new_path="${new_path/%.exe/}"
35026
35027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35028
35029  # First separate the path from the arguments. This will split at the first
35030  # space.
35031  complete="$CXXCPP"
35032  path="${complete%% *}"
35033  tmp="$complete EOL"
35034  arguments="${tmp#* }"
35035
35036  # Input might be given as Windows format, start by converting to
35037  # unix format.
35038  new_path="$path"
35039
35040  windows_path="$new_path"
35041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35042    unix_path=`$CYGPATH -u "$windows_path"`
35043    new_path="$unix_path"
35044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35046    new_path="$unix_path"
35047  fi
35048
35049
35050  # Now try to locate executable using which
35051  new_path=`$WHICH "$new_path" 2> /dev/null`
35052
35053  if test "x$new_path" = x; then
35054    # Oops. Which didn't find the executable.
35055    # The splitting of arguments from the executable at a space might have been incorrect,
35056    # since paths with space are more likely in Windows. Give it another try with the whole
35057    # argument.
35058    path="$complete"
35059    arguments="EOL"
35060    new_path="$path"
35061
35062  windows_path="$new_path"
35063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35064    unix_path=`$CYGPATH -u "$windows_path"`
35065    new_path="$unix_path"
35066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35068    new_path="$unix_path"
35069  fi
35070
35071
35072    new_path=`$WHICH "$new_path" 2> /dev/null`
35073    # bat and cmd files are not always considered executable in MSYS causing which
35074    # to not find them
35075    if test "x$new_path" = x \
35076        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35077        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35078      new_path="$path"
35079
35080  windows_path="$new_path"
35081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35082    unix_path=`$CYGPATH -u "$windows_path"`
35083    new_path="$unix_path"
35084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35086    new_path="$unix_path"
35087  fi
35088
35089    fi
35090
35091    if test "x$new_path" = x; then
35092      # It's still not found. Now this is an unrecoverable error.
35093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35094$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35095      has_space=`$ECHO "$complete" | $GREP " "`
35096      if test "x$has_space" != x; then
35097        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35098$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35099      fi
35100      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35101    fi
35102  fi
35103
35104  # Now new_path has a complete unix path to the binary
35105  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35106    # Keep paths in /bin as-is, but remove trailing .exe if any
35107    new_path="${new_path/%.exe/}"
35108    # Do not save /bin paths to all_fixpath_prefixes!
35109  else
35110    # Not in mixed or Windows style, start by that.
35111    new_path=`cmd //c echo $new_path`
35112
35113  input_path="$new_path"
35114  # Check if we need to convert this using DOS-style short mode. If the path
35115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35116  # take no chances and rewrite it.
35117  # Note: m4 eats our [], so we need to use [ and ] instead.
35118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35119  if test "x$has_forbidden_chars" != x; then
35120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35122  fi
35123
35124    # Output is in $new_path
35125
35126  windows_path="$new_path"
35127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35128    unix_path=`$CYGPATH -u "$windows_path"`
35129    new_path="$unix_path"
35130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35132    new_path="$unix_path"
35133  fi
35134
35135    # remove trailing .exe if any
35136    new_path="${new_path/%.exe/}"
35137
35138    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35139    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35140  fi
35141
35142    else
35143      # We're on a unix platform. Hooray! :)
35144      # First separate the path from the arguments. This will split at the first
35145      # space.
35146      complete="$CXXCPP"
35147      path="${complete%% *}"
35148      tmp="$complete EOL"
35149      arguments="${tmp#* }"
35150
35151      # Cannot rely on the command "which" here since it doesn't always work.
35152      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35153      if test -z "$is_absolute_path"; then
35154        # Path to executable is not absolute. Find it.
35155        IFS_save="$IFS"
35156        IFS=:
35157        for p in $PATH; do
35158          if test -f "$p/$path" && test -x "$p/$path"; then
35159            new_path="$p/$path"
35160            break
35161          fi
35162        done
35163        IFS="$IFS_save"
35164      else
35165        # This is an absolute path, we can use it without further modifications.
35166        new_path="$path"
35167      fi
35168
35169      if test "x$new_path" = x; then
35170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35171$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35172        has_space=`$ECHO "$complete" | $GREP " "`
35173        if test "x$has_space" != x; then
35174          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35175$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35176        fi
35177        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35178      fi
35179    fi
35180
35181    # Now join together the path and the arguments once again
35182    if test "x$arguments" != xEOL; then
35183      new_complete="$new_path ${arguments% *}"
35184    else
35185      new_complete="$new_path"
35186    fi
35187
35188    if test "x$complete" != "x$new_complete"; then
35189      CXXCPP="$new_complete"
35190      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35191$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35192    fi
35193  fi
35194
35195
35196  #
35197  # Setup the linker (LD)
35198  #
35199  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35200    # In the Microsoft toolchain we have a separate LD command "link".
35201    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35202    # a cygwin program for something completely different.
35203    # Extract the first word of "link", so it can be a program name with args.
35204set dummy link; ac_word=$2
35205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35206$as_echo_n "checking for $ac_word... " >&6; }
35207if ${ac_cv_prog_LD+:} false; then :
35208  $as_echo_n "(cached) " >&6
35209else
35210  if test -n "$LD"; then
35211  ac_cv_prog_LD="$LD" # Let the user override the test.
35212else
35213  ac_prog_rejected=no
35214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35215for as_dir in $PATH
35216do
35217  IFS=$as_save_IFS
35218  test -z "$as_dir" && as_dir=.
35219    for ac_exec_ext in '' $ac_executable_extensions; do
35220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35221    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35222       ac_prog_rejected=yes
35223       continue
35224     fi
35225    ac_cv_prog_LD="link"
35226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35227    break 2
35228  fi
35229done
35230  done
35231IFS=$as_save_IFS
35232
35233if test $ac_prog_rejected = yes; then
35234  # We found a bogon in the path, so make sure we never use it.
35235  set dummy $ac_cv_prog_LD
35236  shift
35237  if test $# != 0; then
35238    # We chose a different compiler from the bogus one.
35239    # However, it has the same basename, so the bogon will be chosen
35240    # first if we set LD to just the basename; use the full file name.
35241    shift
35242    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35243  fi
35244fi
35245fi
35246fi
35247LD=$ac_cv_prog_LD
35248if test -n "$LD"; then
35249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35250$as_echo "$LD" >&6; }
35251else
35252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35253$as_echo "no" >&6; }
35254fi
35255
35256
35257
35258  # Only process if variable expands to non-empty
35259
35260  if test "x$LD" != x; then
35261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35262
35263  # First separate the path from the arguments. This will split at the first
35264  # space.
35265  complete="$LD"
35266  path="${complete%% *}"
35267  tmp="$complete EOL"
35268  arguments="${tmp#* }"
35269
35270  # Input might be given as Windows format, start by converting to
35271  # unix format.
35272  new_path=`$CYGPATH -u "$path"`
35273
35274  # Now try to locate executable using which
35275  new_path=`$WHICH "$new_path" 2> /dev/null`
35276  # bat and cmd files are not always considered executable in cygwin causing which
35277  # to not find them
35278  if test "x$new_path" = x \
35279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35281    new_path=`$CYGPATH -u "$path"`
35282  fi
35283  if test "x$new_path" = x; then
35284    # Oops. Which didn't find the executable.
35285    # The splitting of arguments from the executable at a space might have been incorrect,
35286    # since paths with space are more likely in Windows. Give it another try with the whole
35287    # argument.
35288    path="$complete"
35289    arguments="EOL"
35290    new_path=`$CYGPATH -u "$path"`
35291    new_path=`$WHICH "$new_path" 2> /dev/null`
35292    # bat and cmd files are not always considered executable in cygwin causing which
35293    # to not find them
35294    if test "x$new_path" = x \
35295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35297      new_path=`$CYGPATH -u "$path"`
35298    fi
35299    if test "x$new_path" = x; then
35300      # It's still not found. Now this is an unrecoverable error.
35301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35302$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35303      has_space=`$ECHO "$complete" | $GREP " "`
35304      if test "x$has_space" != x; then
35305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35307      fi
35308      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35309    fi
35310  fi
35311
35312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35315  # "foo.exe" is OK but "foo" is an error.
35316  #
35317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35318  # It is also a way to make sure we got the proper file name for the real test later on.
35319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35320  if test "x$test_shortpath" = x; then
35321    # Short path failed, file does not exist as specified.
35322    # Try adding .exe or .cmd
35323    if test -f "${new_path}.exe"; then
35324      input_to_shortpath="${new_path}.exe"
35325    elif test -f "${new_path}.cmd"; then
35326      input_to_shortpath="${new_path}.cmd"
35327    else
35328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35329$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35332      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35333    fi
35334  else
35335    input_to_shortpath="$new_path"
35336  fi
35337
35338  # Call helper function which possibly converts this using DOS-style short mode.
35339  # If so, the updated path is stored in $new_path.
35340  new_path="$input_to_shortpath"
35341
35342  input_path="$input_to_shortpath"
35343  # Check if we need to convert this using DOS-style short mode. If the path
35344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35345  # take no chances and rewrite it.
35346  # Note: m4 eats our [], so we need to use [ and ] instead.
35347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35348  if test "x$has_forbidden_chars" != x; then
35349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35353      # Going to short mode and back again did indeed matter. Since short mode is
35354      # case insensitive, let's make it lowercase to improve readability.
35355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35356      # Now convert it back to Unix-style (cygpath)
35357      input_path=`$CYGPATH -u "$shortmode_path"`
35358      new_path="$input_path"
35359    fi
35360  fi
35361
35362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35363  if test "x$test_cygdrive_prefix" = x; then
35364    # As a simple fix, exclude /usr/bin since it's not a real path.
35365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35367      # a path prefixed by /cygdrive for fixpath to work.
35368      new_path="$CYGWIN_ROOT_PATH$input_path"
35369    fi
35370  fi
35371
35372  # remove trailing .exe if any
35373  new_path="${new_path/%.exe/}"
35374
35375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35376
35377  # First separate the path from the arguments. This will split at the first
35378  # space.
35379  complete="$LD"
35380  path="${complete%% *}"
35381  tmp="$complete EOL"
35382  arguments="${tmp#* }"
35383
35384  # Input might be given as Windows format, start by converting to
35385  # unix format.
35386  new_path="$path"
35387
35388  windows_path="$new_path"
35389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35390    unix_path=`$CYGPATH -u "$windows_path"`
35391    new_path="$unix_path"
35392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35394    new_path="$unix_path"
35395  fi
35396
35397
35398  # Now try to locate executable using which
35399  new_path=`$WHICH "$new_path" 2> /dev/null`
35400
35401  if test "x$new_path" = x; then
35402    # Oops. Which didn't find the executable.
35403    # The splitting of arguments from the executable at a space might have been incorrect,
35404    # since paths with space are more likely in Windows. Give it another try with the whole
35405    # argument.
35406    path="$complete"
35407    arguments="EOL"
35408    new_path="$path"
35409
35410  windows_path="$new_path"
35411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35412    unix_path=`$CYGPATH -u "$windows_path"`
35413    new_path="$unix_path"
35414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35416    new_path="$unix_path"
35417  fi
35418
35419
35420    new_path=`$WHICH "$new_path" 2> /dev/null`
35421    # bat and cmd files are not always considered executable in MSYS causing which
35422    # to not find them
35423    if test "x$new_path" = x \
35424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35426      new_path="$path"
35427
35428  windows_path="$new_path"
35429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35430    unix_path=`$CYGPATH -u "$windows_path"`
35431    new_path="$unix_path"
35432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35434    new_path="$unix_path"
35435  fi
35436
35437    fi
35438
35439    if test "x$new_path" = x; then
35440      # It's still not found. Now this is an unrecoverable error.
35441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35442$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35443      has_space=`$ECHO "$complete" | $GREP " "`
35444      if test "x$has_space" != x; then
35445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35447      fi
35448      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35449    fi
35450  fi
35451
35452  # Now new_path has a complete unix path to the binary
35453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35454    # Keep paths in /bin as-is, but remove trailing .exe if any
35455    new_path="${new_path/%.exe/}"
35456    # Do not save /bin paths to all_fixpath_prefixes!
35457  else
35458    # Not in mixed or Windows style, start by that.
35459    new_path=`cmd //c echo $new_path`
35460
35461  input_path="$new_path"
35462  # Check if we need to convert this using DOS-style short mode. If the path
35463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35464  # take no chances and rewrite it.
35465  # Note: m4 eats our [], so we need to use [ and ] instead.
35466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35467  if test "x$has_forbidden_chars" != x; then
35468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35470  fi
35471
35472    # Output is in $new_path
35473
35474  windows_path="$new_path"
35475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35476    unix_path=`$CYGPATH -u "$windows_path"`
35477    new_path="$unix_path"
35478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35480    new_path="$unix_path"
35481  fi
35482
35483    # remove trailing .exe if any
35484    new_path="${new_path/%.exe/}"
35485
35486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35488  fi
35489
35490    else
35491      # We're on a unix platform. Hooray! :)
35492      # First separate the path from the arguments. This will split at the first
35493      # space.
35494      complete="$LD"
35495      path="${complete%% *}"
35496      tmp="$complete EOL"
35497      arguments="${tmp#* }"
35498
35499      # Cannot rely on the command "which" here since it doesn't always work.
35500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35501      if test -z "$is_absolute_path"; then
35502        # Path to executable is not absolute. Find it.
35503        IFS_save="$IFS"
35504        IFS=:
35505        for p in $PATH; do
35506          if test -f "$p/$path" && test -x "$p/$path"; then
35507            new_path="$p/$path"
35508            break
35509          fi
35510        done
35511        IFS="$IFS_save"
35512      else
35513        # This is an absolute path, we can use it without further modifications.
35514        new_path="$path"
35515      fi
35516
35517      if test "x$new_path" = x; then
35518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35519$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35520        has_space=`$ECHO "$complete" | $GREP " "`
35521        if test "x$has_space" != x; then
35522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35524        fi
35525        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35526      fi
35527    fi
35528
35529    # Now join together the path and the arguments once again
35530    if test "x$arguments" != xEOL; then
35531      new_complete="$new_path ${arguments% *}"
35532    else
35533      new_complete="$new_path"
35534    fi
35535
35536    if test "x$complete" != "x$new_complete"; then
35537      LD="$new_complete"
35538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35539$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35540    fi
35541  fi
35542
35543    # Verify that we indeed succeeded with this trick.
35544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35545$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35546    "$LD" --version > /dev/null
35547    if test $? -eq 0 ; then
35548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35549$as_echo "no" >&6; }
35550      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35551    else
35552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35553$as_echo "yes" >&6; }
35554    fi
35555    LDCXX="$LD"
35556  else
35557    # All other toolchains use the compiler to link.
35558    LD="$CC"
35559    LDCXX="$CXX"
35560  fi
35561
35562  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35563
35564
35565  #
35566  # Setup the assembler (AS)
35567  #
35568  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35569    # FIXME: should this really be solaris, or solstudio?
35570
35571
35572  # Publish this variable in the help.
35573
35574
35575  if [ -z "${AS+x}" ]; then
35576    # The variable is not set by user, try to locate tool using the code snippet
35577    for ac_prog in as
35578do
35579  # Extract the first word of "$ac_prog", so it can be a program name with args.
35580set dummy $ac_prog; ac_word=$2
35581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35582$as_echo_n "checking for $ac_word... " >&6; }
35583if ${ac_cv_path_AS+:} false; then :
35584  $as_echo_n "(cached) " >&6
35585else
35586  case $AS in
35587  [\\/]* | ?:[\\/]*)
35588  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35589  ;;
35590  *)
35591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35592for as_dir in $PATH
35593do
35594  IFS=$as_save_IFS
35595  test -z "$as_dir" && as_dir=.
35596    for ac_exec_ext in '' $ac_executable_extensions; do
35597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35598    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35600    break 2
35601  fi
35602done
35603  done
35604IFS=$as_save_IFS
35605
35606  ;;
35607esac
35608fi
35609AS=$ac_cv_path_AS
35610if test -n "$AS"; then
35611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35612$as_echo "$AS" >&6; }
35613else
35614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35615$as_echo "no" >&6; }
35616fi
35617
35618
35619  test -n "$AS" && break
35620done
35621
35622  else
35623    # The variable is set, but is it from the command line or the environment?
35624
35625    # Try to remove the string !AS! from our list.
35626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35628      # If it failed, the variable was not from the command line. Ignore it,
35629      # but warn the user (except for BASH, which is always set by the calling BASH).
35630      if test "xAS" != xBASH; then
35631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35632$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35633      fi
35634      # Try to locate tool using the code snippet
35635      for ac_prog in as
35636do
35637  # Extract the first word of "$ac_prog", so it can be a program name with args.
35638set dummy $ac_prog; ac_word=$2
35639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35640$as_echo_n "checking for $ac_word... " >&6; }
35641if ${ac_cv_path_AS+:} false; then :
35642  $as_echo_n "(cached) " >&6
35643else
35644  case $AS in
35645  [\\/]* | ?:[\\/]*)
35646  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35647  ;;
35648  *)
35649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35650for as_dir in $PATH
35651do
35652  IFS=$as_save_IFS
35653  test -z "$as_dir" && as_dir=.
35654    for ac_exec_ext in '' $ac_executable_extensions; do
35655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35656    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35658    break 2
35659  fi
35660done
35661  done
35662IFS=$as_save_IFS
35663
35664  ;;
35665esac
35666fi
35667AS=$ac_cv_path_AS
35668if test -n "$AS"; then
35669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35670$as_echo "$AS" >&6; }
35671else
35672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35673$as_echo "no" >&6; }
35674fi
35675
35676
35677  test -n "$AS" && break
35678done
35679
35680    else
35681      # If it succeeded, then it was overridden by the user. We will use it
35682      # for the tool.
35683
35684      # First remove it from the list of overridden variables, so we can test
35685      # for unknown variables in the end.
35686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35687
35688      # Check if we try to supply an empty value
35689      if test "x$AS" = x; then
35690        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35691$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35693$as_echo_n "checking for AS... " >&6; }
35694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35695$as_echo "disabled" >&6; }
35696      else
35697        # Check if the provided tool contains a complete path.
35698        tool_specified="$AS"
35699        tool_basename="${tool_specified##*/}"
35700        if test "x$tool_basename" = "x$tool_specified"; then
35701          # A command without a complete path is provided, search $PATH.
35702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35703$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35704          # Extract the first word of "$tool_basename", so it can be a program name with args.
35705set dummy $tool_basename; ac_word=$2
35706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35707$as_echo_n "checking for $ac_word... " >&6; }
35708if ${ac_cv_path_AS+:} false; then :
35709  $as_echo_n "(cached) " >&6
35710else
35711  case $AS in
35712  [\\/]* | ?:[\\/]*)
35713  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35714  ;;
35715  *)
35716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35717for as_dir in $PATH
35718do
35719  IFS=$as_save_IFS
35720  test -z "$as_dir" && as_dir=.
35721    for ac_exec_ext in '' $ac_executable_extensions; do
35722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35723    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35725    break 2
35726  fi
35727done
35728  done
35729IFS=$as_save_IFS
35730
35731  ;;
35732esac
35733fi
35734AS=$ac_cv_path_AS
35735if test -n "$AS"; then
35736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35737$as_echo "$AS" >&6; }
35738else
35739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35740$as_echo "no" >&6; }
35741fi
35742
35743
35744          if test "x$AS" = x; then
35745            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35746          fi
35747        else
35748          # Otherwise we believe it is a complete path. Use it as it is.
35749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35750$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35751          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35752$as_echo_n "checking for AS... " >&6; }
35753          if test ! -x "$tool_specified"; then
35754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35755$as_echo "not found" >&6; }
35756            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35757          fi
35758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35759$as_echo "$tool_specified" >&6; }
35760        fi
35761      fi
35762    fi
35763
35764  fi
35765
35766
35767
35768  # Only process if variable expands to non-empty
35769
35770  if test "x$AS" != x; then
35771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35772
35773  # First separate the path from the arguments. This will split at the first
35774  # space.
35775  complete="$AS"
35776  path="${complete%% *}"
35777  tmp="$complete EOL"
35778  arguments="${tmp#* }"
35779
35780  # Input might be given as Windows format, start by converting to
35781  # unix format.
35782  new_path=`$CYGPATH -u "$path"`
35783
35784  # Now try to locate executable using which
35785  new_path=`$WHICH "$new_path" 2> /dev/null`
35786  # bat and cmd files are not always considered executable in cygwin causing which
35787  # to not find them
35788  if test "x$new_path" = x \
35789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35791    new_path=`$CYGPATH -u "$path"`
35792  fi
35793  if test "x$new_path" = x; then
35794    # Oops. Which didn't find the executable.
35795    # The splitting of arguments from the executable at a space might have been incorrect,
35796    # since paths with space are more likely in Windows. Give it another try with the whole
35797    # argument.
35798    path="$complete"
35799    arguments="EOL"
35800    new_path=`$CYGPATH -u "$path"`
35801    new_path=`$WHICH "$new_path" 2> /dev/null`
35802    # bat and cmd files are not always considered executable in cygwin causing which
35803    # to not find them
35804    if test "x$new_path" = x \
35805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35807      new_path=`$CYGPATH -u "$path"`
35808    fi
35809    if test "x$new_path" = x; then
35810      # It's still not found. Now this is an unrecoverable error.
35811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35812$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35813      has_space=`$ECHO "$complete" | $GREP " "`
35814      if test "x$has_space" != x; then
35815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35817      fi
35818      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35819    fi
35820  fi
35821
35822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35825  # "foo.exe" is OK but "foo" is an error.
35826  #
35827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35828  # It is also a way to make sure we got the proper file name for the real test later on.
35829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35830  if test "x$test_shortpath" = x; then
35831    # Short path failed, file does not exist as specified.
35832    # Try adding .exe or .cmd
35833    if test -f "${new_path}.exe"; then
35834      input_to_shortpath="${new_path}.exe"
35835    elif test -f "${new_path}.cmd"; then
35836      input_to_shortpath="${new_path}.cmd"
35837    else
35838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35839$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35842      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35843    fi
35844  else
35845    input_to_shortpath="$new_path"
35846  fi
35847
35848  # Call helper function which possibly converts this using DOS-style short mode.
35849  # If so, the updated path is stored in $new_path.
35850  new_path="$input_to_shortpath"
35851
35852  input_path="$input_to_shortpath"
35853  # Check if we need to convert this using DOS-style short mode. If the path
35854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35855  # take no chances and rewrite it.
35856  # Note: m4 eats our [], so we need to use [ and ] instead.
35857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35858  if test "x$has_forbidden_chars" != x; then
35859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35863      # Going to short mode and back again did indeed matter. Since short mode is
35864      # case insensitive, let's make it lowercase to improve readability.
35865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35866      # Now convert it back to Unix-style (cygpath)
35867      input_path=`$CYGPATH -u "$shortmode_path"`
35868      new_path="$input_path"
35869    fi
35870  fi
35871
35872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35873  if test "x$test_cygdrive_prefix" = x; then
35874    # As a simple fix, exclude /usr/bin since it's not a real path.
35875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35877      # a path prefixed by /cygdrive for fixpath to work.
35878      new_path="$CYGWIN_ROOT_PATH$input_path"
35879    fi
35880  fi
35881
35882  # remove trailing .exe if any
35883  new_path="${new_path/%.exe/}"
35884
35885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35886
35887  # First separate the path from the arguments. This will split at the first
35888  # space.
35889  complete="$AS"
35890  path="${complete%% *}"
35891  tmp="$complete EOL"
35892  arguments="${tmp#* }"
35893
35894  # Input might be given as Windows format, start by converting to
35895  # unix format.
35896  new_path="$path"
35897
35898  windows_path="$new_path"
35899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35900    unix_path=`$CYGPATH -u "$windows_path"`
35901    new_path="$unix_path"
35902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35904    new_path="$unix_path"
35905  fi
35906
35907
35908  # Now try to locate executable using which
35909  new_path=`$WHICH "$new_path" 2> /dev/null`
35910
35911  if test "x$new_path" = x; then
35912    # Oops. Which didn't find the executable.
35913    # The splitting of arguments from the executable at a space might have been incorrect,
35914    # since paths with space are more likely in Windows. Give it another try with the whole
35915    # argument.
35916    path="$complete"
35917    arguments="EOL"
35918    new_path="$path"
35919
35920  windows_path="$new_path"
35921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35922    unix_path=`$CYGPATH -u "$windows_path"`
35923    new_path="$unix_path"
35924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35926    new_path="$unix_path"
35927  fi
35928
35929
35930    new_path=`$WHICH "$new_path" 2> /dev/null`
35931    # bat and cmd files are not always considered executable in MSYS causing which
35932    # to not find them
35933    if test "x$new_path" = x \
35934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35936      new_path="$path"
35937
35938  windows_path="$new_path"
35939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35940    unix_path=`$CYGPATH -u "$windows_path"`
35941    new_path="$unix_path"
35942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35944    new_path="$unix_path"
35945  fi
35946
35947    fi
35948
35949    if test "x$new_path" = x; then
35950      # It's still not found. Now this is an unrecoverable error.
35951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35952$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35953      has_space=`$ECHO "$complete" | $GREP " "`
35954      if test "x$has_space" != x; then
35955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35957      fi
35958      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35959    fi
35960  fi
35961
35962  # Now new_path has a complete unix path to the binary
35963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35964    # Keep paths in /bin as-is, but remove trailing .exe if any
35965    new_path="${new_path/%.exe/}"
35966    # Do not save /bin paths to all_fixpath_prefixes!
35967  else
35968    # Not in mixed or Windows style, start by that.
35969    new_path=`cmd //c echo $new_path`
35970
35971  input_path="$new_path"
35972  # Check if we need to convert this using DOS-style short mode. If the path
35973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35974  # take no chances and rewrite it.
35975  # Note: m4 eats our [], so we need to use [ and ] instead.
35976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35977  if test "x$has_forbidden_chars" != x; then
35978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35980  fi
35981
35982    # Output is in $new_path
35983
35984  windows_path="$new_path"
35985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35986    unix_path=`$CYGPATH -u "$windows_path"`
35987    new_path="$unix_path"
35988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35990    new_path="$unix_path"
35991  fi
35992
35993    # remove trailing .exe if any
35994    new_path="${new_path/%.exe/}"
35995
35996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35998  fi
35999
36000    else
36001      # We're on a unix platform. Hooray! :)
36002      # First separate the path from the arguments. This will split at the first
36003      # space.
36004      complete="$AS"
36005      path="${complete%% *}"
36006      tmp="$complete EOL"
36007      arguments="${tmp#* }"
36008
36009      # Cannot rely on the command "which" here since it doesn't always work.
36010      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36011      if test -z "$is_absolute_path"; then
36012        # Path to executable is not absolute. Find it.
36013        IFS_save="$IFS"
36014        IFS=:
36015        for p in $PATH; do
36016          if test -f "$p/$path" && test -x "$p/$path"; then
36017            new_path="$p/$path"
36018            break
36019          fi
36020        done
36021        IFS="$IFS_save"
36022      else
36023        # This is an absolute path, we can use it without further modifications.
36024        new_path="$path"
36025      fi
36026
36027      if test "x$new_path" = x; then
36028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36029$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36030        has_space=`$ECHO "$complete" | $GREP " "`
36031        if test "x$has_space" != x; then
36032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36034        fi
36035        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36036      fi
36037    fi
36038
36039    # Now join together the path and the arguments once again
36040    if test "x$arguments" != xEOL; then
36041      new_complete="$new_path ${arguments% *}"
36042    else
36043      new_complete="$new_path"
36044    fi
36045
36046    if test "x$complete" != "x$new_complete"; then
36047      AS="$new_complete"
36048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36049$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36050    fi
36051  fi
36052
36053  else
36054    # FIXME: is this correct for microsoft?
36055    AS="$CC -c"
36056  fi
36057
36058
36059  #
36060  # Setup the archiver (AR)
36061  #
36062  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36063    # The corresponding ar tool is lib.exe (used to create static libraries)
36064    # Extract the first word of "lib", so it can be a program name with args.
36065set dummy lib; ac_word=$2
36066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36067$as_echo_n "checking for $ac_word... " >&6; }
36068if ${ac_cv_prog_AR+:} false; then :
36069  $as_echo_n "(cached) " >&6
36070else
36071  if test -n "$AR"; then
36072  ac_cv_prog_AR="$AR" # Let the user override the test.
36073else
36074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36075for as_dir in $PATH
36076do
36077  IFS=$as_save_IFS
36078  test -z "$as_dir" && as_dir=.
36079    for ac_exec_ext in '' $ac_executable_extensions; do
36080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36081    ac_cv_prog_AR="lib"
36082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36083    break 2
36084  fi
36085done
36086  done
36087IFS=$as_save_IFS
36088
36089fi
36090fi
36091AR=$ac_cv_prog_AR
36092if test -n "$AR"; then
36093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36094$as_echo "$AR" >&6; }
36095else
36096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36097$as_echo "no" >&6; }
36098fi
36099
36100
36101  else
36102
36103
36104  # Publish this variable in the help.
36105
36106
36107  if [ -z "${AR+x}" ]; then
36108    # The variable is not set by user, try to locate tool using the code snippet
36109    if test -n "$ac_tool_prefix"; then
36110  for ac_prog in ar
36111  do
36112    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36113set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36115$as_echo_n "checking for $ac_word... " >&6; }
36116if ${ac_cv_prog_AR+:} false; then :
36117  $as_echo_n "(cached) " >&6
36118else
36119  if test -n "$AR"; then
36120  ac_cv_prog_AR="$AR" # Let the user override the test.
36121else
36122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36123for as_dir in $PATH
36124do
36125  IFS=$as_save_IFS
36126  test -z "$as_dir" && as_dir=.
36127    for ac_exec_ext in '' $ac_executable_extensions; do
36128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36129    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36131    break 2
36132  fi
36133done
36134  done
36135IFS=$as_save_IFS
36136
36137fi
36138fi
36139AR=$ac_cv_prog_AR
36140if test -n "$AR"; then
36141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36142$as_echo "$AR" >&6; }
36143else
36144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36145$as_echo "no" >&6; }
36146fi
36147
36148
36149    test -n "$AR" && break
36150  done
36151fi
36152if test -z "$AR"; then
36153  ac_ct_AR=$AR
36154  for ac_prog in ar
36155do
36156  # Extract the first word of "$ac_prog", so it can be a program name with args.
36157set dummy $ac_prog; ac_word=$2
36158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36159$as_echo_n "checking for $ac_word... " >&6; }
36160if ${ac_cv_prog_ac_ct_AR+:} false; then :
36161  $as_echo_n "(cached) " >&6
36162else
36163  if test -n "$ac_ct_AR"; then
36164  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36165else
36166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36167for as_dir in $PATH
36168do
36169  IFS=$as_save_IFS
36170  test -z "$as_dir" && as_dir=.
36171    for ac_exec_ext in '' $ac_executable_extensions; do
36172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36173    ac_cv_prog_ac_ct_AR="$ac_prog"
36174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36175    break 2
36176  fi
36177done
36178  done
36179IFS=$as_save_IFS
36180
36181fi
36182fi
36183ac_ct_AR=$ac_cv_prog_ac_ct_AR
36184if test -n "$ac_ct_AR"; then
36185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36186$as_echo "$ac_ct_AR" >&6; }
36187else
36188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36189$as_echo "no" >&6; }
36190fi
36191
36192
36193  test -n "$ac_ct_AR" && break
36194done
36195
36196  if test "x$ac_ct_AR" = x; then
36197    AR=""
36198  else
36199    case $cross_compiling:$ac_tool_warned in
36200yes:)
36201{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36202$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36203ac_tool_warned=yes ;;
36204esac
36205    AR=$ac_ct_AR
36206  fi
36207fi
36208
36209  else
36210    # The variable is set, but is it from the command line or the environment?
36211
36212    # Try to remove the string !AR! from our list.
36213    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36214    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36215      # If it failed, the variable was not from the command line. Ignore it,
36216      # but warn the user (except for BASH, which is always set by the calling BASH).
36217      if test "xAR" != xBASH; then
36218        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36219$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36220      fi
36221      # Try to locate tool using the code snippet
36222      if test -n "$ac_tool_prefix"; then
36223  for ac_prog in ar
36224  do
36225    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36226set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36228$as_echo_n "checking for $ac_word... " >&6; }
36229if ${ac_cv_prog_AR+:} false; then :
36230  $as_echo_n "(cached) " >&6
36231else
36232  if test -n "$AR"; then
36233  ac_cv_prog_AR="$AR" # Let the user override the test.
36234else
36235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36236for as_dir in $PATH
36237do
36238  IFS=$as_save_IFS
36239  test -z "$as_dir" && as_dir=.
36240    for ac_exec_ext in '' $ac_executable_extensions; do
36241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36242    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36244    break 2
36245  fi
36246done
36247  done
36248IFS=$as_save_IFS
36249
36250fi
36251fi
36252AR=$ac_cv_prog_AR
36253if test -n "$AR"; then
36254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36255$as_echo "$AR" >&6; }
36256else
36257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36258$as_echo "no" >&6; }
36259fi
36260
36261
36262    test -n "$AR" && break
36263  done
36264fi
36265if test -z "$AR"; then
36266  ac_ct_AR=$AR
36267  for ac_prog in ar
36268do
36269  # Extract the first word of "$ac_prog", so it can be a program name with args.
36270set dummy $ac_prog; ac_word=$2
36271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36272$as_echo_n "checking for $ac_word... " >&6; }
36273if ${ac_cv_prog_ac_ct_AR+:} false; then :
36274  $as_echo_n "(cached) " >&6
36275else
36276  if test -n "$ac_ct_AR"; then
36277  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36278else
36279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36280for as_dir in $PATH
36281do
36282  IFS=$as_save_IFS
36283  test -z "$as_dir" && as_dir=.
36284    for ac_exec_ext in '' $ac_executable_extensions; do
36285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36286    ac_cv_prog_ac_ct_AR="$ac_prog"
36287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36288    break 2
36289  fi
36290done
36291  done
36292IFS=$as_save_IFS
36293
36294fi
36295fi
36296ac_ct_AR=$ac_cv_prog_ac_ct_AR
36297if test -n "$ac_ct_AR"; then
36298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36299$as_echo "$ac_ct_AR" >&6; }
36300else
36301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36302$as_echo "no" >&6; }
36303fi
36304
36305
36306  test -n "$ac_ct_AR" && break
36307done
36308
36309  if test "x$ac_ct_AR" = x; then
36310    AR=""
36311  else
36312    case $cross_compiling:$ac_tool_warned in
36313yes:)
36314{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36315$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36316ac_tool_warned=yes ;;
36317esac
36318    AR=$ac_ct_AR
36319  fi
36320fi
36321
36322    else
36323      # If it succeeded, then it was overridden by the user. We will use it
36324      # for the tool.
36325
36326      # First remove it from the list of overridden variables, so we can test
36327      # for unknown variables in the end.
36328      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36329
36330      # Check if we try to supply an empty value
36331      if test "x$AR" = x; then
36332        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36333$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36334        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36335$as_echo_n "checking for AR... " >&6; }
36336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36337$as_echo "disabled" >&6; }
36338      else
36339        # Check if the provided tool contains a complete path.
36340        tool_specified="$AR"
36341        tool_basename="${tool_specified##*/}"
36342        if test "x$tool_basename" = "x$tool_specified"; then
36343          # A command without a complete path is provided, search $PATH.
36344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36345$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36346          # Extract the first word of "$tool_basename", so it can be a program name with args.
36347set dummy $tool_basename; ac_word=$2
36348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36349$as_echo_n "checking for $ac_word... " >&6; }
36350if ${ac_cv_path_AR+:} false; then :
36351  $as_echo_n "(cached) " >&6
36352else
36353  case $AR in
36354  [\\/]* | ?:[\\/]*)
36355  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36356  ;;
36357  *)
36358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36359for as_dir in $PATH
36360do
36361  IFS=$as_save_IFS
36362  test -z "$as_dir" && as_dir=.
36363    for ac_exec_ext in '' $ac_executable_extensions; do
36364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36365    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36367    break 2
36368  fi
36369done
36370  done
36371IFS=$as_save_IFS
36372
36373  ;;
36374esac
36375fi
36376AR=$ac_cv_path_AR
36377if test -n "$AR"; then
36378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36379$as_echo "$AR" >&6; }
36380else
36381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36382$as_echo "no" >&6; }
36383fi
36384
36385
36386          if test "x$AR" = x; then
36387            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36388          fi
36389        else
36390          # Otherwise we believe it is a complete path. Use it as it is.
36391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36392$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36393          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36394$as_echo_n "checking for AR... " >&6; }
36395          if test ! -x "$tool_specified"; then
36396            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36397$as_echo "not found" >&6; }
36398            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36399          fi
36400          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36401$as_echo "$tool_specified" >&6; }
36402        fi
36403      fi
36404    fi
36405
36406  fi
36407
36408
36409  fi
36410
36411  # Only process if variable expands to non-empty
36412
36413  if test "x$AR" != x; then
36414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36415
36416  # First separate the path from the arguments. This will split at the first
36417  # space.
36418  complete="$AR"
36419  path="${complete%% *}"
36420  tmp="$complete EOL"
36421  arguments="${tmp#* }"
36422
36423  # Input might be given as Windows format, start by converting to
36424  # unix format.
36425  new_path=`$CYGPATH -u "$path"`
36426
36427  # Now try to locate executable using which
36428  new_path=`$WHICH "$new_path" 2> /dev/null`
36429  # bat and cmd files are not always considered executable in cygwin causing which
36430  # to not find them
36431  if test "x$new_path" = x \
36432      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36433      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36434    new_path=`$CYGPATH -u "$path"`
36435  fi
36436  if test "x$new_path" = x; then
36437    # Oops. Which didn't find the executable.
36438    # The splitting of arguments from the executable at a space might have been incorrect,
36439    # since paths with space are more likely in Windows. Give it another try with the whole
36440    # argument.
36441    path="$complete"
36442    arguments="EOL"
36443    new_path=`$CYGPATH -u "$path"`
36444    new_path=`$WHICH "$new_path" 2> /dev/null`
36445    # bat and cmd files are not always considered executable in cygwin causing which
36446    # to not find them
36447    if test "x$new_path" = x \
36448        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36449        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36450      new_path=`$CYGPATH -u "$path"`
36451    fi
36452    if test "x$new_path" = x; then
36453      # It's still not found. Now this is an unrecoverable error.
36454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36455$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36456      has_space=`$ECHO "$complete" | $GREP " "`
36457      if test "x$has_space" != x; then
36458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36460      fi
36461      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36462    fi
36463  fi
36464
36465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36468  # "foo.exe" is OK but "foo" is an error.
36469  #
36470  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36471  # It is also a way to make sure we got the proper file name for the real test later on.
36472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36473  if test "x$test_shortpath" = x; then
36474    # Short path failed, file does not exist as specified.
36475    # Try adding .exe or .cmd
36476    if test -f "${new_path}.exe"; then
36477      input_to_shortpath="${new_path}.exe"
36478    elif test -f "${new_path}.cmd"; then
36479      input_to_shortpath="${new_path}.cmd"
36480    else
36481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36482$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36483      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36484$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36485      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36486    fi
36487  else
36488    input_to_shortpath="$new_path"
36489  fi
36490
36491  # Call helper function which possibly converts this using DOS-style short mode.
36492  # If so, the updated path is stored in $new_path.
36493  new_path="$input_to_shortpath"
36494
36495  input_path="$input_to_shortpath"
36496  # Check if we need to convert this using DOS-style short mode. If the path
36497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36498  # take no chances and rewrite it.
36499  # Note: m4 eats our [], so we need to use [ and ] instead.
36500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36501  if test "x$has_forbidden_chars" != x; then
36502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36506      # Going to short mode and back again did indeed matter. Since short mode is
36507      # case insensitive, let's make it lowercase to improve readability.
36508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36509      # Now convert it back to Unix-style (cygpath)
36510      input_path=`$CYGPATH -u "$shortmode_path"`
36511      new_path="$input_path"
36512    fi
36513  fi
36514
36515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36516  if test "x$test_cygdrive_prefix" = x; then
36517    # As a simple fix, exclude /usr/bin since it's not a real path.
36518    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36520      # a path prefixed by /cygdrive for fixpath to work.
36521      new_path="$CYGWIN_ROOT_PATH$input_path"
36522    fi
36523  fi
36524
36525  # remove trailing .exe if any
36526  new_path="${new_path/%.exe/}"
36527
36528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36529
36530  # First separate the path from the arguments. This will split at the first
36531  # space.
36532  complete="$AR"
36533  path="${complete%% *}"
36534  tmp="$complete EOL"
36535  arguments="${tmp#* }"
36536
36537  # Input might be given as Windows format, start by converting to
36538  # unix format.
36539  new_path="$path"
36540
36541  windows_path="$new_path"
36542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36543    unix_path=`$CYGPATH -u "$windows_path"`
36544    new_path="$unix_path"
36545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36547    new_path="$unix_path"
36548  fi
36549
36550
36551  # Now try to locate executable using which
36552  new_path=`$WHICH "$new_path" 2> /dev/null`
36553
36554  if test "x$new_path" = x; then
36555    # Oops. Which didn't find the executable.
36556    # The splitting of arguments from the executable at a space might have been incorrect,
36557    # since paths with space are more likely in Windows. Give it another try with the whole
36558    # argument.
36559    path="$complete"
36560    arguments="EOL"
36561    new_path="$path"
36562
36563  windows_path="$new_path"
36564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36565    unix_path=`$CYGPATH -u "$windows_path"`
36566    new_path="$unix_path"
36567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36569    new_path="$unix_path"
36570  fi
36571
36572
36573    new_path=`$WHICH "$new_path" 2> /dev/null`
36574    # bat and cmd files are not always considered executable in MSYS causing which
36575    # to not find them
36576    if test "x$new_path" = x \
36577        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36578        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36579      new_path="$path"
36580
36581  windows_path="$new_path"
36582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36583    unix_path=`$CYGPATH -u "$windows_path"`
36584    new_path="$unix_path"
36585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36587    new_path="$unix_path"
36588  fi
36589
36590    fi
36591
36592    if test "x$new_path" = x; then
36593      # It's still not found. Now this is an unrecoverable error.
36594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36595$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36596      has_space=`$ECHO "$complete" | $GREP " "`
36597      if test "x$has_space" != x; then
36598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36600      fi
36601      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36602    fi
36603  fi
36604
36605  # Now new_path has a complete unix path to the binary
36606  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36607    # Keep paths in /bin as-is, but remove trailing .exe if any
36608    new_path="${new_path/%.exe/}"
36609    # Do not save /bin paths to all_fixpath_prefixes!
36610  else
36611    # Not in mixed or Windows style, start by that.
36612    new_path=`cmd //c echo $new_path`
36613
36614  input_path="$new_path"
36615  # Check if we need to convert this using DOS-style short mode. If the path
36616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36617  # take no chances and rewrite it.
36618  # Note: m4 eats our [], so we need to use [ and ] instead.
36619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36620  if test "x$has_forbidden_chars" != x; then
36621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36623  fi
36624
36625    # Output is in $new_path
36626
36627  windows_path="$new_path"
36628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36629    unix_path=`$CYGPATH -u "$windows_path"`
36630    new_path="$unix_path"
36631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36633    new_path="$unix_path"
36634  fi
36635
36636    # remove trailing .exe if any
36637    new_path="${new_path/%.exe/}"
36638
36639    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36640    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36641  fi
36642
36643    else
36644      # We're on a unix platform. Hooray! :)
36645      # First separate the path from the arguments. This will split at the first
36646      # space.
36647      complete="$AR"
36648      path="${complete%% *}"
36649      tmp="$complete EOL"
36650      arguments="${tmp#* }"
36651
36652      # Cannot rely on the command "which" here since it doesn't always work.
36653      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36654      if test -z "$is_absolute_path"; then
36655        # Path to executable is not absolute. Find it.
36656        IFS_save="$IFS"
36657        IFS=:
36658        for p in $PATH; do
36659          if test -f "$p/$path" && test -x "$p/$path"; then
36660            new_path="$p/$path"
36661            break
36662          fi
36663        done
36664        IFS="$IFS_save"
36665      else
36666        # This is an absolute path, we can use it without further modifications.
36667        new_path="$path"
36668      fi
36669
36670      if test "x$new_path" = x; then
36671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36672$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36673        has_space=`$ECHO "$complete" | $GREP " "`
36674        if test "x$has_space" != x; then
36675          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36676$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36677        fi
36678        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36679      fi
36680    fi
36681
36682    # Now join together the path and the arguments once again
36683    if test "x$arguments" != xEOL; then
36684      new_complete="$new_path ${arguments% *}"
36685    else
36686      new_complete="$new_path"
36687    fi
36688
36689    if test "x$complete" != "x$new_complete"; then
36690      AR="$new_complete"
36691      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36692$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36693    fi
36694  fi
36695
36696
36697
36698  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36699
36700
36701  # Publish this variable in the help.
36702
36703
36704  if [ -z "${LIPO+x}" ]; then
36705    # The variable is not set by user, try to locate tool using the code snippet
36706    for ac_prog in lipo
36707do
36708  # Extract the first word of "$ac_prog", so it can be a program name with args.
36709set dummy $ac_prog; ac_word=$2
36710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36711$as_echo_n "checking for $ac_word... " >&6; }
36712if ${ac_cv_path_LIPO+:} false; then :
36713  $as_echo_n "(cached) " >&6
36714else
36715  case $LIPO in
36716  [\\/]* | ?:[\\/]*)
36717  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36718  ;;
36719  *)
36720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36721for as_dir in $PATH
36722do
36723  IFS=$as_save_IFS
36724  test -z "$as_dir" && as_dir=.
36725    for ac_exec_ext in '' $ac_executable_extensions; do
36726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36727    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36729    break 2
36730  fi
36731done
36732  done
36733IFS=$as_save_IFS
36734
36735  ;;
36736esac
36737fi
36738LIPO=$ac_cv_path_LIPO
36739if test -n "$LIPO"; then
36740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36741$as_echo "$LIPO" >&6; }
36742else
36743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36744$as_echo "no" >&6; }
36745fi
36746
36747
36748  test -n "$LIPO" && break
36749done
36750
36751  else
36752    # The variable is set, but is it from the command line or the environment?
36753
36754    # Try to remove the string !LIPO! from our list.
36755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36757      # If it failed, the variable was not from the command line. Ignore it,
36758      # but warn the user (except for BASH, which is always set by the calling BASH).
36759      if test "xLIPO" != xBASH; then
36760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36761$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36762      fi
36763      # Try to locate tool using the code snippet
36764      for ac_prog in lipo
36765do
36766  # Extract the first word of "$ac_prog", so it can be a program name with args.
36767set dummy $ac_prog; ac_word=$2
36768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36769$as_echo_n "checking for $ac_word... " >&6; }
36770if ${ac_cv_path_LIPO+:} false; then :
36771  $as_echo_n "(cached) " >&6
36772else
36773  case $LIPO in
36774  [\\/]* | ?:[\\/]*)
36775  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36776  ;;
36777  *)
36778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36779for as_dir in $PATH
36780do
36781  IFS=$as_save_IFS
36782  test -z "$as_dir" && as_dir=.
36783    for ac_exec_ext in '' $ac_executable_extensions; do
36784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36785    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36787    break 2
36788  fi
36789done
36790  done
36791IFS=$as_save_IFS
36792
36793  ;;
36794esac
36795fi
36796LIPO=$ac_cv_path_LIPO
36797if test -n "$LIPO"; then
36798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36799$as_echo "$LIPO" >&6; }
36800else
36801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36802$as_echo "no" >&6; }
36803fi
36804
36805
36806  test -n "$LIPO" && break
36807done
36808
36809    else
36810      # If it succeeded, then it was overridden by the user. We will use it
36811      # for the tool.
36812
36813      # First remove it from the list of overridden variables, so we can test
36814      # for unknown variables in the end.
36815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36816
36817      # Check if we try to supply an empty value
36818      if test "x$LIPO" = x; then
36819        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36820$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36822$as_echo_n "checking for LIPO... " >&6; }
36823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36824$as_echo "disabled" >&6; }
36825      else
36826        # Check if the provided tool contains a complete path.
36827        tool_specified="$LIPO"
36828        tool_basename="${tool_specified##*/}"
36829        if test "x$tool_basename" = "x$tool_specified"; then
36830          # A command without a complete path is provided, search $PATH.
36831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36832$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36833          # Extract the first word of "$tool_basename", so it can be a program name with args.
36834set dummy $tool_basename; ac_word=$2
36835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36836$as_echo_n "checking for $ac_word... " >&6; }
36837if ${ac_cv_path_LIPO+:} false; then :
36838  $as_echo_n "(cached) " >&6
36839else
36840  case $LIPO in
36841  [\\/]* | ?:[\\/]*)
36842  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36843  ;;
36844  *)
36845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36846for as_dir in $PATH
36847do
36848  IFS=$as_save_IFS
36849  test -z "$as_dir" && as_dir=.
36850    for ac_exec_ext in '' $ac_executable_extensions; do
36851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36852    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36854    break 2
36855  fi
36856done
36857  done
36858IFS=$as_save_IFS
36859
36860  ;;
36861esac
36862fi
36863LIPO=$ac_cv_path_LIPO
36864if test -n "$LIPO"; then
36865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36866$as_echo "$LIPO" >&6; }
36867else
36868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36869$as_echo "no" >&6; }
36870fi
36871
36872
36873          if test "x$LIPO" = x; then
36874            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36875          fi
36876        else
36877          # Otherwise we believe it is a complete path. Use it as it is.
36878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36879$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36880          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36881$as_echo_n "checking for LIPO... " >&6; }
36882          if test ! -x "$tool_specified"; then
36883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36884$as_echo "not found" >&6; }
36885            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36886          fi
36887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36888$as_echo "$tool_specified" >&6; }
36889        fi
36890      fi
36891    fi
36892
36893  fi
36894
36895
36896
36897  # Only process if variable expands to non-empty
36898
36899  if test "x$LIPO" != x; then
36900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36901
36902  # First separate the path from the arguments. This will split at the first
36903  # space.
36904  complete="$LIPO"
36905  path="${complete%% *}"
36906  tmp="$complete EOL"
36907  arguments="${tmp#* }"
36908
36909  # Input might be given as Windows format, start by converting to
36910  # unix format.
36911  new_path=`$CYGPATH -u "$path"`
36912
36913  # Now try to locate executable using which
36914  new_path=`$WHICH "$new_path" 2> /dev/null`
36915  # bat and cmd files are not always considered executable in cygwin causing which
36916  # to not find them
36917  if test "x$new_path" = x \
36918      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36919      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36920    new_path=`$CYGPATH -u "$path"`
36921  fi
36922  if test "x$new_path" = x; then
36923    # Oops. Which didn't find the executable.
36924    # The splitting of arguments from the executable at a space might have been incorrect,
36925    # since paths with space are more likely in Windows. Give it another try with the whole
36926    # argument.
36927    path="$complete"
36928    arguments="EOL"
36929    new_path=`$CYGPATH -u "$path"`
36930    new_path=`$WHICH "$new_path" 2> /dev/null`
36931    # bat and cmd files are not always considered executable in cygwin causing which
36932    # to not find them
36933    if test "x$new_path" = x \
36934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36936      new_path=`$CYGPATH -u "$path"`
36937    fi
36938    if test "x$new_path" = x; then
36939      # It's still not found. Now this is an unrecoverable error.
36940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36941$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36942      has_space=`$ECHO "$complete" | $GREP " "`
36943      if test "x$has_space" != x; then
36944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36946      fi
36947      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36948    fi
36949  fi
36950
36951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36954  # "foo.exe" is OK but "foo" is an error.
36955  #
36956  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36957  # It is also a way to make sure we got the proper file name for the real test later on.
36958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36959  if test "x$test_shortpath" = x; then
36960    # Short path failed, file does not exist as specified.
36961    # Try adding .exe or .cmd
36962    if test -f "${new_path}.exe"; then
36963      input_to_shortpath="${new_path}.exe"
36964    elif test -f "${new_path}.cmd"; then
36965      input_to_shortpath="${new_path}.cmd"
36966    else
36967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36968$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36969      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36970$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36971      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36972    fi
36973  else
36974    input_to_shortpath="$new_path"
36975  fi
36976
36977  # Call helper function which possibly converts this using DOS-style short mode.
36978  # If so, the updated path is stored in $new_path.
36979  new_path="$input_to_shortpath"
36980
36981  input_path="$input_to_shortpath"
36982  # Check if we need to convert this using DOS-style short mode. If the path
36983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36984  # take no chances and rewrite it.
36985  # Note: m4 eats our [], so we need to use [ and ] instead.
36986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36987  if test "x$has_forbidden_chars" != x; then
36988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36992      # Going to short mode and back again did indeed matter. Since short mode is
36993      # case insensitive, let's make it lowercase to improve readability.
36994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36995      # Now convert it back to Unix-style (cygpath)
36996      input_path=`$CYGPATH -u "$shortmode_path"`
36997      new_path="$input_path"
36998    fi
36999  fi
37000
37001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37002  if test "x$test_cygdrive_prefix" = x; then
37003    # As a simple fix, exclude /usr/bin since it's not a real path.
37004    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37006      # a path prefixed by /cygdrive for fixpath to work.
37007      new_path="$CYGWIN_ROOT_PATH$input_path"
37008    fi
37009  fi
37010
37011  # remove trailing .exe if any
37012  new_path="${new_path/%.exe/}"
37013
37014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37015
37016  # First separate the path from the arguments. This will split at the first
37017  # space.
37018  complete="$LIPO"
37019  path="${complete%% *}"
37020  tmp="$complete EOL"
37021  arguments="${tmp#* }"
37022
37023  # Input might be given as Windows format, start by converting to
37024  # unix format.
37025  new_path="$path"
37026
37027  windows_path="$new_path"
37028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37029    unix_path=`$CYGPATH -u "$windows_path"`
37030    new_path="$unix_path"
37031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37033    new_path="$unix_path"
37034  fi
37035
37036
37037  # Now try to locate executable using which
37038  new_path=`$WHICH "$new_path" 2> /dev/null`
37039
37040  if test "x$new_path" = x; then
37041    # Oops. Which didn't find the executable.
37042    # The splitting of arguments from the executable at a space might have been incorrect,
37043    # since paths with space are more likely in Windows. Give it another try with the whole
37044    # argument.
37045    path="$complete"
37046    arguments="EOL"
37047    new_path="$path"
37048
37049  windows_path="$new_path"
37050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37051    unix_path=`$CYGPATH -u "$windows_path"`
37052    new_path="$unix_path"
37053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37055    new_path="$unix_path"
37056  fi
37057
37058
37059    new_path=`$WHICH "$new_path" 2> /dev/null`
37060    # bat and cmd files are not always considered executable in MSYS causing which
37061    # to not find them
37062    if test "x$new_path" = x \
37063        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37064        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37065      new_path="$path"
37066
37067  windows_path="$new_path"
37068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37069    unix_path=`$CYGPATH -u "$windows_path"`
37070    new_path="$unix_path"
37071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37073    new_path="$unix_path"
37074  fi
37075
37076    fi
37077
37078    if test "x$new_path" = x; then
37079      # It's still not found. Now this is an unrecoverable error.
37080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37081$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37082      has_space=`$ECHO "$complete" | $GREP " "`
37083      if test "x$has_space" != x; then
37084        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37085$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37086      fi
37087      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37088    fi
37089  fi
37090
37091  # Now new_path has a complete unix path to the binary
37092  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37093    # Keep paths in /bin as-is, but remove trailing .exe if any
37094    new_path="${new_path/%.exe/}"
37095    # Do not save /bin paths to all_fixpath_prefixes!
37096  else
37097    # Not in mixed or Windows style, start by that.
37098    new_path=`cmd //c echo $new_path`
37099
37100  input_path="$new_path"
37101  # Check if we need to convert this using DOS-style short mode. If the path
37102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37103  # take no chances and rewrite it.
37104  # Note: m4 eats our [], so we need to use [ and ] instead.
37105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37106  if test "x$has_forbidden_chars" != x; then
37107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37109  fi
37110
37111    # Output is in $new_path
37112
37113  windows_path="$new_path"
37114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37115    unix_path=`$CYGPATH -u "$windows_path"`
37116    new_path="$unix_path"
37117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37119    new_path="$unix_path"
37120  fi
37121
37122    # remove trailing .exe if any
37123    new_path="${new_path/%.exe/}"
37124
37125    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37126    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37127  fi
37128
37129    else
37130      # We're on a unix platform. Hooray! :)
37131      # First separate the path from the arguments. This will split at the first
37132      # space.
37133      complete="$LIPO"
37134      path="${complete%% *}"
37135      tmp="$complete EOL"
37136      arguments="${tmp#* }"
37137
37138      # Cannot rely on the command "which" here since it doesn't always work.
37139      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37140      if test -z "$is_absolute_path"; then
37141        # Path to executable is not absolute. Find it.
37142        IFS_save="$IFS"
37143        IFS=:
37144        for p in $PATH; do
37145          if test -f "$p/$path" && test -x "$p/$path"; then
37146            new_path="$p/$path"
37147            break
37148          fi
37149        done
37150        IFS="$IFS_save"
37151      else
37152        # This is an absolute path, we can use it without further modifications.
37153        new_path="$path"
37154      fi
37155
37156      if test "x$new_path" = x; then
37157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37158$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37159        has_space=`$ECHO "$complete" | $GREP " "`
37160        if test "x$has_space" != x; then
37161          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37162$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37163        fi
37164        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37165      fi
37166    fi
37167
37168    # Now join together the path and the arguments once again
37169    if test "x$arguments" != xEOL; then
37170      new_complete="$new_path ${arguments% *}"
37171    else
37172      new_complete="$new_path"
37173    fi
37174
37175    if test "x$complete" != "x$new_complete"; then
37176      LIPO="$new_complete"
37177      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37178$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37179    fi
37180  fi
37181
37182  fi
37183
37184  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37185    # Extract the first word of "mt", so it can be a program name with args.
37186set dummy mt; ac_word=$2
37187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37188$as_echo_n "checking for $ac_word... " >&6; }
37189if ${ac_cv_prog_MT+:} false; then :
37190  $as_echo_n "(cached) " >&6
37191else
37192  if test -n "$MT"; then
37193  ac_cv_prog_MT="$MT" # Let the user override the test.
37194else
37195  ac_prog_rejected=no
37196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37197for as_dir in $PATH
37198do
37199  IFS=$as_save_IFS
37200  test -z "$as_dir" && as_dir=.
37201    for ac_exec_ext in '' $ac_executable_extensions; do
37202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37203    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37204       ac_prog_rejected=yes
37205       continue
37206     fi
37207    ac_cv_prog_MT="mt"
37208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37209    break 2
37210  fi
37211done
37212  done
37213IFS=$as_save_IFS
37214
37215if test $ac_prog_rejected = yes; then
37216  # We found a bogon in the path, so make sure we never use it.
37217  set dummy $ac_cv_prog_MT
37218  shift
37219  if test $# != 0; then
37220    # We chose a different compiler from the bogus one.
37221    # However, it has the same basename, so the bogon will be chosen
37222    # first if we set MT to just the basename; use the full file name.
37223    shift
37224    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37225  fi
37226fi
37227fi
37228fi
37229MT=$ac_cv_prog_MT
37230if test -n "$MT"; then
37231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37232$as_echo "$MT" >&6; }
37233else
37234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37235$as_echo "no" >&6; }
37236fi
37237
37238
37239
37240  # Only process if variable expands to non-empty
37241
37242  if test "x$MT" != x; then
37243    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37244
37245  # First separate the path from the arguments. This will split at the first
37246  # space.
37247  complete="$MT"
37248  path="${complete%% *}"
37249  tmp="$complete EOL"
37250  arguments="${tmp#* }"
37251
37252  # Input might be given as Windows format, start by converting to
37253  # unix format.
37254  new_path=`$CYGPATH -u "$path"`
37255
37256  # Now try to locate executable using which
37257  new_path=`$WHICH "$new_path" 2> /dev/null`
37258  # bat and cmd files are not always considered executable in cygwin causing which
37259  # to not find them
37260  if test "x$new_path" = x \
37261      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37262      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37263    new_path=`$CYGPATH -u "$path"`
37264  fi
37265  if test "x$new_path" = x; then
37266    # Oops. Which didn't find the executable.
37267    # The splitting of arguments from the executable at a space might have been incorrect,
37268    # since paths with space are more likely in Windows. Give it another try with the whole
37269    # argument.
37270    path="$complete"
37271    arguments="EOL"
37272    new_path=`$CYGPATH -u "$path"`
37273    new_path=`$WHICH "$new_path" 2> /dev/null`
37274    # bat and cmd files are not always considered executable in cygwin causing which
37275    # to not find them
37276    if test "x$new_path" = x \
37277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37279      new_path=`$CYGPATH -u "$path"`
37280    fi
37281    if test "x$new_path" = x; then
37282      # It's still not found. Now this is an unrecoverable error.
37283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37284$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37285      has_space=`$ECHO "$complete" | $GREP " "`
37286      if test "x$has_space" != x; then
37287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37289      fi
37290      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37291    fi
37292  fi
37293
37294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37297  # "foo.exe" is OK but "foo" is an error.
37298  #
37299  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37300  # It is also a way to make sure we got the proper file name for the real test later on.
37301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37302  if test "x$test_shortpath" = x; then
37303    # Short path failed, file does not exist as specified.
37304    # Try adding .exe or .cmd
37305    if test -f "${new_path}.exe"; then
37306      input_to_shortpath="${new_path}.exe"
37307    elif test -f "${new_path}.cmd"; then
37308      input_to_shortpath="${new_path}.cmd"
37309    else
37310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37311$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37314      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37315    fi
37316  else
37317    input_to_shortpath="$new_path"
37318  fi
37319
37320  # Call helper function which possibly converts this using DOS-style short mode.
37321  # If so, the updated path is stored in $new_path.
37322  new_path="$input_to_shortpath"
37323
37324  input_path="$input_to_shortpath"
37325  # Check if we need to convert this using DOS-style short mode. If the path
37326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37327  # take no chances and rewrite it.
37328  # Note: m4 eats our [], so we need to use [ and ] instead.
37329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37330  if test "x$has_forbidden_chars" != x; then
37331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37335      # Going to short mode and back again did indeed matter. Since short mode is
37336      # case insensitive, let's make it lowercase to improve readability.
37337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37338      # Now convert it back to Unix-style (cygpath)
37339      input_path=`$CYGPATH -u "$shortmode_path"`
37340      new_path="$input_path"
37341    fi
37342  fi
37343
37344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37345  if test "x$test_cygdrive_prefix" = x; then
37346    # As a simple fix, exclude /usr/bin since it's not a real path.
37347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37349      # a path prefixed by /cygdrive for fixpath to work.
37350      new_path="$CYGWIN_ROOT_PATH$input_path"
37351    fi
37352  fi
37353
37354  # remove trailing .exe if any
37355  new_path="${new_path/%.exe/}"
37356
37357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37358
37359  # First separate the path from the arguments. This will split at the first
37360  # space.
37361  complete="$MT"
37362  path="${complete%% *}"
37363  tmp="$complete EOL"
37364  arguments="${tmp#* }"
37365
37366  # Input might be given as Windows format, start by converting to
37367  # unix format.
37368  new_path="$path"
37369
37370  windows_path="$new_path"
37371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37372    unix_path=`$CYGPATH -u "$windows_path"`
37373    new_path="$unix_path"
37374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37376    new_path="$unix_path"
37377  fi
37378
37379
37380  # Now try to locate executable using which
37381  new_path=`$WHICH "$new_path" 2> /dev/null`
37382
37383  if test "x$new_path" = x; then
37384    # Oops. Which didn't find the executable.
37385    # The splitting of arguments from the executable at a space might have been incorrect,
37386    # since paths with space are more likely in Windows. Give it another try with the whole
37387    # argument.
37388    path="$complete"
37389    arguments="EOL"
37390    new_path="$path"
37391
37392  windows_path="$new_path"
37393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37394    unix_path=`$CYGPATH -u "$windows_path"`
37395    new_path="$unix_path"
37396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37398    new_path="$unix_path"
37399  fi
37400
37401
37402    new_path=`$WHICH "$new_path" 2> /dev/null`
37403    # bat and cmd files are not always considered executable in MSYS causing which
37404    # to not find them
37405    if test "x$new_path" = x \
37406        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37407        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37408      new_path="$path"
37409
37410  windows_path="$new_path"
37411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37412    unix_path=`$CYGPATH -u "$windows_path"`
37413    new_path="$unix_path"
37414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37416    new_path="$unix_path"
37417  fi
37418
37419    fi
37420
37421    if test "x$new_path" = x; then
37422      # It's still not found. Now this is an unrecoverable error.
37423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37424$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37425      has_space=`$ECHO "$complete" | $GREP " "`
37426      if test "x$has_space" != x; then
37427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37429      fi
37430      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37431    fi
37432  fi
37433
37434  # Now new_path has a complete unix path to the binary
37435  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37436    # Keep paths in /bin as-is, but remove trailing .exe if any
37437    new_path="${new_path/%.exe/}"
37438    # Do not save /bin paths to all_fixpath_prefixes!
37439  else
37440    # Not in mixed or Windows style, start by that.
37441    new_path=`cmd //c echo $new_path`
37442
37443  input_path="$new_path"
37444  # Check if we need to convert this using DOS-style short mode. If the path
37445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37446  # take no chances and rewrite it.
37447  # Note: m4 eats our [], so we need to use [ and ] instead.
37448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37449  if test "x$has_forbidden_chars" != x; then
37450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37452  fi
37453
37454    # Output is in $new_path
37455
37456  windows_path="$new_path"
37457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37458    unix_path=`$CYGPATH -u "$windows_path"`
37459    new_path="$unix_path"
37460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37462    new_path="$unix_path"
37463  fi
37464
37465    # remove trailing .exe if any
37466    new_path="${new_path/%.exe/}"
37467
37468    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37469    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37470  fi
37471
37472    else
37473      # We're on a unix platform. Hooray! :)
37474      # First separate the path from the arguments. This will split at the first
37475      # space.
37476      complete="$MT"
37477      path="${complete%% *}"
37478      tmp="$complete EOL"
37479      arguments="${tmp#* }"
37480
37481      # Cannot rely on the command "which" here since it doesn't always work.
37482      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37483      if test -z "$is_absolute_path"; then
37484        # Path to executable is not absolute. Find it.
37485        IFS_save="$IFS"
37486        IFS=:
37487        for p in $PATH; do
37488          if test -f "$p/$path" && test -x "$p/$path"; then
37489            new_path="$p/$path"
37490            break
37491          fi
37492        done
37493        IFS="$IFS_save"
37494      else
37495        # This is an absolute path, we can use it without further modifications.
37496        new_path="$path"
37497      fi
37498
37499      if test "x$new_path" = x; then
37500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37501$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37502        has_space=`$ECHO "$complete" | $GREP " "`
37503        if test "x$has_space" != x; then
37504          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37506        fi
37507        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37508      fi
37509    fi
37510
37511    # Now join together the path and the arguments once again
37512    if test "x$arguments" != xEOL; then
37513      new_complete="$new_path ${arguments% *}"
37514    else
37515      new_complete="$new_path"
37516    fi
37517
37518    if test "x$complete" != "x$new_complete"; then
37519      MT="$new_complete"
37520      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37521$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37522    fi
37523  fi
37524
37525    # Setup the resource compiler (RC)
37526    # Extract the first word of "rc", so it can be a program name with args.
37527set dummy rc; ac_word=$2
37528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37529$as_echo_n "checking for $ac_word... " >&6; }
37530if ${ac_cv_prog_RC+:} false; then :
37531  $as_echo_n "(cached) " >&6
37532else
37533  if test -n "$RC"; then
37534  ac_cv_prog_RC="$RC" # Let the user override the test.
37535else
37536  ac_prog_rejected=no
37537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37538for as_dir in $PATH
37539do
37540  IFS=$as_save_IFS
37541  test -z "$as_dir" && as_dir=.
37542    for ac_exec_ext in '' $ac_executable_extensions; do
37543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37544    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37545       ac_prog_rejected=yes
37546       continue
37547     fi
37548    ac_cv_prog_RC="rc"
37549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37550    break 2
37551  fi
37552done
37553  done
37554IFS=$as_save_IFS
37555
37556if test $ac_prog_rejected = yes; then
37557  # We found a bogon in the path, so make sure we never use it.
37558  set dummy $ac_cv_prog_RC
37559  shift
37560  if test $# != 0; then
37561    # We chose a different compiler from the bogus one.
37562    # However, it has the same basename, so the bogon will be chosen
37563    # first if we set RC to just the basename; use the full file name.
37564    shift
37565    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37566  fi
37567fi
37568fi
37569fi
37570RC=$ac_cv_prog_RC
37571if test -n "$RC"; then
37572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37573$as_echo "$RC" >&6; }
37574else
37575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37576$as_echo "no" >&6; }
37577fi
37578
37579
37580
37581  # Only process if variable expands to non-empty
37582
37583  if test "x$RC" != x; then
37584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37585
37586  # First separate the path from the arguments. This will split at the first
37587  # space.
37588  complete="$RC"
37589  path="${complete%% *}"
37590  tmp="$complete EOL"
37591  arguments="${tmp#* }"
37592
37593  # Input might be given as Windows format, start by converting to
37594  # unix format.
37595  new_path=`$CYGPATH -u "$path"`
37596
37597  # Now try to locate executable using which
37598  new_path=`$WHICH "$new_path" 2> /dev/null`
37599  # bat and cmd files are not always considered executable in cygwin causing which
37600  # to not find them
37601  if test "x$new_path" = x \
37602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37604    new_path=`$CYGPATH -u "$path"`
37605  fi
37606  if test "x$new_path" = x; then
37607    # Oops. Which didn't find the executable.
37608    # The splitting of arguments from the executable at a space might have been incorrect,
37609    # since paths with space are more likely in Windows. Give it another try with the whole
37610    # argument.
37611    path="$complete"
37612    arguments="EOL"
37613    new_path=`$CYGPATH -u "$path"`
37614    new_path=`$WHICH "$new_path" 2> /dev/null`
37615    # bat and cmd files are not always considered executable in cygwin causing which
37616    # to not find them
37617    if test "x$new_path" = x \
37618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37620      new_path=`$CYGPATH -u "$path"`
37621    fi
37622    if test "x$new_path" = x; then
37623      # It's still not found. Now this is an unrecoverable error.
37624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37625$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37626      has_space=`$ECHO "$complete" | $GREP " "`
37627      if test "x$has_space" != x; then
37628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37630      fi
37631      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37632    fi
37633  fi
37634
37635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37638  # "foo.exe" is OK but "foo" is an error.
37639  #
37640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37641  # It is also a way to make sure we got the proper file name for the real test later on.
37642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37643  if test "x$test_shortpath" = x; then
37644    # Short path failed, file does not exist as specified.
37645    # Try adding .exe or .cmd
37646    if test -f "${new_path}.exe"; then
37647      input_to_shortpath="${new_path}.exe"
37648    elif test -f "${new_path}.cmd"; then
37649      input_to_shortpath="${new_path}.cmd"
37650    else
37651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37652$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37655      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37656    fi
37657  else
37658    input_to_shortpath="$new_path"
37659  fi
37660
37661  # Call helper function which possibly converts this using DOS-style short mode.
37662  # If so, the updated path is stored in $new_path.
37663  new_path="$input_to_shortpath"
37664
37665  input_path="$input_to_shortpath"
37666  # Check if we need to convert this using DOS-style short mode. If the path
37667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37668  # take no chances and rewrite it.
37669  # Note: m4 eats our [], so we need to use [ and ] instead.
37670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37671  if test "x$has_forbidden_chars" != x; then
37672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37676      # Going to short mode and back again did indeed matter. Since short mode is
37677      # case insensitive, let's make it lowercase to improve readability.
37678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37679      # Now convert it back to Unix-style (cygpath)
37680      input_path=`$CYGPATH -u "$shortmode_path"`
37681      new_path="$input_path"
37682    fi
37683  fi
37684
37685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37686  if test "x$test_cygdrive_prefix" = x; then
37687    # As a simple fix, exclude /usr/bin since it's not a real path.
37688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37690      # a path prefixed by /cygdrive for fixpath to work.
37691      new_path="$CYGWIN_ROOT_PATH$input_path"
37692    fi
37693  fi
37694
37695  # remove trailing .exe if any
37696  new_path="${new_path/%.exe/}"
37697
37698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37699
37700  # First separate the path from the arguments. This will split at the first
37701  # space.
37702  complete="$RC"
37703  path="${complete%% *}"
37704  tmp="$complete EOL"
37705  arguments="${tmp#* }"
37706
37707  # Input might be given as Windows format, start by converting to
37708  # unix format.
37709  new_path="$path"
37710
37711  windows_path="$new_path"
37712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37713    unix_path=`$CYGPATH -u "$windows_path"`
37714    new_path="$unix_path"
37715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37717    new_path="$unix_path"
37718  fi
37719
37720
37721  # Now try to locate executable using which
37722  new_path=`$WHICH "$new_path" 2> /dev/null`
37723
37724  if test "x$new_path" = x; then
37725    # Oops. Which didn't find the executable.
37726    # The splitting of arguments from the executable at a space might have been incorrect,
37727    # since paths with space are more likely in Windows. Give it another try with the whole
37728    # argument.
37729    path="$complete"
37730    arguments="EOL"
37731    new_path="$path"
37732
37733  windows_path="$new_path"
37734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37735    unix_path=`$CYGPATH -u "$windows_path"`
37736    new_path="$unix_path"
37737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37739    new_path="$unix_path"
37740  fi
37741
37742
37743    new_path=`$WHICH "$new_path" 2> /dev/null`
37744    # bat and cmd files are not always considered executable in MSYS causing which
37745    # to not find them
37746    if test "x$new_path" = x \
37747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37749      new_path="$path"
37750
37751  windows_path="$new_path"
37752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37753    unix_path=`$CYGPATH -u "$windows_path"`
37754    new_path="$unix_path"
37755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37757    new_path="$unix_path"
37758  fi
37759
37760    fi
37761
37762    if test "x$new_path" = x; then
37763      # It's still not found. Now this is an unrecoverable error.
37764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37765$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37766      has_space=`$ECHO "$complete" | $GREP " "`
37767      if test "x$has_space" != x; then
37768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37770      fi
37771      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37772    fi
37773  fi
37774
37775  # Now new_path has a complete unix path to the binary
37776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37777    # Keep paths in /bin as-is, but remove trailing .exe if any
37778    new_path="${new_path/%.exe/}"
37779    # Do not save /bin paths to all_fixpath_prefixes!
37780  else
37781    # Not in mixed or Windows style, start by that.
37782    new_path=`cmd //c echo $new_path`
37783
37784  input_path="$new_path"
37785  # Check if we need to convert this using DOS-style short mode. If the path
37786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37787  # take no chances and rewrite it.
37788  # Note: m4 eats our [], so we need to use [ and ] instead.
37789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37790  if test "x$has_forbidden_chars" != x; then
37791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37793  fi
37794
37795    # Output is in $new_path
37796
37797  windows_path="$new_path"
37798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37799    unix_path=`$CYGPATH -u "$windows_path"`
37800    new_path="$unix_path"
37801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37803    new_path="$unix_path"
37804  fi
37805
37806    # remove trailing .exe if any
37807    new_path="${new_path/%.exe/}"
37808
37809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37811  fi
37812
37813    else
37814      # We're on a unix platform. Hooray! :)
37815      # First separate the path from the arguments. This will split at the first
37816      # space.
37817      complete="$RC"
37818      path="${complete%% *}"
37819      tmp="$complete EOL"
37820      arguments="${tmp#* }"
37821
37822      # Cannot rely on the command "which" here since it doesn't always work.
37823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37824      if test -z "$is_absolute_path"; then
37825        # Path to executable is not absolute. Find it.
37826        IFS_save="$IFS"
37827        IFS=:
37828        for p in $PATH; do
37829          if test -f "$p/$path" && test -x "$p/$path"; then
37830            new_path="$p/$path"
37831            break
37832          fi
37833        done
37834        IFS="$IFS_save"
37835      else
37836        # This is an absolute path, we can use it without further modifications.
37837        new_path="$path"
37838      fi
37839
37840      if test "x$new_path" = x; then
37841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37842$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37843        has_space=`$ECHO "$complete" | $GREP " "`
37844        if test "x$has_space" != x; then
37845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37847        fi
37848        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37849      fi
37850    fi
37851
37852    # Now join together the path and the arguments once again
37853    if test "x$arguments" != xEOL; then
37854      new_complete="$new_path ${arguments% *}"
37855    else
37856      new_complete="$new_path"
37857    fi
37858
37859    if test "x$complete" != "x$new_complete"; then
37860      RC="$new_complete"
37861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37862$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37863    fi
37864  fi
37865
37866    # Extract the first word of "dumpbin", so it can be a program name with args.
37867set dummy dumpbin; ac_word=$2
37868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37869$as_echo_n "checking for $ac_word... " >&6; }
37870if ${ac_cv_prog_DUMPBIN+:} false; then :
37871  $as_echo_n "(cached) " >&6
37872else
37873  if test -n "$DUMPBIN"; then
37874  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37875else
37876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37877for as_dir in $PATH
37878do
37879  IFS=$as_save_IFS
37880  test -z "$as_dir" && as_dir=.
37881    for ac_exec_ext in '' $ac_executable_extensions; do
37882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37883    ac_cv_prog_DUMPBIN="dumpbin"
37884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37885    break 2
37886  fi
37887done
37888  done
37889IFS=$as_save_IFS
37890
37891fi
37892fi
37893DUMPBIN=$ac_cv_prog_DUMPBIN
37894if test -n "$DUMPBIN"; then
37895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37896$as_echo "$DUMPBIN" >&6; }
37897else
37898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37899$as_echo "no" >&6; }
37900fi
37901
37902
37903
37904  # Only process if variable expands to non-empty
37905
37906  if test "x$DUMPBIN" != x; then
37907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37908
37909  # First separate the path from the arguments. This will split at the first
37910  # space.
37911  complete="$DUMPBIN"
37912  path="${complete%% *}"
37913  tmp="$complete EOL"
37914  arguments="${tmp#* }"
37915
37916  # Input might be given as Windows format, start by converting to
37917  # unix format.
37918  new_path=`$CYGPATH -u "$path"`
37919
37920  # Now try to locate executable using which
37921  new_path=`$WHICH "$new_path" 2> /dev/null`
37922  # bat and cmd files are not always considered executable in cygwin causing which
37923  # to not find them
37924  if test "x$new_path" = x \
37925      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37926      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37927    new_path=`$CYGPATH -u "$path"`
37928  fi
37929  if test "x$new_path" = x; then
37930    # Oops. Which didn't find the executable.
37931    # The splitting of arguments from the executable at a space might have been incorrect,
37932    # since paths with space are more likely in Windows. Give it another try with the whole
37933    # argument.
37934    path="$complete"
37935    arguments="EOL"
37936    new_path=`$CYGPATH -u "$path"`
37937    new_path=`$WHICH "$new_path" 2> /dev/null`
37938    # bat and cmd files are not always considered executable in cygwin causing which
37939    # to not find them
37940    if test "x$new_path" = x \
37941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37943      new_path=`$CYGPATH -u "$path"`
37944    fi
37945    if test "x$new_path" = x; then
37946      # It's still not found. Now this is an unrecoverable error.
37947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37948$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37949      has_space=`$ECHO "$complete" | $GREP " "`
37950      if test "x$has_space" != x; then
37951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37953      fi
37954      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37955    fi
37956  fi
37957
37958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37961  # "foo.exe" is OK but "foo" is an error.
37962  #
37963  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37964  # It is also a way to make sure we got the proper file name for the real test later on.
37965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37966  if test "x$test_shortpath" = x; then
37967    # Short path failed, file does not exist as specified.
37968    # Try adding .exe or .cmd
37969    if test -f "${new_path}.exe"; then
37970      input_to_shortpath="${new_path}.exe"
37971    elif test -f "${new_path}.cmd"; then
37972      input_to_shortpath="${new_path}.cmd"
37973    else
37974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37975$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37976      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37977$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37978      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37979    fi
37980  else
37981    input_to_shortpath="$new_path"
37982  fi
37983
37984  # Call helper function which possibly converts this using DOS-style short mode.
37985  # If so, the updated path is stored in $new_path.
37986  new_path="$input_to_shortpath"
37987
37988  input_path="$input_to_shortpath"
37989  # Check if we need to convert this using DOS-style short mode. If the path
37990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37991  # take no chances and rewrite it.
37992  # Note: m4 eats our [], so we need to use [ and ] instead.
37993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37994  if test "x$has_forbidden_chars" != x; then
37995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37999      # Going to short mode and back again did indeed matter. Since short mode is
38000      # case insensitive, let's make it lowercase to improve readability.
38001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38002      # Now convert it back to Unix-style (cygpath)
38003      input_path=`$CYGPATH -u "$shortmode_path"`
38004      new_path="$input_path"
38005    fi
38006  fi
38007
38008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38009  if test "x$test_cygdrive_prefix" = x; then
38010    # As a simple fix, exclude /usr/bin since it's not a real path.
38011    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38013      # a path prefixed by /cygdrive for fixpath to work.
38014      new_path="$CYGWIN_ROOT_PATH$input_path"
38015    fi
38016  fi
38017
38018  # remove trailing .exe if any
38019  new_path="${new_path/%.exe/}"
38020
38021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38022
38023  # First separate the path from the arguments. This will split at the first
38024  # space.
38025  complete="$DUMPBIN"
38026  path="${complete%% *}"
38027  tmp="$complete EOL"
38028  arguments="${tmp#* }"
38029
38030  # Input might be given as Windows format, start by converting to
38031  # unix format.
38032  new_path="$path"
38033
38034  windows_path="$new_path"
38035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38036    unix_path=`$CYGPATH -u "$windows_path"`
38037    new_path="$unix_path"
38038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38040    new_path="$unix_path"
38041  fi
38042
38043
38044  # Now try to locate executable using which
38045  new_path=`$WHICH "$new_path" 2> /dev/null`
38046
38047  if test "x$new_path" = x; then
38048    # Oops. Which didn't find the executable.
38049    # The splitting of arguments from the executable at a space might have been incorrect,
38050    # since paths with space are more likely in Windows. Give it another try with the whole
38051    # argument.
38052    path="$complete"
38053    arguments="EOL"
38054    new_path="$path"
38055
38056  windows_path="$new_path"
38057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38058    unix_path=`$CYGPATH -u "$windows_path"`
38059    new_path="$unix_path"
38060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38062    new_path="$unix_path"
38063  fi
38064
38065
38066    new_path=`$WHICH "$new_path" 2> /dev/null`
38067    # bat and cmd files are not always considered executable in MSYS causing which
38068    # to not find them
38069    if test "x$new_path" = x \
38070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38072      new_path="$path"
38073
38074  windows_path="$new_path"
38075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38076    unix_path=`$CYGPATH -u "$windows_path"`
38077    new_path="$unix_path"
38078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38080    new_path="$unix_path"
38081  fi
38082
38083    fi
38084
38085    if test "x$new_path" = x; then
38086      # It's still not found. Now this is an unrecoverable error.
38087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38088$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38089      has_space=`$ECHO "$complete" | $GREP " "`
38090      if test "x$has_space" != x; then
38091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38093      fi
38094      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38095    fi
38096  fi
38097
38098  # Now new_path has a complete unix path to the binary
38099  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38100    # Keep paths in /bin as-is, but remove trailing .exe if any
38101    new_path="${new_path/%.exe/}"
38102    # Do not save /bin paths to all_fixpath_prefixes!
38103  else
38104    # Not in mixed or Windows style, start by that.
38105    new_path=`cmd //c echo $new_path`
38106
38107  input_path="$new_path"
38108  # Check if we need to convert this using DOS-style short mode. If the path
38109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38110  # take no chances and rewrite it.
38111  # Note: m4 eats our [], so we need to use [ and ] instead.
38112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38113  if test "x$has_forbidden_chars" != x; then
38114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38116  fi
38117
38118    # Output is in $new_path
38119
38120  windows_path="$new_path"
38121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38122    unix_path=`$CYGPATH -u "$windows_path"`
38123    new_path="$unix_path"
38124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38126    new_path="$unix_path"
38127  fi
38128
38129    # remove trailing .exe if any
38130    new_path="${new_path/%.exe/}"
38131
38132    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38133    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38134  fi
38135
38136    else
38137      # We're on a unix platform. Hooray! :)
38138      # First separate the path from the arguments. This will split at the first
38139      # space.
38140      complete="$DUMPBIN"
38141      path="${complete%% *}"
38142      tmp="$complete EOL"
38143      arguments="${tmp#* }"
38144
38145      # Cannot rely on the command "which" here since it doesn't always work.
38146      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38147      if test -z "$is_absolute_path"; then
38148        # Path to executable is not absolute. Find it.
38149        IFS_save="$IFS"
38150        IFS=:
38151        for p in $PATH; do
38152          if test -f "$p/$path" && test -x "$p/$path"; then
38153            new_path="$p/$path"
38154            break
38155          fi
38156        done
38157        IFS="$IFS_save"
38158      else
38159        # This is an absolute path, we can use it without further modifications.
38160        new_path="$path"
38161      fi
38162
38163      if test "x$new_path" = x; then
38164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38165$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38166        has_space=`$ECHO "$complete" | $GREP " "`
38167        if test "x$has_space" != x; then
38168          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38169$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38170        fi
38171        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38172      fi
38173    fi
38174
38175    # Now join together the path and the arguments once again
38176    if test "x$arguments" != xEOL; then
38177      new_complete="$new_path ${arguments% *}"
38178    else
38179      new_complete="$new_path"
38180    fi
38181
38182    if test "x$complete" != "x$new_complete"; then
38183      DUMPBIN="$new_complete"
38184      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38185$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38186    fi
38187  fi
38188
38189    # We need to check for 'msbuild.exe' because at the place where we expect to
38190    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38191    # won't find the 'msbuild.exe' executable in that case (and the
38192    # 'ac_executable_extensions' is unusable due to performance reasons).
38193    # Notice that we intentionally don't fix up the path to MSBUILD because we
38194    # will call it in a DOS shell during freetype detection on Windows (see
38195    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38196    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38197set dummy msbuild.exe; ac_word=$2
38198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38199$as_echo_n "checking for $ac_word... " >&6; }
38200if ${ac_cv_prog_MSBUILD+:} false; then :
38201  $as_echo_n "(cached) " >&6
38202else
38203  if test -n "$MSBUILD"; then
38204  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38205else
38206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38207for as_dir in $PATH
38208do
38209  IFS=$as_save_IFS
38210  test -z "$as_dir" && as_dir=.
38211    for ac_exec_ext in '' $ac_executable_extensions; do
38212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38213    ac_cv_prog_MSBUILD="msbuild.exe"
38214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38215    break 2
38216  fi
38217done
38218  done
38219IFS=$as_save_IFS
38220
38221fi
38222fi
38223MSBUILD=$ac_cv_prog_MSBUILD
38224if test -n "$MSBUILD"; then
38225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38226$as_echo "$MSBUILD" >&6; }
38227else
38228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38229$as_echo "no" >&6; }
38230fi
38231
38232
38233  fi
38234
38235  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38236
38237
38238  # Publish this variable in the help.
38239
38240
38241  if [ -z "${STRIP+x}" ]; then
38242    # The variable is not set by user, try to locate tool using the code snippet
38243    for ac_prog in strip
38244do
38245  # Extract the first word of "$ac_prog", so it can be a program name with args.
38246set dummy $ac_prog; ac_word=$2
38247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38248$as_echo_n "checking for $ac_word... " >&6; }
38249if ${ac_cv_path_STRIP+:} false; then :
38250  $as_echo_n "(cached) " >&6
38251else
38252  case $STRIP in
38253  [\\/]* | ?:[\\/]*)
38254  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38255  ;;
38256  *)
38257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38258for as_dir in $PATH
38259do
38260  IFS=$as_save_IFS
38261  test -z "$as_dir" && as_dir=.
38262    for ac_exec_ext in '' $ac_executable_extensions; do
38263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38264    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38266    break 2
38267  fi
38268done
38269  done
38270IFS=$as_save_IFS
38271
38272  ;;
38273esac
38274fi
38275STRIP=$ac_cv_path_STRIP
38276if test -n "$STRIP"; then
38277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38278$as_echo "$STRIP" >&6; }
38279else
38280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38281$as_echo "no" >&6; }
38282fi
38283
38284
38285  test -n "$STRIP" && break
38286done
38287
38288  else
38289    # The variable is set, but is it from the command line or the environment?
38290
38291    # Try to remove the string !STRIP! from our list.
38292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38294      # If it failed, the variable was not from the command line. Ignore it,
38295      # but warn the user (except for BASH, which is always set by the calling BASH).
38296      if test "xSTRIP" != xBASH; then
38297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38298$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38299      fi
38300      # Try to locate tool using the code snippet
38301      for ac_prog in strip
38302do
38303  # Extract the first word of "$ac_prog", so it can be a program name with args.
38304set dummy $ac_prog; ac_word=$2
38305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38306$as_echo_n "checking for $ac_word... " >&6; }
38307if ${ac_cv_path_STRIP+:} false; then :
38308  $as_echo_n "(cached) " >&6
38309else
38310  case $STRIP in
38311  [\\/]* | ?:[\\/]*)
38312  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38313  ;;
38314  *)
38315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38316for as_dir in $PATH
38317do
38318  IFS=$as_save_IFS
38319  test -z "$as_dir" && as_dir=.
38320    for ac_exec_ext in '' $ac_executable_extensions; do
38321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38322    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38324    break 2
38325  fi
38326done
38327  done
38328IFS=$as_save_IFS
38329
38330  ;;
38331esac
38332fi
38333STRIP=$ac_cv_path_STRIP
38334if test -n "$STRIP"; then
38335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38336$as_echo "$STRIP" >&6; }
38337else
38338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38339$as_echo "no" >&6; }
38340fi
38341
38342
38343  test -n "$STRIP" && break
38344done
38345
38346    else
38347      # If it succeeded, then it was overridden by the user. We will use it
38348      # for the tool.
38349
38350      # First remove it from the list of overridden variables, so we can test
38351      # for unknown variables in the end.
38352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38353
38354      # Check if we try to supply an empty value
38355      if test "x$STRIP" = x; then
38356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38357$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38359$as_echo_n "checking for STRIP... " >&6; }
38360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38361$as_echo "disabled" >&6; }
38362      else
38363        # Check if the provided tool contains a complete path.
38364        tool_specified="$STRIP"
38365        tool_basename="${tool_specified##*/}"
38366        if test "x$tool_basename" = "x$tool_specified"; then
38367          # A command without a complete path is provided, search $PATH.
38368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38369$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38370          # Extract the first word of "$tool_basename", so it can be a program name with args.
38371set dummy $tool_basename; ac_word=$2
38372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38373$as_echo_n "checking for $ac_word... " >&6; }
38374if ${ac_cv_path_STRIP+:} false; then :
38375  $as_echo_n "(cached) " >&6
38376else
38377  case $STRIP in
38378  [\\/]* | ?:[\\/]*)
38379  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38380  ;;
38381  *)
38382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38383for as_dir in $PATH
38384do
38385  IFS=$as_save_IFS
38386  test -z "$as_dir" && as_dir=.
38387    for ac_exec_ext in '' $ac_executable_extensions; do
38388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38389    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38391    break 2
38392  fi
38393done
38394  done
38395IFS=$as_save_IFS
38396
38397  ;;
38398esac
38399fi
38400STRIP=$ac_cv_path_STRIP
38401if test -n "$STRIP"; then
38402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38403$as_echo "$STRIP" >&6; }
38404else
38405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38406$as_echo "no" >&6; }
38407fi
38408
38409
38410          if test "x$STRIP" = x; then
38411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38412          fi
38413        else
38414          # Otherwise we believe it is a complete path. Use it as it is.
38415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38416$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38418$as_echo_n "checking for STRIP... " >&6; }
38419          if test ! -x "$tool_specified"; then
38420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38421$as_echo "not found" >&6; }
38422            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38423          fi
38424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38425$as_echo "$tool_specified" >&6; }
38426        fi
38427      fi
38428    fi
38429
38430  fi
38431
38432
38433
38434  # Only process if variable expands to non-empty
38435
38436  if test "x$STRIP" != x; then
38437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38438
38439  # First separate the path from the arguments. This will split at the first
38440  # space.
38441  complete="$STRIP"
38442  path="${complete%% *}"
38443  tmp="$complete EOL"
38444  arguments="${tmp#* }"
38445
38446  # Input might be given as Windows format, start by converting to
38447  # unix format.
38448  new_path=`$CYGPATH -u "$path"`
38449
38450  # Now try to locate executable using which
38451  new_path=`$WHICH "$new_path" 2> /dev/null`
38452  # bat and cmd files are not always considered executable in cygwin causing which
38453  # to not find them
38454  if test "x$new_path" = x \
38455      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38456      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38457    new_path=`$CYGPATH -u "$path"`
38458  fi
38459  if test "x$new_path" = x; then
38460    # Oops. Which didn't find the executable.
38461    # The splitting of arguments from the executable at a space might have been incorrect,
38462    # since paths with space are more likely in Windows. Give it another try with the whole
38463    # argument.
38464    path="$complete"
38465    arguments="EOL"
38466    new_path=`$CYGPATH -u "$path"`
38467    new_path=`$WHICH "$new_path" 2> /dev/null`
38468    # bat and cmd files are not always considered executable in cygwin causing which
38469    # to not find them
38470    if test "x$new_path" = x \
38471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38473      new_path=`$CYGPATH -u "$path"`
38474    fi
38475    if test "x$new_path" = x; then
38476      # It's still not found. Now this is an unrecoverable error.
38477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38478$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38479      has_space=`$ECHO "$complete" | $GREP " "`
38480      if test "x$has_space" != x; then
38481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38483      fi
38484      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38485    fi
38486  fi
38487
38488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38491  # "foo.exe" is OK but "foo" is an error.
38492  #
38493  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38494  # It is also a way to make sure we got the proper file name for the real test later on.
38495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38496  if test "x$test_shortpath" = x; then
38497    # Short path failed, file does not exist as specified.
38498    # Try adding .exe or .cmd
38499    if test -f "${new_path}.exe"; then
38500      input_to_shortpath="${new_path}.exe"
38501    elif test -f "${new_path}.cmd"; then
38502      input_to_shortpath="${new_path}.cmd"
38503    else
38504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38505$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38508      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38509    fi
38510  else
38511    input_to_shortpath="$new_path"
38512  fi
38513
38514  # Call helper function which possibly converts this using DOS-style short mode.
38515  # If so, the updated path is stored in $new_path.
38516  new_path="$input_to_shortpath"
38517
38518  input_path="$input_to_shortpath"
38519  # Check if we need to convert this using DOS-style short mode. If the path
38520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38521  # take no chances and rewrite it.
38522  # Note: m4 eats our [], so we need to use [ and ] instead.
38523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38524  if test "x$has_forbidden_chars" != x; then
38525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38529      # Going to short mode and back again did indeed matter. Since short mode is
38530      # case insensitive, let's make it lowercase to improve readability.
38531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38532      # Now convert it back to Unix-style (cygpath)
38533      input_path=`$CYGPATH -u "$shortmode_path"`
38534      new_path="$input_path"
38535    fi
38536  fi
38537
38538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38539  if test "x$test_cygdrive_prefix" = x; then
38540    # As a simple fix, exclude /usr/bin since it's not a real path.
38541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38543      # a path prefixed by /cygdrive for fixpath to work.
38544      new_path="$CYGWIN_ROOT_PATH$input_path"
38545    fi
38546  fi
38547
38548  # remove trailing .exe if any
38549  new_path="${new_path/%.exe/}"
38550
38551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38552
38553  # First separate the path from the arguments. This will split at the first
38554  # space.
38555  complete="$STRIP"
38556  path="${complete%% *}"
38557  tmp="$complete EOL"
38558  arguments="${tmp#* }"
38559
38560  # Input might be given as Windows format, start by converting to
38561  # unix format.
38562  new_path="$path"
38563
38564  windows_path="$new_path"
38565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38566    unix_path=`$CYGPATH -u "$windows_path"`
38567    new_path="$unix_path"
38568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38570    new_path="$unix_path"
38571  fi
38572
38573
38574  # Now try to locate executable using which
38575  new_path=`$WHICH "$new_path" 2> /dev/null`
38576
38577  if test "x$new_path" = x; then
38578    # Oops. Which didn't find the executable.
38579    # The splitting of arguments from the executable at a space might have been incorrect,
38580    # since paths with space are more likely in Windows. Give it another try with the whole
38581    # argument.
38582    path="$complete"
38583    arguments="EOL"
38584    new_path="$path"
38585
38586  windows_path="$new_path"
38587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38588    unix_path=`$CYGPATH -u "$windows_path"`
38589    new_path="$unix_path"
38590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38592    new_path="$unix_path"
38593  fi
38594
38595
38596    new_path=`$WHICH "$new_path" 2> /dev/null`
38597    # bat and cmd files are not always considered executable in MSYS causing which
38598    # to not find them
38599    if test "x$new_path" = x \
38600        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38601        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38602      new_path="$path"
38603
38604  windows_path="$new_path"
38605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38606    unix_path=`$CYGPATH -u "$windows_path"`
38607    new_path="$unix_path"
38608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38610    new_path="$unix_path"
38611  fi
38612
38613    fi
38614
38615    if test "x$new_path" = x; then
38616      # It's still not found. Now this is an unrecoverable error.
38617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38618$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38619      has_space=`$ECHO "$complete" | $GREP " "`
38620      if test "x$has_space" != x; then
38621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38623      fi
38624      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38625    fi
38626  fi
38627
38628  # Now new_path has a complete unix path to the binary
38629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38630    # Keep paths in /bin as-is, but remove trailing .exe if any
38631    new_path="${new_path/%.exe/}"
38632    # Do not save /bin paths to all_fixpath_prefixes!
38633  else
38634    # Not in mixed or Windows style, start by that.
38635    new_path=`cmd //c echo $new_path`
38636
38637  input_path="$new_path"
38638  # Check if we need to convert this using DOS-style short mode. If the path
38639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38640  # take no chances and rewrite it.
38641  # Note: m4 eats our [], so we need to use [ and ] instead.
38642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38643  if test "x$has_forbidden_chars" != x; then
38644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38646  fi
38647
38648    # Output is in $new_path
38649
38650  windows_path="$new_path"
38651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38652    unix_path=`$CYGPATH -u "$windows_path"`
38653    new_path="$unix_path"
38654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38656    new_path="$unix_path"
38657  fi
38658
38659    # remove trailing .exe if any
38660    new_path="${new_path/%.exe/}"
38661
38662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38664  fi
38665
38666    else
38667      # We're on a unix platform. Hooray! :)
38668      # First separate the path from the arguments. This will split at the first
38669      # space.
38670      complete="$STRIP"
38671      path="${complete%% *}"
38672      tmp="$complete EOL"
38673      arguments="${tmp#* }"
38674
38675      # Cannot rely on the command "which" here since it doesn't always work.
38676      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38677      if test -z "$is_absolute_path"; then
38678        # Path to executable is not absolute. Find it.
38679        IFS_save="$IFS"
38680        IFS=:
38681        for p in $PATH; do
38682          if test -f "$p/$path" && test -x "$p/$path"; then
38683            new_path="$p/$path"
38684            break
38685          fi
38686        done
38687        IFS="$IFS_save"
38688      else
38689        # This is an absolute path, we can use it without further modifications.
38690        new_path="$path"
38691      fi
38692
38693      if test "x$new_path" = x; then
38694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38695$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38696        has_space=`$ECHO "$complete" | $GREP " "`
38697        if test "x$has_space" != x; then
38698          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38699$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38700        fi
38701        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38702      fi
38703    fi
38704
38705    # Now join together the path and the arguments once again
38706    if test "x$arguments" != xEOL; then
38707      new_complete="$new_path ${arguments% *}"
38708    else
38709      new_complete="$new_path"
38710    fi
38711
38712    if test "x$complete" != "x$new_complete"; then
38713      STRIP="$new_complete"
38714      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38715$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38716    fi
38717  fi
38718
38719
38720
38721  # Publish this variable in the help.
38722
38723
38724  if [ -z "${NM+x}" ]; then
38725    # The variable is not set by user, try to locate tool using the code snippet
38726    for ac_prog in nm
38727do
38728  # Extract the first word of "$ac_prog", so it can be a program name with args.
38729set dummy $ac_prog; ac_word=$2
38730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38731$as_echo_n "checking for $ac_word... " >&6; }
38732if ${ac_cv_path_NM+:} false; then :
38733  $as_echo_n "(cached) " >&6
38734else
38735  case $NM in
38736  [\\/]* | ?:[\\/]*)
38737  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38738  ;;
38739  *)
38740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38741for as_dir in $PATH
38742do
38743  IFS=$as_save_IFS
38744  test -z "$as_dir" && as_dir=.
38745    for ac_exec_ext in '' $ac_executable_extensions; do
38746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38747    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38749    break 2
38750  fi
38751done
38752  done
38753IFS=$as_save_IFS
38754
38755  ;;
38756esac
38757fi
38758NM=$ac_cv_path_NM
38759if test -n "$NM"; then
38760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38761$as_echo "$NM" >&6; }
38762else
38763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38764$as_echo "no" >&6; }
38765fi
38766
38767
38768  test -n "$NM" && break
38769done
38770
38771  else
38772    # The variable is set, but is it from the command line or the environment?
38773
38774    # Try to remove the string !NM! from our list.
38775    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38776    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38777      # If it failed, the variable was not from the command line. Ignore it,
38778      # but warn the user (except for BASH, which is always set by the calling BASH).
38779      if test "xNM" != xBASH; then
38780        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38781$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38782      fi
38783      # Try to locate tool using the code snippet
38784      for ac_prog in nm
38785do
38786  # Extract the first word of "$ac_prog", so it can be a program name with args.
38787set dummy $ac_prog; ac_word=$2
38788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38789$as_echo_n "checking for $ac_word... " >&6; }
38790if ${ac_cv_path_NM+:} false; then :
38791  $as_echo_n "(cached) " >&6
38792else
38793  case $NM in
38794  [\\/]* | ?:[\\/]*)
38795  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38796  ;;
38797  *)
38798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38799for as_dir in $PATH
38800do
38801  IFS=$as_save_IFS
38802  test -z "$as_dir" && as_dir=.
38803    for ac_exec_ext in '' $ac_executable_extensions; do
38804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38805    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38807    break 2
38808  fi
38809done
38810  done
38811IFS=$as_save_IFS
38812
38813  ;;
38814esac
38815fi
38816NM=$ac_cv_path_NM
38817if test -n "$NM"; then
38818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38819$as_echo "$NM" >&6; }
38820else
38821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38822$as_echo "no" >&6; }
38823fi
38824
38825
38826  test -n "$NM" && break
38827done
38828
38829    else
38830      # If it succeeded, then it was overridden by the user. We will use it
38831      # for the tool.
38832
38833      # First remove it from the list of overridden variables, so we can test
38834      # for unknown variables in the end.
38835      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38836
38837      # Check if we try to supply an empty value
38838      if test "x$NM" = x; then
38839        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38840$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38841        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38842$as_echo_n "checking for NM... " >&6; }
38843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38844$as_echo "disabled" >&6; }
38845      else
38846        # Check if the provided tool contains a complete path.
38847        tool_specified="$NM"
38848        tool_basename="${tool_specified##*/}"
38849        if test "x$tool_basename" = "x$tool_specified"; then
38850          # A command without a complete path is provided, search $PATH.
38851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38852$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38853          # Extract the first word of "$tool_basename", so it can be a program name with args.
38854set dummy $tool_basename; ac_word=$2
38855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38856$as_echo_n "checking for $ac_word... " >&6; }
38857if ${ac_cv_path_NM+:} false; then :
38858  $as_echo_n "(cached) " >&6
38859else
38860  case $NM in
38861  [\\/]* | ?:[\\/]*)
38862  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38863  ;;
38864  *)
38865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38866for as_dir in $PATH
38867do
38868  IFS=$as_save_IFS
38869  test -z "$as_dir" && as_dir=.
38870    for ac_exec_ext in '' $ac_executable_extensions; do
38871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38872    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38874    break 2
38875  fi
38876done
38877  done
38878IFS=$as_save_IFS
38879
38880  ;;
38881esac
38882fi
38883NM=$ac_cv_path_NM
38884if test -n "$NM"; then
38885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38886$as_echo "$NM" >&6; }
38887else
38888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38889$as_echo "no" >&6; }
38890fi
38891
38892
38893          if test "x$NM" = x; then
38894            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38895          fi
38896        else
38897          # Otherwise we believe it is a complete path. Use it as it is.
38898          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38899$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38900          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38901$as_echo_n "checking for NM... " >&6; }
38902          if test ! -x "$tool_specified"; then
38903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38904$as_echo "not found" >&6; }
38905            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38906          fi
38907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38908$as_echo "$tool_specified" >&6; }
38909        fi
38910      fi
38911    fi
38912
38913  fi
38914
38915
38916
38917  # Only process if variable expands to non-empty
38918
38919  if test "x$NM" != x; then
38920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38921
38922  # First separate the path from the arguments. This will split at the first
38923  # space.
38924  complete="$NM"
38925  path="${complete%% *}"
38926  tmp="$complete EOL"
38927  arguments="${tmp#* }"
38928
38929  # Input might be given as Windows format, start by converting to
38930  # unix format.
38931  new_path=`$CYGPATH -u "$path"`
38932
38933  # Now try to locate executable using which
38934  new_path=`$WHICH "$new_path" 2> /dev/null`
38935  # bat and cmd files are not always considered executable in cygwin causing which
38936  # to not find them
38937  if test "x$new_path" = x \
38938      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38939      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38940    new_path=`$CYGPATH -u "$path"`
38941  fi
38942  if test "x$new_path" = x; then
38943    # Oops. Which didn't find the executable.
38944    # The splitting of arguments from the executable at a space might have been incorrect,
38945    # since paths with space are more likely in Windows. Give it another try with the whole
38946    # argument.
38947    path="$complete"
38948    arguments="EOL"
38949    new_path=`$CYGPATH -u "$path"`
38950    new_path=`$WHICH "$new_path" 2> /dev/null`
38951    # bat and cmd files are not always considered executable in cygwin causing which
38952    # to not find them
38953    if test "x$new_path" = x \
38954        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38955        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38956      new_path=`$CYGPATH -u "$path"`
38957    fi
38958    if test "x$new_path" = x; then
38959      # It's still not found. Now this is an unrecoverable error.
38960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38961$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38962      has_space=`$ECHO "$complete" | $GREP " "`
38963      if test "x$has_space" != x; then
38964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38966      fi
38967      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38968    fi
38969  fi
38970
38971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38974  # "foo.exe" is OK but "foo" is an error.
38975  #
38976  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38977  # It is also a way to make sure we got the proper file name for the real test later on.
38978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38979  if test "x$test_shortpath" = x; then
38980    # Short path failed, file does not exist as specified.
38981    # Try adding .exe or .cmd
38982    if test -f "${new_path}.exe"; then
38983      input_to_shortpath="${new_path}.exe"
38984    elif test -f "${new_path}.cmd"; then
38985      input_to_shortpath="${new_path}.cmd"
38986    else
38987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38988$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38989      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38990$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38991      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38992    fi
38993  else
38994    input_to_shortpath="$new_path"
38995  fi
38996
38997  # Call helper function which possibly converts this using DOS-style short mode.
38998  # If so, the updated path is stored in $new_path.
38999  new_path="$input_to_shortpath"
39000
39001  input_path="$input_to_shortpath"
39002  # Check if we need to convert this using DOS-style short mode. If the path
39003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39004  # take no chances and rewrite it.
39005  # Note: m4 eats our [], so we need to use [ and ] instead.
39006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39007  if test "x$has_forbidden_chars" != x; then
39008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39012      # Going to short mode and back again did indeed matter. Since short mode is
39013      # case insensitive, let's make it lowercase to improve readability.
39014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39015      # Now convert it back to Unix-style (cygpath)
39016      input_path=`$CYGPATH -u "$shortmode_path"`
39017      new_path="$input_path"
39018    fi
39019  fi
39020
39021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39022  if test "x$test_cygdrive_prefix" = x; then
39023    # As a simple fix, exclude /usr/bin since it's not a real path.
39024    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39026      # a path prefixed by /cygdrive for fixpath to work.
39027      new_path="$CYGWIN_ROOT_PATH$input_path"
39028    fi
39029  fi
39030
39031  # remove trailing .exe if any
39032  new_path="${new_path/%.exe/}"
39033
39034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39035
39036  # First separate the path from the arguments. This will split at the first
39037  # space.
39038  complete="$NM"
39039  path="${complete%% *}"
39040  tmp="$complete EOL"
39041  arguments="${tmp#* }"
39042
39043  # Input might be given as Windows format, start by converting to
39044  # unix format.
39045  new_path="$path"
39046
39047  windows_path="$new_path"
39048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39049    unix_path=`$CYGPATH -u "$windows_path"`
39050    new_path="$unix_path"
39051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39053    new_path="$unix_path"
39054  fi
39055
39056
39057  # Now try to locate executable using which
39058  new_path=`$WHICH "$new_path" 2> /dev/null`
39059
39060  if test "x$new_path" = x; then
39061    # Oops. Which didn't find the executable.
39062    # The splitting of arguments from the executable at a space might have been incorrect,
39063    # since paths with space are more likely in Windows. Give it another try with the whole
39064    # argument.
39065    path="$complete"
39066    arguments="EOL"
39067    new_path="$path"
39068
39069  windows_path="$new_path"
39070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39071    unix_path=`$CYGPATH -u "$windows_path"`
39072    new_path="$unix_path"
39073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39075    new_path="$unix_path"
39076  fi
39077
39078
39079    new_path=`$WHICH "$new_path" 2> /dev/null`
39080    # bat and cmd files are not always considered executable in MSYS causing which
39081    # to not find them
39082    if test "x$new_path" = x \
39083        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39084        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39085      new_path="$path"
39086
39087  windows_path="$new_path"
39088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39089    unix_path=`$CYGPATH -u "$windows_path"`
39090    new_path="$unix_path"
39091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39093    new_path="$unix_path"
39094  fi
39095
39096    fi
39097
39098    if test "x$new_path" = x; then
39099      # It's still not found. Now this is an unrecoverable error.
39100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39101$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39102      has_space=`$ECHO "$complete" | $GREP " "`
39103      if test "x$has_space" != x; then
39104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39106      fi
39107      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39108    fi
39109  fi
39110
39111  # Now new_path has a complete unix path to the binary
39112  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39113    # Keep paths in /bin as-is, but remove trailing .exe if any
39114    new_path="${new_path/%.exe/}"
39115    # Do not save /bin paths to all_fixpath_prefixes!
39116  else
39117    # Not in mixed or Windows style, start by that.
39118    new_path=`cmd //c echo $new_path`
39119
39120  input_path="$new_path"
39121  # Check if we need to convert this using DOS-style short mode. If the path
39122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39123  # take no chances and rewrite it.
39124  # Note: m4 eats our [], so we need to use [ and ] instead.
39125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39126  if test "x$has_forbidden_chars" != x; then
39127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39129  fi
39130
39131    # Output is in $new_path
39132
39133  windows_path="$new_path"
39134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39135    unix_path=`$CYGPATH -u "$windows_path"`
39136    new_path="$unix_path"
39137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39139    new_path="$unix_path"
39140  fi
39141
39142    # remove trailing .exe if any
39143    new_path="${new_path/%.exe/}"
39144
39145    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39146    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39147  fi
39148
39149    else
39150      # We're on a unix platform. Hooray! :)
39151      # First separate the path from the arguments. This will split at the first
39152      # space.
39153      complete="$NM"
39154      path="${complete%% *}"
39155      tmp="$complete EOL"
39156      arguments="${tmp#* }"
39157
39158      # Cannot rely on the command "which" here since it doesn't always work.
39159      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39160      if test -z "$is_absolute_path"; then
39161        # Path to executable is not absolute. Find it.
39162        IFS_save="$IFS"
39163        IFS=:
39164        for p in $PATH; do
39165          if test -f "$p/$path" && test -x "$p/$path"; then
39166            new_path="$p/$path"
39167            break
39168          fi
39169        done
39170        IFS="$IFS_save"
39171      else
39172        # This is an absolute path, we can use it without further modifications.
39173        new_path="$path"
39174      fi
39175
39176      if test "x$new_path" = x; then
39177        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39178$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39179        has_space=`$ECHO "$complete" | $GREP " "`
39180        if test "x$has_space" != x; then
39181          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39182$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39183        fi
39184        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39185      fi
39186    fi
39187
39188    # Now join together the path and the arguments once again
39189    if test "x$arguments" != xEOL; then
39190      new_complete="$new_path ${arguments% *}"
39191    else
39192      new_complete="$new_path"
39193    fi
39194
39195    if test "x$complete" != "x$new_complete"; then
39196      NM="$new_complete"
39197      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39198$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39199    fi
39200  fi
39201
39202
39203
39204  # Publish this variable in the help.
39205
39206
39207  if [ -z "${GNM+x}" ]; then
39208    # The variable is not set by user, try to locate tool using the code snippet
39209    for ac_prog in gnm
39210do
39211  # Extract the first word of "$ac_prog", so it can be a program name with args.
39212set dummy $ac_prog; ac_word=$2
39213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39214$as_echo_n "checking for $ac_word... " >&6; }
39215if ${ac_cv_path_GNM+:} false; then :
39216  $as_echo_n "(cached) " >&6
39217else
39218  case $GNM in
39219  [\\/]* | ?:[\\/]*)
39220  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39221  ;;
39222  *)
39223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39224for as_dir in $PATH
39225do
39226  IFS=$as_save_IFS
39227  test -z "$as_dir" && as_dir=.
39228    for ac_exec_ext in '' $ac_executable_extensions; do
39229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39230    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39232    break 2
39233  fi
39234done
39235  done
39236IFS=$as_save_IFS
39237
39238  ;;
39239esac
39240fi
39241GNM=$ac_cv_path_GNM
39242if test -n "$GNM"; then
39243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39244$as_echo "$GNM" >&6; }
39245else
39246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39247$as_echo "no" >&6; }
39248fi
39249
39250
39251  test -n "$GNM" && break
39252done
39253
39254  else
39255    # The variable is set, but is it from the command line or the environment?
39256
39257    # Try to remove the string !GNM! from our list.
39258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39260      # If it failed, the variable was not from the command line. Ignore it,
39261      # but warn the user (except for BASH, which is always set by the calling BASH).
39262      if test "xGNM" != xBASH; then
39263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39264$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39265      fi
39266      # Try to locate tool using the code snippet
39267      for ac_prog in gnm
39268do
39269  # Extract the first word of "$ac_prog", so it can be a program name with args.
39270set dummy $ac_prog; ac_word=$2
39271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39272$as_echo_n "checking for $ac_word... " >&6; }
39273if ${ac_cv_path_GNM+:} false; then :
39274  $as_echo_n "(cached) " >&6
39275else
39276  case $GNM in
39277  [\\/]* | ?:[\\/]*)
39278  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39279  ;;
39280  *)
39281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39282for as_dir in $PATH
39283do
39284  IFS=$as_save_IFS
39285  test -z "$as_dir" && as_dir=.
39286    for ac_exec_ext in '' $ac_executable_extensions; do
39287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39288    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39290    break 2
39291  fi
39292done
39293  done
39294IFS=$as_save_IFS
39295
39296  ;;
39297esac
39298fi
39299GNM=$ac_cv_path_GNM
39300if test -n "$GNM"; then
39301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39302$as_echo "$GNM" >&6; }
39303else
39304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39305$as_echo "no" >&6; }
39306fi
39307
39308
39309  test -n "$GNM" && break
39310done
39311
39312    else
39313      # If it succeeded, then it was overridden by the user. We will use it
39314      # for the tool.
39315
39316      # First remove it from the list of overridden variables, so we can test
39317      # for unknown variables in the end.
39318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39319
39320      # Check if we try to supply an empty value
39321      if test "x$GNM" = x; then
39322        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39323$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39325$as_echo_n "checking for GNM... " >&6; }
39326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39327$as_echo "disabled" >&6; }
39328      else
39329        # Check if the provided tool contains a complete path.
39330        tool_specified="$GNM"
39331        tool_basename="${tool_specified##*/}"
39332        if test "x$tool_basename" = "x$tool_specified"; then
39333          # A command without a complete path is provided, search $PATH.
39334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39335$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39336          # Extract the first word of "$tool_basename", so it can be a program name with args.
39337set dummy $tool_basename; ac_word=$2
39338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39339$as_echo_n "checking for $ac_word... " >&6; }
39340if ${ac_cv_path_GNM+:} false; then :
39341  $as_echo_n "(cached) " >&6
39342else
39343  case $GNM in
39344  [\\/]* | ?:[\\/]*)
39345  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39346  ;;
39347  *)
39348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39349for as_dir in $PATH
39350do
39351  IFS=$as_save_IFS
39352  test -z "$as_dir" && as_dir=.
39353    for ac_exec_ext in '' $ac_executable_extensions; do
39354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39355    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39357    break 2
39358  fi
39359done
39360  done
39361IFS=$as_save_IFS
39362
39363  ;;
39364esac
39365fi
39366GNM=$ac_cv_path_GNM
39367if test -n "$GNM"; then
39368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39369$as_echo "$GNM" >&6; }
39370else
39371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39372$as_echo "no" >&6; }
39373fi
39374
39375
39376          if test "x$GNM" = x; then
39377            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39378          fi
39379        else
39380          # Otherwise we believe it is a complete path. Use it as it is.
39381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39382$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39383          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39384$as_echo_n "checking for GNM... " >&6; }
39385          if test ! -x "$tool_specified"; then
39386            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39387$as_echo "not found" >&6; }
39388            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39389          fi
39390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39391$as_echo "$tool_specified" >&6; }
39392        fi
39393      fi
39394    fi
39395
39396  fi
39397
39398
39399
39400  # Only process if variable expands to non-empty
39401
39402  if test "x$GNM" != x; then
39403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39404
39405  # First separate the path from the arguments. This will split at the first
39406  # space.
39407  complete="$GNM"
39408  path="${complete%% *}"
39409  tmp="$complete EOL"
39410  arguments="${tmp#* }"
39411
39412  # Input might be given as Windows format, start by converting to
39413  # unix format.
39414  new_path=`$CYGPATH -u "$path"`
39415
39416  # Now try to locate executable using which
39417  new_path=`$WHICH "$new_path" 2> /dev/null`
39418  # bat and cmd files are not always considered executable in cygwin causing which
39419  # to not find them
39420  if test "x$new_path" = x \
39421      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39422      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39423    new_path=`$CYGPATH -u "$path"`
39424  fi
39425  if test "x$new_path" = x; then
39426    # Oops. Which didn't find the executable.
39427    # The splitting of arguments from the executable at a space might have been incorrect,
39428    # since paths with space are more likely in Windows. Give it another try with the whole
39429    # argument.
39430    path="$complete"
39431    arguments="EOL"
39432    new_path=`$CYGPATH -u "$path"`
39433    new_path=`$WHICH "$new_path" 2> /dev/null`
39434    # bat and cmd files are not always considered executable in cygwin causing which
39435    # to not find them
39436    if test "x$new_path" = x \
39437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39439      new_path=`$CYGPATH -u "$path"`
39440    fi
39441    if test "x$new_path" = x; then
39442      # It's still not found. Now this is an unrecoverable error.
39443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39444$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39445      has_space=`$ECHO "$complete" | $GREP " "`
39446      if test "x$has_space" != x; then
39447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39449      fi
39450      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39451    fi
39452  fi
39453
39454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39457  # "foo.exe" is OK but "foo" is an error.
39458  #
39459  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39460  # It is also a way to make sure we got the proper file name for the real test later on.
39461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39462  if test "x$test_shortpath" = x; then
39463    # Short path failed, file does not exist as specified.
39464    # Try adding .exe or .cmd
39465    if test -f "${new_path}.exe"; then
39466      input_to_shortpath="${new_path}.exe"
39467    elif test -f "${new_path}.cmd"; then
39468      input_to_shortpath="${new_path}.cmd"
39469    else
39470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39471$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39474      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39475    fi
39476  else
39477    input_to_shortpath="$new_path"
39478  fi
39479
39480  # Call helper function which possibly converts this using DOS-style short mode.
39481  # If so, the updated path is stored in $new_path.
39482  new_path="$input_to_shortpath"
39483
39484  input_path="$input_to_shortpath"
39485  # Check if we need to convert this using DOS-style short mode. If the path
39486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39487  # take no chances and rewrite it.
39488  # Note: m4 eats our [], so we need to use [ and ] instead.
39489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39490  if test "x$has_forbidden_chars" != x; then
39491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39495      # Going to short mode and back again did indeed matter. Since short mode is
39496      # case insensitive, let's make it lowercase to improve readability.
39497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39498      # Now convert it back to Unix-style (cygpath)
39499      input_path=`$CYGPATH -u "$shortmode_path"`
39500      new_path="$input_path"
39501    fi
39502  fi
39503
39504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39505  if test "x$test_cygdrive_prefix" = x; then
39506    # As a simple fix, exclude /usr/bin since it's not a real path.
39507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39509      # a path prefixed by /cygdrive for fixpath to work.
39510      new_path="$CYGWIN_ROOT_PATH$input_path"
39511    fi
39512  fi
39513
39514  # remove trailing .exe if any
39515  new_path="${new_path/%.exe/}"
39516
39517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39518
39519  # First separate the path from the arguments. This will split at the first
39520  # space.
39521  complete="$GNM"
39522  path="${complete%% *}"
39523  tmp="$complete EOL"
39524  arguments="${tmp#* }"
39525
39526  # Input might be given as Windows format, start by converting to
39527  # unix format.
39528  new_path="$path"
39529
39530  windows_path="$new_path"
39531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39532    unix_path=`$CYGPATH -u "$windows_path"`
39533    new_path="$unix_path"
39534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39536    new_path="$unix_path"
39537  fi
39538
39539
39540  # Now try to locate executable using which
39541  new_path=`$WHICH "$new_path" 2> /dev/null`
39542
39543  if test "x$new_path" = x; then
39544    # Oops. Which didn't find the executable.
39545    # The splitting of arguments from the executable at a space might have been incorrect,
39546    # since paths with space are more likely in Windows. Give it another try with the whole
39547    # argument.
39548    path="$complete"
39549    arguments="EOL"
39550    new_path="$path"
39551
39552  windows_path="$new_path"
39553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39554    unix_path=`$CYGPATH -u "$windows_path"`
39555    new_path="$unix_path"
39556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39558    new_path="$unix_path"
39559  fi
39560
39561
39562    new_path=`$WHICH "$new_path" 2> /dev/null`
39563    # bat and cmd files are not always considered executable in MSYS causing which
39564    # to not find them
39565    if test "x$new_path" = x \
39566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39568      new_path="$path"
39569
39570  windows_path="$new_path"
39571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39572    unix_path=`$CYGPATH -u "$windows_path"`
39573    new_path="$unix_path"
39574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39576    new_path="$unix_path"
39577  fi
39578
39579    fi
39580
39581    if test "x$new_path" = x; then
39582      # It's still not found. Now this is an unrecoverable error.
39583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39584$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39585      has_space=`$ECHO "$complete" | $GREP " "`
39586      if test "x$has_space" != x; then
39587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39589      fi
39590      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39591    fi
39592  fi
39593
39594  # Now new_path has a complete unix path to the binary
39595  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39596    # Keep paths in /bin as-is, but remove trailing .exe if any
39597    new_path="${new_path/%.exe/}"
39598    # Do not save /bin paths to all_fixpath_prefixes!
39599  else
39600    # Not in mixed or Windows style, start by that.
39601    new_path=`cmd //c echo $new_path`
39602
39603  input_path="$new_path"
39604  # Check if we need to convert this using DOS-style short mode. If the path
39605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39606  # take no chances and rewrite it.
39607  # Note: m4 eats our [], so we need to use [ and ] instead.
39608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39609  if test "x$has_forbidden_chars" != x; then
39610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39612  fi
39613
39614    # Output is in $new_path
39615
39616  windows_path="$new_path"
39617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39618    unix_path=`$CYGPATH -u "$windows_path"`
39619    new_path="$unix_path"
39620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39622    new_path="$unix_path"
39623  fi
39624
39625    # remove trailing .exe if any
39626    new_path="${new_path/%.exe/}"
39627
39628    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39629    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39630  fi
39631
39632    else
39633      # We're on a unix platform. Hooray! :)
39634      # First separate the path from the arguments. This will split at the first
39635      # space.
39636      complete="$GNM"
39637      path="${complete%% *}"
39638      tmp="$complete EOL"
39639      arguments="${tmp#* }"
39640
39641      # Cannot rely on the command "which" here since it doesn't always work.
39642      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39643      if test -z "$is_absolute_path"; then
39644        # Path to executable is not absolute. Find it.
39645        IFS_save="$IFS"
39646        IFS=:
39647        for p in $PATH; do
39648          if test -f "$p/$path" && test -x "$p/$path"; then
39649            new_path="$p/$path"
39650            break
39651          fi
39652        done
39653        IFS="$IFS_save"
39654      else
39655        # This is an absolute path, we can use it without further modifications.
39656        new_path="$path"
39657      fi
39658
39659      if test "x$new_path" = x; then
39660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39661$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39662        has_space=`$ECHO "$complete" | $GREP " "`
39663        if test "x$has_space" != x; then
39664          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39665$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39666        fi
39667        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39668      fi
39669    fi
39670
39671    # Now join together the path and the arguments once again
39672    if test "x$arguments" != xEOL; then
39673      new_complete="$new_path ${arguments% *}"
39674    else
39675      new_complete="$new_path"
39676    fi
39677
39678    if test "x$complete" != "x$new_complete"; then
39679      GNM="$new_complete"
39680      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39681$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39682    fi
39683  fi
39684
39685  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39686    # FIXME: we should unify this with the solaris case above.
39687
39688
39689  # Publish this variable in the help.
39690
39691
39692  if [ -z "${STRIP+x}" ]; then
39693    # The variable is not set by user, try to locate tool using the code snippet
39694    if test -n "$ac_tool_prefix"; then
39695  for ac_prog in strip
39696  do
39697    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39698set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39700$as_echo_n "checking for $ac_word... " >&6; }
39701if ${ac_cv_prog_STRIP+:} false; then :
39702  $as_echo_n "(cached) " >&6
39703else
39704  if test -n "$STRIP"; then
39705  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39706else
39707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39708for as_dir in $PATH
39709do
39710  IFS=$as_save_IFS
39711  test -z "$as_dir" && as_dir=.
39712    for ac_exec_ext in '' $ac_executable_extensions; do
39713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39714    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39716    break 2
39717  fi
39718done
39719  done
39720IFS=$as_save_IFS
39721
39722fi
39723fi
39724STRIP=$ac_cv_prog_STRIP
39725if test -n "$STRIP"; then
39726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39727$as_echo "$STRIP" >&6; }
39728else
39729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39730$as_echo "no" >&6; }
39731fi
39732
39733
39734    test -n "$STRIP" && break
39735  done
39736fi
39737if test -z "$STRIP"; then
39738  ac_ct_STRIP=$STRIP
39739  for ac_prog in strip
39740do
39741  # Extract the first word of "$ac_prog", so it can be a program name with args.
39742set dummy $ac_prog; ac_word=$2
39743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39744$as_echo_n "checking for $ac_word... " >&6; }
39745if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39746  $as_echo_n "(cached) " >&6
39747else
39748  if test -n "$ac_ct_STRIP"; then
39749  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39750else
39751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39752for as_dir in $PATH
39753do
39754  IFS=$as_save_IFS
39755  test -z "$as_dir" && as_dir=.
39756    for ac_exec_ext in '' $ac_executable_extensions; do
39757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39758    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39760    break 2
39761  fi
39762done
39763  done
39764IFS=$as_save_IFS
39765
39766fi
39767fi
39768ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39769if test -n "$ac_ct_STRIP"; then
39770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39771$as_echo "$ac_ct_STRIP" >&6; }
39772else
39773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39774$as_echo "no" >&6; }
39775fi
39776
39777
39778  test -n "$ac_ct_STRIP" && break
39779done
39780
39781  if test "x$ac_ct_STRIP" = x; then
39782    STRIP=""
39783  else
39784    case $cross_compiling:$ac_tool_warned in
39785yes:)
39786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39788ac_tool_warned=yes ;;
39789esac
39790    STRIP=$ac_ct_STRIP
39791  fi
39792fi
39793
39794  else
39795    # The variable is set, but is it from the command line or the environment?
39796
39797    # Try to remove the string !STRIP! from our list.
39798    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39799    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39800      # If it failed, the variable was not from the command line. Ignore it,
39801      # but warn the user (except for BASH, which is always set by the calling BASH).
39802      if test "xSTRIP" != xBASH; then
39803        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39804$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39805      fi
39806      # Try to locate tool using the code snippet
39807      if test -n "$ac_tool_prefix"; then
39808  for ac_prog in strip
39809  do
39810    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39811set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39813$as_echo_n "checking for $ac_word... " >&6; }
39814if ${ac_cv_prog_STRIP+:} false; then :
39815  $as_echo_n "(cached) " >&6
39816else
39817  if test -n "$STRIP"; then
39818  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39819else
39820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39821for as_dir in $PATH
39822do
39823  IFS=$as_save_IFS
39824  test -z "$as_dir" && as_dir=.
39825    for ac_exec_ext in '' $ac_executable_extensions; do
39826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39827    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39829    break 2
39830  fi
39831done
39832  done
39833IFS=$as_save_IFS
39834
39835fi
39836fi
39837STRIP=$ac_cv_prog_STRIP
39838if test -n "$STRIP"; then
39839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39840$as_echo "$STRIP" >&6; }
39841else
39842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39843$as_echo "no" >&6; }
39844fi
39845
39846
39847    test -n "$STRIP" && break
39848  done
39849fi
39850if test -z "$STRIP"; then
39851  ac_ct_STRIP=$STRIP
39852  for ac_prog in strip
39853do
39854  # Extract the first word of "$ac_prog", so it can be a program name with args.
39855set dummy $ac_prog; ac_word=$2
39856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39857$as_echo_n "checking for $ac_word... " >&6; }
39858if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39859  $as_echo_n "(cached) " >&6
39860else
39861  if test -n "$ac_ct_STRIP"; then
39862  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39863else
39864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39865for as_dir in $PATH
39866do
39867  IFS=$as_save_IFS
39868  test -z "$as_dir" && as_dir=.
39869    for ac_exec_ext in '' $ac_executable_extensions; do
39870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39871    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39873    break 2
39874  fi
39875done
39876  done
39877IFS=$as_save_IFS
39878
39879fi
39880fi
39881ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39882if test -n "$ac_ct_STRIP"; then
39883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39884$as_echo "$ac_ct_STRIP" >&6; }
39885else
39886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39887$as_echo "no" >&6; }
39888fi
39889
39890
39891  test -n "$ac_ct_STRIP" && break
39892done
39893
39894  if test "x$ac_ct_STRIP" = x; then
39895    STRIP=""
39896  else
39897    case $cross_compiling:$ac_tool_warned in
39898yes:)
39899{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39900$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39901ac_tool_warned=yes ;;
39902esac
39903    STRIP=$ac_ct_STRIP
39904  fi
39905fi
39906
39907    else
39908      # If it succeeded, then it was overridden by the user. We will use it
39909      # for the tool.
39910
39911      # First remove it from the list of overridden variables, so we can test
39912      # for unknown variables in the end.
39913      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39914
39915      # Check if we try to supply an empty value
39916      if test "x$STRIP" = x; then
39917        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39918$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39920$as_echo_n "checking for STRIP... " >&6; }
39921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39922$as_echo "disabled" >&6; }
39923      else
39924        # Check if the provided tool contains a complete path.
39925        tool_specified="$STRIP"
39926        tool_basename="${tool_specified##*/}"
39927        if test "x$tool_basename" = "x$tool_specified"; then
39928          # A command without a complete path is provided, search $PATH.
39929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39930$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39931          # Extract the first word of "$tool_basename", so it can be a program name with args.
39932set dummy $tool_basename; ac_word=$2
39933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39934$as_echo_n "checking for $ac_word... " >&6; }
39935if ${ac_cv_path_STRIP+:} false; then :
39936  $as_echo_n "(cached) " >&6
39937else
39938  case $STRIP in
39939  [\\/]* | ?:[\\/]*)
39940  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39941  ;;
39942  *)
39943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39944for as_dir in $PATH
39945do
39946  IFS=$as_save_IFS
39947  test -z "$as_dir" && as_dir=.
39948    for ac_exec_ext in '' $ac_executable_extensions; do
39949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39950    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39952    break 2
39953  fi
39954done
39955  done
39956IFS=$as_save_IFS
39957
39958  ;;
39959esac
39960fi
39961STRIP=$ac_cv_path_STRIP
39962if test -n "$STRIP"; then
39963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39964$as_echo "$STRIP" >&6; }
39965else
39966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39967$as_echo "no" >&6; }
39968fi
39969
39970
39971          if test "x$STRIP" = x; then
39972            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39973          fi
39974        else
39975          # Otherwise we believe it is a complete path. Use it as it is.
39976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39977$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39978          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39979$as_echo_n "checking for STRIP... " >&6; }
39980          if test ! -x "$tool_specified"; then
39981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39982$as_echo "not found" >&6; }
39983            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39984          fi
39985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39986$as_echo "$tool_specified" >&6; }
39987        fi
39988      fi
39989    fi
39990
39991  fi
39992
39993
39994
39995  # Only process if variable expands to non-empty
39996
39997  if test "x$STRIP" != x; then
39998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39999
40000  # First separate the path from the arguments. This will split at the first
40001  # space.
40002  complete="$STRIP"
40003  path="${complete%% *}"
40004  tmp="$complete EOL"
40005  arguments="${tmp#* }"
40006
40007  # Input might be given as Windows format, start by converting to
40008  # unix format.
40009  new_path=`$CYGPATH -u "$path"`
40010
40011  # Now try to locate executable using which
40012  new_path=`$WHICH "$new_path" 2> /dev/null`
40013  # bat and cmd files are not always considered executable in cygwin causing which
40014  # to not find them
40015  if test "x$new_path" = x \
40016      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40017      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40018    new_path=`$CYGPATH -u "$path"`
40019  fi
40020  if test "x$new_path" = x; then
40021    # Oops. Which didn't find the executable.
40022    # The splitting of arguments from the executable at a space might have been incorrect,
40023    # since paths with space are more likely in Windows. Give it another try with the whole
40024    # argument.
40025    path="$complete"
40026    arguments="EOL"
40027    new_path=`$CYGPATH -u "$path"`
40028    new_path=`$WHICH "$new_path" 2> /dev/null`
40029    # bat and cmd files are not always considered executable in cygwin causing which
40030    # to not find them
40031    if test "x$new_path" = x \
40032        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40033        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40034      new_path=`$CYGPATH -u "$path"`
40035    fi
40036    if test "x$new_path" = x; then
40037      # It's still not found. Now this is an unrecoverable error.
40038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40039$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40040      has_space=`$ECHO "$complete" | $GREP " "`
40041      if test "x$has_space" != x; then
40042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40044      fi
40045      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40046    fi
40047  fi
40048
40049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40052  # "foo.exe" is OK but "foo" is an error.
40053  #
40054  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40055  # It is also a way to make sure we got the proper file name for the real test later on.
40056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40057  if test "x$test_shortpath" = x; then
40058    # Short path failed, file does not exist as specified.
40059    # Try adding .exe or .cmd
40060    if test -f "${new_path}.exe"; then
40061      input_to_shortpath="${new_path}.exe"
40062    elif test -f "${new_path}.cmd"; then
40063      input_to_shortpath="${new_path}.cmd"
40064    else
40065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40066$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40067      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40068$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40069      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40070    fi
40071  else
40072    input_to_shortpath="$new_path"
40073  fi
40074
40075  # Call helper function which possibly converts this using DOS-style short mode.
40076  # If so, the updated path is stored in $new_path.
40077  new_path="$input_to_shortpath"
40078
40079  input_path="$input_to_shortpath"
40080  # Check if we need to convert this using DOS-style short mode. If the path
40081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40082  # take no chances and rewrite it.
40083  # Note: m4 eats our [], so we need to use [ and ] instead.
40084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40085  if test "x$has_forbidden_chars" != x; then
40086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40090      # Going to short mode and back again did indeed matter. Since short mode is
40091      # case insensitive, let's make it lowercase to improve readability.
40092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40093      # Now convert it back to Unix-style (cygpath)
40094      input_path=`$CYGPATH -u "$shortmode_path"`
40095      new_path="$input_path"
40096    fi
40097  fi
40098
40099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40100  if test "x$test_cygdrive_prefix" = x; then
40101    # As a simple fix, exclude /usr/bin since it's not a real path.
40102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40104      # a path prefixed by /cygdrive for fixpath to work.
40105      new_path="$CYGWIN_ROOT_PATH$input_path"
40106    fi
40107  fi
40108
40109  # remove trailing .exe if any
40110  new_path="${new_path/%.exe/}"
40111
40112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40113
40114  # First separate the path from the arguments. This will split at the first
40115  # space.
40116  complete="$STRIP"
40117  path="${complete%% *}"
40118  tmp="$complete EOL"
40119  arguments="${tmp#* }"
40120
40121  # Input might be given as Windows format, start by converting to
40122  # unix format.
40123  new_path="$path"
40124
40125  windows_path="$new_path"
40126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40127    unix_path=`$CYGPATH -u "$windows_path"`
40128    new_path="$unix_path"
40129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40131    new_path="$unix_path"
40132  fi
40133
40134
40135  # Now try to locate executable using which
40136  new_path=`$WHICH "$new_path" 2> /dev/null`
40137
40138  if test "x$new_path" = x; then
40139    # Oops. Which didn't find the executable.
40140    # The splitting of arguments from the executable at a space might have been incorrect,
40141    # since paths with space are more likely in Windows. Give it another try with the whole
40142    # argument.
40143    path="$complete"
40144    arguments="EOL"
40145    new_path="$path"
40146
40147  windows_path="$new_path"
40148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40149    unix_path=`$CYGPATH -u "$windows_path"`
40150    new_path="$unix_path"
40151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40153    new_path="$unix_path"
40154  fi
40155
40156
40157    new_path=`$WHICH "$new_path" 2> /dev/null`
40158    # bat and cmd files are not always considered executable in MSYS causing which
40159    # to not find them
40160    if test "x$new_path" = x \
40161        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40162        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40163      new_path="$path"
40164
40165  windows_path="$new_path"
40166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40167    unix_path=`$CYGPATH -u "$windows_path"`
40168    new_path="$unix_path"
40169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40171    new_path="$unix_path"
40172  fi
40173
40174    fi
40175
40176    if test "x$new_path" = x; then
40177      # It's still not found. Now this is an unrecoverable error.
40178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40179$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40180      has_space=`$ECHO "$complete" | $GREP " "`
40181      if test "x$has_space" != x; then
40182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40184      fi
40185      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40186    fi
40187  fi
40188
40189  # Now new_path has a complete unix path to the binary
40190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40191    # Keep paths in /bin as-is, but remove trailing .exe if any
40192    new_path="${new_path/%.exe/}"
40193    # Do not save /bin paths to all_fixpath_prefixes!
40194  else
40195    # Not in mixed or Windows style, start by that.
40196    new_path=`cmd //c echo $new_path`
40197
40198  input_path="$new_path"
40199  # Check if we need to convert this using DOS-style short mode. If the path
40200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40201  # take no chances and rewrite it.
40202  # Note: m4 eats our [], so we need to use [ and ] instead.
40203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40204  if test "x$has_forbidden_chars" != x; then
40205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40207  fi
40208
40209    # Output is in $new_path
40210
40211  windows_path="$new_path"
40212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40213    unix_path=`$CYGPATH -u "$windows_path"`
40214    new_path="$unix_path"
40215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40217    new_path="$unix_path"
40218  fi
40219
40220    # remove trailing .exe if any
40221    new_path="${new_path/%.exe/}"
40222
40223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40225  fi
40226
40227    else
40228      # We're on a unix platform. Hooray! :)
40229      # First separate the path from the arguments. This will split at the first
40230      # space.
40231      complete="$STRIP"
40232      path="${complete%% *}"
40233      tmp="$complete EOL"
40234      arguments="${tmp#* }"
40235
40236      # Cannot rely on the command "which" here since it doesn't always work.
40237      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40238      if test -z "$is_absolute_path"; then
40239        # Path to executable is not absolute. Find it.
40240        IFS_save="$IFS"
40241        IFS=:
40242        for p in $PATH; do
40243          if test -f "$p/$path" && test -x "$p/$path"; then
40244            new_path="$p/$path"
40245            break
40246          fi
40247        done
40248        IFS="$IFS_save"
40249      else
40250        # This is an absolute path, we can use it without further modifications.
40251        new_path="$path"
40252      fi
40253
40254      if test "x$new_path" = x; then
40255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40256$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40257        has_space=`$ECHO "$complete" | $GREP " "`
40258        if test "x$has_space" != x; then
40259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40261        fi
40262        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40263      fi
40264    fi
40265
40266    # Now join together the path and the arguments once again
40267    if test "x$arguments" != xEOL; then
40268      new_complete="$new_path ${arguments% *}"
40269    else
40270      new_complete="$new_path"
40271    fi
40272
40273    if test "x$complete" != "x$new_complete"; then
40274      STRIP="$new_complete"
40275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40276$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40277    fi
40278  fi
40279
40280
40281
40282  # Publish this variable in the help.
40283
40284
40285  if [ -z "${NM+x}" ]; then
40286    # The variable is not set by user, try to locate tool using the code snippet
40287    if test -n "$ac_tool_prefix"; then
40288  for ac_prog in nm
40289  do
40290    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40291set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40293$as_echo_n "checking for $ac_word... " >&6; }
40294if ${ac_cv_prog_NM+:} false; then :
40295  $as_echo_n "(cached) " >&6
40296else
40297  if test -n "$NM"; then
40298  ac_cv_prog_NM="$NM" # Let the user override the test.
40299else
40300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40301for as_dir in $PATH
40302do
40303  IFS=$as_save_IFS
40304  test -z "$as_dir" && as_dir=.
40305    for ac_exec_ext in '' $ac_executable_extensions; do
40306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40307    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40309    break 2
40310  fi
40311done
40312  done
40313IFS=$as_save_IFS
40314
40315fi
40316fi
40317NM=$ac_cv_prog_NM
40318if test -n "$NM"; then
40319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40320$as_echo "$NM" >&6; }
40321else
40322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40323$as_echo "no" >&6; }
40324fi
40325
40326
40327    test -n "$NM" && break
40328  done
40329fi
40330if test -z "$NM"; then
40331  ac_ct_NM=$NM
40332  for ac_prog in nm
40333do
40334  # Extract the first word of "$ac_prog", so it can be a program name with args.
40335set dummy $ac_prog; ac_word=$2
40336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40337$as_echo_n "checking for $ac_word... " >&6; }
40338if ${ac_cv_prog_ac_ct_NM+:} false; then :
40339  $as_echo_n "(cached) " >&6
40340else
40341  if test -n "$ac_ct_NM"; then
40342  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40343else
40344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40345for as_dir in $PATH
40346do
40347  IFS=$as_save_IFS
40348  test -z "$as_dir" && as_dir=.
40349    for ac_exec_ext in '' $ac_executable_extensions; do
40350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40351    ac_cv_prog_ac_ct_NM="$ac_prog"
40352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40353    break 2
40354  fi
40355done
40356  done
40357IFS=$as_save_IFS
40358
40359fi
40360fi
40361ac_ct_NM=$ac_cv_prog_ac_ct_NM
40362if test -n "$ac_ct_NM"; then
40363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40364$as_echo "$ac_ct_NM" >&6; }
40365else
40366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40367$as_echo "no" >&6; }
40368fi
40369
40370
40371  test -n "$ac_ct_NM" && break
40372done
40373
40374  if test "x$ac_ct_NM" = x; then
40375    NM=""
40376  else
40377    case $cross_compiling:$ac_tool_warned in
40378yes:)
40379{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40380$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40381ac_tool_warned=yes ;;
40382esac
40383    NM=$ac_ct_NM
40384  fi
40385fi
40386
40387  else
40388    # The variable is set, but is it from the command line or the environment?
40389
40390    # Try to remove the string !NM! from our list.
40391    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40392    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40393      # If it failed, the variable was not from the command line. Ignore it,
40394      # but warn the user (except for BASH, which is always set by the calling BASH).
40395      if test "xNM" != xBASH; then
40396        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40397$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40398      fi
40399      # Try to locate tool using the code snippet
40400      if test -n "$ac_tool_prefix"; then
40401  for ac_prog in nm
40402  do
40403    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40404set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40406$as_echo_n "checking for $ac_word... " >&6; }
40407if ${ac_cv_prog_NM+:} false; then :
40408  $as_echo_n "(cached) " >&6
40409else
40410  if test -n "$NM"; then
40411  ac_cv_prog_NM="$NM" # Let the user override the test.
40412else
40413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40414for as_dir in $PATH
40415do
40416  IFS=$as_save_IFS
40417  test -z "$as_dir" && as_dir=.
40418    for ac_exec_ext in '' $ac_executable_extensions; do
40419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40420    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40422    break 2
40423  fi
40424done
40425  done
40426IFS=$as_save_IFS
40427
40428fi
40429fi
40430NM=$ac_cv_prog_NM
40431if test -n "$NM"; then
40432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40433$as_echo "$NM" >&6; }
40434else
40435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40436$as_echo "no" >&6; }
40437fi
40438
40439
40440    test -n "$NM" && break
40441  done
40442fi
40443if test -z "$NM"; then
40444  ac_ct_NM=$NM
40445  for ac_prog in nm
40446do
40447  # Extract the first word of "$ac_prog", so it can be a program name with args.
40448set dummy $ac_prog; ac_word=$2
40449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40450$as_echo_n "checking for $ac_word... " >&6; }
40451if ${ac_cv_prog_ac_ct_NM+:} false; then :
40452  $as_echo_n "(cached) " >&6
40453else
40454  if test -n "$ac_ct_NM"; then
40455  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40456else
40457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40458for as_dir in $PATH
40459do
40460  IFS=$as_save_IFS
40461  test -z "$as_dir" && as_dir=.
40462    for ac_exec_ext in '' $ac_executable_extensions; do
40463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40464    ac_cv_prog_ac_ct_NM="$ac_prog"
40465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40466    break 2
40467  fi
40468done
40469  done
40470IFS=$as_save_IFS
40471
40472fi
40473fi
40474ac_ct_NM=$ac_cv_prog_ac_ct_NM
40475if test -n "$ac_ct_NM"; then
40476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40477$as_echo "$ac_ct_NM" >&6; }
40478else
40479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40480$as_echo "no" >&6; }
40481fi
40482
40483
40484  test -n "$ac_ct_NM" && break
40485done
40486
40487  if test "x$ac_ct_NM" = x; then
40488    NM=""
40489  else
40490    case $cross_compiling:$ac_tool_warned in
40491yes:)
40492{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40493$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40494ac_tool_warned=yes ;;
40495esac
40496    NM=$ac_ct_NM
40497  fi
40498fi
40499
40500    else
40501      # If it succeeded, then it was overridden by the user. We will use it
40502      # for the tool.
40503
40504      # First remove it from the list of overridden variables, so we can test
40505      # for unknown variables in the end.
40506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40507
40508      # Check if we try to supply an empty value
40509      if test "x$NM" = x; then
40510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40511$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40513$as_echo_n "checking for NM... " >&6; }
40514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40515$as_echo "disabled" >&6; }
40516      else
40517        # Check if the provided tool contains a complete path.
40518        tool_specified="$NM"
40519        tool_basename="${tool_specified##*/}"
40520        if test "x$tool_basename" = "x$tool_specified"; then
40521          # A command without a complete path is provided, search $PATH.
40522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40523$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40524          # Extract the first word of "$tool_basename", so it can be a program name with args.
40525set dummy $tool_basename; ac_word=$2
40526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40527$as_echo_n "checking for $ac_word... " >&6; }
40528if ${ac_cv_path_NM+:} false; then :
40529  $as_echo_n "(cached) " >&6
40530else
40531  case $NM in
40532  [\\/]* | ?:[\\/]*)
40533  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40534  ;;
40535  *)
40536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40537for as_dir in $PATH
40538do
40539  IFS=$as_save_IFS
40540  test -z "$as_dir" && as_dir=.
40541    for ac_exec_ext in '' $ac_executable_extensions; do
40542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40543    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40545    break 2
40546  fi
40547done
40548  done
40549IFS=$as_save_IFS
40550
40551  ;;
40552esac
40553fi
40554NM=$ac_cv_path_NM
40555if test -n "$NM"; then
40556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40557$as_echo "$NM" >&6; }
40558else
40559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40560$as_echo "no" >&6; }
40561fi
40562
40563
40564          if test "x$NM" = x; then
40565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40566          fi
40567        else
40568          # Otherwise we believe it is a complete path. Use it as it is.
40569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40570$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40572$as_echo_n "checking for NM... " >&6; }
40573          if test ! -x "$tool_specified"; then
40574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40575$as_echo "not found" >&6; }
40576            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40577          fi
40578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40579$as_echo "$tool_specified" >&6; }
40580        fi
40581      fi
40582    fi
40583
40584  fi
40585
40586
40587
40588  # Only process if variable expands to non-empty
40589
40590  if test "x$NM" != x; then
40591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40592
40593  # First separate the path from the arguments. This will split at the first
40594  # space.
40595  complete="$NM"
40596  path="${complete%% *}"
40597  tmp="$complete EOL"
40598  arguments="${tmp#* }"
40599
40600  # Input might be given as Windows format, start by converting to
40601  # unix format.
40602  new_path=`$CYGPATH -u "$path"`
40603
40604  # Now try to locate executable using which
40605  new_path=`$WHICH "$new_path" 2> /dev/null`
40606  # bat and cmd files are not always considered executable in cygwin causing which
40607  # to not find them
40608  if test "x$new_path" = x \
40609      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40610      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40611    new_path=`$CYGPATH -u "$path"`
40612  fi
40613  if test "x$new_path" = x; then
40614    # Oops. Which didn't find the executable.
40615    # The splitting of arguments from the executable at a space might have been incorrect,
40616    # since paths with space are more likely in Windows. Give it another try with the whole
40617    # argument.
40618    path="$complete"
40619    arguments="EOL"
40620    new_path=`$CYGPATH -u "$path"`
40621    new_path=`$WHICH "$new_path" 2> /dev/null`
40622    # bat and cmd files are not always considered executable in cygwin causing which
40623    # to not find them
40624    if test "x$new_path" = x \
40625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40627      new_path=`$CYGPATH -u "$path"`
40628    fi
40629    if test "x$new_path" = x; then
40630      # It's still not found. Now this is an unrecoverable error.
40631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40632$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40633      has_space=`$ECHO "$complete" | $GREP " "`
40634      if test "x$has_space" != x; then
40635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40637      fi
40638      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40639    fi
40640  fi
40641
40642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40645  # "foo.exe" is OK but "foo" is an error.
40646  #
40647  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40648  # It is also a way to make sure we got the proper file name for the real test later on.
40649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40650  if test "x$test_shortpath" = x; then
40651    # Short path failed, file does not exist as specified.
40652    # Try adding .exe or .cmd
40653    if test -f "${new_path}.exe"; then
40654      input_to_shortpath="${new_path}.exe"
40655    elif test -f "${new_path}.cmd"; then
40656      input_to_shortpath="${new_path}.cmd"
40657    else
40658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40659$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40660      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40661$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40662      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40663    fi
40664  else
40665    input_to_shortpath="$new_path"
40666  fi
40667
40668  # Call helper function which possibly converts this using DOS-style short mode.
40669  # If so, the updated path is stored in $new_path.
40670  new_path="$input_to_shortpath"
40671
40672  input_path="$input_to_shortpath"
40673  # Check if we need to convert this using DOS-style short mode. If the path
40674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40675  # take no chances and rewrite it.
40676  # Note: m4 eats our [], so we need to use [ and ] instead.
40677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40678  if test "x$has_forbidden_chars" != x; then
40679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40683      # Going to short mode and back again did indeed matter. Since short mode is
40684      # case insensitive, let's make it lowercase to improve readability.
40685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40686      # Now convert it back to Unix-style (cygpath)
40687      input_path=`$CYGPATH -u "$shortmode_path"`
40688      new_path="$input_path"
40689    fi
40690  fi
40691
40692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40693  if test "x$test_cygdrive_prefix" = x; then
40694    # As a simple fix, exclude /usr/bin since it's not a real path.
40695    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40697      # a path prefixed by /cygdrive for fixpath to work.
40698      new_path="$CYGWIN_ROOT_PATH$input_path"
40699    fi
40700  fi
40701
40702  # remove trailing .exe if any
40703  new_path="${new_path/%.exe/}"
40704
40705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40706
40707  # First separate the path from the arguments. This will split at the first
40708  # space.
40709  complete="$NM"
40710  path="${complete%% *}"
40711  tmp="$complete EOL"
40712  arguments="${tmp#* }"
40713
40714  # Input might be given as Windows format, start by converting to
40715  # unix format.
40716  new_path="$path"
40717
40718  windows_path="$new_path"
40719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40720    unix_path=`$CYGPATH -u "$windows_path"`
40721    new_path="$unix_path"
40722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40724    new_path="$unix_path"
40725  fi
40726
40727
40728  # Now try to locate executable using which
40729  new_path=`$WHICH "$new_path" 2> /dev/null`
40730
40731  if test "x$new_path" = x; then
40732    # Oops. Which didn't find the executable.
40733    # The splitting of arguments from the executable at a space might have been incorrect,
40734    # since paths with space are more likely in Windows. Give it another try with the whole
40735    # argument.
40736    path="$complete"
40737    arguments="EOL"
40738    new_path="$path"
40739
40740  windows_path="$new_path"
40741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40742    unix_path=`$CYGPATH -u "$windows_path"`
40743    new_path="$unix_path"
40744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40746    new_path="$unix_path"
40747  fi
40748
40749
40750    new_path=`$WHICH "$new_path" 2> /dev/null`
40751    # bat and cmd files are not always considered executable in MSYS causing which
40752    # to not find them
40753    if test "x$new_path" = x \
40754        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40755        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40756      new_path="$path"
40757
40758  windows_path="$new_path"
40759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40760    unix_path=`$CYGPATH -u "$windows_path"`
40761    new_path="$unix_path"
40762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40764    new_path="$unix_path"
40765  fi
40766
40767    fi
40768
40769    if test "x$new_path" = x; then
40770      # It's still not found. Now this is an unrecoverable error.
40771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40772$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40773      has_space=`$ECHO "$complete" | $GREP " "`
40774      if test "x$has_space" != x; then
40775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40777      fi
40778      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40779    fi
40780  fi
40781
40782  # Now new_path has a complete unix path to the binary
40783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40784    # Keep paths in /bin as-is, but remove trailing .exe if any
40785    new_path="${new_path/%.exe/}"
40786    # Do not save /bin paths to all_fixpath_prefixes!
40787  else
40788    # Not in mixed or Windows style, start by that.
40789    new_path=`cmd //c echo $new_path`
40790
40791  input_path="$new_path"
40792  # Check if we need to convert this using DOS-style short mode. If the path
40793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40794  # take no chances and rewrite it.
40795  # Note: m4 eats our [], so we need to use [ and ] instead.
40796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40797  if test "x$has_forbidden_chars" != x; then
40798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40800  fi
40801
40802    # Output is in $new_path
40803
40804  windows_path="$new_path"
40805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40806    unix_path=`$CYGPATH -u "$windows_path"`
40807    new_path="$unix_path"
40808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40810    new_path="$unix_path"
40811  fi
40812
40813    # remove trailing .exe if any
40814    new_path="${new_path/%.exe/}"
40815
40816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40818  fi
40819
40820    else
40821      # We're on a unix platform. Hooray! :)
40822      # First separate the path from the arguments. This will split at the first
40823      # space.
40824      complete="$NM"
40825      path="${complete%% *}"
40826      tmp="$complete EOL"
40827      arguments="${tmp#* }"
40828
40829      # Cannot rely on the command "which" here since it doesn't always work.
40830      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40831      if test -z "$is_absolute_path"; then
40832        # Path to executable is not absolute. Find it.
40833        IFS_save="$IFS"
40834        IFS=:
40835        for p in $PATH; do
40836          if test -f "$p/$path" && test -x "$p/$path"; then
40837            new_path="$p/$path"
40838            break
40839          fi
40840        done
40841        IFS="$IFS_save"
40842      else
40843        # This is an absolute path, we can use it without further modifications.
40844        new_path="$path"
40845      fi
40846
40847      if test "x$new_path" = x; then
40848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40849$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40850        has_space=`$ECHO "$complete" | $GREP " "`
40851        if test "x$has_space" != x; then
40852          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40853$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40854        fi
40855        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40856      fi
40857    fi
40858
40859    # Now join together the path and the arguments once again
40860    if test "x$arguments" != xEOL; then
40861      new_complete="$new_path ${arguments% *}"
40862    else
40863      new_complete="$new_path"
40864    fi
40865
40866    if test "x$complete" != "x$new_complete"; then
40867      NM="$new_complete"
40868      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40869$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40870    fi
40871  fi
40872
40873    GNM="$NM"
40874
40875  fi
40876
40877  # objcopy is used for moving debug symbols to separate files when
40878  # full debug symbols are enabled.
40879  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40880
40881
40882  # Publish this variable in the help.
40883
40884
40885  if [ -z "${OBJCOPY+x}" ]; then
40886    # The variable is not set by user, try to locate tool using the code snippet
40887    if test -n "$ac_tool_prefix"; then
40888  for ac_prog in gobjcopy objcopy
40889  do
40890    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40891set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40893$as_echo_n "checking for $ac_word... " >&6; }
40894if ${ac_cv_prog_OBJCOPY+:} false; then :
40895  $as_echo_n "(cached) " >&6
40896else
40897  if test -n "$OBJCOPY"; then
40898  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40899else
40900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40901for as_dir in $PATH
40902do
40903  IFS=$as_save_IFS
40904  test -z "$as_dir" && as_dir=.
40905    for ac_exec_ext in '' $ac_executable_extensions; do
40906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40907    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40909    break 2
40910  fi
40911done
40912  done
40913IFS=$as_save_IFS
40914
40915fi
40916fi
40917OBJCOPY=$ac_cv_prog_OBJCOPY
40918if test -n "$OBJCOPY"; then
40919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40920$as_echo "$OBJCOPY" >&6; }
40921else
40922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40923$as_echo "no" >&6; }
40924fi
40925
40926
40927    test -n "$OBJCOPY" && break
40928  done
40929fi
40930if test -z "$OBJCOPY"; then
40931  ac_ct_OBJCOPY=$OBJCOPY
40932  for ac_prog in gobjcopy objcopy
40933do
40934  # Extract the first word of "$ac_prog", so it can be a program name with args.
40935set dummy $ac_prog; ac_word=$2
40936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40937$as_echo_n "checking for $ac_word... " >&6; }
40938if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40939  $as_echo_n "(cached) " >&6
40940else
40941  if test -n "$ac_ct_OBJCOPY"; then
40942  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40943else
40944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40945for as_dir in $PATH
40946do
40947  IFS=$as_save_IFS
40948  test -z "$as_dir" && as_dir=.
40949    for ac_exec_ext in '' $ac_executable_extensions; do
40950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40951    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40953    break 2
40954  fi
40955done
40956  done
40957IFS=$as_save_IFS
40958
40959fi
40960fi
40961ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40962if test -n "$ac_ct_OBJCOPY"; then
40963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40964$as_echo "$ac_ct_OBJCOPY" >&6; }
40965else
40966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40967$as_echo "no" >&6; }
40968fi
40969
40970
40971  test -n "$ac_ct_OBJCOPY" && break
40972done
40973
40974  if test "x$ac_ct_OBJCOPY" = x; then
40975    OBJCOPY=""
40976  else
40977    case $cross_compiling:$ac_tool_warned in
40978yes:)
40979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40981ac_tool_warned=yes ;;
40982esac
40983    OBJCOPY=$ac_ct_OBJCOPY
40984  fi
40985fi
40986
40987  else
40988    # The variable is set, but is it from the command line or the environment?
40989
40990    # Try to remove the string !OBJCOPY! from our list.
40991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
40992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40993      # If it failed, the variable was not from the command line. Ignore it,
40994      # but warn the user (except for BASH, which is always set by the calling BASH).
40995      if test "xOBJCOPY" != xBASH; then
40996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
40997$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
40998      fi
40999      # Try to locate tool using the code snippet
41000      if test -n "$ac_tool_prefix"; then
41001  for ac_prog in gobjcopy objcopy
41002  do
41003    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41004set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41006$as_echo_n "checking for $ac_word... " >&6; }
41007if ${ac_cv_prog_OBJCOPY+:} false; then :
41008  $as_echo_n "(cached) " >&6
41009else
41010  if test -n "$OBJCOPY"; then
41011  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41012else
41013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41014for as_dir in $PATH
41015do
41016  IFS=$as_save_IFS
41017  test -z "$as_dir" && as_dir=.
41018    for ac_exec_ext in '' $ac_executable_extensions; do
41019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41020    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41022    break 2
41023  fi
41024done
41025  done
41026IFS=$as_save_IFS
41027
41028fi
41029fi
41030OBJCOPY=$ac_cv_prog_OBJCOPY
41031if test -n "$OBJCOPY"; then
41032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41033$as_echo "$OBJCOPY" >&6; }
41034else
41035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41036$as_echo "no" >&6; }
41037fi
41038
41039
41040    test -n "$OBJCOPY" && break
41041  done
41042fi
41043if test -z "$OBJCOPY"; then
41044  ac_ct_OBJCOPY=$OBJCOPY
41045  for ac_prog in gobjcopy objcopy
41046do
41047  # Extract the first word of "$ac_prog", so it can be a program name with args.
41048set dummy $ac_prog; ac_word=$2
41049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41050$as_echo_n "checking for $ac_word... " >&6; }
41051if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41052  $as_echo_n "(cached) " >&6
41053else
41054  if test -n "$ac_ct_OBJCOPY"; then
41055  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41056else
41057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41058for as_dir in $PATH
41059do
41060  IFS=$as_save_IFS
41061  test -z "$as_dir" && as_dir=.
41062    for ac_exec_ext in '' $ac_executable_extensions; do
41063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41064    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41066    break 2
41067  fi
41068done
41069  done
41070IFS=$as_save_IFS
41071
41072fi
41073fi
41074ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41075if test -n "$ac_ct_OBJCOPY"; then
41076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41077$as_echo "$ac_ct_OBJCOPY" >&6; }
41078else
41079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41080$as_echo "no" >&6; }
41081fi
41082
41083
41084  test -n "$ac_ct_OBJCOPY" && break
41085done
41086
41087  if test "x$ac_ct_OBJCOPY" = x; then
41088    OBJCOPY=""
41089  else
41090    case $cross_compiling:$ac_tool_warned in
41091yes:)
41092{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41093$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41094ac_tool_warned=yes ;;
41095esac
41096    OBJCOPY=$ac_ct_OBJCOPY
41097  fi
41098fi
41099
41100    else
41101      # If it succeeded, then it was overridden by the user. We will use it
41102      # for the tool.
41103
41104      # First remove it from the list of overridden variables, so we can test
41105      # for unknown variables in the end.
41106      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41107
41108      # Check if we try to supply an empty value
41109      if test "x$OBJCOPY" = x; then
41110        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41111$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41113$as_echo_n "checking for OBJCOPY... " >&6; }
41114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41115$as_echo "disabled" >&6; }
41116      else
41117        # Check if the provided tool contains a complete path.
41118        tool_specified="$OBJCOPY"
41119        tool_basename="${tool_specified##*/}"
41120        if test "x$tool_basename" = "x$tool_specified"; then
41121          # A command without a complete path is provided, search $PATH.
41122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41123$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41124          # Extract the first word of "$tool_basename", so it can be a program name with args.
41125set dummy $tool_basename; ac_word=$2
41126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41127$as_echo_n "checking for $ac_word... " >&6; }
41128if ${ac_cv_path_OBJCOPY+:} false; then :
41129  $as_echo_n "(cached) " >&6
41130else
41131  case $OBJCOPY in
41132  [\\/]* | ?:[\\/]*)
41133  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41134  ;;
41135  *)
41136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41137for as_dir in $PATH
41138do
41139  IFS=$as_save_IFS
41140  test -z "$as_dir" && as_dir=.
41141    for ac_exec_ext in '' $ac_executable_extensions; do
41142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41143    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41145    break 2
41146  fi
41147done
41148  done
41149IFS=$as_save_IFS
41150
41151  ;;
41152esac
41153fi
41154OBJCOPY=$ac_cv_path_OBJCOPY
41155if test -n "$OBJCOPY"; then
41156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41157$as_echo "$OBJCOPY" >&6; }
41158else
41159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41160$as_echo "no" >&6; }
41161fi
41162
41163
41164          if test "x$OBJCOPY" = x; then
41165            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41166          fi
41167        else
41168          # Otherwise we believe it is a complete path. Use it as it is.
41169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41170$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41171          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41172$as_echo_n "checking for OBJCOPY... " >&6; }
41173          if test ! -x "$tool_specified"; then
41174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41175$as_echo "not found" >&6; }
41176            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41177          fi
41178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41179$as_echo "$tool_specified" >&6; }
41180        fi
41181      fi
41182    fi
41183
41184  fi
41185
41186
41187    # Only call fixup if objcopy was found.
41188    if test -n "$OBJCOPY"; then
41189
41190  # Only process if variable expands to non-empty
41191
41192  if test "x$OBJCOPY" != x; then
41193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41194
41195  # First separate the path from the arguments. This will split at the first
41196  # space.
41197  complete="$OBJCOPY"
41198  path="${complete%% *}"
41199  tmp="$complete EOL"
41200  arguments="${tmp#* }"
41201
41202  # Input might be given as Windows format, start by converting to
41203  # unix format.
41204  new_path=`$CYGPATH -u "$path"`
41205
41206  # Now try to locate executable using which
41207  new_path=`$WHICH "$new_path" 2> /dev/null`
41208  # bat and cmd files are not always considered executable in cygwin causing which
41209  # to not find them
41210  if test "x$new_path" = x \
41211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41213    new_path=`$CYGPATH -u "$path"`
41214  fi
41215  if test "x$new_path" = x; then
41216    # Oops. Which didn't find the executable.
41217    # The splitting of arguments from the executable at a space might have been incorrect,
41218    # since paths with space are more likely in Windows. Give it another try with the whole
41219    # argument.
41220    path="$complete"
41221    arguments="EOL"
41222    new_path=`$CYGPATH -u "$path"`
41223    new_path=`$WHICH "$new_path" 2> /dev/null`
41224    # bat and cmd files are not always considered executable in cygwin causing which
41225    # to not find them
41226    if test "x$new_path" = x \
41227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41229      new_path=`$CYGPATH -u "$path"`
41230    fi
41231    if test "x$new_path" = x; then
41232      # It's still not found. Now this is an unrecoverable error.
41233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41234$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41235      has_space=`$ECHO "$complete" | $GREP " "`
41236      if test "x$has_space" != x; then
41237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41239      fi
41240      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41241    fi
41242  fi
41243
41244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41247  # "foo.exe" is OK but "foo" is an error.
41248  #
41249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41250  # It is also a way to make sure we got the proper file name for the real test later on.
41251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41252  if test "x$test_shortpath" = x; then
41253    # Short path failed, file does not exist as specified.
41254    # Try adding .exe or .cmd
41255    if test -f "${new_path}.exe"; then
41256      input_to_shortpath="${new_path}.exe"
41257    elif test -f "${new_path}.cmd"; then
41258      input_to_shortpath="${new_path}.cmd"
41259    else
41260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41261$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41264      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41265    fi
41266  else
41267    input_to_shortpath="$new_path"
41268  fi
41269
41270  # Call helper function which possibly converts this using DOS-style short mode.
41271  # If so, the updated path is stored in $new_path.
41272  new_path="$input_to_shortpath"
41273
41274  input_path="$input_to_shortpath"
41275  # Check if we need to convert this using DOS-style short mode. If the path
41276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41277  # take no chances and rewrite it.
41278  # Note: m4 eats our [], so we need to use [ and ] instead.
41279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41280  if test "x$has_forbidden_chars" != x; then
41281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41285      # Going to short mode and back again did indeed matter. Since short mode is
41286      # case insensitive, let's make it lowercase to improve readability.
41287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41288      # Now convert it back to Unix-style (cygpath)
41289      input_path=`$CYGPATH -u "$shortmode_path"`
41290      new_path="$input_path"
41291    fi
41292  fi
41293
41294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41295  if test "x$test_cygdrive_prefix" = x; then
41296    # As a simple fix, exclude /usr/bin since it's not a real path.
41297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41299      # a path prefixed by /cygdrive for fixpath to work.
41300      new_path="$CYGWIN_ROOT_PATH$input_path"
41301    fi
41302  fi
41303
41304  # remove trailing .exe if any
41305  new_path="${new_path/%.exe/}"
41306
41307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41308
41309  # First separate the path from the arguments. This will split at the first
41310  # space.
41311  complete="$OBJCOPY"
41312  path="${complete%% *}"
41313  tmp="$complete EOL"
41314  arguments="${tmp#* }"
41315
41316  # Input might be given as Windows format, start by converting to
41317  # unix format.
41318  new_path="$path"
41319
41320  windows_path="$new_path"
41321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41322    unix_path=`$CYGPATH -u "$windows_path"`
41323    new_path="$unix_path"
41324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41326    new_path="$unix_path"
41327  fi
41328
41329
41330  # Now try to locate executable using which
41331  new_path=`$WHICH "$new_path" 2> /dev/null`
41332
41333  if test "x$new_path" = x; then
41334    # Oops. Which didn't find the executable.
41335    # The splitting of arguments from the executable at a space might have been incorrect,
41336    # since paths with space are more likely in Windows. Give it another try with the whole
41337    # argument.
41338    path="$complete"
41339    arguments="EOL"
41340    new_path="$path"
41341
41342  windows_path="$new_path"
41343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41344    unix_path=`$CYGPATH -u "$windows_path"`
41345    new_path="$unix_path"
41346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41348    new_path="$unix_path"
41349  fi
41350
41351
41352    new_path=`$WHICH "$new_path" 2> /dev/null`
41353    # bat and cmd files are not always considered executable in MSYS causing which
41354    # to not find them
41355    if test "x$new_path" = x \
41356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41358      new_path="$path"
41359
41360  windows_path="$new_path"
41361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41362    unix_path=`$CYGPATH -u "$windows_path"`
41363    new_path="$unix_path"
41364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41366    new_path="$unix_path"
41367  fi
41368
41369    fi
41370
41371    if test "x$new_path" = x; then
41372      # It's still not found. Now this is an unrecoverable error.
41373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41374$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41375      has_space=`$ECHO "$complete" | $GREP " "`
41376      if test "x$has_space" != x; then
41377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41379      fi
41380      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41381    fi
41382  fi
41383
41384  # Now new_path has a complete unix path to the binary
41385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41386    # Keep paths in /bin as-is, but remove trailing .exe if any
41387    new_path="${new_path/%.exe/}"
41388    # Do not save /bin paths to all_fixpath_prefixes!
41389  else
41390    # Not in mixed or Windows style, start by that.
41391    new_path=`cmd //c echo $new_path`
41392
41393  input_path="$new_path"
41394  # Check if we need to convert this using DOS-style short mode. If the path
41395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41396  # take no chances and rewrite it.
41397  # Note: m4 eats our [], so we need to use [ and ] instead.
41398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41399  if test "x$has_forbidden_chars" != x; then
41400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41402  fi
41403
41404    # Output is in $new_path
41405
41406  windows_path="$new_path"
41407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41408    unix_path=`$CYGPATH -u "$windows_path"`
41409    new_path="$unix_path"
41410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41412    new_path="$unix_path"
41413  fi
41414
41415    # remove trailing .exe if any
41416    new_path="${new_path/%.exe/}"
41417
41418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41420  fi
41421
41422    else
41423      # We're on a unix platform. Hooray! :)
41424      # First separate the path from the arguments. This will split at the first
41425      # space.
41426      complete="$OBJCOPY"
41427      path="${complete%% *}"
41428      tmp="$complete EOL"
41429      arguments="${tmp#* }"
41430
41431      # Cannot rely on the command "which" here since it doesn't always work.
41432      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41433      if test -z "$is_absolute_path"; then
41434        # Path to executable is not absolute. Find it.
41435        IFS_save="$IFS"
41436        IFS=:
41437        for p in $PATH; do
41438          if test -f "$p/$path" && test -x "$p/$path"; then
41439            new_path="$p/$path"
41440            break
41441          fi
41442        done
41443        IFS="$IFS_save"
41444      else
41445        # This is an absolute path, we can use it without further modifications.
41446        new_path="$path"
41447      fi
41448
41449      if test "x$new_path" = x; then
41450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41451$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41452        has_space=`$ECHO "$complete" | $GREP " "`
41453        if test "x$has_space" != x; then
41454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41456        fi
41457        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41458      fi
41459    fi
41460
41461    # Now join together the path and the arguments once again
41462    if test "x$arguments" != xEOL; then
41463      new_complete="$new_path ${arguments% *}"
41464    else
41465      new_complete="$new_path"
41466    fi
41467
41468    if test "x$complete" != "x$new_complete"; then
41469      OBJCOPY="$new_complete"
41470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41471$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41472    fi
41473  fi
41474
41475      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41476        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41477        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41478        # - version number is last blank separate word on first line
41479        # - version number formats that have been seen:
41480        #   - <major>.<minor>
41481        #   - <major>.<minor>.<micro>
41482        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41483        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41484         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41485              -e 's/.* //' \
41486              -e '/^[01]\./b bad' \
41487              -e '/^2\./{' \
41488              -e '  s/^2\.//' \
41489              -e '  /^[0-9]$/b bad' \
41490              -e '  /^[0-9]\./b bad' \
41491              -e '  /^1[0-9]$/b bad' \
41492              -e '  /^1[0-9]\./b bad' \
41493              -e '  /^20\./b bad' \
41494              -e '  /^21\.0$/b bad' \
41495              -e '  /^21\.0\./b bad' \
41496              -e '}' \
41497              -e ':good' \
41498              -e 's/.*/VALID_VERSION/p' \
41499              -e 'q' \
41500              -e ':bad' \
41501              -e 's/.*/BAD_VERSION/p' \
41502              -e 'q'`
41503        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41504          OBJCOPY=
41505          { $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
41506$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41507          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41508$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41509          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41510$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41511          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41512$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41513          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41514$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41515        fi
41516      fi
41517    fi
41518  fi
41519
41520
41521
41522  # Publish this variable in the help.
41523
41524
41525  if [ -z "${OBJDUMP+x}" ]; then
41526    # The variable is not set by user, try to locate tool using the code snippet
41527    if test -n "$ac_tool_prefix"; then
41528  for ac_prog in gobjdump objdump
41529  do
41530    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41533$as_echo_n "checking for $ac_word... " >&6; }
41534if ${ac_cv_prog_OBJDUMP+:} false; then :
41535  $as_echo_n "(cached) " >&6
41536else
41537  if test -n "$OBJDUMP"; then
41538  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41539else
41540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41541for as_dir in $PATH
41542do
41543  IFS=$as_save_IFS
41544  test -z "$as_dir" && as_dir=.
41545    for ac_exec_ext in '' $ac_executable_extensions; do
41546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41547    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41549    break 2
41550  fi
41551done
41552  done
41553IFS=$as_save_IFS
41554
41555fi
41556fi
41557OBJDUMP=$ac_cv_prog_OBJDUMP
41558if test -n "$OBJDUMP"; then
41559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41560$as_echo "$OBJDUMP" >&6; }
41561else
41562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41563$as_echo "no" >&6; }
41564fi
41565
41566
41567    test -n "$OBJDUMP" && break
41568  done
41569fi
41570if test -z "$OBJDUMP"; then
41571  ac_ct_OBJDUMP=$OBJDUMP
41572  for ac_prog in gobjdump objdump
41573do
41574  # Extract the first word of "$ac_prog", so it can be a program name with args.
41575set dummy $ac_prog; ac_word=$2
41576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41577$as_echo_n "checking for $ac_word... " >&6; }
41578if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41579  $as_echo_n "(cached) " >&6
41580else
41581  if test -n "$ac_ct_OBJDUMP"; then
41582  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41583else
41584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41585for as_dir in $PATH
41586do
41587  IFS=$as_save_IFS
41588  test -z "$as_dir" && as_dir=.
41589    for ac_exec_ext in '' $ac_executable_extensions; do
41590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41591    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41593    break 2
41594  fi
41595done
41596  done
41597IFS=$as_save_IFS
41598
41599fi
41600fi
41601ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41602if test -n "$ac_ct_OBJDUMP"; then
41603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41604$as_echo "$ac_ct_OBJDUMP" >&6; }
41605else
41606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41607$as_echo "no" >&6; }
41608fi
41609
41610
41611  test -n "$ac_ct_OBJDUMP" && break
41612done
41613
41614  if test "x$ac_ct_OBJDUMP" = x; then
41615    OBJDUMP=""
41616  else
41617    case $cross_compiling:$ac_tool_warned in
41618yes:)
41619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41621ac_tool_warned=yes ;;
41622esac
41623    OBJDUMP=$ac_ct_OBJDUMP
41624  fi
41625fi
41626
41627  else
41628    # The variable is set, but is it from the command line or the environment?
41629
41630    # Try to remove the string !OBJDUMP! from our list.
41631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41633      # If it failed, the variable was not from the command line. Ignore it,
41634      # but warn the user (except for BASH, which is always set by the calling BASH).
41635      if test "xOBJDUMP" != xBASH; then
41636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41637$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41638      fi
41639      # Try to locate tool using the code snippet
41640      if test -n "$ac_tool_prefix"; then
41641  for ac_prog in gobjdump objdump
41642  do
41643    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41644set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41646$as_echo_n "checking for $ac_word... " >&6; }
41647if ${ac_cv_prog_OBJDUMP+:} false; then :
41648  $as_echo_n "(cached) " >&6
41649else
41650  if test -n "$OBJDUMP"; then
41651  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41652else
41653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41654for as_dir in $PATH
41655do
41656  IFS=$as_save_IFS
41657  test -z "$as_dir" && as_dir=.
41658    for ac_exec_ext in '' $ac_executable_extensions; do
41659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41660    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41662    break 2
41663  fi
41664done
41665  done
41666IFS=$as_save_IFS
41667
41668fi
41669fi
41670OBJDUMP=$ac_cv_prog_OBJDUMP
41671if test -n "$OBJDUMP"; then
41672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41673$as_echo "$OBJDUMP" >&6; }
41674else
41675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41676$as_echo "no" >&6; }
41677fi
41678
41679
41680    test -n "$OBJDUMP" && break
41681  done
41682fi
41683if test -z "$OBJDUMP"; then
41684  ac_ct_OBJDUMP=$OBJDUMP
41685  for ac_prog in gobjdump objdump
41686do
41687  # Extract the first word of "$ac_prog", so it can be a program name with args.
41688set dummy $ac_prog; ac_word=$2
41689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41690$as_echo_n "checking for $ac_word... " >&6; }
41691if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41692  $as_echo_n "(cached) " >&6
41693else
41694  if test -n "$ac_ct_OBJDUMP"; then
41695  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41696else
41697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41698for as_dir in $PATH
41699do
41700  IFS=$as_save_IFS
41701  test -z "$as_dir" && as_dir=.
41702    for ac_exec_ext in '' $ac_executable_extensions; do
41703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41704    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41706    break 2
41707  fi
41708done
41709  done
41710IFS=$as_save_IFS
41711
41712fi
41713fi
41714ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41715if test -n "$ac_ct_OBJDUMP"; then
41716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41717$as_echo "$ac_ct_OBJDUMP" >&6; }
41718else
41719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41720$as_echo "no" >&6; }
41721fi
41722
41723
41724  test -n "$ac_ct_OBJDUMP" && break
41725done
41726
41727  if test "x$ac_ct_OBJDUMP" = x; then
41728    OBJDUMP=""
41729  else
41730    case $cross_compiling:$ac_tool_warned in
41731yes:)
41732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41734ac_tool_warned=yes ;;
41735esac
41736    OBJDUMP=$ac_ct_OBJDUMP
41737  fi
41738fi
41739
41740    else
41741      # If it succeeded, then it was overridden by the user. We will use it
41742      # for the tool.
41743
41744      # First remove it from the list of overridden variables, so we can test
41745      # for unknown variables in the end.
41746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41747
41748      # Check if we try to supply an empty value
41749      if test "x$OBJDUMP" = x; then
41750        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41751$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41753$as_echo_n "checking for OBJDUMP... " >&6; }
41754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41755$as_echo "disabled" >&6; }
41756      else
41757        # Check if the provided tool contains a complete path.
41758        tool_specified="$OBJDUMP"
41759        tool_basename="${tool_specified##*/}"
41760        if test "x$tool_basename" = "x$tool_specified"; then
41761          # A command without a complete path is provided, search $PATH.
41762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41763$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41764          # Extract the first word of "$tool_basename", so it can be a program name with args.
41765set dummy $tool_basename; ac_word=$2
41766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41767$as_echo_n "checking for $ac_word... " >&6; }
41768if ${ac_cv_path_OBJDUMP+:} false; then :
41769  $as_echo_n "(cached) " >&6
41770else
41771  case $OBJDUMP in
41772  [\\/]* | ?:[\\/]*)
41773  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41774  ;;
41775  *)
41776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41777for as_dir in $PATH
41778do
41779  IFS=$as_save_IFS
41780  test -z "$as_dir" && as_dir=.
41781    for ac_exec_ext in '' $ac_executable_extensions; do
41782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41783    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41785    break 2
41786  fi
41787done
41788  done
41789IFS=$as_save_IFS
41790
41791  ;;
41792esac
41793fi
41794OBJDUMP=$ac_cv_path_OBJDUMP
41795if test -n "$OBJDUMP"; then
41796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41797$as_echo "$OBJDUMP" >&6; }
41798else
41799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41800$as_echo "no" >&6; }
41801fi
41802
41803
41804          if test "x$OBJDUMP" = x; then
41805            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41806          fi
41807        else
41808          # Otherwise we believe it is a complete path. Use it as it is.
41809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41810$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41811          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41812$as_echo_n "checking for OBJDUMP... " >&6; }
41813          if test ! -x "$tool_specified"; then
41814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41815$as_echo "not found" >&6; }
41816            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41817          fi
41818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41819$as_echo "$tool_specified" >&6; }
41820        fi
41821      fi
41822    fi
41823
41824  fi
41825
41826
41827  if test "x$OBJDUMP" != x; then
41828    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41829    # bails if argument is missing.
41830
41831  # Only process if variable expands to non-empty
41832
41833  if test "x$OBJDUMP" != x; then
41834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41835
41836  # First separate the path from the arguments. This will split at the first
41837  # space.
41838  complete="$OBJDUMP"
41839  path="${complete%% *}"
41840  tmp="$complete EOL"
41841  arguments="${tmp#* }"
41842
41843  # Input might be given as Windows format, start by converting to
41844  # unix format.
41845  new_path=`$CYGPATH -u "$path"`
41846
41847  # Now try to locate executable using which
41848  new_path=`$WHICH "$new_path" 2> /dev/null`
41849  # bat and cmd files are not always considered executable in cygwin causing which
41850  # to not find them
41851  if test "x$new_path" = x \
41852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41854    new_path=`$CYGPATH -u "$path"`
41855  fi
41856  if test "x$new_path" = x; then
41857    # Oops. Which didn't find the executable.
41858    # The splitting of arguments from the executable at a space might have been incorrect,
41859    # since paths with space are more likely in Windows. Give it another try with the whole
41860    # argument.
41861    path="$complete"
41862    arguments="EOL"
41863    new_path=`$CYGPATH -u "$path"`
41864    new_path=`$WHICH "$new_path" 2> /dev/null`
41865    # bat and cmd files are not always considered executable in cygwin causing which
41866    # to not find them
41867    if test "x$new_path" = x \
41868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41870      new_path=`$CYGPATH -u "$path"`
41871    fi
41872    if test "x$new_path" = x; then
41873      # It's still not found. Now this is an unrecoverable error.
41874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41875$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41876      has_space=`$ECHO "$complete" | $GREP " "`
41877      if test "x$has_space" != x; then
41878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41880      fi
41881      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41882    fi
41883  fi
41884
41885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41888  # "foo.exe" is OK but "foo" is an error.
41889  #
41890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41891  # It is also a way to make sure we got the proper file name for the real test later on.
41892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41893  if test "x$test_shortpath" = x; then
41894    # Short path failed, file does not exist as specified.
41895    # Try adding .exe or .cmd
41896    if test -f "${new_path}.exe"; then
41897      input_to_shortpath="${new_path}.exe"
41898    elif test -f "${new_path}.cmd"; then
41899      input_to_shortpath="${new_path}.cmd"
41900    else
41901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41902$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41905      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41906    fi
41907  else
41908    input_to_shortpath="$new_path"
41909  fi
41910
41911  # Call helper function which possibly converts this using DOS-style short mode.
41912  # If so, the updated path is stored in $new_path.
41913  new_path="$input_to_shortpath"
41914
41915  input_path="$input_to_shortpath"
41916  # Check if we need to convert this using DOS-style short mode. If the path
41917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41918  # take no chances and rewrite it.
41919  # Note: m4 eats our [], so we need to use [ and ] instead.
41920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41921  if test "x$has_forbidden_chars" != x; then
41922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41926      # Going to short mode and back again did indeed matter. Since short mode is
41927      # case insensitive, let's make it lowercase to improve readability.
41928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41929      # Now convert it back to Unix-style (cygpath)
41930      input_path=`$CYGPATH -u "$shortmode_path"`
41931      new_path="$input_path"
41932    fi
41933  fi
41934
41935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41936  if test "x$test_cygdrive_prefix" = x; then
41937    # As a simple fix, exclude /usr/bin since it's not a real path.
41938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41940      # a path prefixed by /cygdrive for fixpath to work.
41941      new_path="$CYGWIN_ROOT_PATH$input_path"
41942    fi
41943  fi
41944
41945  # remove trailing .exe if any
41946  new_path="${new_path/%.exe/}"
41947
41948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41949
41950  # First separate the path from the arguments. This will split at the first
41951  # space.
41952  complete="$OBJDUMP"
41953  path="${complete%% *}"
41954  tmp="$complete EOL"
41955  arguments="${tmp#* }"
41956
41957  # Input might be given as Windows format, start by converting to
41958  # unix format.
41959  new_path="$path"
41960
41961  windows_path="$new_path"
41962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41963    unix_path=`$CYGPATH -u "$windows_path"`
41964    new_path="$unix_path"
41965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41967    new_path="$unix_path"
41968  fi
41969
41970
41971  # Now try to locate executable using which
41972  new_path=`$WHICH "$new_path" 2> /dev/null`
41973
41974  if test "x$new_path" = x; then
41975    # Oops. Which didn't find the executable.
41976    # The splitting of arguments from the executable at a space might have been incorrect,
41977    # since paths with space are more likely in Windows. Give it another try with the whole
41978    # argument.
41979    path="$complete"
41980    arguments="EOL"
41981    new_path="$path"
41982
41983  windows_path="$new_path"
41984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41985    unix_path=`$CYGPATH -u "$windows_path"`
41986    new_path="$unix_path"
41987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41989    new_path="$unix_path"
41990  fi
41991
41992
41993    new_path=`$WHICH "$new_path" 2> /dev/null`
41994    # bat and cmd files are not always considered executable in MSYS causing which
41995    # to not find them
41996    if test "x$new_path" = x \
41997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41999      new_path="$path"
42000
42001  windows_path="$new_path"
42002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42003    unix_path=`$CYGPATH -u "$windows_path"`
42004    new_path="$unix_path"
42005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42007    new_path="$unix_path"
42008  fi
42009
42010    fi
42011
42012    if test "x$new_path" = x; then
42013      # It's still not found. Now this is an unrecoverable error.
42014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42015$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42016      has_space=`$ECHO "$complete" | $GREP " "`
42017      if test "x$has_space" != x; then
42018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42020      fi
42021      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42022    fi
42023  fi
42024
42025  # Now new_path has a complete unix path to the binary
42026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42027    # Keep paths in /bin as-is, but remove trailing .exe if any
42028    new_path="${new_path/%.exe/}"
42029    # Do not save /bin paths to all_fixpath_prefixes!
42030  else
42031    # Not in mixed or Windows style, start by that.
42032    new_path=`cmd //c echo $new_path`
42033
42034  input_path="$new_path"
42035  # Check if we need to convert this using DOS-style short mode. If the path
42036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42037  # take no chances and rewrite it.
42038  # Note: m4 eats our [], so we need to use [ and ] instead.
42039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42040  if test "x$has_forbidden_chars" != x; then
42041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42043  fi
42044
42045    # Output is in $new_path
42046
42047  windows_path="$new_path"
42048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42049    unix_path=`$CYGPATH -u "$windows_path"`
42050    new_path="$unix_path"
42051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42053    new_path="$unix_path"
42054  fi
42055
42056    # remove trailing .exe if any
42057    new_path="${new_path/%.exe/}"
42058
42059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42061  fi
42062
42063    else
42064      # We're on a unix platform. Hooray! :)
42065      # First separate the path from the arguments. This will split at the first
42066      # space.
42067      complete="$OBJDUMP"
42068      path="${complete%% *}"
42069      tmp="$complete EOL"
42070      arguments="${tmp#* }"
42071
42072      # Cannot rely on the command "which" here since it doesn't always work.
42073      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42074      if test -z "$is_absolute_path"; then
42075        # Path to executable is not absolute. Find it.
42076        IFS_save="$IFS"
42077        IFS=:
42078        for p in $PATH; do
42079          if test -f "$p/$path" && test -x "$p/$path"; then
42080            new_path="$p/$path"
42081            break
42082          fi
42083        done
42084        IFS="$IFS_save"
42085      else
42086        # This is an absolute path, we can use it without further modifications.
42087        new_path="$path"
42088      fi
42089
42090      if test "x$new_path" = x; then
42091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42092$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42093        has_space=`$ECHO "$complete" | $GREP " "`
42094        if test "x$has_space" != x; then
42095          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42097        fi
42098        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42099      fi
42100    fi
42101
42102    # Now join together the path and the arguments once again
42103    if test "x$arguments" != xEOL; then
42104      new_complete="$new_path ${arguments% *}"
42105    else
42106      new_complete="$new_path"
42107    fi
42108
42109    if test "x$complete" != "x$new_complete"; then
42110      OBJDUMP="$new_complete"
42111      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42112$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42113    fi
42114  fi
42115
42116  fi
42117
42118
42119  # Restore old path.
42120  PATH="$OLD_PATH"
42121
42122  # Restore the flags to the user specified values.
42123  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42124  CFLAGS="$ORG_CFLAGS"
42125  CXXFLAGS="$ORG_CXXFLAGS"
42126
42127
42128# Finally do some processing after the detection phase
42129
42130  if test "x$COMPILE_TYPE" = "xcross"; then
42131    # Now we need to find a C/C++ compiler that can build executables for the
42132    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42133    # used once. Also, we need to do this without adding a tools dir to the
42134    # path, otherwise we might pick up cross-compilers which don't use standard
42135    # naming.
42136
42137    OLDPATH="$PATH"
42138
42139
42140# Check whether --with-build-devkit was given.
42141if test "${with_build_devkit+set}" = set; then :
42142  withval=$with_build_devkit;
42143fi
42144
42145    if test "x$with_build_devkit" = "xyes"; then
42146      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42147    elif test -n "$with_build_devkit"; then
42148      if test ! -d "$with_build_devkit"; then
42149        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42150      else
42151
42152  # Only process if variable expands to non-empty
42153
42154  if test "x$with_build_devkit" != x; then
42155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42156
42157  # Input might be given as Windows format, start by converting to
42158  # unix format.
42159  path="$with_build_devkit"
42160  new_path=`$CYGPATH -u "$path"`
42161
42162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42165  # "foo.exe" is OK but "foo" is an error.
42166  #
42167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42168  # It is also a way to make sure we got the proper file name for the real test later on.
42169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42170  if test "x$test_shortpath" = x; then
42171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42172$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42173    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42174  fi
42175
42176  # Call helper function which possibly converts this using DOS-style short mode.
42177  # If so, the updated path is stored in $new_path.
42178
42179  input_path="$new_path"
42180  # Check if we need to convert this using DOS-style short mode. If the path
42181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42182  # take no chances and rewrite it.
42183  # Note: m4 eats our [], so we need to use [ and ] instead.
42184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42185  if test "x$has_forbidden_chars" != x; then
42186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42190      # Going to short mode and back again did indeed matter. Since short mode is
42191      # case insensitive, let's make it lowercase to improve readability.
42192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42193      # Now convert it back to Unix-style (cygpath)
42194      input_path=`$CYGPATH -u "$shortmode_path"`
42195      new_path="$input_path"
42196    fi
42197  fi
42198
42199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42200  if test "x$test_cygdrive_prefix" = x; then
42201    # As a simple fix, exclude /usr/bin since it's not a real path.
42202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42204      # a path prefixed by /cygdrive for fixpath to work.
42205      new_path="$CYGWIN_ROOT_PATH$input_path"
42206    fi
42207  fi
42208
42209
42210  if test "x$path" != "x$new_path"; then
42211    with_build_devkit="$new_path"
42212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42213$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42214  fi
42215
42216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42217
42218  path="$with_build_devkit"
42219  has_colon=`$ECHO $path | $GREP ^.:`
42220  new_path="$path"
42221  if test "x$has_colon" = x; then
42222    # Not in mixed or Windows style, start by that.
42223    new_path=`cmd //c echo $path`
42224  fi
42225
42226
42227  input_path="$new_path"
42228  # Check if we need to convert this using DOS-style short mode. If the path
42229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42230  # take no chances and rewrite it.
42231  # Note: m4 eats our [], so we need to use [ and ] instead.
42232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42233  if test "x$has_forbidden_chars" != x; then
42234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42236  fi
42237
42238
42239  windows_path="$new_path"
42240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42241    unix_path=`$CYGPATH -u "$windows_path"`
42242    new_path="$unix_path"
42243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42245    new_path="$unix_path"
42246  fi
42247
42248  if test "x$path" != "x$new_path"; then
42249    with_build_devkit="$new_path"
42250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42251$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42252  fi
42253
42254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42256
42257    else
42258      # We're on a unix platform. Hooray! :)
42259      path="$with_build_devkit"
42260      has_space=`$ECHO "$path" | $GREP " "`
42261      if test "x$has_space" != x; then
42262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42263$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42265      fi
42266
42267      # Use eval to expand a potential ~
42268      eval path="$path"
42269      if test ! -f "$path" && test ! -d "$path"; then
42270        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42271      fi
42272
42273      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42274    fi
42275  fi
42276
42277        BUILD_DEVKIT_ROOT="$with_build_devkit"
42278        # Check for a meta data info file in the root of the devkit
42279        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42280          # Process devkit.info so that existing devkit variables are not
42281          # modified by this
42282          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42283              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42284              -e "s/\$host/\$build/g" \
42285              $BUILD_DEVKIT_ROOT/devkit.info \
42286              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42287          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42288          # This potentially sets the following:
42289          # A descriptive name of the devkit
42290
42291  if test "x$BUILD_DEVKIT_NAME" = x; then
42292    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42293  fi
42294
42295          # Corresponds to --with-extra-path
42296
42297  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42298    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42299  fi
42300
42301          # Corresponds to --with-toolchain-path
42302
42303  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42304    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42305  fi
42306
42307          # Corresponds to --with-sysroot
42308
42309  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42310    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42311  fi
42312
42313          # Skip the Window specific parts
42314        fi
42315
42316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42317$as_echo_n "checking for build platform devkit... " >&6; }
42318        if test "x$BUILD_DEVKIT_NAME" != x; then
42319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42320$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42321        else
42322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42323$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42324        fi
42325
42326        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42327
42328  if test "x$BUILD_SYSROOT" != "x"; then
42329    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42330      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42331        # Solaris Studio does not have a concept of sysroot. Instead we must
42332        # make sure the default include and lib dirs are appended to each
42333        # compile and link command line.
42334        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42335        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42336            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42337            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42338      fi
42339    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42340      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42341      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42342    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42343      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42344      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42345    fi
42346    # Propagate the sysroot args to hotspot
42347    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42348    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42349    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42350    # The global CFLAGS and LDFLAGS variables need these for configure to function
42351    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42352    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42353    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42354    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42355  fi
42356
42357  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42358    # We also need -iframework<path>/System/Library/Frameworks
42359    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42360    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42361    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42362    # set this here so it doesn't have to be peppered throughout the forest
42363    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42364    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42365  fi
42366
42367
42368
42369
42370
42371         # Fallback default of just /bin if DEVKIT_PATH is not defined
42372        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42373          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42374        fi
42375        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42376      fi
42377    fi
42378
42379    # FIXME: we should list the discovered compilers as an exclude pattern!
42380    # If we do that, we can do this detection before POST_DETECTION, and still
42381    # find the build compilers in the tools dir, if needed.
42382
42383
42384
42385  # Publish this variable in the help.
42386
42387
42388  if [ -z "${BUILD_CC+x}" ]; then
42389    # The variable is not set by user, try to locate tool using the code snippet
42390    for ac_prog in cl cc gcc
42391do
42392  # Extract the first word of "$ac_prog", so it can be a program name with args.
42393set dummy $ac_prog; ac_word=$2
42394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42395$as_echo_n "checking for $ac_word... " >&6; }
42396if ${ac_cv_path_BUILD_CC+:} false; then :
42397  $as_echo_n "(cached) " >&6
42398else
42399  case $BUILD_CC in
42400  [\\/]* | ?:[\\/]*)
42401  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42402  ;;
42403  *)
42404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42405for as_dir in $PATH
42406do
42407  IFS=$as_save_IFS
42408  test -z "$as_dir" && as_dir=.
42409    for ac_exec_ext in '' $ac_executable_extensions; do
42410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42411    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42413    break 2
42414  fi
42415done
42416  done
42417IFS=$as_save_IFS
42418
42419  ;;
42420esac
42421fi
42422BUILD_CC=$ac_cv_path_BUILD_CC
42423if test -n "$BUILD_CC"; then
42424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42425$as_echo "$BUILD_CC" >&6; }
42426else
42427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42428$as_echo "no" >&6; }
42429fi
42430
42431
42432  test -n "$BUILD_CC" && break
42433done
42434
42435  else
42436    # The variable is set, but is it from the command line or the environment?
42437
42438    # Try to remove the string !BUILD_CC! from our list.
42439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42441      # If it failed, the variable was not from the command line. Ignore it,
42442      # but warn the user (except for BASH, which is always set by the calling BASH).
42443      if test "xBUILD_CC" != xBASH; then
42444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42445$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42446      fi
42447      # Try to locate tool using the code snippet
42448      for ac_prog in cl cc gcc
42449do
42450  # Extract the first word of "$ac_prog", so it can be a program name with args.
42451set dummy $ac_prog; ac_word=$2
42452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42453$as_echo_n "checking for $ac_word... " >&6; }
42454if ${ac_cv_path_BUILD_CC+:} false; then :
42455  $as_echo_n "(cached) " >&6
42456else
42457  case $BUILD_CC in
42458  [\\/]* | ?:[\\/]*)
42459  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42460  ;;
42461  *)
42462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42463for as_dir in $PATH
42464do
42465  IFS=$as_save_IFS
42466  test -z "$as_dir" && as_dir=.
42467    for ac_exec_ext in '' $ac_executable_extensions; do
42468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42469    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42471    break 2
42472  fi
42473done
42474  done
42475IFS=$as_save_IFS
42476
42477  ;;
42478esac
42479fi
42480BUILD_CC=$ac_cv_path_BUILD_CC
42481if test -n "$BUILD_CC"; then
42482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42483$as_echo "$BUILD_CC" >&6; }
42484else
42485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42486$as_echo "no" >&6; }
42487fi
42488
42489
42490  test -n "$BUILD_CC" && break
42491done
42492
42493    else
42494      # If it succeeded, then it was overridden by the user. We will use it
42495      # for the tool.
42496
42497      # First remove it from the list of overridden variables, so we can test
42498      # for unknown variables in the end.
42499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42500
42501      # Check if we try to supply an empty value
42502      if test "x$BUILD_CC" = x; then
42503        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42504$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42506$as_echo_n "checking for BUILD_CC... " >&6; }
42507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42508$as_echo "disabled" >&6; }
42509      else
42510        # Check if the provided tool contains a complete path.
42511        tool_specified="$BUILD_CC"
42512        tool_basename="${tool_specified##*/}"
42513        if test "x$tool_basename" = "x$tool_specified"; then
42514          # A command without a complete path is provided, search $PATH.
42515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42516$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42517          # Extract the first word of "$tool_basename", so it can be a program name with args.
42518set dummy $tool_basename; ac_word=$2
42519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42520$as_echo_n "checking for $ac_word... " >&6; }
42521if ${ac_cv_path_BUILD_CC+:} false; then :
42522  $as_echo_n "(cached) " >&6
42523else
42524  case $BUILD_CC in
42525  [\\/]* | ?:[\\/]*)
42526  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42527  ;;
42528  *)
42529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42530for as_dir in $PATH
42531do
42532  IFS=$as_save_IFS
42533  test -z "$as_dir" && as_dir=.
42534    for ac_exec_ext in '' $ac_executable_extensions; do
42535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42536    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42538    break 2
42539  fi
42540done
42541  done
42542IFS=$as_save_IFS
42543
42544  ;;
42545esac
42546fi
42547BUILD_CC=$ac_cv_path_BUILD_CC
42548if test -n "$BUILD_CC"; then
42549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42550$as_echo "$BUILD_CC" >&6; }
42551else
42552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42553$as_echo "no" >&6; }
42554fi
42555
42556
42557          if test "x$BUILD_CC" = x; then
42558            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42559          fi
42560        else
42561          # Otherwise we believe it is a complete path. Use it as it is.
42562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42563$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42564          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42565$as_echo_n "checking for BUILD_CC... " >&6; }
42566          if test ! -x "$tool_specified"; then
42567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42568$as_echo "not found" >&6; }
42569            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42570          fi
42571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42572$as_echo "$tool_specified" >&6; }
42573        fi
42574      fi
42575    fi
42576
42577  fi
42578
42579
42580
42581  if test "x$BUILD_CC" = x; then
42582    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42583  fi
42584
42585
42586
42587  # Only process if variable expands to non-empty
42588
42589  if test "x$BUILD_CC" != x; then
42590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42591
42592  # First separate the path from the arguments. This will split at the first
42593  # space.
42594  complete="$BUILD_CC"
42595  path="${complete%% *}"
42596  tmp="$complete EOL"
42597  arguments="${tmp#* }"
42598
42599  # Input might be given as Windows format, start by converting to
42600  # unix format.
42601  new_path=`$CYGPATH -u "$path"`
42602
42603  # Now try to locate executable using which
42604  new_path=`$WHICH "$new_path" 2> /dev/null`
42605  # bat and cmd files are not always considered executable in cygwin causing which
42606  # to not find them
42607  if test "x$new_path" = x \
42608      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42609      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42610    new_path=`$CYGPATH -u "$path"`
42611  fi
42612  if test "x$new_path" = x; then
42613    # Oops. Which didn't find the executable.
42614    # The splitting of arguments from the executable at a space might have been incorrect,
42615    # since paths with space are more likely in Windows. Give it another try with the whole
42616    # argument.
42617    path="$complete"
42618    arguments="EOL"
42619    new_path=`$CYGPATH -u "$path"`
42620    new_path=`$WHICH "$new_path" 2> /dev/null`
42621    # bat and cmd files are not always considered executable in cygwin causing which
42622    # to not find them
42623    if test "x$new_path" = x \
42624        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42625        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42626      new_path=`$CYGPATH -u "$path"`
42627    fi
42628    if test "x$new_path" = x; then
42629      # It's still not found. Now this is an unrecoverable error.
42630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42631$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42632      has_space=`$ECHO "$complete" | $GREP " "`
42633      if test "x$has_space" != x; then
42634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42636      fi
42637      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42638    fi
42639  fi
42640
42641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42644  # "foo.exe" is OK but "foo" is an error.
42645  #
42646  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42647  # It is also a way to make sure we got the proper file name for the real test later on.
42648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42649  if test "x$test_shortpath" = x; then
42650    # Short path failed, file does not exist as specified.
42651    # Try adding .exe or .cmd
42652    if test -f "${new_path}.exe"; then
42653      input_to_shortpath="${new_path}.exe"
42654    elif test -f "${new_path}.cmd"; then
42655      input_to_shortpath="${new_path}.cmd"
42656    else
42657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42658$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42659      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42660$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42661      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42662    fi
42663  else
42664    input_to_shortpath="$new_path"
42665  fi
42666
42667  # Call helper function which possibly converts this using DOS-style short mode.
42668  # If so, the updated path is stored in $new_path.
42669  new_path="$input_to_shortpath"
42670
42671  input_path="$input_to_shortpath"
42672  # Check if we need to convert this using DOS-style short mode. If the path
42673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42674  # take no chances and rewrite it.
42675  # Note: m4 eats our [], so we need to use [ and ] instead.
42676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42677  if test "x$has_forbidden_chars" != x; then
42678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42682      # Going to short mode and back again did indeed matter. Since short mode is
42683      # case insensitive, let's make it lowercase to improve readability.
42684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42685      # Now convert it back to Unix-style (cygpath)
42686      input_path=`$CYGPATH -u "$shortmode_path"`
42687      new_path="$input_path"
42688    fi
42689  fi
42690
42691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42692  if test "x$test_cygdrive_prefix" = x; then
42693    # As a simple fix, exclude /usr/bin since it's not a real path.
42694    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42696      # a path prefixed by /cygdrive for fixpath to work.
42697      new_path="$CYGWIN_ROOT_PATH$input_path"
42698    fi
42699  fi
42700
42701  # remove trailing .exe if any
42702  new_path="${new_path/%.exe/}"
42703
42704    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42705
42706  # First separate the path from the arguments. This will split at the first
42707  # space.
42708  complete="$BUILD_CC"
42709  path="${complete%% *}"
42710  tmp="$complete EOL"
42711  arguments="${tmp#* }"
42712
42713  # Input might be given as Windows format, start by converting to
42714  # unix format.
42715  new_path="$path"
42716
42717  windows_path="$new_path"
42718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42719    unix_path=`$CYGPATH -u "$windows_path"`
42720    new_path="$unix_path"
42721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42723    new_path="$unix_path"
42724  fi
42725
42726
42727  # Now try to locate executable using which
42728  new_path=`$WHICH "$new_path" 2> /dev/null`
42729
42730  if test "x$new_path" = x; then
42731    # Oops. Which didn't find the executable.
42732    # The splitting of arguments from the executable at a space might have been incorrect,
42733    # since paths with space are more likely in Windows. Give it another try with the whole
42734    # argument.
42735    path="$complete"
42736    arguments="EOL"
42737    new_path="$path"
42738
42739  windows_path="$new_path"
42740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42741    unix_path=`$CYGPATH -u "$windows_path"`
42742    new_path="$unix_path"
42743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42745    new_path="$unix_path"
42746  fi
42747
42748
42749    new_path=`$WHICH "$new_path" 2> /dev/null`
42750    # bat and cmd files are not always considered executable in MSYS causing which
42751    # to not find them
42752    if test "x$new_path" = x \
42753        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42754        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42755      new_path="$path"
42756
42757  windows_path="$new_path"
42758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42759    unix_path=`$CYGPATH -u "$windows_path"`
42760    new_path="$unix_path"
42761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42763    new_path="$unix_path"
42764  fi
42765
42766    fi
42767
42768    if test "x$new_path" = x; then
42769      # It's still not found. Now this is an unrecoverable error.
42770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42771$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42772      has_space=`$ECHO "$complete" | $GREP " "`
42773      if test "x$has_space" != x; then
42774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42776      fi
42777      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42778    fi
42779  fi
42780
42781  # Now new_path has a complete unix path to the binary
42782  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42783    # Keep paths in /bin as-is, but remove trailing .exe if any
42784    new_path="${new_path/%.exe/}"
42785    # Do not save /bin paths to all_fixpath_prefixes!
42786  else
42787    # Not in mixed or Windows style, start by that.
42788    new_path=`cmd //c echo $new_path`
42789
42790  input_path="$new_path"
42791  # Check if we need to convert this using DOS-style short mode. If the path
42792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42793  # take no chances and rewrite it.
42794  # Note: m4 eats our [], so we need to use [ and ] instead.
42795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42796  if test "x$has_forbidden_chars" != x; then
42797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42799  fi
42800
42801    # Output is in $new_path
42802
42803  windows_path="$new_path"
42804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42805    unix_path=`$CYGPATH -u "$windows_path"`
42806    new_path="$unix_path"
42807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42809    new_path="$unix_path"
42810  fi
42811
42812    # remove trailing .exe if any
42813    new_path="${new_path/%.exe/}"
42814
42815    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42816    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42817  fi
42818
42819    else
42820      # We're on a unix platform. Hooray! :)
42821      # First separate the path from the arguments. This will split at the first
42822      # space.
42823      complete="$BUILD_CC"
42824      path="${complete%% *}"
42825      tmp="$complete EOL"
42826      arguments="${tmp#* }"
42827
42828      # Cannot rely on the command "which" here since it doesn't always work.
42829      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42830      if test -z "$is_absolute_path"; then
42831        # Path to executable is not absolute. Find it.
42832        IFS_save="$IFS"
42833        IFS=:
42834        for p in $PATH; do
42835          if test -f "$p/$path" && test -x "$p/$path"; then
42836            new_path="$p/$path"
42837            break
42838          fi
42839        done
42840        IFS="$IFS_save"
42841      else
42842        # This is an absolute path, we can use it without further modifications.
42843        new_path="$path"
42844      fi
42845
42846      if test "x$new_path" = x; then
42847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42848$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42849        has_space=`$ECHO "$complete" | $GREP " "`
42850        if test "x$has_space" != x; then
42851          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42852$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42853        fi
42854        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42855      fi
42856    fi
42857
42858    # Now join together the path and the arguments once again
42859    if test "x$arguments" != xEOL; then
42860      new_complete="$new_path ${arguments% *}"
42861    else
42862      new_complete="$new_path"
42863    fi
42864
42865    if test "x$complete" != "x$new_complete"; then
42866      BUILD_CC="$new_complete"
42867      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42868$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42869    fi
42870  fi
42871
42872
42873
42874
42875  # Publish this variable in the help.
42876
42877
42878  if [ -z "${BUILD_CXX+x}" ]; then
42879    # The variable is not set by user, try to locate tool using the code snippet
42880    for ac_prog in cl CC g++
42881do
42882  # Extract the first word of "$ac_prog", so it can be a program name with args.
42883set dummy $ac_prog; ac_word=$2
42884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42885$as_echo_n "checking for $ac_word... " >&6; }
42886if ${ac_cv_path_BUILD_CXX+:} false; then :
42887  $as_echo_n "(cached) " >&6
42888else
42889  case $BUILD_CXX in
42890  [\\/]* | ?:[\\/]*)
42891  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42892  ;;
42893  *)
42894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42895for as_dir in $PATH
42896do
42897  IFS=$as_save_IFS
42898  test -z "$as_dir" && as_dir=.
42899    for ac_exec_ext in '' $ac_executable_extensions; do
42900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42901    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42903    break 2
42904  fi
42905done
42906  done
42907IFS=$as_save_IFS
42908
42909  ;;
42910esac
42911fi
42912BUILD_CXX=$ac_cv_path_BUILD_CXX
42913if test -n "$BUILD_CXX"; then
42914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42915$as_echo "$BUILD_CXX" >&6; }
42916else
42917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42918$as_echo "no" >&6; }
42919fi
42920
42921
42922  test -n "$BUILD_CXX" && break
42923done
42924
42925  else
42926    # The variable is set, but is it from the command line or the environment?
42927
42928    # Try to remove the string !BUILD_CXX! from our list.
42929    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42930    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42931      # If it failed, the variable was not from the command line. Ignore it,
42932      # but warn the user (except for BASH, which is always set by the calling BASH).
42933      if test "xBUILD_CXX" != xBASH; then
42934        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42935$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42936      fi
42937      # Try to locate tool using the code snippet
42938      for ac_prog in cl CC g++
42939do
42940  # Extract the first word of "$ac_prog", so it can be a program name with args.
42941set dummy $ac_prog; ac_word=$2
42942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42943$as_echo_n "checking for $ac_word... " >&6; }
42944if ${ac_cv_path_BUILD_CXX+:} false; then :
42945  $as_echo_n "(cached) " >&6
42946else
42947  case $BUILD_CXX in
42948  [\\/]* | ?:[\\/]*)
42949  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42950  ;;
42951  *)
42952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42953for as_dir in $PATH
42954do
42955  IFS=$as_save_IFS
42956  test -z "$as_dir" && as_dir=.
42957    for ac_exec_ext in '' $ac_executable_extensions; do
42958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42959    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42961    break 2
42962  fi
42963done
42964  done
42965IFS=$as_save_IFS
42966
42967  ;;
42968esac
42969fi
42970BUILD_CXX=$ac_cv_path_BUILD_CXX
42971if test -n "$BUILD_CXX"; then
42972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42973$as_echo "$BUILD_CXX" >&6; }
42974else
42975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42976$as_echo "no" >&6; }
42977fi
42978
42979
42980  test -n "$BUILD_CXX" && break
42981done
42982
42983    else
42984      # If it succeeded, then it was overridden by the user. We will use it
42985      # for the tool.
42986
42987      # First remove it from the list of overridden variables, so we can test
42988      # for unknown variables in the end.
42989      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42990
42991      # Check if we try to supply an empty value
42992      if test "x$BUILD_CXX" = x; then
42993        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
42994$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
42995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42996$as_echo_n "checking for BUILD_CXX... " >&6; }
42997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42998$as_echo "disabled" >&6; }
42999      else
43000        # Check if the provided tool contains a complete path.
43001        tool_specified="$BUILD_CXX"
43002        tool_basename="${tool_specified##*/}"
43003        if test "x$tool_basename" = "x$tool_specified"; then
43004          # A command without a complete path is provided, search $PATH.
43005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43006$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43007          # Extract the first word of "$tool_basename", so it can be a program name with args.
43008set dummy $tool_basename; ac_word=$2
43009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43010$as_echo_n "checking for $ac_word... " >&6; }
43011if ${ac_cv_path_BUILD_CXX+:} false; then :
43012  $as_echo_n "(cached) " >&6
43013else
43014  case $BUILD_CXX in
43015  [\\/]* | ?:[\\/]*)
43016  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43017  ;;
43018  *)
43019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43020for as_dir in $PATH
43021do
43022  IFS=$as_save_IFS
43023  test -z "$as_dir" && as_dir=.
43024    for ac_exec_ext in '' $ac_executable_extensions; do
43025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43026    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43028    break 2
43029  fi
43030done
43031  done
43032IFS=$as_save_IFS
43033
43034  ;;
43035esac
43036fi
43037BUILD_CXX=$ac_cv_path_BUILD_CXX
43038if test -n "$BUILD_CXX"; then
43039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43040$as_echo "$BUILD_CXX" >&6; }
43041else
43042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43043$as_echo "no" >&6; }
43044fi
43045
43046
43047          if test "x$BUILD_CXX" = x; then
43048            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43049          fi
43050        else
43051          # Otherwise we believe it is a complete path. Use it as it is.
43052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43053$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43054          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43055$as_echo_n "checking for BUILD_CXX... " >&6; }
43056          if test ! -x "$tool_specified"; then
43057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43058$as_echo "not found" >&6; }
43059            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43060          fi
43061          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43062$as_echo "$tool_specified" >&6; }
43063        fi
43064      fi
43065    fi
43066
43067  fi
43068
43069
43070
43071  if test "x$BUILD_CXX" = x; then
43072    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43073  fi
43074
43075
43076
43077  # Only process if variable expands to non-empty
43078
43079  if test "x$BUILD_CXX" != x; then
43080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43081
43082  # First separate the path from the arguments. This will split at the first
43083  # space.
43084  complete="$BUILD_CXX"
43085  path="${complete%% *}"
43086  tmp="$complete EOL"
43087  arguments="${tmp#* }"
43088
43089  # Input might be given as Windows format, start by converting to
43090  # unix format.
43091  new_path=`$CYGPATH -u "$path"`
43092
43093  # Now try to locate executable using which
43094  new_path=`$WHICH "$new_path" 2> /dev/null`
43095  # bat and cmd files are not always considered executable in cygwin causing which
43096  # to not find them
43097  if test "x$new_path" = x \
43098      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43099      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43100    new_path=`$CYGPATH -u "$path"`
43101  fi
43102  if test "x$new_path" = x; then
43103    # Oops. Which didn't find the executable.
43104    # The splitting of arguments from the executable at a space might have been incorrect,
43105    # since paths with space are more likely in Windows. Give it another try with the whole
43106    # argument.
43107    path="$complete"
43108    arguments="EOL"
43109    new_path=`$CYGPATH -u "$path"`
43110    new_path=`$WHICH "$new_path" 2> /dev/null`
43111    # bat and cmd files are not always considered executable in cygwin causing which
43112    # to not find them
43113    if test "x$new_path" = x \
43114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43116      new_path=`$CYGPATH -u "$path"`
43117    fi
43118    if test "x$new_path" = x; then
43119      # It's still not found. Now this is an unrecoverable error.
43120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43121$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43122      has_space=`$ECHO "$complete" | $GREP " "`
43123      if test "x$has_space" != x; then
43124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43126      fi
43127      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43128    fi
43129  fi
43130
43131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43134  # "foo.exe" is OK but "foo" is an error.
43135  #
43136  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43137  # It is also a way to make sure we got the proper file name for the real test later on.
43138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43139  if test "x$test_shortpath" = x; then
43140    # Short path failed, file does not exist as specified.
43141    # Try adding .exe or .cmd
43142    if test -f "${new_path}.exe"; then
43143      input_to_shortpath="${new_path}.exe"
43144    elif test -f "${new_path}.cmd"; then
43145      input_to_shortpath="${new_path}.cmd"
43146    else
43147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43148$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43149      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43150$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43151      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43152    fi
43153  else
43154    input_to_shortpath="$new_path"
43155  fi
43156
43157  # Call helper function which possibly converts this using DOS-style short mode.
43158  # If so, the updated path is stored in $new_path.
43159  new_path="$input_to_shortpath"
43160
43161  input_path="$input_to_shortpath"
43162  # Check if we need to convert this using DOS-style short mode. If the path
43163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43164  # take no chances and rewrite it.
43165  # Note: m4 eats our [], so we need to use [ and ] instead.
43166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43167  if test "x$has_forbidden_chars" != x; then
43168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43172      # Going to short mode and back again did indeed matter. Since short mode is
43173      # case insensitive, let's make it lowercase to improve readability.
43174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43175      # Now convert it back to Unix-style (cygpath)
43176      input_path=`$CYGPATH -u "$shortmode_path"`
43177      new_path="$input_path"
43178    fi
43179  fi
43180
43181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43182  if test "x$test_cygdrive_prefix" = x; then
43183    # As a simple fix, exclude /usr/bin since it's not a real path.
43184    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43186      # a path prefixed by /cygdrive for fixpath to work.
43187      new_path="$CYGWIN_ROOT_PATH$input_path"
43188    fi
43189  fi
43190
43191  # remove trailing .exe if any
43192  new_path="${new_path/%.exe/}"
43193
43194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43195
43196  # First separate the path from the arguments. This will split at the first
43197  # space.
43198  complete="$BUILD_CXX"
43199  path="${complete%% *}"
43200  tmp="$complete EOL"
43201  arguments="${tmp#* }"
43202
43203  # Input might be given as Windows format, start by converting to
43204  # unix format.
43205  new_path="$path"
43206
43207  windows_path="$new_path"
43208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43209    unix_path=`$CYGPATH -u "$windows_path"`
43210    new_path="$unix_path"
43211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43213    new_path="$unix_path"
43214  fi
43215
43216
43217  # Now try to locate executable using which
43218  new_path=`$WHICH "$new_path" 2> /dev/null`
43219
43220  if test "x$new_path" = x; then
43221    # Oops. Which didn't find the executable.
43222    # The splitting of arguments from the executable at a space might have been incorrect,
43223    # since paths with space are more likely in Windows. Give it another try with the whole
43224    # argument.
43225    path="$complete"
43226    arguments="EOL"
43227    new_path="$path"
43228
43229  windows_path="$new_path"
43230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43231    unix_path=`$CYGPATH -u "$windows_path"`
43232    new_path="$unix_path"
43233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43235    new_path="$unix_path"
43236  fi
43237
43238
43239    new_path=`$WHICH "$new_path" 2> /dev/null`
43240    # bat and cmd files are not always considered executable in MSYS causing which
43241    # to not find them
43242    if test "x$new_path" = x \
43243        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43244        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43245      new_path="$path"
43246
43247  windows_path="$new_path"
43248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43249    unix_path=`$CYGPATH -u "$windows_path"`
43250    new_path="$unix_path"
43251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43253    new_path="$unix_path"
43254  fi
43255
43256    fi
43257
43258    if test "x$new_path" = x; then
43259      # It's still not found. Now this is an unrecoverable error.
43260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43261$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43262      has_space=`$ECHO "$complete" | $GREP " "`
43263      if test "x$has_space" != x; then
43264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43266      fi
43267      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43268    fi
43269  fi
43270
43271  # Now new_path has a complete unix path to the binary
43272  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43273    # Keep paths in /bin as-is, but remove trailing .exe if any
43274    new_path="${new_path/%.exe/}"
43275    # Do not save /bin paths to all_fixpath_prefixes!
43276  else
43277    # Not in mixed or Windows style, start by that.
43278    new_path=`cmd //c echo $new_path`
43279
43280  input_path="$new_path"
43281  # Check if we need to convert this using DOS-style short mode. If the path
43282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43283  # take no chances and rewrite it.
43284  # Note: m4 eats our [], so we need to use [ and ] instead.
43285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43286  if test "x$has_forbidden_chars" != x; then
43287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43289  fi
43290
43291    # Output is in $new_path
43292
43293  windows_path="$new_path"
43294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43295    unix_path=`$CYGPATH -u "$windows_path"`
43296    new_path="$unix_path"
43297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43299    new_path="$unix_path"
43300  fi
43301
43302    # remove trailing .exe if any
43303    new_path="${new_path/%.exe/}"
43304
43305    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43306    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43307  fi
43308
43309    else
43310      # We're on a unix platform. Hooray! :)
43311      # First separate the path from the arguments. This will split at the first
43312      # space.
43313      complete="$BUILD_CXX"
43314      path="${complete%% *}"
43315      tmp="$complete EOL"
43316      arguments="${tmp#* }"
43317
43318      # Cannot rely on the command "which" here since it doesn't always work.
43319      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43320      if test -z "$is_absolute_path"; then
43321        # Path to executable is not absolute. Find it.
43322        IFS_save="$IFS"
43323        IFS=:
43324        for p in $PATH; do
43325          if test -f "$p/$path" && test -x "$p/$path"; then
43326            new_path="$p/$path"
43327            break
43328          fi
43329        done
43330        IFS="$IFS_save"
43331      else
43332        # This is an absolute path, we can use it without further modifications.
43333        new_path="$path"
43334      fi
43335
43336      if test "x$new_path" = x; then
43337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43338$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43339        has_space=`$ECHO "$complete" | $GREP " "`
43340        if test "x$has_space" != x; then
43341          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43342$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43343        fi
43344        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43345      fi
43346    fi
43347
43348    # Now join together the path and the arguments once again
43349    if test "x$arguments" != xEOL; then
43350      new_complete="$new_path ${arguments% *}"
43351    else
43352      new_complete="$new_path"
43353    fi
43354
43355    if test "x$complete" != "x$new_complete"; then
43356      BUILD_CXX="$new_complete"
43357      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43358$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43359    fi
43360  fi
43361
43362    BUILD_LD="$BUILD_CC"
43363
43364    PATH="$OLDPATH"
43365  else
43366    # If we are not cross compiling, use the normal target compilers for
43367    # building the build platform executables.
43368    BUILD_CC="$CC"
43369    BUILD_CXX="$CXX"
43370    BUILD_LD="$LD"
43371    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
43372    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
43373  fi
43374
43375
43376
43377
43378
43379
43380
43381
43382  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43383    # For hotspot, we need these in Windows mixed path,
43384    # so rewrite them all. Need added .exe suffix.
43385    HOTSPOT_CXX="$CXX.exe"
43386    HOTSPOT_LD="$LD.exe"
43387    HOTSPOT_MT="$MT.exe"
43388    HOTSPOT_RC="$RC.exe"
43389
43390  unix_path="$HOTSPOT_CXX"
43391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43392    windows_path=`$CYGPATH -m "$unix_path"`
43393    HOTSPOT_CXX="$windows_path"
43394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43395    windows_path=`cmd //c echo $unix_path`
43396    HOTSPOT_CXX="$windows_path"
43397  fi
43398
43399
43400  unix_path="$HOTSPOT_LD"
43401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43402    windows_path=`$CYGPATH -m "$unix_path"`
43403    HOTSPOT_LD="$windows_path"
43404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43405    windows_path=`cmd //c echo $unix_path`
43406    HOTSPOT_LD="$windows_path"
43407  fi
43408
43409
43410  unix_path="$HOTSPOT_MT"
43411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43412    windows_path=`$CYGPATH -m "$unix_path"`
43413    HOTSPOT_MT="$windows_path"
43414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43415    windows_path=`cmd //c echo $unix_path`
43416    HOTSPOT_MT="$windows_path"
43417  fi
43418
43419
43420  unix_path="$HOTSPOT_RC"
43421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43422    windows_path=`$CYGPATH -m "$unix_path"`
43423    HOTSPOT_RC="$windows_path"
43424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43425    windows_path=`cmd //c echo $unix_path`
43426    HOTSPOT_RC="$windows_path"
43427  fi
43428
43429
43430
43431  else
43432    HOTSPOT_CXX="$CXX"
43433    HOTSPOT_LD="$LD"
43434  fi
43435
43436
43437
43438  if test  "x$TOOLCHAIN_TYPE" = xclang; then
43439    USE_CLANG=true
43440  fi
43441
43442
43443
43444
43445
43446  # The package path is used only on macosx?
43447  # FIXME: clean this up, and/or move it elsewhere.
43448  PACKAGE_PATH=/opt/local
43449
43450
43451  # Check for extra potential brokenness.
43452  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43453    # On Windows, double-check that we got the right compiler.
43454    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
43455    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
43456    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
43457      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
43458        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
43459      fi
43460    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
43461      if test "x$COMPILER_CPU_TEST" != "xx64"; then
43462        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
43463      fi
43464    fi
43465  fi
43466
43467  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43468    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43469    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
43470    # This is later checked when setting flags.
43471
43472    # "-Og" suppported for GCC 4.8 and later
43473    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
43474
43475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
43476$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
43477  supports=yes
43478
43479  saved_cflags="$CFLAGS"
43480  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
43481  ac_ext=c
43482ac_cpp='$CPP $CPPFLAGS'
43483ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43484ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43485ac_compiler_gnu=$ac_cv_c_compiler_gnu
43486
43487  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43488/* end confdefs.h.  */
43489int i;
43490_ACEOF
43491if ac_fn_c_try_compile "$LINENO"; then :
43492
43493else
43494  supports=no
43495fi
43496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43497  ac_ext=cpp
43498ac_cpp='$CXXCPP $CPPFLAGS'
43499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43502
43503  CFLAGS="$saved_cflags"
43504
43505  saved_cxxflags="$CXXFLAGS"
43506  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
43507  ac_ext=cpp
43508ac_cpp='$CXXCPP $CPPFLAGS'
43509ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43510ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43511ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43512
43513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43514/* end confdefs.h.  */
43515int i;
43516_ACEOF
43517if ac_fn_cxx_try_compile "$LINENO"; then :
43518
43519else
43520  supports=no
43521fi
43522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43523  ac_ext=cpp
43524ac_cpp='$CXXCPP $CPPFLAGS'
43525ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43526ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43527ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43528
43529  CXXFLAGS="$saved_cxxflags"
43530
43531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43532$as_echo "$supports" >&6; }
43533  if test "x$supports" = "xyes" ; then
43534    HAS_CFLAG_OPTIMIZE_DEBUG=true
43535  else
43536    HAS_CFLAG_OPTIMIZE_DEBUG=false
43537  fi
43538
43539
43540    # "-z relro" supported in GNU binutils 2.17 and later
43541    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
43542
43543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
43544$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
43545  supports=yes
43546
43547  saved_ldflags="$LDFLAGS"
43548  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
43549  ac_ext=c
43550ac_cpp='$CPP $CPPFLAGS'
43551ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43552ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43553ac_compiler_gnu=$ac_cv_c_compiler_gnu
43554
43555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43556/* end confdefs.h.  */
43557
43558int
43559main ()
43560{
43561
43562  ;
43563  return 0;
43564}
43565_ACEOF
43566if ac_fn_c_try_link "$LINENO"; then :
43567
43568else
43569  supports=no
43570fi
43571rm -f core conftest.err conftest.$ac_objext \
43572    conftest$ac_exeext conftest.$ac_ext
43573  ac_ext=cpp
43574ac_cpp='$CXXCPP $CPPFLAGS'
43575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43578
43579  LDFLAGS="$saved_ldflags"
43580
43581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43582$as_echo "$supports" >&6; }
43583  if test "x$supports" = "xyes" ; then
43584    HAS_LINKER_RELRO=true
43585  else
43586    HAS_LINKER_RELRO=false
43587  fi
43588
43589
43590    # "-z now" supported in GNU binutils 2.11 and later
43591    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
43592
43593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
43594$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
43595  supports=yes
43596
43597  saved_ldflags="$LDFLAGS"
43598  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
43599  ac_ext=c
43600ac_cpp='$CPP $CPPFLAGS'
43601ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43602ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43603ac_compiler_gnu=$ac_cv_c_compiler_gnu
43604
43605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43606/* end confdefs.h.  */
43607
43608int
43609main ()
43610{
43611
43612  ;
43613  return 0;
43614}
43615_ACEOF
43616if ac_fn_c_try_link "$LINENO"; then :
43617
43618else
43619  supports=no
43620fi
43621rm -f core conftest.err conftest.$ac_objext \
43622    conftest$ac_exeext conftest.$ac_ext
43623  ac_ext=cpp
43624ac_cpp='$CXXCPP $CPPFLAGS'
43625ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43626ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43627ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43628
43629  LDFLAGS="$saved_ldflags"
43630
43631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43632$as_echo "$supports" >&6; }
43633  if test "x$supports" = "xyes" ; then
43634    HAS_LINKER_NOW=true
43635  else
43636    HAS_LINKER_NOW=false
43637  fi
43638
43639  fi
43640
43641  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
43642  # in executable.'
43643  USING_BROKEN_SUSE_LD=no
43644  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
43645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
43646$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
43647    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
43648    $ECHO "int main() { }" > main.c
43649    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
43650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43651$as_echo "no" >&6; }
43652      USING_BROKEN_SUSE_LD=no
43653    else
43654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43655$as_echo "yes" >&6; }
43656      USING_BROKEN_SUSE_LD=yes
43657    fi
43658    rm -rf version-script.map main.c a.out
43659  fi
43660
43661
43662
43663# Setup the JTReg Regression Test Harness.
43664
43665
43666# Check whether --with-jtreg was given.
43667if test "${with_jtreg+set}" = set; then :
43668  withval=$with_jtreg;
43669else
43670  with_jtreg=no
43671fi
43672
43673
43674  if test "x$with_jtreg" = xno; then
43675    # jtreg disabled
43676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43677$as_echo_n "checking for jtreg... " >&6; }
43678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43679$as_echo "no" >&6; }
43680  else
43681    if test "x$with_jtreg" != xyes; then
43682      # with path specified.
43683      JT_HOME="$with_jtreg"
43684    fi
43685
43686    if test "x$JT_HOME" != x; then
43687      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43688$as_echo_n "checking for jtreg... " >&6; }
43689
43690      # use JT_HOME enviroment var.
43691
43692  # Only process if variable expands to non-empty
43693
43694  if test "x$JT_HOME" != x; then
43695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43696
43697  # Input might be given as Windows format, start by converting to
43698  # unix format.
43699  path="$JT_HOME"
43700  new_path=`$CYGPATH -u "$path"`
43701
43702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43705  # "foo.exe" is OK but "foo" is an error.
43706  #
43707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43708  # It is also a way to make sure we got the proper file name for the real test later on.
43709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43710  if test "x$test_shortpath" = x; then
43711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43712$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43713    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
43714  fi
43715
43716  # Call helper function which possibly converts this using DOS-style short mode.
43717  # If so, the updated path is stored in $new_path.
43718
43719  input_path="$new_path"
43720  # Check if we need to convert this using DOS-style short mode. If the path
43721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43722  # take no chances and rewrite it.
43723  # Note: m4 eats our [], so we need to use [ and ] instead.
43724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43725  if test "x$has_forbidden_chars" != x; then
43726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43730      # Going to short mode and back again did indeed matter. Since short mode is
43731      # case insensitive, let's make it lowercase to improve readability.
43732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43733      # Now convert it back to Unix-style (cygpath)
43734      input_path=`$CYGPATH -u "$shortmode_path"`
43735      new_path="$input_path"
43736    fi
43737  fi
43738
43739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43740  if test "x$test_cygdrive_prefix" = x; then
43741    # As a simple fix, exclude /usr/bin since it's not a real path.
43742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43744      # a path prefixed by /cygdrive for fixpath to work.
43745      new_path="$CYGWIN_ROOT_PATH$input_path"
43746    fi
43747  fi
43748
43749
43750  if test "x$path" != "x$new_path"; then
43751    JT_HOME="$new_path"
43752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43753$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43754  fi
43755
43756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43757
43758  path="$JT_HOME"
43759  has_colon=`$ECHO $path | $GREP ^.:`
43760  new_path="$path"
43761  if test "x$has_colon" = x; then
43762    # Not in mixed or Windows style, start by that.
43763    new_path=`cmd //c echo $path`
43764  fi
43765
43766
43767  input_path="$new_path"
43768  # Check if we need to convert this using DOS-style short mode. If the path
43769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43770  # take no chances and rewrite it.
43771  # Note: m4 eats our [], so we need to use [ and ] instead.
43772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43773  if test "x$has_forbidden_chars" != x; then
43774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43776  fi
43777
43778
43779  windows_path="$new_path"
43780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43781    unix_path=`$CYGPATH -u "$windows_path"`
43782    new_path="$unix_path"
43783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43785    new_path="$unix_path"
43786  fi
43787
43788  if test "x$path" != "x$new_path"; then
43789    JT_HOME="$new_path"
43790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43791$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43792  fi
43793
43794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43796
43797    else
43798      # We're on a unix platform. Hooray! :)
43799      path="$JT_HOME"
43800      has_space=`$ECHO "$path" | $GREP " "`
43801      if test "x$has_space" != x; then
43802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43803$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43804        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43805      fi
43806
43807      # Use eval to expand a potential ~
43808      eval path="$path"
43809      if test ! -f "$path" && test ! -d "$path"; then
43810        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
43811      fi
43812
43813      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
43814    fi
43815  fi
43816
43817
43818      # jtreg win32 script works for everybody
43819      JTREGEXE="$JT_HOME/bin/jtreg"
43820
43821      if test ! -f "$JTREGEXE"; then
43822        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
43823      fi
43824
43825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43826$as_echo "$JTREGEXE" >&6; }
43827    else
43828      # try to find jtreg on path
43829
43830
43831
43832  # Publish this variable in the help.
43833
43834
43835  if [ -z "${JTREGEXE+x}" ]; then
43836    # The variable is not set by user, try to locate tool using the code snippet
43837    for ac_prog in jtreg
43838do
43839  # Extract the first word of "$ac_prog", so it can be a program name with args.
43840set dummy $ac_prog; ac_word=$2
43841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43842$as_echo_n "checking for $ac_word... " >&6; }
43843if ${ac_cv_path_JTREGEXE+:} false; then :
43844  $as_echo_n "(cached) " >&6
43845else
43846  case $JTREGEXE in
43847  [\\/]* | ?:[\\/]*)
43848  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43849  ;;
43850  *)
43851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43852for as_dir in $PATH
43853do
43854  IFS=$as_save_IFS
43855  test -z "$as_dir" && as_dir=.
43856    for ac_exec_ext in '' $ac_executable_extensions; do
43857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43858    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43860    break 2
43861  fi
43862done
43863  done
43864IFS=$as_save_IFS
43865
43866  ;;
43867esac
43868fi
43869JTREGEXE=$ac_cv_path_JTREGEXE
43870if test -n "$JTREGEXE"; then
43871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43872$as_echo "$JTREGEXE" >&6; }
43873else
43874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43875$as_echo "no" >&6; }
43876fi
43877
43878
43879  test -n "$JTREGEXE" && break
43880done
43881
43882  else
43883    # The variable is set, but is it from the command line or the environment?
43884
43885    # Try to remove the string !JTREGEXE! from our list.
43886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
43887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43888      # If it failed, the variable was not from the command line. Ignore it,
43889      # but warn the user (except for BASH, which is always set by the calling BASH).
43890      if test "xJTREGEXE" != xBASH; then
43891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
43892$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
43893      fi
43894      # Try to locate tool using the code snippet
43895      for ac_prog in jtreg
43896do
43897  # Extract the first word of "$ac_prog", so it can be a program name with args.
43898set dummy $ac_prog; ac_word=$2
43899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43900$as_echo_n "checking for $ac_word... " >&6; }
43901if ${ac_cv_path_JTREGEXE+:} false; then :
43902  $as_echo_n "(cached) " >&6
43903else
43904  case $JTREGEXE in
43905  [\\/]* | ?:[\\/]*)
43906  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43907  ;;
43908  *)
43909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43910for as_dir in $PATH
43911do
43912  IFS=$as_save_IFS
43913  test -z "$as_dir" && as_dir=.
43914    for ac_exec_ext in '' $ac_executable_extensions; do
43915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43916    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43918    break 2
43919  fi
43920done
43921  done
43922IFS=$as_save_IFS
43923
43924  ;;
43925esac
43926fi
43927JTREGEXE=$ac_cv_path_JTREGEXE
43928if test -n "$JTREGEXE"; then
43929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43930$as_echo "$JTREGEXE" >&6; }
43931else
43932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43933$as_echo "no" >&6; }
43934fi
43935
43936
43937  test -n "$JTREGEXE" && break
43938done
43939
43940    else
43941      # If it succeeded, then it was overridden by the user. We will use it
43942      # for the tool.
43943
43944      # First remove it from the list of overridden variables, so we can test
43945      # for unknown variables in the end.
43946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43947
43948      # Check if we try to supply an empty value
43949      if test "x$JTREGEXE" = x; then
43950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
43951$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
43952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43953$as_echo_n "checking for JTREGEXE... " >&6; }
43954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43955$as_echo "disabled" >&6; }
43956      else
43957        # Check if the provided tool contains a complete path.
43958        tool_specified="$JTREGEXE"
43959        tool_basename="${tool_specified##*/}"
43960        if test "x$tool_basename" = "x$tool_specified"; then
43961          # A command without a complete path is provided, search $PATH.
43962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
43963$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
43964          # Extract the first word of "$tool_basename", so it can be a program name with args.
43965set dummy $tool_basename; ac_word=$2
43966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43967$as_echo_n "checking for $ac_word... " >&6; }
43968if ${ac_cv_path_JTREGEXE+:} false; then :
43969  $as_echo_n "(cached) " >&6
43970else
43971  case $JTREGEXE in
43972  [\\/]* | ?:[\\/]*)
43973  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43974  ;;
43975  *)
43976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43977for as_dir in $PATH
43978do
43979  IFS=$as_save_IFS
43980  test -z "$as_dir" && as_dir=.
43981    for ac_exec_ext in '' $ac_executable_extensions; do
43982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43983    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43985    break 2
43986  fi
43987done
43988  done
43989IFS=$as_save_IFS
43990
43991  ;;
43992esac
43993fi
43994JTREGEXE=$ac_cv_path_JTREGEXE
43995if test -n "$JTREGEXE"; then
43996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43997$as_echo "$JTREGEXE" >&6; }
43998else
43999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44000$as_echo "no" >&6; }
44001fi
44002
44003
44004          if test "x$JTREGEXE" = x; then
44005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44006          fi
44007        else
44008          # Otherwise we believe it is a complete path. Use it as it is.
44009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
44010$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
44011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
44012$as_echo_n "checking for JTREGEXE... " >&6; }
44013          if test ! -x "$tool_specified"; then
44014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44015$as_echo "not found" >&6; }
44016            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
44017          fi
44018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44019$as_echo "$tool_specified" >&6; }
44020        fi
44021      fi
44022    fi
44023
44024  fi
44025
44026
44027
44028  if test "x$JTREGEXE" = x; then
44029    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
44030  fi
44031
44032
44033      JT_HOME="`$DIRNAME $JTREGEXE`"
44034    fi
44035  fi
44036
44037
44038
44039
44040
44041
44042  # Option used to tell the compiler whether to create 32- or 64-bit executables
44043  if test "x$TOOLCHAIN_TYPE" = xxlc; then
44044    COMPILER_TARGET_BITS_FLAG="-q"
44045  else
44046    COMPILER_TARGET_BITS_FLAG="-m"
44047  fi
44048
44049
44050  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
44051  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44052    ARFLAGS="-r"
44053  elif test "x$OPENJDK_TARGET_OS" = xaix; then
44054    ARFLAGS="-X64"
44055  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
44056    # lib.exe is used as AR to create static libraries.
44057    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
44058  else
44059    ARFLAGS=""
44060  fi
44061
44062
44063  ## Setup strip.
44064  # FIXME: should this really be per platform, or should it be per toolchain type?
44065  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
44066  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
44067  if test "x$OPENJDK_TARGET_OS" = xlinux; then
44068    STRIPFLAGS="-g"
44069  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
44070    STRIPFLAGS="-x"
44071  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
44072    STRIPFLAGS="-S"
44073  elif test "x$OPENJDK_TARGET_OS" = xaix; then
44074    STRIPFLAGS="-X32_64"
44075  fi
44076
44077
44078
44079  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44080    CC_OUT_OPTION=-Fo
44081    EXE_OUT_OPTION=-out:
44082    LD_OUT_OPTION=-out:
44083    AR_OUT_OPTION=-out:
44084  else
44085    # The option used to specify the target .o,.a or .so file.
44086    # When compiling, how to specify the to be created object file.
44087    CC_OUT_OPTION='-o$(SPACE)'
44088    # When linking, how to specify the to be created executable.
44089    EXE_OUT_OPTION='-o$(SPACE)'
44090    # When linking, how to specify the to be created dynamically linkable library.
44091    LD_OUT_OPTION='-o$(SPACE)'
44092    # When archiving, how to specify the to be create static archive for object files.
44093    AR_OUT_OPTION='rcs$(SPACE)'
44094  fi
44095
44096
44097
44098
44099
44100  # On Windows, we need to set RC flags.
44101  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44102    RC_FLAGS="-nologo -l0x409"
44103    if test "x$VARIANT" = xOPT; then
44104      RC_FLAGS="$RC_FLAGS -DNDEBUG"
44105    fi
44106
44107    # The version variables used to create RC_FLAGS may be overridden
44108    # in a custom configure script, or possibly the command line.
44109    # Let those variables be expanded at make time in spec.gmk.
44110    # The \$ are escaped to the shell, and the $(...) variables
44111    # are evaluated by make.
44112    RC_FLAGS="$RC_FLAGS \
44113        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
44114        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
44115        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
44116        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
44117        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
44118        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
44119        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
44120  fi
44121
44122
44123  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44124    # silence copyright notice and other headers.
44125    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
44126  fi
44127
44128
44129# FIXME: Currently we must test this after toolchain but before flags. Fix!
44130
44131# Now we can test some aspects on the target using configure macros.
44132
44133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
44134$as_echo_n "checking for ANSI C header files... " >&6; }
44135if ${ac_cv_header_stdc+:} false; then :
44136  $as_echo_n "(cached) " >&6
44137else
44138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44139/* end confdefs.h.  */
44140#include <stdlib.h>
44141#include <stdarg.h>
44142#include <string.h>
44143#include <float.h>
44144
44145int
44146main ()
44147{
44148
44149  ;
44150  return 0;
44151}
44152_ACEOF
44153if ac_fn_cxx_try_compile "$LINENO"; then :
44154  ac_cv_header_stdc=yes
44155else
44156  ac_cv_header_stdc=no
44157fi
44158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44159
44160if test $ac_cv_header_stdc = yes; then
44161  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
44162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44163/* end confdefs.h.  */
44164#include <string.h>
44165
44166_ACEOF
44167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44168  $EGREP "memchr" >/dev/null 2>&1; then :
44169
44170else
44171  ac_cv_header_stdc=no
44172fi
44173rm -f conftest*
44174
44175fi
44176
44177if test $ac_cv_header_stdc = yes; then
44178  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
44179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44180/* end confdefs.h.  */
44181#include <stdlib.h>
44182
44183_ACEOF
44184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44185  $EGREP "free" >/dev/null 2>&1; then :
44186
44187else
44188  ac_cv_header_stdc=no
44189fi
44190rm -f conftest*
44191
44192fi
44193
44194if test $ac_cv_header_stdc = yes; then
44195  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
44196  if test "$cross_compiling" = yes; then :
44197  :
44198else
44199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44200/* end confdefs.h.  */
44201#include <ctype.h>
44202#include <stdlib.h>
44203#if ((' ' & 0x0FF) == 0x020)
44204# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
44205# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
44206#else
44207# define ISLOWER(c) \
44208		   (('a' <= (c) && (c) <= 'i') \
44209		     || ('j' <= (c) && (c) <= 'r') \
44210		     || ('s' <= (c) && (c) <= 'z'))
44211# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
44212#endif
44213
44214#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
44215int
44216main ()
44217{
44218  int i;
44219  for (i = 0; i < 256; i++)
44220    if (XOR (islower (i), ISLOWER (i))
44221	|| toupper (i) != TOUPPER (i))
44222      return 2;
44223  return 0;
44224}
44225_ACEOF
44226if ac_fn_cxx_try_run "$LINENO"; then :
44227
44228else
44229  ac_cv_header_stdc=no
44230fi
44231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44232  conftest.$ac_objext conftest.beam conftest.$ac_ext
44233fi
44234
44235fi
44236fi
44237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
44238$as_echo "$ac_cv_header_stdc" >&6; }
44239if test $ac_cv_header_stdc = yes; then
44240
44241$as_echo "#define STDC_HEADERS 1" >>confdefs.h
44242
44243fi
44244
44245# On IRIX 5.3, sys/types and inttypes.h are conflicting.
44246for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
44247		  inttypes.h stdint.h unistd.h
44248do :
44249  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44250ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
44251"
44252if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44253  cat >>confdefs.h <<_ACEOF
44254#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44255_ACEOF
44256
44257fi
44258
44259done
44260
44261
44262
44263  ###############################################################################
44264  #
44265  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
44266  # (The JVM can use 32 or 64 bit Java pointers but that decision
44267  # is made at runtime.)
44268  #
44269
44270  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
44271    # Always specify -m flag on Solaris
44272    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
44273
44274  # When we add flags to the "official" CFLAGS etc, we need to
44275  # keep track of these additions in ADDED_CFLAGS etc. These
44276  # will later be checked to make sure only controlled additions
44277  # have been made to CFLAGS etc.
44278  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44279  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44280  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44281
44282  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44283  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44284  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44285
44286  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44287  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44288  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44289
44290  elif test "x$COMPILE_TYPE" = xreduced; then
44291    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
44292      # Specify -m if running reduced on unix platforms
44293
44294  # When we add flags to the "official" CFLAGS etc, we need to
44295  # keep track of these additions in ADDED_CFLAGS etc. These
44296  # will later be checked to make sure only controlled additions
44297  # have been made to CFLAGS etc.
44298  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44299  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44300  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44301
44302  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44303  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44304  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44305
44306  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44307  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44308  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44309
44310    fi
44311  fi
44312
44313  # Make compilation sanity check
44314  for ac_header in stdio.h
44315do :
44316  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
44317if test "x$ac_cv_header_stdio_h" = xyes; then :
44318  cat >>confdefs.h <<_ACEOF
44319#define HAVE_STDIO_H 1
44320_ACEOF
44321
44322else
44323
44324    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
44325$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
44326    if test "x$COMPILE_TYPE" = xreduced; then
44327
44328  # Print a helpful message on how to acquire the necessary build dependency.
44329  # reduced is the help tag: freetype, cups, alsa etc
44330  MISSING_DEPENDENCY=reduced
44331
44332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44333    cygwin_help $MISSING_DEPENDENCY
44334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44335    msys_help $MISSING_DEPENDENCY
44336  else
44337    PKGHANDLER_COMMAND=
44338
44339    case $PKGHANDLER in
44340      apt-get)
44341        apt_help     $MISSING_DEPENDENCY ;;
44342      yum)
44343        yum_help     $MISSING_DEPENDENCY ;;
44344      port)
44345        port_help    $MISSING_DEPENDENCY ;;
44346      pkgutil)
44347        pkgutil_help $MISSING_DEPENDENCY ;;
44348      pkgadd)
44349        pkgadd_help  $MISSING_DEPENDENCY ;;
44350    esac
44351
44352    if test "x$PKGHANDLER_COMMAND" != x; then
44353      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44354    fi
44355  fi
44356
44357      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44358$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44359    elif test "x$COMPILE_TYPE" = xcross; then
44360      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44361$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44362    fi
44363    as_fn_error $? "Cannot continue." "$LINENO" 5
44364
44365fi
44366
44367done
44368
44369
44370  # The cast to long int works around a bug in the HP C Compiler
44371# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44372# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44373# This bug is HP SR number 8606223364.
44374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44375$as_echo_n "checking size of int *... " >&6; }
44376if ${ac_cv_sizeof_int_p+:} false; then :
44377  $as_echo_n "(cached) " >&6
44378else
44379  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44380
44381else
44382  if test "$ac_cv_type_int_p" = yes; then
44383     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44384$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44385as_fn_error 77 "cannot compute sizeof (int *)
44386See \`config.log' for more details" "$LINENO" 5; }
44387   else
44388     ac_cv_sizeof_int_p=0
44389   fi
44390fi
44391
44392fi
44393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44394$as_echo "$ac_cv_sizeof_int_p" >&6; }
44395
44396
44397
44398cat >>confdefs.h <<_ACEOF
44399#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44400_ACEOF
44401
44402
44403
44404  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
44405  if test "x$ac_cv_sizeof_int_p" = x; then
44406    # The test failed, lets stick to the assumed value.
44407    { $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
44408$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
44409  else
44410    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44411
44412    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44413      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
44414      # Let's try to implicitely set the compilers target architecture and retry the test
44415      { $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
44416$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;}
44417      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
44418$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
44419
44420  # When we add flags to the "official" CFLAGS etc, we need to
44421  # keep track of these additions in ADDED_CFLAGS etc. These
44422  # will later be checked to make sure only controlled additions
44423  # have been made to CFLAGS etc.
44424  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44425  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44426  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44427
44428  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44429  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44430  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44431
44432  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44433  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44434  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44435
44436
44437      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
44438      unset ac_cv_sizeof_int_p
44439      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
44440      cat >>confdefs.h <<_ACEOF
44441#undef SIZEOF_INT_P
44442_ACEOF
44443
44444      # The cast to long int works around a bug in the HP C Compiler
44445# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44446# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44447# This bug is HP SR number 8606223364.
44448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44449$as_echo_n "checking size of int *... " >&6; }
44450if ${ac_cv_sizeof_int_p+:} false; then :
44451  $as_echo_n "(cached) " >&6
44452else
44453  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44454
44455else
44456  if test "$ac_cv_type_int_p" = yes; then
44457     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44459as_fn_error 77 "cannot compute sizeof (int *)
44460See \`config.log' for more details" "$LINENO" 5; }
44461   else
44462     ac_cv_sizeof_int_p=0
44463   fi
44464fi
44465
44466fi
44467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44468$as_echo "$ac_cv_sizeof_int_p" >&6; }
44469
44470
44471
44472cat >>confdefs.h <<_ACEOF
44473#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44474_ACEOF
44475
44476
44477
44478      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44479
44480      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44481        { $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
44482$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;}
44483        if test "x$COMPILE_TYPE" = xreduced; then
44484
44485  # Print a helpful message on how to acquire the necessary build dependency.
44486  # reduced is the help tag: freetype, cups, alsa etc
44487  MISSING_DEPENDENCY=reduced
44488
44489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44490    cygwin_help $MISSING_DEPENDENCY
44491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44492    msys_help $MISSING_DEPENDENCY
44493  else
44494    PKGHANDLER_COMMAND=
44495
44496    case $PKGHANDLER in
44497      apt-get)
44498        apt_help     $MISSING_DEPENDENCY ;;
44499      yum)
44500        yum_help     $MISSING_DEPENDENCY ;;
44501      port)
44502        port_help    $MISSING_DEPENDENCY ;;
44503      pkgutil)
44504        pkgutil_help $MISSING_DEPENDENCY ;;
44505      pkgadd)
44506        pkgadd_help  $MISSING_DEPENDENCY ;;
44507    esac
44508
44509    if test "x$PKGHANDLER_COMMAND" != x; then
44510      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44511    fi
44512  fi
44513
44514          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44515$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44516        elif test "x$COMPILE_TYPE" = xcross; then
44517          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44518$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44519        fi
44520        as_fn_error $? "Cannot continue." "$LINENO" 5
44521      fi
44522    fi
44523  fi
44524
44525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
44526$as_echo_n "checking for target address size... " >&6; }
44527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
44528$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
44529
44530
44531  ###############################################################################
44532  #
44533  # Is the target little of big endian?
44534  #
44535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
44536$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
44537if ${ac_cv_c_bigendian+:} false; then :
44538  $as_echo_n "(cached) " >&6
44539else
44540  ac_cv_c_bigendian=unknown
44541    # See if we're dealing with a universal compiler.
44542    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44543/* end confdefs.h.  */
44544#ifndef __APPLE_CC__
44545	       not a universal capable compiler
44546	     #endif
44547	     typedef int dummy;
44548
44549_ACEOF
44550if ac_fn_cxx_try_compile "$LINENO"; then :
44551
44552	# Check for potential -arch flags.  It is not universal unless
44553	# there are at least two -arch flags with different values.
44554	ac_arch=
44555	ac_prev=
44556	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
44557	 if test -n "$ac_prev"; then
44558	   case $ac_word in
44559	     i?86 | x86_64 | ppc | ppc64)
44560	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
44561		 ac_arch=$ac_word
44562	       else
44563		 ac_cv_c_bigendian=universal
44564		 break
44565	       fi
44566	       ;;
44567	   esac
44568	   ac_prev=
44569	 elif test "x$ac_word" = "x-arch"; then
44570	   ac_prev=arch
44571	 fi
44572       done
44573fi
44574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44575    if test $ac_cv_c_bigendian = unknown; then
44576      # See if sys/param.h defines the BYTE_ORDER macro.
44577      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44578/* end confdefs.h.  */
44579#include <sys/types.h>
44580	     #include <sys/param.h>
44581
44582int
44583main ()
44584{
44585#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
44586		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
44587		     && LITTLE_ENDIAN)
44588	      bogus endian macros
44589	     #endif
44590
44591  ;
44592  return 0;
44593}
44594_ACEOF
44595if ac_fn_cxx_try_compile "$LINENO"; then :
44596  # It does; now see whether it defined to BIG_ENDIAN or not.
44597	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44598/* end confdefs.h.  */
44599#include <sys/types.h>
44600		#include <sys/param.h>
44601
44602int
44603main ()
44604{
44605#if BYTE_ORDER != BIG_ENDIAN
44606		 not big endian
44607		#endif
44608
44609  ;
44610  return 0;
44611}
44612_ACEOF
44613if ac_fn_cxx_try_compile "$LINENO"; then :
44614  ac_cv_c_bigendian=yes
44615else
44616  ac_cv_c_bigendian=no
44617fi
44618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44619fi
44620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44621    fi
44622    if test $ac_cv_c_bigendian = unknown; then
44623      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
44624      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44625/* end confdefs.h.  */
44626#include <limits.h>
44627
44628int
44629main ()
44630{
44631#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
44632	      bogus endian macros
44633	     #endif
44634
44635  ;
44636  return 0;
44637}
44638_ACEOF
44639if ac_fn_cxx_try_compile "$LINENO"; then :
44640  # It does; now see whether it defined to _BIG_ENDIAN or not.
44641	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44642/* end confdefs.h.  */
44643#include <limits.h>
44644
44645int
44646main ()
44647{
44648#ifndef _BIG_ENDIAN
44649		 not big endian
44650		#endif
44651
44652  ;
44653  return 0;
44654}
44655_ACEOF
44656if ac_fn_cxx_try_compile "$LINENO"; then :
44657  ac_cv_c_bigendian=yes
44658else
44659  ac_cv_c_bigendian=no
44660fi
44661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44662fi
44663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44664    fi
44665    if test $ac_cv_c_bigendian = unknown; then
44666      # Compile a test program.
44667      if test "$cross_compiling" = yes; then :
44668  # Try to guess by grepping values from an object file.
44669	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44670/* end confdefs.h.  */
44671short int ascii_mm[] =
44672		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
44673		short int ascii_ii[] =
44674		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
44675		int use_ascii (int i) {
44676		  return ascii_mm[i] + ascii_ii[i];
44677		}
44678		short int ebcdic_ii[] =
44679		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
44680		short int ebcdic_mm[] =
44681		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
44682		int use_ebcdic (int i) {
44683		  return ebcdic_mm[i] + ebcdic_ii[i];
44684		}
44685		extern int foo;
44686
44687int
44688main ()
44689{
44690return use_ascii (foo) == use_ebcdic (foo);
44691  ;
44692  return 0;
44693}
44694_ACEOF
44695if ac_fn_cxx_try_compile "$LINENO"; then :
44696  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
44697	      ac_cv_c_bigendian=yes
44698	    fi
44699	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
44700	      if test "$ac_cv_c_bigendian" = unknown; then
44701		ac_cv_c_bigendian=no
44702	      else
44703		# finding both strings is unlikely to happen, but who knows?
44704		ac_cv_c_bigendian=unknown
44705	      fi
44706	    fi
44707fi
44708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44709else
44710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44711/* end confdefs.h.  */
44712$ac_includes_default
44713int
44714main ()
44715{
44716
44717	     /* Are we little or big endian?  From Harbison&Steele.  */
44718	     union
44719	     {
44720	       long int l;
44721	       char c[sizeof (long int)];
44722	     } u;
44723	     u.l = 1;
44724	     return u.c[sizeof (long int) - 1] == 1;
44725
44726  ;
44727  return 0;
44728}
44729_ACEOF
44730if ac_fn_cxx_try_run "$LINENO"; then :
44731  ac_cv_c_bigendian=no
44732else
44733  ac_cv_c_bigendian=yes
44734fi
44735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44736  conftest.$ac_objext conftest.beam conftest.$ac_ext
44737fi
44738
44739    fi
44740fi
44741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
44742$as_echo "$ac_cv_c_bigendian" >&6; }
44743 case $ac_cv_c_bigendian in #(
44744   yes)
44745     ENDIAN="big";; #(
44746   no)
44747     ENDIAN="little" ;; #(
44748   universal)
44749     ENDIAN="universal_endianness"
44750     ;; #(
44751   *)
44752     ENDIAN="unknown" ;;
44753 esac
44754
44755
44756  if test "x$ENDIAN" = xuniversal_endianness; then
44757    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
44758  fi
44759  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
44760    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
44761  fi
44762
44763
44764# Configure flags for the tools
44765
44766  ###############################################################################
44767  #
44768  # How to compile shared libraries.
44769  #
44770
44771  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44772    PICFLAG="-fPIC"
44773    C_FLAG_REORDER=''
44774    CXX_FLAG_REORDER=''
44775
44776    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44777      # Linking is different on MacOSX
44778      if test "x$STATIC_BUILD" = xtrue; then
44779        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
44780      else
44781        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44782      fi
44783      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44784      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44785      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44786      SET_SHARED_LIBRARY_MAPFILE=''
44787    else
44788      # Default works for linux, might work on other platforms as well.
44789      SHARED_LIBRARY_FLAGS='-shared'
44790      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44791      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44792      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44793      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44794    fi
44795  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44796    PICFLAG=''
44797    C_FLAG_REORDER=''
44798    CXX_FLAG_REORDER=''
44799
44800    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44801      # Linking is different on MacOSX
44802      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44803      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44804      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44805      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44806      SET_SHARED_LIBRARY_MAPFILE=''
44807    else
44808      # Default works for linux, might work on other platforms as well.
44809      SHARED_LIBRARY_FLAGS='-shared'
44810      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44811      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44812      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44813      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44814    fi
44815  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44816    PICFLAG="-KPIC"
44817    C_FLAG_REORDER='-xF'
44818    CXX_FLAG_REORDER='-xF'
44819    SHARED_LIBRARY_FLAGS="-G"
44820    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
44821    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44822    SET_SHARED_LIBRARY_NAME=''
44823    SET_SHARED_LIBRARY_MAPFILE='-M$1'
44824  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44825    PICFLAG="-qpic=large"
44826    C_FLAG_REORDER=''
44827    CXX_FLAG_REORDER=''
44828    SHARED_LIBRARY_FLAGS="-qmkshrobj"
44829    SET_EXECUTABLE_ORIGIN=""
44830    SET_SHARED_LIBRARY_ORIGIN=''
44831    SET_SHARED_LIBRARY_NAME=''
44832    SET_SHARED_LIBRARY_MAPFILE=''
44833  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44834    PICFLAG=""
44835    C_FLAG_REORDER=''
44836    CXX_FLAG_REORDER=''
44837    SHARED_LIBRARY_FLAGS="-LD"
44838    SET_EXECUTABLE_ORIGIN=''
44839    SET_SHARED_LIBRARY_ORIGIN=''
44840    SET_SHARED_LIBRARY_NAME=''
44841    SET_SHARED_LIBRARY_MAPFILE=''
44842  fi
44843
44844
44845
44846
44847
44848
44849
44850
44851  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44852    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
44853    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
44854    CFLAGS_JDKLIB_EXTRA='-xstrconst'
44855  fi
44856  # The (cross) compiler is now configured, we can now test capabilities
44857  # of the target platform.
44858
44859
44860
44861  ###############################################################################
44862  #
44863  # Setup the opt flags for different compilers
44864  # and different operating systems.
44865  #
44866
44867  # FIXME: this was indirectly the old default, but just inherited.
44868  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44869  #   C_FLAG_DEPS="-MMD -MF"
44870  # fi
44871
44872  # Generate make dependency files
44873  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44874    C_FLAG_DEPS="-MMD -MF"
44875  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44876    C_FLAG_DEPS="-MMD -MF"
44877  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44878    C_FLAG_DEPS="-xMMD -xMF"
44879  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44880    C_FLAG_DEPS="-qmakedep=gcc -MF"
44881  fi
44882  CXX_FLAG_DEPS="$C_FLAG_DEPS"
44883
44884
44885
44886  # Debug symbols
44887  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44888    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
44889      # reduce from default "-g2" option to save space
44890      CFLAGS_DEBUG_SYMBOLS="-g1"
44891      CXXFLAGS_DEBUG_SYMBOLS="-g1"
44892    else
44893      CFLAGS_DEBUG_SYMBOLS="-g"
44894      CXXFLAGS_DEBUG_SYMBOLS="-g"
44895    fi
44896  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44897    CFLAGS_DEBUG_SYMBOLS="-g"
44898    CXXFLAGS_DEBUG_SYMBOLS="-g"
44899  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44900    CFLAGS_DEBUG_SYMBOLS="-g -xs"
44901    # FIXME: likely a bug, this disables debug symbols rather than enables them
44902    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
44903  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44904    CFLAGS_DEBUG_SYMBOLS="-g"
44905    CXXFLAGS_DEBUG_SYMBOLS="-g"
44906  fi
44907
44908
44909
44910  # bounds, memory and behavior checking options
44911  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44912    case $DEBUG_LEVEL in
44913    release )
44914      # no adjustment
44915      ;;
44916    fastdebug )
44917      # no adjustment
44918      ;;
44919    slowdebug )
44920      # Add runtime stack smashing and undefined behavior checks.
44921      # Not all versions of gcc support -fstack-protector
44922      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
44923
44924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
44925$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
44926  supports=yes
44927
44928  saved_cflags="$CFLAGS"
44929  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
44930  ac_ext=c
44931ac_cpp='$CPP $CPPFLAGS'
44932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44934ac_compiler_gnu=$ac_cv_c_compiler_gnu
44935
44936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44937/* end confdefs.h.  */
44938int i;
44939_ACEOF
44940if ac_fn_c_try_compile "$LINENO"; then :
44941
44942else
44943  supports=no
44944fi
44945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44946  ac_ext=cpp
44947ac_cpp='$CXXCPP $CPPFLAGS'
44948ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44949ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44950ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44951
44952  CFLAGS="$saved_cflags"
44953
44954  saved_cxxflags="$CXXFLAGS"
44955  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
44956  ac_ext=cpp
44957ac_cpp='$CXXCPP $CPPFLAGS'
44958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44961
44962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44963/* end confdefs.h.  */
44964int i;
44965_ACEOF
44966if ac_fn_cxx_try_compile "$LINENO"; then :
44967
44968else
44969  supports=no
44970fi
44971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44972  ac_ext=cpp
44973ac_cpp='$CXXCPP $CPPFLAGS'
44974ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44975ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44976ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44977
44978  CXXFLAGS="$saved_cxxflags"
44979
44980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44981$as_echo "$supports" >&6; }
44982  if test "x$supports" = "xyes" ; then
44983    :
44984  else
44985    STACK_PROTECTOR_CFLAG=""
44986  fi
44987
44988
44989      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44990      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44991      ;;
44992    esac
44993  fi
44994
44995  # Optimization levels
44996  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44997    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
44998
44999    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
45000      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
45001      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
45002      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
45003      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
45004      C_O_FLAG_DEBUG="-xregs=no%frameptr"
45005      C_O_FLAG_NONE="-xregs=no%frameptr"
45006      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
45007      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
45008      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
45009      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
45010      CXX_O_FLAG_NONE="-xregs=no%frameptr"
45011      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
45012        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
45013        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
45014      fi
45015    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
45016      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
45017      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
45018      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
45019      C_O_FLAG_DEBUG=""
45020      C_O_FLAG_NONE=""
45021      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
45022      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
45023      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
45024      C_O_FLAG_DEBUG=""
45025      CXX_O_FLAG_NONE=""
45026    fi
45027  else
45028    # The remaining toolchains share opt flags between CC and CXX;
45029    # setup for C and duplicate afterwards.
45030    if test "x$TOOLCHAIN_TYPE" = xgcc; then
45031      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45032        # On MacOSX we optimize for size, something
45033        # we should do for all platforms?
45034        C_O_FLAG_HIGHEST="-Os"
45035        C_O_FLAG_HI="-Os"
45036        C_O_FLAG_NORM="-Os"
45037      else
45038        C_O_FLAG_HIGHEST="-O3"
45039        C_O_FLAG_HI="-O3"
45040        C_O_FLAG_NORM="-O2"
45041      fi
45042      C_O_FLAG_DEBUG="-O0"
45043      C_O_FLAG_NONE="-O0"
45044    elif test "x$TOOLCHAIN_TYPE" = xclang; then
45045      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45046        # On MacOSX we optimize for size, something
45047        # we should do for all platforms?
45048        C_O_FLAG_HIGHEST="-Os"
45049        C_O_FLAG_HI="-Os"
45050        C_O_FLAG_NORM="-Os"
45051      else
45052        C_O_FLAG_HIGHEST="-O3"
45053        C_O_FLAG_HI="-O3"
45054        C_O_FLAG_NORM="-O2"
45055      fi
45056      C_O_FLAG_DEBUG="-O0"
45057      C_O_FLAG_NONE="-O0"
45058    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45059      C_O_FLAG_HIGHEST="-O3"
45060      C_O_FLAG_HI="-O3 -qstrict"
45061      C_O_FLAG_NORM="-O2"
45062      C_O_FLAG_DEBUG="-qnoopt"
45063      C_O_FLAG_NONE="-qnoop"
45064    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45065      C_O_FLAG_HIGHEST="-O2"
45066      C_O_FLAG_HI="-O1"
45067      C_O_FLAG_NORM="-O1"
45068      C_O_FLAG_DEBUG="-Od"
45069      C_O_FLAG_NONE="-Od"
45070    fi
45071    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
45072    CXX_O_FLAG_HI="$C_O_FLAG_HI"
45073    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
45074    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
45075    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
45076  fi
45077
45078  # Adjust optimization flags according to debug level.
45079  case $DEBUG_LEVEL in
45080    release )
45081      # no adjustment
45082      ;;
45083    fastdebug )
45084      # Not quite so much optimization
45085      C_O_FLAG_HI="$C_O_FLAG_NORM"
45086      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
45087      ;;
45088    slowdebug )
45089      # Disable optimization
45090      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
45091      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
45092      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
45093      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
45094      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
45095      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
45096      ;;
45097  esac
45098
45099
45100
45101
45102
45103
45104
45105
45106
45107
45108
45109
45110
45111  # Special extras...
45112  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45113    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
45114      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
45115      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
45116    fi
45117    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
45118    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
45119  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45120    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
45121    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
45122  fi
45123
45124  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
45125  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
45126  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
45127
45128  ###############################################################################
45129  #
45130  # Now setup the CFLAGS and LDFLAGS for the JDK build.
45131  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
45132  #
45133
45134  # Setup compiler/platform specific flags into
45135  #    CFLAGS_JDK    - C Compiler flags
45136  #    CXXFLAGS_JDK  - C++ Compiler flags
45137  #    COMMON_CCXXFLAGS_JDK - common to C and C++
45138  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45139    if test "x$OPENJDK_TARGET_CPU" = xx86; then
45140      # Force compatibility with i586 on 32 bit intel platforms.
45141      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
45142    fi
45143    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
45144        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
45145    case $OPENJDK_TARGET_CPU_ARCH in
45146      arm )
45147        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
45148        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
45149        ;;
45150      ppc )
45151        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
45152        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
45153        ;;
45154      * )
45155        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
45156        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
45157        ;;
45158    esac
45159  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45160    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
45161    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
45162      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
45163    fi
45164
45165    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
45166    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
45167  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45168    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
45169    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
45170  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45171    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
45172        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
45173        -DWIN32_LEAN_AND_MEAN \
45174        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
45175        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
45176        -DWIN32 -DIAL"
45177    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45178      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
45179    else
45180      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
45181    fi
45182    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
45183    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
45184    # studio.
45185    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
45186      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
45187          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
45188    fi
45189  fi
45190
45191  ###############################################################################
45192
45193  # Adjust flags according to debug level.
45194  case $DEBUG_LEVEL in
45195    fastdebug | slowdebug )
45196      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
45197      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
45198      JAVAC_FLAGS="$JAVAC_FLAGS -g"
45199      ;;
45200    release )
45201      ;;
45202    * )
45203      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
45204      ;;
45205  esac
45206
45207  # Setup LP64
45208  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
45209
45210  # Set some common defines. These works for all compilers, but assume
45211  # -D is universally accepted.
45212
45213  # Setup endianness
45214  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
45215    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
45216    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
45217    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
45218    #   Note: -Dmacro         is the same as    #define macro 1
45219    #         -Dmacro=        is the same as    #define macro
45220    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45221      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
45222    else
45223      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
45224    fi
45225  else
45226    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
45227    # are defined in the system?
45228    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45229      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
45230    else
45231      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
45232    fi
45233  fi
45234
45235  # Setup target OS define. Use OS target name but in upper case.
45236  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
45237  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
45238
45239  # Setup target CPU
45240  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
45241
45242  # Setup debug/release defines
45243  if test "x$DEBUG_LEVEL" = xrelease; then
45244    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
45245    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45246      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
45247    fi
45248  else
45249    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
45250  fi
45251
45252  # Set some additional per-OS defines.
45253  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45254    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
45255  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45256    # FIXME: PPC64 should not be here.
45257    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
45258  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
45259    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
45260  fi
45261
45262  # Additional macosx handling
45263  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45264    # Setting these parameters makes it an error to link to macosx APIs that are
45265    # newer than the given OS version and makes the linked binaries compatible
45266    # even if built on a newer version of the OS.
45267    # The expected format is X.Y.Z
45268    MACOSX_VERSION_MIN=10.7.0
45269
45270
45271    # The macro takes the version with no dots, ex: 1070
45272    # Let the flags variables get resolved in make for easier override on make
45273    # command line.
45274    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
45275    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
45276  fi
45277
45278  # Setup some hard coded includes
45279  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
45280      -I${JDK_TOPDIR}/src/java.base/share/native/include \
45281      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
45282      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
45283      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
45284      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
45285
45286  # The shared libraries are compiled using the picflag.
45287  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
45288  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
45289
45290  # Executable flags
45291  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
45292  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
45293
45294
45295
45296
45297
45298
45299  # Flags for compiling test libraries
45300  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
45301  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
45302
45303  # Flags for compiling test executables
45304  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
45305  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
45306
45307
45308
45309
45310
45311
45312  # Setup LDFLAGS et al.
45313  #
45314
45315  # Now this is odd. The JDK native libraries have to link against libjvm.so
45316  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
45317  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
45318  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
45319  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
45320  # libraries will link to whatever is in memory. Yuck.
45321  #
45322  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
45323  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45324    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
45325    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
45326      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
45327    fi
45328    # TODO: make -debug optional "--disable-full-debug-symbols"
45329    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
45330  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45331    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45332    # We have previously set HAS_GNU_HASH if this is the case
45333    if test -n "$HAS_GNU_HASH"; then
45334      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
45335    fi
45336    if test "x$OPENJDK_TARGET_OS" = xlinux; then
45337      # And since we now know that the linker is gnu, then add -z defs, to forbid
45338      # undefined symbols in object files.
45339      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
45340      case $DEBUG_LEVEL in
45341        release )
45342          # tell linker to optimize libraries.
45343          # Should this be supplied to the OSS linker as well?
45344          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
45345          ;;
45346        slowdebug )
45347          if test "x$HAS_LINKER_NOW" = "xtrue"; then
45348            # do relocations at load
45349            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
45350            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
45351          fi
45352          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45353            # mark relocations read only
45354            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45355            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45356          fi
45357          ;;
45358        fastdebug )
45359          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45360            # mark relocations read only
45361            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45362            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45363          fi
45364          ;;
45365        * )
45366          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
45367          ;;
45368        esac
45369    fi
45370  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45371    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
45372    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
45373  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45374    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
45375  fi
45376
45377  # Customize LDFLAGS for executables
45378
45379  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
45380
45381  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45382    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
45383      LDFLAGS_STACK_SIZE=1048576
45384    else
45385      LDFLAGS_STACK_SIZE=327680
45386    fi
45387    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
45388  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
45389    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
45390  fi
45391
45392  # Customize LDFLAGS for libs
45393  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
45394
45395  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45396    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
45397    JDKLIB_LIBS=""
45398  else
45399    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
45400        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
45401
45402    # On some platforms (mac) the linker warns about non existing -L dirs.
45403    # Add server first if available. Linking aginst client does not always produce the same results.
45404    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
45405    # Default to server for other variants.
45406    if test "x$JVM_VARIANT_SERVER" = xtrue; then
45407      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45408    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
45409      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
45410    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
45411      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
45412    else
45413      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45414    fi
45415
45416    JDKLIB_LIBS="-ljava -ljvm"
45417    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45418      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
45419    fi
45420  fi
45421
45422
45423
45424
45425
45426
45427
45428  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
45429  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
45430
45431
45432
45433
45434
45435  # Some Zero and Shark settings.
45436  # ZERO_ARCHFLAG tells the compiler which mode to build for
45437  case "${OPENJDK_TARGET_CPU}" in
45438    s390)
45439      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
45440      ;;
45441    *)
45442      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45443  esac
45444
45445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
45446$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
45447  supports=yes
45448
45449  saved_cflags="$CFLAGS"
45450  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
45451  ac_ext=c
45452ac_cpp='$CPP $CPPFLAGS'
45453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45455ac_compiler_gnu=$ac_cv_c_compiler_gnu
45456
45457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45458/* end confdefs.h.  */
45459int i;
45460_ACEOF
45461if ac_fn_c_try_compile "$LINENO"; then :
45462
45463else
45464  supports=no
45465fi
45466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45467  ac_ext=cpp
45468ac_cpp='$CXXCPP $CPPFLAGS'
45469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45472
45473  CFLAGS="$saved_cflags"
45474
45475  saved_cxxflags="$CXXFLAGS"
45476  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
45477  ac_ext=cpp
45478ac_cpp='$CXXCPP $CPPFLAGS'
45479ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45480ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45481ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45482
45483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45484/* end confdefs.h.  */
45485int i;
45486_ACEOF
45487if ac_fn_cxx_try_compile "$LINENO"; then :
45488
45489else
45490  supports=no
45491fi
45492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45493  ac_ext=cpp
45494ac_cpp='$CXXCPP $CPPFLAGS'
45495ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45496ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45497ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45498
45499  CXXFLAGS="$saved_cxxflags"
45500
45501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45502$as_echo "$supports" >&6; }
45503  if test "x$supports" = "xyes" ; then
45504    :
45505  else
45506    ZERO_ARCHFLAG=""
45507  fi
45508
45509
45510
45511  # Check that the compiler supports -mX (or -qX on AIX) flags
45512  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
45513
45514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
45515$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
45516  supports=yes
45517
45518  saved_cflags="$CFLAGS"
45519  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45520  ac_ext=c
45521ac_cpp='$CPP $CPPFLAGS'
45522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45524ac_compiler_gnu=$ac_cv_c_compiler_gnu
45525
45526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45527/* end confdefs.h.  */
45528int i;
45529_ACEOF
45530if ac_fn_c_try_compile "$LINENO"; then :
45531
45532else
45533  supports=no
45534fi
45535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45536  ac_ext=cpp
45537ac_cpp='$CXXCPP $CPPFLAGS'
45538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45541
45542  CFLAGS="$saved_cflags"
45543
45544  saved_cxxflags="$CXXFLAGS"
45545  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45546  ac_ext=cpp
45547ac_cpp='$CXXCPP $CPPFLAGS'
45548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45551
45552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45553/* end confdefs.h.  */
45554int i;
45555_ACEOF
45556if ac_fn_cxx_try_compile "$LINENO"; then :
45557
45558else
45559  supports=no
45560fi
45561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45562  ac_ext=cpp
45563ac_cpp='$CXXCPP $CPPFLAGS'
45564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45567
45568  CXXFLAGS="$saved_cxxflags"
45569
45570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45571$as_echo "$supports" >&6; }
45572  if test "x$supports" = "xyes" ; then
45573    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
45574  else
45575    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
45576  fi
45577
45578
45579
45580  # Check whether --enable-warnings-as-errors was given.
45581if test "${enable_warnings_as_errors+set}" = set; then :
45582  enableval=$enable_warnings_as_errors;
45583fi
45584
45585
45586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
45587$as_echo_n "checking if native warnings are errors... " >&6; }
45588  if test "x$enable_warnings_as_errors" = "xyes"; then
45589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
45590$as_echo "yes (explicitely set)" >&6; }
45591    WARNINGS_AS_ERRORS=true
45592  elif test "x$enable_warnings_as_errors" = "xno"; then
45593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45594$as_echo "no" >&6; }
45595    WARNINGS_AS_ERRORS=false
45596  elif test "x$enable_warnings_as_errors" = "x"; then
45597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
45598$as_echo "yes (default)" >&6; }
45599    WARNINGS_AS_ERRORS=true
45600  else
45601    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
45602  fi
45603
45604  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
45605    # Set legacy hotspot variable
45606    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
45607  else
45608    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
45609  fi
45610
45611
45612
45613
45614  case "${TOOLCHAIN_TYPE}" in
45615    microsoft)
45616      DISABLE_WARNING_PREFIX="-wd"
45617      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
45618      ;;
45619    solstudio)
45620      DISABLE_WARNING_PREFIX="-erroff="
45621      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
45622      ;;
45623    gcc)
45624      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
45625
45626  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
45627$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
45628  supports=yes
45629
45630  saved_cflags="$CFLAGS"
45631  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
45632  ac_ext=c
45633ac_cpp='$CPP $CPPFLAGS'
45634ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45635ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45636ac_compiler_gnu=$ac_cv_c_compiler_gnu
45637
45638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45639/* end confdefs.h.  */
45640int i;
45641_ACEOF
45642if ac_fn_c_try_compile "$LINENO"; then :
45643
45644else
45645  supports=no
45646fi
45647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45648  ac_ext=cpp
45649ac_cpp='$CXXCPP $CPPFLAGS'
45650ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45651ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45652ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45653
45654  CFLAGS="$saved_cflags"
45655
45656  saved_cxxflags="$CXXFLAGS"
45657  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
45658  ac_ext=cpp
45659ac_cpp='$CXXCPP $CPPFLAGS'
45660ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45661ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45662ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45663
45664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45665/* end confdefs.h.  */
45666int i;
45667_ACEOF
45668if ac_fn_cxx_try_compile "$LINENO"; then :
45669
45670else
45671  supports=no
45672fi
45673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45674  ac_ext=cpp
45675ac_cpp='$CXXCPP $CPPFLAGS'
45676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45679
45680  CXXFLAGS="$saved_cxxflags"
45681
45682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45683$as_echo "$supports" >&6; }
45684  if test "x$supports" = "xyes" ; then
45685    GCC_CAN_DISABLE_WARNINGS=true
45686  else
45687    GCC_CAN_DISABLE_WARNINGS=false
45688
45689  fi
45690
45691      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
45692        DISABLE_WARNING_PREFIX="-Wno-"
45693      else
45694        DISABLE_WARNING_PREFIX=
45695      fi
45696      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45697      ;;
45698    clang)
45699      DISABLE_WARNING_PREFIX="-Wno-"
45700      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45701      ;;
45702  esac
45703
45704
45705
45706
45707# Setup debug symbols (need objcopy from the toolchain for that)
45708
45709  #
45710  # ENABLE_DEBUG_SYMBOLS
45711  # This must be done after the toolchain is setup, since we're looking at objcopy.
45712  #
45713  # Check whether --enable-debug-symbols was given.
45714if test "${enable_debug_symbols+set}" = set; then :
45715  enableval=$enable_debug_symbols;
45716fi
45717
45718
45719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
45720$as_echo_n "checking if we should generate debug symbols... " >&6; }
45721
45722  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
45723    # explicit enabling of enable-debug-symbols and can't find objcopy
45724    #   this is an error
45725    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
45726  fi
45727
45728  if test "x$enable_debug_symbols" = "xyes"; then
45729    ENABLE_DEBUG_SYMBOLS=true
45730  elif test "x$enable_debug_symbols" = "xno"; then
45731    ENABLE_DEBUG_SYMBOLS=false
45732  else
45733    # Default is on if objcopy is found
45734    if test "x$OBJCOPY" != x; then
45735      ENABLE_DEBUG_SYMBOLS=true
45736    # MacOS X and Windows don't use objcopy but default is on for those OSes
45737    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
45738      ENABLE_DEBUG_SYMBOLS=true
45739    else
45740      ENABLE_DEBUG_SYMBOLS=false
45741    fi
45742  fi
45743
45744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
45745$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
45746
45747  #
45748  # ZIP_DEBUGINFO_FILES
45749  #
45750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
45751$as_echo_n "checking if we should zip debug-info files... " >&6; }
45752  # Check whether --enable-zip-debug-info was given.
45753if test "${enable_zip_debug_info+set}" = set; then :
45754  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
45755else
45756  enable_zip_debug_info="yes"
45757fi
45758
45759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
45760$as_echo "${enable_zip_debug_info}" >&6; }
45761
45762  if test "x${enable_zip_debug_info}" = "xno"; then
45763    ZIP_DEBUGINFO_FILES=false
45764  else
45765    ZIP_DEBUGINFO_FILES=true
45766  fi
45767
45768
45769
45770
45771
45772  # Check whether --enable-native-coverage was given.
45773if test "${enable_native_coverage+set}" = set; then :
45774  enableval=$enable_native_coverage;
45775fi
45776
45777  GCOV_ENABLED="false"
45778  if test "x$enable_native_coverage" = "xyes"; then
45779    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
45780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45781$as_echo_n "checking if native coverage is enabled... " >&6; }
45782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45783$as_echo "yes" >&6; }
45784      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
45785      GCOV_LDFLAGS="-fprofile-arcs"
45786      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
45787      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
45788      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
45789      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
45790      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
45791      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
45792      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
45793      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
45794      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
45795      GCOV_ENABLED="true"
45796    else
45797      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
45798    fi
45799  elif test "x$enable_native_coverage" = "xno"; then
45800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45801$as_echo_n "checking if native coverage is enabled... " >&6; }
45802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45803$as_echo "no" >&6; }
45804  elif test "x$enable_native_coverage" != "x"; then
45805    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
45806  fi
45807
45808
45809
45810
45811###############################################################################
45812#
45813# Check dependencies for external and internal libraries.
45814#
45815###############################################################################
45816
45817# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
45818
45819  # When using cygwin or msys, we need a wrapper binary that renames
45820  # /cygdrive/c/ arguments into c:/ arguments and peeks into
45821  # @files and rewrites these too! This wrapper binary is
45822  # called fixpath.
45823  FIXPATH=
45824  if test "x$OPENJDK_BUILD_OS" = xwindows; then
45825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
45826$as_echo_n "checking if fixpath can be created... " >&6; }
45827    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
45828    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
45829    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
45830    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
45831      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
45832      FIXPATH="$FIXPATH_BIN -c"
45833    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
45834      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
45835      # @ was chosen as separator to minimize risk of other tools messing around with it
45836      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
45837          | tr ' ' '\n' | grep '^/./' | sort | uniq`
45838      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
45839      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
45840    fi
45841    FIXPATH_SRC_W="$FIXPATH_SRC"
45842    FIXPATH_BIN_W="$FIXPATH_BIN"
45843
45844  unix_path="$FIXPATH_SRC_W"
45845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45846    windows_path=`$CYGPATH -m "$unix_path"`
45847    FIXPATH_SRC_W="$windows_path"
45848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45849    windows_path=`cmd //c echo $unix_path`
45850    FIXPATH_SRC_W="$windows_path"
45851  fi
45852
45853
45854  unix_path="$FIXPATH_BIN_W"
45855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45856    windows_path=`$CYGPATH -m "$unix_path"`
45857    FIXPATH_BIN_W="$windows_path"
45858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45859    windows_path=`cmd //c echo $unix_path`
45860    FIXPATH_BIN_W="$windows_path"
45861  fi
45862
45863    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
45864    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
45865    cd $FIXPATH_DIR
45866    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
45867    cd $CURDIR
45868
45869    if test ! -x $FIXPATH_BIN; then
45870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45871$as_echo "no" >&6; }
45872      cat $FIXPATH_DIR/fixpath1.log
45873      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
45874    fi
45875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45876$as_echo "yes" >&6; }
45877    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
45878$as_echo_n "checking if fixpath.exe works... " >&6; }
45879    cd $FIXPATH_DIR
45880    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
45881        > $FIXPATH_DIR/fixpath2.log 2>&1
45882    cd $CURDIR
45883    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
45884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45885$as_echo "no" >&6; }
45886      cat $FIXPATH_DIR/fixpath2.log
45887      as_fn_error $? "fixpath did not work!" "$LINENO" 5
45888    fi
45889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45890$as_echo "yes" >&6; }
45891  fi
45892
45893
45894
45895
45896
45897  # Check if X11 is needed
45898  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45899    # No X11 support on windows or macosx
45900    NEEDS_LIB_X11=false
45901  else
45902    if test "x$SUPPORT_HEADFUL" = xno; then
45903      # No X11 support if building headless-only
45904      NEEDS_LIB_X11=false
45905    else
45906      # All other instances need X11
45907      NEEDS_LIB_X11=true
45908    fi
45909  fi
45910
45911  # Check if cups is needed
45912  if test "x$OPENJDK_TARGET_OS" = xwindows; then
45913    # Windows have a separate print system
45914    NEEDS_LIB_CUPS=false
45915  else
45916    NEEDS_LIB_CUPS=true
45917  fi
45918
45919  # Check if freetype is needed
45920  if test "x$OPENJDK" = "xtrue"; then
45921    NEEDS_LIB_FREETYPE=true
45922  else
45923    NEEDS_LIB_FREETYPE=false
45924  fi
45925
45926  # Check if alsa is needed
45927  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45928    NEEDS_LIB_ALSA=true
45929  else
45930    NEEDS_LIB_ALSA=false
45931  fi
45932
45933  # Check if ffi is needed
45934  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45935    NEEDS_LIB_FFI=true
45936  else
45937    NEEDS_LIB_FFI=false
45938  fi
45939
45940
45941  # statically link libstdc++ before C++ ABI is stablized on Linux unless
45942  # dynamic build is configured on command line.
45943
45944# Check whether --with-stdc++lib was given.
45945if test "${with_stdc__lib+set}" = set; then :
45946  withval=$with_stdc__lib;
45947        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45948                && test "x$with_stdc__lib" != xdefault; then
45949          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45950        fi
45951
45952else
45953  with_stdc__lib=default
45954
45955fi
45956
45957
45958  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45959    # Test if -lstdc++ works.
45960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
45961$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
45962    ac_ext=cpp
45963ac_cpp='$CXXCPP $CPPFLAGS'
45964ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45965ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45966ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45967
45968    OLD_CXXFLAGS="$CXXFLAGS"
45969    CXXFLAGS="$CXXFLAGS -lstdc++"
45970    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45971/* end confdefs.h.  */
45972
45973int
45974main ()
45975{
45976return 0;
45977  ;
45978  return 0;
45979}
45980_ACEOF
45981if ac_fn_cxx_try_link "$LINENO"; then :
45982  has_dynamic_libstdcxx=yes
45983else
45984  has_dynamic_libstdcxx=no
45985fi
45986rm -f core conftest.err conftest.$ac_objext \
45987    conftest$ac_exeext conftest.$ac_ext
45988    CXXFLAGS="$OLD_CXXFLAGS"
45989    ac_ext=cpp
45990ac_cpp='$CXXCPP $CPPFLAGS'
45991ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45992ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45993ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45994
45995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
45996$as_echo "$has_dynamic_libstdcxx" >&6; }
45997
45998    # Test if stdc++ can be linked statically.
45999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
46000$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
46001    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
46002    ac_ext=cpp
46003ac_cpp='$CXXCPP $CPPFLAGS'
46004ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46005ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46006ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46007
46008    OLD_LIBS="$LIBS"
46009    OLD_CXX="$CXX"
46010    LIBS="$STATIC_STDCXX_FLAGS"
46011    CXX="$CC"
46012    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46013/* end confdefs.h.  */
46014
46015int
46016main ()
46017{
46018return 0;
46019  ;
46020  return 0;
46021}
46022_ACEOF
46023if ac_fn_cxx_try_link "$LINENO"; then :
46024  has_static_libstdcxx=yes
46025else
46026  has_static_libstdcxx=no
46027fi
46028rm -f core conftest.err conftest.$ac_objext \
46029    conftest$ac_exeext conftest.$ac_ext
46030    LIBS="$OLD_LIBS"
46031    CXX="$OLD_CXX"
46032    ac_ext=cpp
46033ac_cpp='$CXXCPP $CPPFLAGS'
46034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46037
46038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
46039$as_echo "$has_static_libstdcxx" >&6; }
46040
46041    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
46042      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
46043    fi
46044
46045    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
46046      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
46047    fi
46048
46049    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
46050      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
46051    fi
46052
46053    # If dynamic was requested, it's available since it would fail above otherwise.
46054    # If dynamic wasn't requested, go with static unless it isn't available.
46055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
46056$as_echo_n "checking how to link with libstdc++... " >&6; }
46057    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
46058      LIBCXX="$LIBCXX -lstdc++"
46059      LDCXX="$CXX"
46060      STATIC_CXX_SETTING="STATIC_CXX=false"
46061      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
46062$as_echo "dynamic" >&6; }
46063    else
46064      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
46065      LDCXX="$CC"
46066      STATIC_CXX_SETTING="STATIC_CXX=true"
46067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
46068$as_echo "static" >&6; }
46069    fi
46070  fi
46071
46072
46073  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
46074  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
46075    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
46076  fi
46077
46078  # TODO better (platform agnostic) test
46079  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
46080    LIBCXX="-lstdc++"
46081  fi
46082
46083
46084  # Setup Windows runtime dlls
46085  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
46086
46087
46088# Check whether --with-msvcr-dll was given.
46089if test "${with_msvcr_dll+set}" = set; then :
46090  withval=$with_msvcr_dll;
46091fi
46092
46093
46094  if test "x$with_msvcr_dll" != x; then
46095    # If given explicitely by user, do not probe. If not present, fail directly.
46096
46097  DLL_NAME="$MSVCR_NAME"
46098  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
46099  METHOD="--with-msvcr-dll"
46100  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46102$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46103
46104    # Need to check if the found msvcr is correct architecture
46105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46106$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46107    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46109      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46110      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46111      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46112        CORRECT_MSVCR_ARCH="PE32 executable"
46113      else
46114        CORRECT_MSVCR_ARCH="PE32+ executable"
46115      fi
46116    else
46117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46118        CORRECT_MSVCR_ARCH=386
46119      else
46120        CORRECT_MSVCR_ARCH=x86-64
46121      fi
46122    fi
46123    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46125$as_echo "ok" >&6; }
46126      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46127
46128  # Only process if variable expands to non-empty
46129
46130  if test "x$MSVC_DLL" != x; then
46131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46132
46133  # Input might be given as Windows format, start by converting to
46134  # unix format.
46135  path="$MSVC_DLL"
46136  new_path=`$CYGPATH -u "$path"`
46137
46138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46141  # "foo.exe" is OK but "foo" is an error.
46142  #
46143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46144  # It is also a way to make sure we got the proper file name for the real test later on.
46145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46146  if test "x$test_shortpath" = x; then
46147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46148$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46149    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46150  fi
46151
46152  # Call helper function which possibly converts this using DOS-style short mode.
46153  # If so, the updated path is stored in $new_path.
46154
46155  input_path="$new_path"
46156  # Check if we need to convert this using DOS-style short mode. If the path
46157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46158  # take no chances and rewrite it.
46159  # Note: m4 eats our [], so we need to use [ and ] instead.
46160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46161  if test "x$has_forbidden_chars" != x; then
46162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46166      # Going to short mode and back again did indeed matter. Since short mode is
46167      # case insensitive, let's make it lowercase to improve readability.
46168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46169      # Now convert it back to Unix-style (cygpath)
46170      input_path=`$CYGPATH -u "$shortmode_path"`
46171      new_path="$input_path"
46172    fi
46173  fi
46174
46175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46176  if test "x$test_cygdrive_prefix" = x; then
46177    # As a simple fix, exclude /usr/bin since it's not a real path.
46178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46180      # a path prefixed by /cygdrive for fixpath to work.
46181      new_path="$CYGWIN_ROOT_PATH$input_path"
46182    fi
46183  fi
46184
46185
46186  if test "x$path" != "x$new_path"; then
46187    MSVC_DLL="$new_path"
46188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46189$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46190  fi
46191
46192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46193
46194  path="$MSVC_DLL"
46195  has_colon=`$ECHO $path | $GREP ^.:`
46196  new_path="$path"
46197  if test "x$has_colon" = x; then
46198    # Not in mixed or Windows style, start by that.
46199    new_path=`cmd //c echo $path`
46200  fi
46201
46202
46203  input_path="$new_path"
46204  # Check if we need to convert this using DOS-style short mode. If the path
46205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46206  # take no chances and rewrite it.
46207  # Note: m4 eats our [], so we need to use [ and ] instead.
46208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46209  if test "x$has_forbidden_chars" != x; then
46210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46212  fi
46213
46214
46215  windows_path="$new_path"
46216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46217    unix_path=`$CYGPATH -u "$windows_path"`
46218    new_path="$unix_path"
46219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46221    new_path="$unix_path"
46222  fi
46223
46224  if test "x$path" != "x$new_path"; then
46225    MSVC_DLL="$new_path"
46226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46227$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46228  fi
46229
46230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46232
46233    else
46234      # We're on a unix platform. Hooray! :)
46235      path="$MSVC_DLL"
46236      has_space=`$ECHO "$path" | $GREP " "`
46237      if test "x$has_space" != x; then
46238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46239$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46241      fi
46242
46243      # Use eval to expand a potential ~
46244      eval path="$path"
46245      if test ! -f "$path" && test ! -d "$path"; then
46246        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46247      fi
46248
46249      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46250    fi
46251  fi
46252
46253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46254$as_echo_n "checking for $DLL_NAME... " >&6; }
46255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46256$as_echo "$MSVC_DLL" >&6; }
46257    else
46258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46259$as_echo "incorrect, ignoring" >&6; }
46260      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46261$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46262    fi
46263  fi
46264
46265    if test "x$MSVC_DLL" = x; then
46266      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
46267    fi
46268    MSVCR_DLL="$MSVC_DLL"
46269  elif test "x$DEVKIT_MSVCR_DLL" != x; then
46270
46271  DLL_NAME="$MSVCR_NAME"
46272  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
46273  METHOD="devkit"
46274  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46275    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46276$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46277
46278    # Need to check if the found msvcr is correct architecture
46279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46280$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46281    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46283      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46284      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46285      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46286        CORRECT_MSVCR_ARCH="PE32 executable"
46287      else
46288        CORRECT_MSVCR_ARCH="PE32+ executable"
46289      fi
46290    else
46291      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46292        CORRECT_MSVCR_ARCH=386
46293      else
46294        CORRECT_MSVCR_ARCH=x86-64
46295      fi
46296    fi
46297    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46299$as_echo "ok" >&6; }
46300      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46301
46302  # Only process if variable expands to non-empty
46303
46304  if test "x$MSVC_DLL" != x; then
46305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46306
46307  # Input might be given as Windows format, start by converting to
46308  # unix format.
46309  path="$MSVC_DLL"
46310  new_path=`$CYGPATH -u "$path"`
46311
46312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46315  # "foo.exe" is OK but "foo" is an error.
46316  #
46317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46318  # It is also a way to make sure we got the proper file name for the real test later on.
46319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46320  if test "x$test_shortpath" = x; then
46321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46322$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46323    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46324  fi
46325
46326  # Call helper function which possibly converts this using DOS-style short mode.
46327  # If so, the updated path is stored in $new_path.
46328
46329  input_path="$new_path"
46330  # Check if we need to convert this using DOS-style short mode. If the path
46331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46332  # take no chances and rewrite it.
46333  # Note: m4 eats our [], so we need to use [ and ] instead.
46334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46335  if test "x$has_forbidden_chars" != x; then
46336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46340      # Going to short mode and back again did indeed matter. Since short mode is
46341      # case insensitive, let's make it lowercase to improve readability.
46342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46343      # Now convert it back to Unix-style (cygpath)
46344      input_path=`$CYGPATH -u "$shortmode_path"`
46345      new_path="$input_path"
46346    fi
46347  fi
46348
46349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46350  if test "x$test_cygdrive_prefix" = x; then
46351    # As a simple fix, exclude /usr/bin since it's not a real path.
46352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46354      # a path prefixed by /cygdrive for fixpath to work.
46355      new_path="$CYGWIN_ROOT_PATH$input_path"
46356    fi
46357  fi
46358
46359
46360  if test "x$path" != "x$new_path"; then
46361    MSVC_DLL="$new_path"
46362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46363$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46364  fi
46365
46366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46367
46368  path="$MSVC_DLL"
46369  has_colon=`$ECHO $path | $GREP ^.:`
46370  new_path="$path"
46371  if test "x$has_colon" = x; then
46372    # Not in mixed or Windows style, start by that.
46373    new_path=`cmd //c echo $path`
46374  fi
46375
46376
46377  input_path="$new_path"
46378  # Check if we need to convert this using DOS-style short mode. If the path
46379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46380  # take no chances and rewrite it.
46381  # Note: m4 eats our [], so we need to use [ and ] instead.
46382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46383  if test "x$has_forbidden_chars" != x; then
46384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46386  fi
46387
46388
46389  windows_path="$new_path"
46390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46391    unix_path=`$CYGPATH -u "$windows_path"`
46392    new_path="$unix_path"
46393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46395    new_path="$unix_path"
46396  fi
46397
46398  if test "x$path" != "x$new_path"; then
46399    MSVC_DLL="$new_path"
46400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46401$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46402  fi
46403
46404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46406
46407    else
46408      # We're on a unix platform. Hooray! :)
46409      path="$MSVC_DLL"
46410      has_space=`$ECHO "$path" | $GREP " "`
46411      if test "x$has_space" != x; then
46412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46413$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46414        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46415      fi
46416
46417      # Use eval to expand a potential ~
46418      eval path="$path"
46419      if test ! -f "$path" && test ! -d "$path"; then
46420        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46421      fi
46422
46423      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46424    fi
46425  fi
46426
46427      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46428$as_echo_n "checking for $DLL_NAME... " >&6; }
46429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46430$as_echo "$MSVC_DLL" >&6; }
46431    else
46432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46433$as_echo "incorrect, ignoring" >&6; }
46434      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46435$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46436    fi
46437  fi
46438
46439    if test "x$MSVC_DLL" = x; then
46440      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
46441    fi
46442    MSVCR_DLL="$MSVC_DLL"
46443  else
46444
46445  DLL_NAME="${MSVCR_NAME}"
46446  MSVC_DLL=
46447
46448  if test "x$MSVC_DLL" = x; then
46449    # Probe: Using well-known location from Visual Studio 10.0
46450    if test "x$VCINSTALLDIR" != x; then
46451      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
46452
46453  windows_path="$CYGWIN_VC_INSTALL_DIR"
46454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46455    unix_path=`$CYGPATH -u "$windows_path"`
46456    CYGWIN_VC_INSTALL_DIR="$unix_path"
46457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46459    CYGWIN_VC_INSTALL_DIR="$unix_path"
46460  fi
46461
46462      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46463        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46464      else
46465        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46466      fi
46467      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
46468
46469  DLL_NAME="$DLL_NAME"
46470  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46471  METHOD="well-known location in VCINSTALLDIR"
46472  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46473    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46474$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46475
46476    # Need to check if the found msvcr is correct architecture
46477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46478$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46479    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46481      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46482      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46483      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46484        CORRECT_MSVCR_ARCH="PE32 executable"
46485      else
46486        CORRECT_MSVCR_ARCH="PE32+ executable"
46487      fi
46488    else
46489      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46490        CORRECT_MSVCR_ARCH=386
46491      else
46492        CORRECT_MSVCR_ARCH=x86-64
46493      fi
46494    fi
46495    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46497$as_echo "ok" >&6; }
46498      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46499
46500  # Only process if variable expands to non-empty
46501
46502  if test "x$MSVC_DLL" != x; then
46503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46504
46505  # Input might be given as Windows format, start by converting to
46506  # unix format.
46507  path="$MSVC_DLL"
46508  new_path=`$CYGPATH -u "$path"`
46509
46510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46513  # "foo.exe" is OK but "foo" is an error.
46514  #
46515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46516  # It is also a way to make sure we got the proper file name for the real test later on.
46517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46518  if test "x$test_shortpath" = x; then
46519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46520$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46521    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46522  fi
46523
46524  # Call helper function which possibly converts this using DOS-style short mode.
46525  # If so, the updated path is stored in $new_path.
46526
46527  input_path="$new_path"
46528  # Check if we need to convert this using DOS-style short mode. If the path
46529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46530  # take no chances and rewrite it.
46531  # Note: m4 eats our [], so we need to use [ and ] instead.
46532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46533  if test "x$has_forbidden_chars" != x; then
46534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46538      # Going to short mode and back again did indeed matter. Since short mode is
46539      # case insensitive, let's make it lowercase to improve readability.
46540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46541      # Now convert it back to Unix-style (cygpath)
46542      input_path=`$CYGPATH -u "$shortmode_path"`
46543      new_path="$input_path"
46544    fi
46545  fi
46546
46547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46548  if test "x$test_cygdrive_prefix" = x; then
46549    # As a simple fix, exclude /usr/bin since it's not a real path.
46550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46552      # a path prefixed by /cygdrive for fixpath to work.
46553      new_path="$CYGWIN_ROOT_PATH$input_path"
46554    fi
46555  fi
46556
46557
46558  if test "x$path" != "x$new_path"; then
46559    MSVC_DLL="$new_path"
46560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46561$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46562  fi
46563
46564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46565
46566  path="$MSVC_DLL"
46567  has_colon=`$ECHO $path | $GREP ^.:`
46568  new_path="$path"
46569  if test "x$has_colon" = x; then
46570    # Not in mixed or Windows style, start by that.
46571    new_path=`cmd //c echo $path`
46572  fi
46573
46574
46575  input_path="$new_path"
46576  # Check if we need to convert this using DOS-style short mode. If the path
46577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46578  # take no chances and rewrite it.
46579  # Note: m4 eats our [], so we need to use [ and ] instead.
46580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46581  if test "x$has_forbidden_chars" != x; then
46582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46584  fi
46585
46586
46587  windows_path="$new_path"
46588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46589    unix_path=`$CYGPATH -u "$windows_path"`
46590    new_path="$unix_path"
46591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46593    new_path="$unix_path"
46594  fi
46595
46596  if test "x$path" != "x$new_path"; then
46597    MSVC_DLL="$new_path"
46598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46599$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46600  fi
46601
46602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46604
46605    else
46606      # We're on a unix platform. Hooray! :)
46607      path="$MSVC_DLL"
46608      has_space=`$ECHO "$path" | $GREP " "`
46609      if test "x$has_space" != x; then
46610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46611$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46613      fi
46614
46615      # Use eval to expand a potential ~
46616      eval path="$path"
46617      if test ! -f "$path" && test ! -d "$path"; then
46618        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46619      fi
46620
46621      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46622    fi
46623  fi
46624
46625      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46626$as_echo_n "checking for $DLL_NAME... " >&6; }
46627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46628$as_echo "$MSVC_DLL" >&6; }
46629    else
46630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46631$as_echo "incorrect, ignoring" >&6; }
46632      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46633$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46634    fi
46635  fi
46636
46637    fi
46638  fi
46639
46640  if test "x$MSVC_DLL" = x; then
46641    # Probe: Check in the Boot JDK directory.
46642    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46643
46644  DLL_NAME="$DLL_NAME"
46645  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46646  METHOD="well-known location in Boot JDK"
46647  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46648    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46649$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46650
46651    # Need to check if the found msvcr is correct architecture
46652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46653$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46654    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46656      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46657      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46658      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46659        CORRECT_MSVCR_ARCH="PE32 executable"
46660      else
46661        CORRECT_MSVCR_ARCH="PE32+ executable"
46662      fi
46663    else
46664      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46665        CORRECT_MSVCR_ARCH=386
46666      else
46667        CORRECT_MSVCR_ARCH=x86-64
46668      fi
46669    fi
46670    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46672$as_echo "ok" >&6; }
46673      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46674
46675  # Only process if variable expands to non-empty
46676
46677  if test "x$MSVC_DLL" != x; then
46678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46679
46680  # Input might be given as Windows format, start by converting to
46681  # unix format.
46682  path="$MSVC_DLL"
46683  new_path=`$CYGPATH -u "$path"`
46684
46685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46688  # "foo.exe" is OK but "foo" is an error.
46689  #
46690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46691  # It is also a way to make sure we got the proper file name for the real test later on.
46692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46693  if test "x$test_shortpath" = x; then
46694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46695$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46696    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46697  fi
46698
46699  # Call helper function which possibly converts this using DOS-style short mode.
46700  # If so, the updated path is stored in $new_path.
46701
46702  input_path="$new_path"
46703  # Check if we need to convert this using DOS-style short mode. If the path
46704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46705  # take no chances and rewrite it.
46706  # Note: m4 eats our [], so we need to use [ and ] instead.
46707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46708  if test "x$has_forbidden_chars" != x; then
46709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46713      # Going to short mode and back again did indeed matter. Since short mode is
46714      # case insensitive, let's make it lowercase to improve readability.
46715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46716      # Now convert it back to Unix-style (cygpath)
46717      input_path=`$CYGPATH -u "$shortmode_path"`
46718      new_path="$input_path"
46719    fi
46720  fi
46721
46722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46723  if test "x$test_cygdrive_prefix" = x; then
46724    # As a simple fix, exclude /usr/bin since it's not a real path.
46725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46727      # a path prefixed by /cygdrive for fixpath to work.
46728      new_path="$CYGWIN_ROOT_PATH$input_path"
46729    fi
46730  fi
46731
46732
46733  if test "x$path" != "x$new_path"; then
46734    MSVC_DLL="$new_path"
46735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46736$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46737  fi
46738
46739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46740
46741  path="$MSVC_DLL"
46742  has_colon=`$ECHO $path | $GREP ^.:`
46743  new_path="$path"
46744  if test "x$has_colon" = x; then
46745    # Not in mixed or Windows style, start by that.
46746    new_path=`cmd //c echo $path`
46747  fi
46748
46749
46750  input_path="$new_path"
46751  # Check if we need to convert this using DOS-style short mode. If the path
46752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46753  # take no chances and rewrite it.
46754  # Note: m4 eats our [], so we need to use [ and ] instead.
46755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46756  if test "x$has_forbidden_chars" != x; then
46757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46759  fi
46760
46761
46762  windows_path="$new_path"
46763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46764    unix_path=`$CYGPATH -u "$windows_path"`
46765    new_path="$unix_path"
46766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46768    new_path="$unix_path"
46769  fi
46770
46771  if test "x$path" != "x$new_path"; then
46772    MSVC_DLL="$new_path"
46773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46774$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46775  fi
46776
46777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46779
46780    else
46781      # We're on a unix platform. Hooray! :)
46782      path="$MSVC_DLL"
46783      has_space=`$ECHO "$path" | $GREP " "`
46784      if test "x$has_space" != x; then
46785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46786$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46787        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46788      fi
46789
46790      # Use eval to expand a potential ~
46791      eval path="$path"
46792      if test ! -f "$path" && test ! -d "$path"; then
46793        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46794      fi
46795
46796      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46797    fi
46798  fi
46799
46800      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46801$as_echo_n "checking for $DLL_NAME... " >&6; }
46802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46803$as_echo "$MSVC_DLL" >&6; }
46804    else
46805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46806$as_echo "incorrect, ignoring" >&6; }
46807      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46808$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46809    fi
46810  fi
46811
46812  fi
46813
46814  if test "x$MSVC_DLL" = x; then
46815    # Probe: Look in the Windows system32 directory
46816    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46817
46818  windows_path="$CYGWIN_SYSTEMROOT"
46819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46820    unix_path=`$CYGPATH -u "$windows_path"`
46821    CYGWIN_SYSTEMROOT="$unix_path"
46822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46824    CYGWIN_SYSTEMROOT="$unix_path"
46825  fi
46826
46827    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46828
46829  DLL_NAME="$DLL_NAME"
46830  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46831  METHOD="well-known location in SYSTEMROOT"
46832  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46833    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46834$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46835
46836    # Need to check if the found msvcr is correct architecture
46837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46838$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46839    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46841      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46842      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46843      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46844        CORRECT_MSVCR_ARCH="PE32 executable"
46845      else
46846        CORRECT_MSVCR_ARCH="PE32+ executable"
46847      fi
46848    else
46849      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46850        CORRECT_MSVCR_ARCH=386
46851      else
46852        CORRECT_MSVCR_ARCH=x86-64
46853      fi
46854    fi
46855    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46857$as_echo "ok" >&6; }
46858      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46859
46860  # Only process if variable expands to non-empty
46861
46862  if test "x$MSVC_DLL" != x; then
46863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46864
46865  # Input might be given as Windows format, start by converting to
46866  # unix format.
46867  path="$MSVC_DLL"
46868  new_path=`$CYGPATH -u "$path"`
46869
46870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46873  # "foo.exe" is OK but "foo" is an error.
46874  #
46875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46876  # It is also a way to make sure we got the proper file name for the real test later on.
46877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46878  if test "x$test_shortpath" = x; then
46879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46880$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46881    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46882  fi
46883
46884  # Call helper function which possibly converts this using DOS-style short mode.
46885  # If so, the updated path is stored in $new_path.
46886
46887  input_path="$new_path"
46888  # Check if we need to convert this using DOS-style short mode. If the path
46889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46890  # take no chances and rewrite it.
46891  # Note: m4 eats our [], so we need to use [ and ] instead.
46892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46893  if test "x$has_forbidden_chars" != x; then
46894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46898      # Going to short mode and back again did indeed matter. Since short mode is
46899      # case insensitive, let's make it lowercase to improve readability.
46900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46901      # Now convert it back to Unix-style (cygpath)
46902      input_path=`$CYGPATH -u "$shortmode_path"`
46903      new_path="$input_path"
46904    fi
46905  fi
46906
46907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46908  if test "x$test_cygdrive_prefix" = x; then
46909    # As a simple fix, exclude /usr/bin since it's not a real path.
46910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46912      # a path prefixed by /cygdrive for fixpath to work.
46913      new_path="$CYGWIN_ROOT_PATH$input_path"
46914    fi
46915  fi
46916
46917
46918  if test "x$path" != "x$new_path"; then
46919    MSVC_DLL="$new_path"
46920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46921$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46922  fi
46923
46924    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46925
46926  path="$MSVC_DLL"
46927  has_colon=`$ECHO $path | $GREP ^.:`
46928  new_path="$path"
46929  if test "x$has_colon" = x; then
46930    # Not in mixed or Windows style, start by that.
46931    new_path=`cmd //c echo $path`
46932  fi
46933
46934
46935  input_path="$new_path"
46936  # Check if we need to convert this using DOS-style short mode. If the path
46937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46938  # take no chances and rewrite it.
46939  # Note: m4 eats our [], so we need to use [ and ] instead.
46940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46941  if test "x$has_forbidden_chars" != x; then
46942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46944  fi
46945
46946
46947  windows_path="$new_path"
46948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46949    unix_path=`$CYGPATH -u "$windows_path"`
46950    new_path="$unix_path"
46951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46953    new_path="$unix_path"
46954  fi
46955
46956  if test "x$path" != "x$new_path"; then
46957    MSVC_DLL="$new_path"
46958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46959$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46960  fi
46961
46962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46964
46965    else
46966      # We're on a unix platform. Hooray! :)
46967      path="$MSVC_DLL"
46968      has_space=`$ECHO "$path" | $GREP " "`
46969      if test "x$has_space" != x; then
46970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46971$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46972        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46973      fi
46974
46975      # Use eval to expand a potential ~
46976      eval path="$path"
46977      if test ! -f "$path" && test ! -d "$path"; then
46978        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46979      fi
46980
46981      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46982    fi
46983  fi
46984
46985      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46986$as_echo_n "checking for $DLL_NAME... " >&6; }
46987      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46988$as_echo "$MSVC_DLL" >&6; }
46989    else
46990      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46991$as_echo "incorrect, ignoring" >&6; }
46992      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46993$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46994    fi
46995  fi
46996
46997  fi
46998
46999  if test "x$MSVC_DLL" = x; then
47000    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47001    if test "x$VS100COMNTOOLS" != x; then
47002      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47003
47004  windows_path="$CYGWIN_VS_TOOLS_DIR"
47005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47006    unix_path=`$CYGPATH -u "$windows_path"`
47007    CYGWIN_VS_TOOLS_DIR="$unix_path"
47008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47010    CYGWIN_VS_TOOLS_DIR="$unix_path"
47011  fi
47012
47013      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47014        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47015	    | $GREP -i /x64/ | $HEAD --lines 1`
47016      else
47017        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47018	    | $GREP -i /x86/ | $HEAD --lines 1`
47019      fi
47020
47021  DLL_NAME="$DLL_NAME"
47022  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47023  METHOD="search of VS100COMNTOOLS"
47024  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47025    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47026$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47027
47028    # Need to check if the found msvcr is correct architecture
47029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47030$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47031    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47033      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47034      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47035      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47036        CORRECT_MSVCR_ARCH="PE32 executable"
47037      else
47038        CORRECT_MSVCR_ARCH="PE32+ executable"
47039      fi
47040    else
47041      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47042        CORRECT_MSVCR_ARCH=386
47043      else
47044        CORRECT_MSVCR_ARCH=x86-64
47045      fi
47046    fi
47047    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47049$as_echo "ok" >&6; }
47050      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47051
47052  # Only process if variable expands to non-empty
47053
47054  if test "x$MSVC_DLL" != x; then
47055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47056
47057  # Input might be given as Windows format, start by converting to
47058  # unix format.
47059  path="$MSVC_DLL"
47060  new_path=`$CYGPATH -u "$path"`
47061
47062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47065  # "foo.exe" is OK but "foo" is an error.
47066  #
47067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47068  # It is also a way to make sure we got the proper file name for the real test later on.
47069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47070  if test "x$test_shortpath" = x; then
47071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47072$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47073    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47074  fi
47075
47076  # Call helper function which possibly converts this using DOS-style short mode.
47077  # If so, the updated path is stored in $new_path.
47078
47079  input_path="$new_path"
47080  # Check if we need to convert this using DOS-style short mode. If the path
47081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47082  # take no chances and rewrite it.
47083  # Note: m4 eats our [], so we need to use [ and ] instead.
47084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47085  if test "x$has_forbidden_chars" != x; then
47086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47090      # Going to short mode and back again did indeed matter. Since short mode is
47091      # case insensitive, let's make it lowercase to improve readability.
47092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47093      # Now convert it back to Unix-style (cygpath)
47094      input_path=`$CYGPATH -u "$shortmode_path"`
47095      new_path="$input_path"
47096    fi
47097  fi
47098
47099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47100  if test "x$test_cygdrive_prefix" = x; then
47101    # As a simple fix, exclude /usr/bin since it's not a real path.
47102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47104      # a path prefixed by /cygdrive for fixpath to work.
47105      new_path="$CYGWIN_ROOT_PATH$input_path"
47106    fi
47107  fi
47108
47109
47110  if test "x$path" != "x$new_path"; then
47111    MSVC_DLL="$new_path"
47112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47113$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47114  fi
47115
47116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47117
47118  path="$MSVC_DLL"
47119  has_colon=`$ECHO $path | $GREP ^.:`
47120  new_path="$path"
47121  if test "x$has_colon" = x; then
47122    # Not in mixed or Windows style, start by that.
47123    new_path=`cmd //c echo $path`
47124  fi
47125
47126
47127  input_path="$new_path"
47128  # Check if we need to convert this using DOS-style short mode. If the path
47129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47130  # take no chances and rewrite it.
47131  # Note: m4 eats our [], so we need to use [ and ] instead.
47132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47133  if test "x$has_forbidden_chars" != x; then
47134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47136  fi
47137
47138
47139  windows_path="$new_path"
47140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47141    unix_path=`$CYGPATH -u "$windows_path"`
47142    new_path="$unix_path"
47143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47145    new_path="$unix_path"
47146  fi
47147
47148  if test "x$path" != "x$new_path"; then
47149    MSVC_DLL="$new_path"
47150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47151$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47152  fi
47153
47154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47156
47157    else
47158      # We're on a unix platform. Hooray! :)
47159      path="$MSVC_DLL"
47160      has_space=`$ECHO "$path" | $GREP " "`
47161      if test "x$has_space" != x; then
47162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47163$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47164        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47165      fi
47166
47167      # Use eval to expand a potential ~
47168      eval path="$path"
47169      if test ! -f "$path" && test ! -d "$path"; then
47170        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47171      fi
47172
47173      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47174    fi
47175  fi
47176
47177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47178$as_echo_n "checking for $DLL_NAME... " >&6; }
47179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47180$as_echo "$MSVC_DLL" >&6; }
47181    else
47182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47183$as_echo "incorrect, ignoring" >&6; }
47184      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47185$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47186    fi
47187  fi
47188
47189    fi
47190  fi
47191
47192  if test "x$MSVC_DLL" = x; then
47193    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47194    # (This was the original behaviour; kept since it might turn something up)
47195    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47196      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47197        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
47198	    | $GREP x64 | $HEAD --lines 1`
47199      else
47200        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
47201	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47202        if test "x$POSSIBLE_MSVC_DLL" = x; then
47203          # We're grasping at straws now...
47204          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
47205	      | $HEAD --lines 1`
47206        fi
47207      fi
47208
47209
47210  DLL_NAME="$DLL_NAME"
47211  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47212  METHOD="search of VCINSTALLDIR"
47213  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47214    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47215$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47216
47217    # Need to check if the found msvcr is correct architecture
47218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47219$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47220    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47222      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47223      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47224      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47225        CORRECT_MSVCR_ARCH="PE32 executable"
47226      else
47227        CORRECT_MSVCR_ARCH="PE32+ executable"
47228      fi
47229    else
47230      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47231        CORRECT_MSVCR_ARCH=386
47232      else
47233        CORRECT_MSVCR_ARCH=x86-64
47234      fi
47235    fi
47236    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47238$as_echo "ok" >&6; }
47239      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47240
47241  # Only process if variable expands to non-empty
47242
47243  if test "x$MSVC_DLL" != x; then
47244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47245
47246  # Input might be given as Windows format, start by converting to
47247  # unix format.
47248  path="$MSVC_DLL"
47249  new_path=`$CYGPATH -u "$path"`
47250
47251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47254  # "foo.exe" is OK but "foo" is an error.
47255  #
47256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47257  # It is also a way to make sure we got the proper file name for the real test later on.
47258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47259  if test "x$test_shortpath" = x; then
47260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47261$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47262    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47263  fi
47264
47265  # Call helper function which possibly converts this using DOS-style short mode.
47266  # If so, the updated path is stored in $new_path.
47267
47268  input_path="$new_path"
47269  # Check if we need to convert this using DOS-style short mode. If the path
47270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47271  # take no chances and rewrite it.
47272  # Note: m4 eats our [], so we need to use [ and ] instead.
47273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47274  if test "x$has_forbidden_chars" != x; then
47275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47279      # Going to short mode and back again did indeed matter. Since short mode is
47280      # case insensitive, let's make it lowercase to improve readability.
47281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47282      # Now convert it back to Unix-style (cygpath)
47283      input_path=`$CYGPATH -u "$shortmode_path"`
47284      new_path="$input_path"
47285    fi
47286  fi
47287
47288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47289  if test "x$test_cygdrive_prefix" = x; then
47290    # As a simple fix, exclude /usr/bin since it's not a real path.
47291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47293      # a path prefixed by /cygdrive for fixpath to work.
47294      new_path="$CYGWIN_ROOT_PATH$input_path"
47295    fi
47296  fi
47297
47298
47299  if test "x$path" != "x$new_path"; then
47300    MSVC_DLL="$new_path"
47301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47302$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47303  fi
47304
47305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47306
47307  path="$MSVC_DLL"
47308  has_colon=`$ECHO $path | $GREP ^.:`
47309  new_path="$path"
47310  if test "x$has_colon" = x; then
47311    # Not in mixed or Windows style, start by that.
47312    new_path=`cmd //c echo $path`
47313  fi
47314
47315
47316  input_path="$new_path"
47317  # Check if we need to convert this using DOS-style short mode. If the path
47318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47319  # take no chances and rewrite it.
47320  # Note: m4 eats our [], so we need to use [ and ] instead.
47321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47322  if test "x$has_forbidden_chars" != x; then
47323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47325  fi
47326
47327
47328  windows_path="$new_path"
47329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47330    unix_path=`$CYGPATH -u "$windows_path"`
47331    new_path="$unix_path"
47332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47334    new_path="$unix_path"
47335  fi
47336
47337  if test "x$path" != "x$new_path"; then
47338    MSVC_DLL="$new_path"
47339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47340$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47341  fi
47342
47343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47345
47346    else
47347      # We're on a unix platform. Hooray! :)
47348      path="$MSVC_DLL"
47349      has_space=`$ECHO "$path" | $GREP " "`
47350      if test "x$has_space" != x; then
47351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47352$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47353        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47354      fi
47355
47356      # Use eval to expand a potential ~
47357      eval path="$path"
47358      if test ! -f "$path" && test ! -d "$path"; then
47359        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47360      fi
47361
47362      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47363    fi
47364  fi
47365
47366      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47367$as_echo_n "checking for $DLL_NAME... " >&6; }
47368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47369$as_echo "$MSVC_DLL" >&6; }
47370    else
47371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47372$as_echo "incorrect, ignoring" >&6; }
47373      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47374$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47375    fi
47376  fi
47377
47378    fi
47379  fi
47380
47381  if test "x$MSVC_DLL" = x; then
47382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47383$as_echo_n "checking for $DLL_NAME... " >&6; }
47384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47385$as_echo "no" >&6; }
47386    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
47387  fi
47388
47389    MSVCR_DLL="$MSVC_DLL"
47390  fi
47391
47392
47393
47394# Check whether --with-msvcp-dll was given.
47395if test "${with_msvcp_dll+set}" = set; then :
47396  withval=$with_msvcp_dll;
47397fi
47398
47399
47400  if test "x$MSVCP_NAME" != "x"; then
47401    if test "x$with_msvcp_dll" != x; then
47402      # If given explicitely by user, do not probe. If not present, fail directly.
47403
47404  DLL_NAME="$MSVCP_NAME"
47405  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
47406  METHOD="--with-msvcp-dll"
47407  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47408    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47409$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47410
47411    # Need to check if the found msvcr is correct architecture
47412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47413$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47414    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47416      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47417      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47418      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47419        CORRECT_MSVCR_ARCH="PE32 executable"
47420      else
47421        CORRECT_MSVCR_ARCH="PE32+ executable"
47422      fi
47423    else
47424      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47425        CORRECT_MSVCR_ARCH=386
47426      else
47427        CORRECT_MSVCR_ARCH=x86-64
47428      fi
47429    fi
47430    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47432$as_echo "ok" >&6; }
47433      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47434
47435  # Only process if variable expands to non-empty
47436
47437  if test "x$MSVC_DLL" != x; then
47438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47439
47440  # Input might be given as Windows format, start by converting to
47441  # unix format.
47442  path="$MSVC_DLL"
47443  new_path=`$CYGPATH -u "$path"`
47444
47445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47448  # "foo.exe" is OK but "foo" is an error.
47449  #
47450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47451  # It is also a way to make sure we got the proper file name for the real test later on.
47452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47453  if test "x$test_shortpath" = x; then
47454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47455$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47456    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47457  fi
47458
47459  # Call helper function which possibly converts this using DOS-style short mode.
47460  # If so, the updated path is stored in $new_path.
47461
47462  input_path="$new_path"
47463  # Check if we need to convert this using DOS-style short mode. If the path
47464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47465  # take no chances and rewrite it.
47466  # Note: m4 eats our [], so we need to use [ and ] instead.
47467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47468  if test "x$has_forbidden_chars" != x; then
47469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47473      # Going to short mode and back again did indeed matter. Since short mode is
47474      # case insensitive, let's make it lowercase to improve readability.
47475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47476      # Now convert it back to Unix-style (cygpath)
47477      input_path=`$CYGPATH -u "$shortmode_path"`
47478      new_path="$input_path"
47479    fi
47480  fi
47481
47482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47483  if test "x$test_cygdrive_prefix" = x; then
47484    # As a simple fix, exclude /usr/bin since it's not a real path.
47485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47487      # a path prefixed by /cygdrive for fixpath to work.
47488      new_path="$CYGWIN_ROOT_PATH$input_path"
47489    fi
47490  fi
47491
47492
47493  if test "x$path" != "x$new_path"; then
47494    MSVC_DLL="$new_path"
47495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47496$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47497  fi
47498
47499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47500
47501  path="$MSVC_DLL"
47502  has_colon=`$ECHO $path | $GREP ^.:`
47503  new_path="$path"
47504  if test "x$has_colon" = x; then
47505    # Not in mixed or Windows style, start by that.
47506    new_path=`cmd //c echo $path`
47507  fi
47508
47509
47510  input_path="$new_path"
47511  # Check if we need to convert this using DOS-style short mode. If the path
47512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47513  # take no chances and rewrite it.
47514  # Note: m4 eats our [], so we need to use [ and ] instead.
47515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47516  if test "x$has_forbidden_chars" != x; then
47517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47519  fi
47520
47521
47522  windows_path="$new_path"
47523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47524    unix_path=`$CYGPATH -u "$windows_path"`
47525    new_path="$unix_path"
47526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47528    new_path="$unix_path"
47529  fi
47530
47531  if test "x$path" != "x$new_path"; then
47532    MSVC_DLL="$new_path"
47533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47534$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47535  fi
47536
47537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47539
47540    else
47541      # We're on a unix platform. Hooray! :)
47542      path="$MSVC_DLL"
47543      has_space=`$ECHO "$path" | $GREP " "`
47544      if test "x$has_space" != x; then
47545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47546$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47548      fi
47549
47550      # Use eval to expand a potential ~
47551      eval path="$path"
47552      if test ! -f "$path" && test ! -d "$path"; then
47553        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47554      fi
47555
47556      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47557    fi
47558  fi
47559
47560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47561$as_echo_n "checking for $DLL_NAME... " >&6; }
47562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47563$as_echo "$MSVC_DLL" >&6; }
47564    else
47565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47566$as_echo "incorrect, ignoring" >&6; }
47567      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47568$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47569    fi
47570  fi
47571
47572      if test "x$MSVC_DLL" = x; then
47573        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
47574      fi
47575      MSVCP_DLL="$MSVC_DLL"
47576    elif test "x$DEVKIT_MSVCP_DLL" != x; then
47577
47578  DLL_NAME="$MSVCP_NAME"
47579  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
47580  METHOD="devkit"
47581  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47582    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47583$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47584
47585    # Need to check if the found msvcr is correct architecture
47586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47587$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47588    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47590      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47591      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47592      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47593        CORRECT_MSVCR_ARCH="PE32 executable"
47594      else
47595        CORRECT_MSVCR_ARCH="PE32+ executable"
47596      fi
47597    else
47598      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47599        CORRECT_MSVCR_ARCH=386
47600      else
47601        CORRECT_MSVCR_ARCH=x86-64
47602      fi
47603    fi
47604    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47606$as_echo "ok" >&6; }
47607      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47608
47609  # Only process if variable expands to non-empty
47610
47611  if test "x$MSVC_DLL" != x; then
47612    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47613
47614  # Input might be given as Windows format, start by converting to
47615  # unix format.
47616  path="$MSVC_DLL"
47617  new_path=`$CYGPATH -u "$path"`
47618
47619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47622  # "foo.exe" is OK but "foo" is an error.
47623  #
47624  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47625  # It is also a way to make sure we got the proper file name for the real test later on.
47626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47627  if test "x$test_shortpath" = x; then
47628    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47629$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47630    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47631  fi
47632
47633  # Call helper function which possibly converts this using DOS-style short mode.
47634  # If so, the updated path is stored in $new_path.
47635
47636  input_path="$new_path"
47637  # Check if we need to convert this using DOS-style short mode. If the path
47638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47639  # take no chances and rewrite it.
47640  # Note: m4 eats our [], so we need to use [ and ] instead.
47641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47642  if test "x$has_forbidden_chars" != x; then
47643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47647      # Going to short mode and back again did indeed matter. Since short mode is
47648      # case insensitive, let's make it lowercase to improve readability.
47649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47650      # Now convert it back to Unix-style (cygpath)
47651      input_path=`$CYGPATH -u "$shortmode_path"`
47652      new_path="$input_path"
47653    fi
47654  fi
47655
47656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47657  if test "x$test_cygdrive_prefix" = x; then
47658    # As a simple fix, exclude /usr/bin since it's not a real path.
47659    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47661      # a path prefixed by /cygdrive for fixpath to work.
47662      new_path="$CYGWIN_ROOT_PATH$input_path"
47663    fi
47664  fi
47665
47666
47667  if test "x$path" != "x$new_path"; then
47668    MSVC_DLL="$new_path"
47669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47670$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47671  fi
47672
47673    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47674
47675  path="$MSVC_DLL"
47676  has_colon=`$ECHO $path | $GREP ^.:`
47677  new_path="$path"
47678  if test "x$has_colon" = x; then
47679    # Not in mixed or Windows style, start by that.
47680    new_path=`cmd //c echo $path`
47681  fi
47682
47683
47684  input_path="$new_path"
47685  # Check if we need to convert this using DOS-style short mode. If the path
47686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47687  # take no chances and rewrite it.
47688  # Note: m4 eats our [], so we need to use [ and ] instead.
47689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47690  if test "x$has_forbidden_chars" != x; then
47691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47693  fi
47694
47695
47696  windows_path="$new_path"
47697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47698    unix_path=`$CYGPATH -u "$windows_path"`
47699    new_path="$unix_path"
47700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47702    new_path="$unix_path"
47703  fi
47704
47705  if test "x$path" != "x$new_path"; then
47706    MSVC_DLL="$new_path"
47707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47708$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47709  fi
47710
47711  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47712  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47713
47714    else
47715      # We're on a unix platform. Hooray! :)
47716      path="$MSVC_DLL"
47717      has_space=`$ECHO "$path" | $GREP " "`
47718      if test "x$has_space" != x; then
47719        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47720$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47721        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47722      fi
47723
47724      # Use eval to expand a potential ~
47725      eval path="$path"
47726      if test ! -f "$path" && test ! -d "$path"; then
47727        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47728      fi
47729
47730      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47731    fi
47732  fi
47733
47734      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47735$as_echo_n "checking for $DLL_NAME... " >&6; }
47736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47737$as_echo "$MSVC_DLL" >&6; }
47738    else
47739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47740$as_echo "incorrect, ignoring" >&6; }
47741      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47742$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47743    fi
47744  fi
47745
47746      if test "x$MSVC_DLL" = x; then
47747        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
47748      fi
47749      MSVCP_DLL="$MSVC_DLL"
47750    else
47751
47752  DLL_NAME="${MSVCP_NAME}"
47753  MSVC_DLL=
47754
47755  if test "x$MSVC_DLL" = x; then
47756    # Probe: Using well-known location from Visual Studio 10.0
47757    if test "x$VCINSTALLDIR" != x; then
47758      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47759
47760  windows_path="$CYGWIN_VC_INSTALL_DIR"
47761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47762    unix_path=`$CYGPATH -u "$windows_path"`
47763    CYGWIN_VC_INSTALL_DIR="$unix_path"
47764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47766    CYGWIN_VC_INSTALL_DIR="$unix_path"
47767  fi
47768
47769      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47770        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47771      else
47772        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47773      fi
47774      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47775
47776  DLL_NAME="$DLL_NAME"
47777  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47778  METHOD="well-known location in VCINSTALLDIR"
47779  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47780    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47781$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47782
47783    # Need to check if the found msvcr is correct architecture
47784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47785$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47786    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47788      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47789      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47790      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47791        CORRECT_MSVCR_ARCH="PE32 executable"
47792      else
47793        CORRECT_MSVCR_ARCH="PE32+ executable"
47794      fi
47795    else
47796      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47797        CORRECT_MSVCR_ARCH=386
47798      else
47799        CORRECT_MSVCR_ARCH=x86-64
47800      fi
47801    fi
47802    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47804$as_echo "ok" >&6; }
47805      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47806
47807  # Only process if variable expands to non-empty
47808
47809  if test "x$MSVC_DLL" != x; then
47810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47811
47812  # Input might be given as Windows format, start by converting to
47813  # unix format.
47814  path="$MSVC_DLL"
47815  new_path=`$CYGPATH -u "$path"`
47816
47817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47820  # "foo.exe" is OK but "foo" is an error.
47821  #
47822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47823  # It is also a way to make sure we got the proper file name for the real test later on.
47824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47825  if test "x$test_shortpath" = x; then
47826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47827$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47828    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47829  fi
47830
47831  # Call helper function which possibly converts this using DOS-style short mode.
47832  # If so, the updated path is stored in $new_path.
47833
47834  input_path="$new_path"
47835  # Check if we need to convert this using DOS-style short mode. If the path
47836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47837  # take no chances and rewrite it.
47838  # Note: m4 eats our [], so we need to use [ and ] instead.
47839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47840  if test "x$has_forbidden_chars" != x; then
47841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47845      # Going to short mode and back again did indeed matter. Since short mode is
47846      # case insensitive, let's make it lowercase to improve readability.
47847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47848      # Now convert it back to Unix-style (cygpath)
47849      input_path=`$CYGPATH -u "$shortmode_path"`
47850      new_path="$input_path"
47851    fi
47852  fi
47853
47854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47855  if test "x$test_cygdrive_prefix" = x; then
47856    # As a simple fix, exclude /usr/bin since it's not a real path.
47857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47859      # a path prefixed by /cygdrive for fixpath to work.
47860      new_path="$CYGWIN_ROOT_PATH$input_path"
47861    fi
47862  fi
47863
47864
47865  if test "x$path" != "x$new_path"; then
47866    MSVC_DLL="$new_path"
47867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47868$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47869  fi
47870
47871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47872
47873  path="$MSVC_DLL"
47874  has_colon=`$ECHO $path | $GREP ^.:`
47875  new_path="$path"
47876  if test "x$has_colon" = x; then
47877    # Not in mixed or Windows style, start by that.
47878    new_path=`cmd //c echo $path`
47879  fi
47880
47881
47882  input_path="$new_path"
47883  # Check if we need to convert this using DOS-style short mode. If the path
47884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47885  # take no chances and rewrite it.
47886  # Note: m4 eats our [], so we need to use [ and ] instead.
47887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47888  if test "x$has_forbidden_chars" != x; then
47889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47891  fi
47892
47893
47894  windows_path="$new_path"
47895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47896    unix_path=`$CYGPATH -u "$windows_path"`
47897    new_path="$unix_path"
47898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47900    new_path="$unix_path"
47901  fi
47902
47903  if test "x$path" != "x$new_path"; then
47904    MSVC_DLL="$new_path"
47905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47906$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47907  fi
47908
47909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47911
47912    else
47913      # We're on a unix platform. Hooray! :)
47914      path="$MSVC_DLL"
47915      has_space=`$ECHO "$path" | $GREP " "`
47916      if test "x$has_space" != x; then
47917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47918$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47920      fi
47921
47922      # Use eval to expand a potential ~
47923      eval path="$path"
47924      if test ! -f "$path" && test ! -d "$path"; then
47925        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47926      fi
47927
47928      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47929    fi
47930  fi
47931
47932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47933$as_echo_n "checking for $DLL_NAME... " >&6; }
47934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47935$as_echo "$MSVC_DLL" >&6; }
47936    else
47937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47938$as_echo "incorrect, ignoring" >&6; }
47939      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47940$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47941    fi
47942  fi
47943
47944    fi
47945  fi
47946
47947  if test "x$MSVC_DLL" = x; then
47948    # Probe: Check in the Boot JDK directory.
47949    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47950
47951  DLL_NAME="$DLL_NAME"
47952  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47953  METHOD="well-known location in Boot JDK"
47954  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47955    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47956$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47957
47958    # Need to check if the found msvcr is correct architecture
47959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47960$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47961    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47963      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47964      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47965      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47966        CORRECT_MSVCR_ARCH="PE32 executable"
47967      else
47968        CORRECT_MSVCR_ARCH="PE32+ executable"
47969      fi
47970    else
47971      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47972        CORRECT_MSVCR_ARCH=386
47973      else
47974        CORRECT_MSVCR_ARCH=x86-64
47975      fi
47976    fi
47977    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47978      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47979$as_echo "ok" >&6; }
47980      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47981
47982  # Only process if variable expands to non-empty
47983
47984  if test "x$MSVC_DLL" != x; then
47985    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47986
47987  # Input might be given as Windows format, start by converting to
47988  # unix format.
47989  path="$MSVC_DLL"
47990  new_path=`$CYGPATH -u "$path"`
47991
47992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47995  # "foo.exe" is OK but "foo" is an error.
47996  #
47997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47998  # It is also a way to make sure we got the proper file name for the real test later on.
47999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48000  if test "x$test_shortpath" = x; then
48001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48002$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48003    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48004  fi
48005
48006  # Call helper function which possibly converts this using DOS-style short mode.
48007  # If so, the updated path is stored in $new_path.
48008
48009  input_path="$new_path"
48010  # Check if we need to convert this using DOS-style short mode. If the path
48011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48012  # take no chances and rewrite it.
48013  # Note: m4 eats our [], so we need to use [ and ] instead.
48014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48015  if test "x$has_forbidden_chars" != x; then
48016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48020      # Going to short mode and back again did indeed matter. Since short mode is
48021      # case insensitive, let's make it lowercase to improve readability.
48022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48023      # Now convert it back to Unix-style (cygpath)
48024      input_path=`$CYGPATH -u "$shortmode_path"`
48025      new_path="$input_path"
48026    fi
48027  fi
48028
48029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48030  if test "x$test_cygdrive_prefix" = x; then
48031    # As a simple fix, exclude /usr/bin since it's not a real path.
48032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48034      # a path prefixed by /cygdrive for fixpath to work.
48035      new_path="$CYGWIN_ROOT_PATH$input_path"
48036    fi
48037  fi
48038
48039
48040  if test "x$path" != "x$new_path"; then
48041    MSVC_DLL="$new_path"
48042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48043$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48044  fi
48045
48046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48047
48048  path="$MSVC_DLL"
48049  has_colon=`$ECHO $path | $GREP ^.:`
48050  new_path="$path"
48051  if test "x$has_colon" = x; then
48052    # Not in mixed or Windows style, start by that.
48053    new_path=`cmd //c echo $path`
48054  fi
48055
48056
48057  input_path="$new_path"
48058  # Check if we need to convert this using DOS-style short mode. If the path
48059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48060  # take no chances and rewrite it.
48061  # Note: m4 eats our [], so we need to use [ and ] instead.
48062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48063  if test "x$has_forbidden_chars" != x; then
48064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48066  fi
48067
48068
48069  windows_path="$new_path"
48070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48071    unix_path=`$CYGPATH -u "$windows_path"`
48072    new_path="$unix_path"
48073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48075    new_path="$unix_path"
48076  fi
48077
48078  if test "x$path" != "x$new_path"; then
48079    MSVC_DLL="$new_path"
48080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48081$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48082  fi
48083
48084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48086
48087    else
48088      # We're on a unix platform. Hooray! :)
48089      path="$MSVC_DLL"
48090      has_space=`$ECHO "$path" | $GREP " "`
48091      if test "x$has_space" != x; then
48092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48093$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48094        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48095      fi
48096
48097      # Use eval to expand a potential ~
48098      eval path="$path"
48099      if test ! -f "$path" && test ! -d "$path"; then
48100        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48101      fi
48102
48103      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48104    fi
48105  fi
48106
48107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48108$as_echo_n "checking for $DLL_NAME... " >&6; }
48109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48110$as_echo "$MSVC_DLL" >&6; }
48111    else
48112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48113$as_echo "incorrect, ignoring" >&6; }
48114      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48115$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48116    fi
48117  fi
48118
48119  fi
48120
48121  if test "x$MSVC_DLL" = x; then
48122    # Probe: Look in the Windows system32 directory
48123    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48124
48125  windows_path="$CYGWIN_SYSTEMROOT"
48126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48127    unix_path=`$CYGPATH -u "$windows_path"`
48128    CYGWIN_SYSTEMROOT="$unix_path"
48129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48131    CYGWIN_SYSTEMROOT="$unix_path"
48132  fi
48133
48134    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48135
48136  DLL_NAME="$DLL_NAME"
48137  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48138  METHOD="well-known location in SYSTEMROOT"
48139  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48140    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48141$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48142
48143    # Need to check if the found msvcr is correct architecture
48144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48145$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48146    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48147    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48148      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48149      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48150      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48151        CORRECT_MSVCR_ARCH="PE32 executable"
48152      else
48153        CORRECT_MSVCR_ARCH="PE32+ executable"
48154      fi
48155    else
48156      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48157        CORRECT_MSVCR_ARCH=386
48158      else
48159        CORRECT_MSVCR_ARCH=x86-64
48160      fi
48161    fi
48162    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48164$as_echo "ok" >&6; }
48165      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48166
48167  # Only process if variable expands to non-empty
48168
48169  if test "x$MSVC_DLL" != x; then
48170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48171
48172  # Input might be given as Windows format, start by converting to
48173  # unix format.
48174  path="$MSVC_DLL"
48175  new_path=`$CYGPATH -u "$path"`
48176
48177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48180  # "foo.exe" is OK but "foo" is an error.
48181  #
48182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48183  # It is also a way to make sure we got the proper file name for the real test later on.
48184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48185  if test "x$test_shortpath" = x; then
48186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48187$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48188    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48189  fi
48190
48191  # Call helper function which possibly converts this using DOS-style short mode.
48192  # If so, the updated path is stored in $new_path.
48193
48194  input_path="$new_path"
48195  # Check if we need to convert this using DOS-style short mode. If the path
48196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48197  # take no chances and rewrite it.
48198  # Note: m4 eats our [], so we need to use [ and ] instead.
48199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48200  if test "x$has_forbidden_chars" != x; then
48201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48205      # Going to short mode and back again did indeed matter. Since short mode is
48206      # case insensitive, let's make it lowercase to improve readability.
48207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48208      # Now convert it back to Unix-style (cygpath)
48209      input_path=`$CYGPATH -u "$shortmode_path"`
48210      new_path="$input_path"
48211    fi
48212  fi
48213
48214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48215  if test "x$test_cygdrive_prefix" = x; then
48216    # As a simple fix, exclude /usr/bin since it's not a real path.
48217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48219      # a path prefixed by /cygdrive for fixpath to work.
48220      new_path="$CYGWIN_ROOT_PATH$input_path"
48221    fi
48222  fi
48223
48224
48225  if test "x$path" != "x$new_path"; then
48226    MSVC_DLL="$new_path"
48227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48228$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48229  fi
48230
48231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48232
48233  path="$MSVC_DLL"
48234  has_colon=`$ECHO $path | $GREP ^.:`
48235  new_path="$path"
48236  if test "x$has_colon" = x; then
48237    # Not in mixed or Windows style, start by that.
48238    new_path=`cmd //c echo $path`
48239  fi
48240
48241
48242  input_path="$new_path"
48243  # Check if we need to convert this using DOS-style short mode. If the path
48244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48245  # take no chances and rewrite it.
48246  # Note: m4 eats our [], so we need to use [ and ] instead.
48247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48248  if test "x$has_forbidden_chars" != x; then
48249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48251  fi
48252
48253
48254  windows_path="$new_path"
48255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48256    unix_path=`$CYGPATH -u "$windows_path"`
48257    new_path="$unix_path"
48258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48260    new_path="$unix_path"
48261  fi
48262
48263  if test "x$path" != "x$new_path"; then
48264    MSVC_DLL="$new_path"
48265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48266$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48267  fi
48268
48269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48271
48272    else
48273      # We're on a unix platform. Hooray! :)
48274      path="$MSVC_DLL"
48275      has_space=`$ECHO "$path" | $GREP " "`
48276      if test "x$has_space" != x; then
48277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48278$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48280      fi
48281
48282      # Use eval to expand a potential ~
48283      eval path="$path"
48284      if test ! -f "$path" && test ! -d "$path"; then
48285        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48286      fi
48287
48288      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48289    fi
48290  fi
48291
48292      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48293$as_echo_n "checking for $DLL_NAME... " >&6; }
48294      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48295$as_echo "$MSVC_DLL" >&6; }
48296    else
48297      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48298$as_echo "incorrect, ignoring" >&6; }
48299      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48300$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48301    fi
48302  fi
48303
48304  fi
48305
48306  if test "x$MSVC_DLL" = x; then
48307    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48308    if test "x$VS100COMNTOOLS" != x; then
48309      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48310
48311  windows_path="$CYGWIN_VS_TOOLS_DIR"
48312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48313    unix_path=`$CYGPATH -u "$windows_path"`
48314    CYGWIN_VS_TOOLS_DIR="$unix_path"
48315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48317    CYGWIN_VS_TOOLS_DIR="$unix_path"
48318  fi
48319
48320      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48321        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48322	    | $GREP -i /x64/ | $HEAD --lines 1`
48323      else
48324        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48325	    | $GREP -i /x86/ | $HEAD --lines 1`
48326      fi
48327
48328  DLL_NAME="$DLL_NAME"
48329  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48330  METHOD="search of VS100COMNTOOLS"
48331  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48332    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48333$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48334
48335    # Need to check if the found msvcr is correct architecture
48336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48337$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48338    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48340      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48341      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48342      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48343        CORRECT_MSVCR_ARCH="PE32 executable"
48344      else
48345        CORRECT_MSVCR_ARCH="PE32+ executable"
48346      fi
48347    else
48348      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48349        CORRECT_MSVCR_ARCH=386
48350      else
48351        CORRECT_MSVCR_ARCH=x86-64
48352      fi
48353    fi
48354    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48356$as_echo "ok" >&6; }
48357      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48358
48359  # Only process if variable expands to non-empty
48360
48361  if test "x$MSVC_DLL" != x; then
48362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48363
48364  # Input might be given as Windows format, start by converting to
48365  # unix format.
48366  path="$MSVC_DLL"
48367  new_path=`$CYGPATH -u "$path"`
48368
48369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48372  # "foo.exe" is OK but "foo" is an error.
48373  #
48374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48375  # It is also a way to make sure we got the proper file name for the real test later on.
48376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48377  if test "x$test_shortpath" = x; then
48378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48379$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48380    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48381  fi
48382
48383  # Call helper function which possibly converts this using DOS-style short mode.
48384  # If so, the updated path is stored in $new_path.
48385
48386  input_path="$new_path"
48387  # Check if we need to convert this using DOS-style short mode. If the path
48388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48389  # take no chances and rewrite it.
48390  # Note: m4 eats our [], so we need to use [ and ] instead.
48391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48392  if test "x$has_forbidden_chars" != x; then
48393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48397      # Going to short mode and back again did indeed matter. Since short mode is
48398      # case insensitive, let's make it lowercase to improve readability.
48399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48400      # Now convert it back to Unix-style (cygpath)
48401      input_path=`$CYGPATH -u "$shortmode_path"`
48402      new_path="$input_path"
48403    fi
48404  fi
48405
48406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48407  if test "x$test_cygdrive_prefix" = x; then
48408    # As a simple fix, exclude /usr/bin since it's not a real path.
48409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48411      # a path prefixed by /cygdrive for fixpath to work.
48412      new_path="$CYGWIN_ROOT_PATH$input_path"
48413    fi
48414  fi
48415
48416
48417  if test "x$path" != "x$new_path"; then
48418    MSVC_DLL="$new_path"
48419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48420$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48421  fi
48422
48423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48424
48425  path="$MSVC_DLL"
48426  has_colon=`$ECHO $path | $GREP ^.:`
48427  new_path="$path"
48428  if test "x$has_colon" = x; then
48429    # Not in mixed or Windows style, start by that.
48430    new_path=`cmd //c echo $path`
48431  fi
48432
48433
48434  input_path="$new_path"
48435  # Check if we need to convert this using DOS-style short mode. If the path
48436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48437  # take no chances and rewrite it.
48438  # Note: m4 eats our [], so we need to use [ and ] instead.
48439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48440  if test "x$has_forbidden_chars" != x; then
48441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48443  fi
48444
48445
48446  windows_path="$new_path"
48447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48448    unix_path=`$CYGPATH -u "$windows_path"`
48449    new_path="$unix_path"
48450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48452    new_path="$unix_path"
48453  fi
48454
48455  if test "x$path" != "x$new_path"; then
48456    MSVC_DLL="$new_path"
48457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48458$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48459  fi
48460
48461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48463
48464    else
48465      # We're on a unix platform. Hooray! :)
48466      path="$MSVC_DLL"
48467      has_space=`$ECHO "$path" | $GREP " "`
48468      if test "x$has_space" != x; then
48469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48470$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48472      fi
48473
48474      # Use eval to expand a potential ~
48475      eval path="$path"
48476      if test ! -f "$path" && test ! -d "$path"; then
48477        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48478      fi
48479
48480      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48481    fi
48482  fi
48483
48484      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48485$as_echo_n "checking for $DLL_NAME... " >&6; }
48486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48487$as_echo "$MSVC_DLL" >&6; }
48488    else
48489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48490$as_echo "incorrect, ignoring" >&6; }
48491      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48492$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48493    fi
48494  fi
48495
48496    fi
48497  fi
48498
48499  if test "x$MSVC_DLL" = x; then
48500    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48501    # (This was the original behaviour; kept since it might turn something up)
48502    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48503      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48504        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48505	    | $GREP x64 | $HEAD --lines 1`
48506      else
48507        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48508	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48509        if test "x$POSSIBLE_MSVC_DLL" = x; then
48510          # We're grasping at straws now...
48511          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48512	      | $HEAD --lines 1`
48513        fi
48514      fi
48515
48516
48517  DLL_NAME="$DLL_NAME"
48518  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48519  METHOD="search of VCINSTALLDIR"
48520  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48521    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48522$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48523
48524    # Need to check if the found msvcr is correct architecture
48525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48526$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48527    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48529      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48530      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48531      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48532        CORRECT_MSVCR_ARCH="PE32 executable"
48533      else
48534        CORRECT_MSVCR_ARCH="PE32+ executable"
48535      fi
48536    else
48537      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48538        CORRECT_MSVCR_ARCH=386
48539      else
48540        CORRECT_MSVCR_ARCH=x86-64
48541      fi
48542    fi
48543    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48545$as_echo "ok" >&6; }
48546      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48547
48548  # Only process if variable expands to non-empty
48549
48550  if test "x$MSVC_DLL" != x; then
48551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48552
48553  # Input might be given as Windows format, start by converting to
48554  # unix format.
48555  path="$MSVC_DLL"
48556  new_path=`$CYGPATH -u "$path"`
48557
48558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48561  # "foo.exe" is OK but "foo" is an error.
48562  #
48563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48564  # It is also a way to make sure we got the proper file name for the real test later on.
48565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48566  if test "x$test_shortpath" = x; then
48567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48568$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48569    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48570  fi
48571
48572  # Call helper function which possibly converts this using DOS-style short mode.
48573  # If so, the updated path is stored in $new_path.
48574
48575  input_path="$new_path"
48576  # Check if we need to convert this using DOS-style short mode. If the path
48577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48578  # take no chances and rewrite it.
48579  # Note: m4 eats our [], so we need to use [ and ] instead.
48580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48581  if test "x$has_forbidden_chars" != x; then
48582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48586      # Going to short mode and back again did indeed matter. Since short mode is
48587      # case insensitive, let's make it lowercase to improve readability.
48588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48589      # Now convert it back to Unix-style (cygpath)
48590      input_path=`$CYGPATH -u "$shortmode_path"`
48591      new_path="$input_path"
48592    fi
48593  fi
48594
48595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48596  if test "x$test_cygdrive_prefix" = x; then
48597    # As a simple fix, exclude /usr/bin since it's not a real path.
48598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48600      # a path prefixed by /cygdrive for fixpath to work.
48601      new_path="$CYGWIN_ROOT_PATH$input_path"
48602    fi
48603  fi
48604
48605
48606  if test "x$path" != "x$new_path"; then
48607    MSVC_DLL="$new_path"
48608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48609$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48610  fi
48611
48612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48613
48614  path="$MSVC_DLL"
48615  has_colon=`$ECHO $path | $GREP ^.:`
48616  new_path="$path"
48617  if test "x$has_colon" = x; then
48618    # Not in mixed or Windows style, start by that.
48619    new_path=`cmd //c echo $path`
48620  fi
48621
48622
48623  input_path="$new_path"
48624  # Check if we need to convert this using DOS-style short mode. If the path
48625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48626  # take no chances and rewrite it.
48627  # Note: m4 eats our [], so we need to use [ and ] instead.
48628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48629  if test "x$has_forbidden_chars" != x; then
48630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48632  fi
48633
48634
48635  windows_path="$new_path"
48636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48637    unix_path=`$CYGPATH -u "$windows_path"`
48638    new_path="$unix_path"
48639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48641    new_path="$unix_path"
48642  fi
48643
48644  if test "x$path" != "x$new_path"; then
48645    MSVC_DLL="$new_path"
48646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48647$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48648  fi
48649
48650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48652
48653    else
48654      # We're on a unix platform. Hooray! :)
48655      path="$MSVC_DLL"
48656      has_space=`$ECHO "$path" | $GREP " "`
48657      if test "x$has_space" != x; then
48658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48659$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48661      fi
48662
48663      # Use eval to expand a potential ~
48664      eval path="$path"
48665      if test ! -f "$path" && test ! -d "$path"; then
48666        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48667      fi
48668
48669      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48670    fi
48671  fi
48672
48673      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48674$as_echo_n "checking for $DLL_NAME... " >&6; }
48675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48676$as_echo "$MSVC_DLL" >&6; }
48677    else
48678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48679$as_echo "incorrect, ignoring" >&6; }
48680      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48681$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48682    fi
48683  fi
48684
48685    fi
48686  fi
48687
48688  if test "x$MSVC_DLL" = x; then
48689    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48690$as_echo_n "checking for $DLL_NAME... " >&6; }
48691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48692$as_echo "no" >&6; }
48693    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48694  fi
48695
48696      MSVCP_DLL="$MSVC_DLL"
48697    fi
48698
48699  fi
48700
48701  fi
48702
48703
48704  if test "x$NEEDS_LIB_X11" = xfalse; then
48705    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
48706      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
48707$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
48708    fi
48709    X_CFLAGS=
48710    X_LIBS=
48711  else
48712
48713    if test "x${with_x}" = xno; then
48714      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
48715    fi
48716
48717    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
48718      # The user has specified a X11 base directory. Use it for includes and
48719      # libraries, unless explicitely overridden.
48720      if test "x$x_includes" = xNONE; then
48721        x_includes="${with_x}/include"
48722      fi
48723      if test "x$x_libraries" = xNONE; then
48724        x_libraries="${with_x}/lib"
48725      fi
48726    else
48727      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
48728      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
48729      # --x-libraries for the sysroot, if that seems to be correct.
48730      if test "x$SYSROOT" != "x"; then
48731        if test "x$x_includes" = xNONE; then
48732          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
48733            x_includes="$SYSROOT/usr/X11R6/include"
48734          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
48735            x_includes="$SYSROOT/usr/include"
48736          fi
48737        fi
48738        if test "x$x_libraries" = xNONE; then
48739          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
48740            x_libraries="$SYSROOT/usr/X11R6/lib"
48741          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48742            x_libraries="$SYSROOT/usr/lib64"
48743          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
48744            x_libraries="$SYSROOT/usr/lib"
48745          fi
48746        fi
48747      fi
48748    fi
48749
48750    # Now let autoconf do it's magic
48751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
48752$as_echo_n "checking for X... " >&6; }
48753
48754
48755# Check whether --with-x was given.
48756if test "${with_x+set}" = set; then :
48757  withval=$with_x;
48758fi
48759
48760# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
48761if test "x$with_x" = xno; then
48762  # The user explicitly disabled X.
48763  have_x=disabled
48764else
48765  case $x_includes,$x_libraries in #(
48766    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
48767    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
48768  $as_echo_n "(cached) " >&6
48769else
48770  # One or both of the vars are not set, and there is no cached value.
48771ac_x_includes=no ac_x_libraries=no
48772rm -f -r conftest.dir
48773if mkdir conftest.dir; then
48774  cd conftest.dir
48775  cat >Imakefile <<'_ACEOF'
48776incroot:
48777	@echo incroot='${INCROOT}'
48778usrlibdir:
48779	@echo usrlibdir='${USRLIBDIR}'
48780libdir:
48781	@echo libdir='${LIBDIR}'
48782_ACEOF
48783  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
48784    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
48785    for ac_var in incroot usrlibdir libdir; do
48786      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
48787    done
48788    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
48789    for ac_extension in a so sl dylib la dll; do
48790      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
48791	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
48792	ac_im_usrlibdir=$ac_im_libdir; break
48793      fi
48794    done
48795    # Screen out bogus values from the imake configuration.  They are
48796    # bogus both because they are the default anyway, and because
48797    # using them would break gcc on systems where it needs fixed includes.
48798    case $ac_im_incroot in
48799	/usr/include) ac_x_includes= ;;
48800	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
48801    esac
48802    case $ac_im_usrlibdir in
48803	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
48804	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
48805    esac
48806  fi
48807  cd ..
48808  rm -f -r conftest.dir
48809fi
48810
48811# Standard set of common directories for X headers.
48812# Check X11 before X11Rn because it is often a symlink to the current release.
48813ac_x_header_dirs='
48814/usr/X11/include
48815/usr/X11R7/include
48816/usr/X11R6/include
48817/usr/X11R5/include
48818/usr/X11R4/include
48819
48820/usr/include/X11
48821/usr/include/X11R7
48822/usr/include/X11R6
48823/usr/include/X11R5
48824/usr/include/X11R4
48825
48826/usr/local/X11/include
48827/usr/local/X11R7/include
48828/usr/local/X11R6/include
48829/usr/local/X11R5/include
48830/usr/local/X11R4/include
48831
48832/usr/local/include/X11
48833/usr/local/include/X11R7
48834/usr/local/include/X11R6
48835/usr/local/include/X11R5
48836/usr/local/include/X11R4
48837
48838/usr/X386/include
48839/usr/x386/include
48840/usr/XFree86/include/X11
48841
48842/usr/include
48843/usr/local/include
48844/usr/unsupported/include
48845/usr/athena/include
48846/usr/local/x11r5/include
48847/usr/lpp/Xamples/include
48848
48849/usr/openwin/include
48850/usr/openwin/share/include'
48851
48852if test "$ac_x_includes" = no; then
48853  # Guess where to find include files, by looking for Xlib.h.
48854  # First, try using that file with no special directory specified.
48855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48856/* end confdefs.h.  */
48857#include <X11/Xlib.h>
48858_ACEOF
48859if ac_fn_cxx_try_cpp "$LINENO"; then :
48860  # We can compile using X headers with no special include directory.
48861ac_x_includes=
48862else
48863  for ac_dir in $ac_x_header_dirs; do
48864  if test -r "$ac_dir/X11/Xlib.h"; then
48865    ac_x_includes=$ac_dir
48866    break
48867  fi
48868done
48869fi
48870rm -f conftest.err conftest.i conftest.$ac_ext
48871fi # $ac_x_includes = no
48872
48873if test "$ac_x_libraries" = no; then
48874  # Check for the libraries.
48875  # See if we find them without any special options.
48876  # Don't add to $LIBS permanently.
48877  ac_save_LIBS=$LIBS
48878  LIBS="-lX11 $LIBS"
48879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48880/* end confdefs.h.  */
48881#include <X11/Xlib.h>
48882int
48883main ()
48884{
48885XrmInitialize ()
48886  ;
48887  return 0;
48888}
48889_ACEOF
48890if ac_fn_cxx_try_link "$LINENO"; then :
48891  LIBS=$ac_save_LIBS
48892# We can link X programs with no special library path.
48893ac_x_libraries=
48894else
48895  LIBS=$ac_save_LIBS
48896for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
48897do
48898  # Don't even attempt the hair of trying to link an X program!
48899  for ac_extension in a so sl dylib la dll; do
48900    if test -r "$ac_dir/libX11.$ac_extension"; then
48901      ac_x_libraries=$ac_dir
48902      break 2
48903    fi
48904  done
48905done
48906fi
48907rm -f core conftest.err conftest.$ac_objext \
48908    conftest$ac_exeext conftest.$ac_ext
48909fi # $ac_x_libraries = no
48910
48911case $ac_x_includes,$ac_x_libraries in #(
48912  no,* | *,no | *\'*)
48913    # Didn't find X, or a directory has "'" in its name.
48914    ac_cv_have_x="have_x=no";; #(
48915  *)
48916    # Record where we found X for the cache.
48917    ac_cv_have_x="have_x=yes\
48918	ac_x_includes='$ac_x_includes'\
48919	ac_x_libraries='$ac_x_libraries'"
48920esac
48921fi
48922;; #(
48923    *) have_x=yes;;
48924  esac
48925  eval "$ac_cv_have_x"
48926fi # $with_x != no
48927
48928if test "$have_x" != yes; then
48929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
48930$as_echo "$have_x" >&6; }
48931  no_x=yes
48932else
48933  # If each of the values was on the command line, it overrides each guess.
48934  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
48935  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
48936  # Update the cache value to reflect the command line values.
48937  ac_cv_have_x="have_x=yes\
48938	ac_x_includes='$x_includes'\
48939	ac_x_libraries='$x_libraries'"
48940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
48941$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
48942fi
48943
48944    if test "$no_x" = yes; then
48945  # Not all programs may use this symbol, but it does not hurt to define it.
48946
48947$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
48948
48949  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
48950else
48951  if test -n "$x_includes"; then
48952    X_CFLAGS="$X_CFLAGS -I$x_includes"
48953  fi
48954
48955  # It would also be nice to do this for all -L options, not just this one.
48956  if test -n "$x_libraries"; then
48957    X_LIBS="$X_LIBS -L$x_libraries"
48958    # For Solaris; some versions of Sun CC require a space after -R and
48959    # others require no space.  Words are not sufficient . . . .
48960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
48961$as_echo_n "checking whether -R must be followed by a space... " >&6; }
48962    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
48963    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
48964    ac_cxx_werror_flag=yes
48965    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48966/* end confdefs.h.  */
48967
48968int
48969main ()
48970{
48971
48972  ;
48973  return 0;
48974}
48975_ACEOF
48976if ac_fn_cxx_try_link "$LINENO"; then :
48977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48978$as_echo "no" >&6; }
48979       X_LIBS="$X_LIBS -R$x_libraries"
48980else
48981  LIBS="$ac_xsave_LIBS -R $x_libraries"
48982       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48983/* end confdefs.h.  */
48984
48985int
48986main ()
48987{
48988
48989  ;
48990  return 0;
48991}
48992_ACEOF
48993if ac_fn_cxx_try_link "$LINENO"; then :
48994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48995$as_echo "yes" >&6; }
48996	  X_LIBS="$X_LIBS -R $x_libraries"
48997else
48998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
48999$as_echo "neither works" >&6; }
49000fi
49001rm -f core conftest.err conftest.$ac_objext \
49002    conftest$ac_exeext conftest.$ac_ext
49003fi
49004rm -f core conftest.err conftest.$ac_objext \
49005    conftest$ac_exeext conftest.$ac_ext
49006    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
49007    LIBS=$ac_xsave_LIBS
49008  fi
49009
49010  # Check for system-dependent libraries X programs must link with.
49011  # Do this before checking for the system-independent R6 libraries
49012  # (-lICE), since we may need -lsocket or whatever for X linking.
49013
49014  if test "$ISC" = yes; then
49015    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
49016  else
49017    # Martyn Johnson says this is needed for Ultrix, if the X
49018    # libraries were built with DECnet support.  And Karl Berry says
49019    # the Alpha needs dnet_stub (dnet does not exist).
49020    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
49021    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49022/* end confdefs.h.  */
49023
49024/* Override any GCC internal prototype to avoid an error.
49025   Use char because int might match the return type of a GCC
49026   builtin and then its argument prototype would still apply.  */
49027#ifdef __cplusplus
49028extern "C"
49029#endif
49030char XOpenDisplay ();
49031int
49032main ()
49033{
49034return XOpenDisplay ();
49035  ;
49036  return 0;
49037}
49038_ACEOF
49039if ac_fn_cxx_try_link "$LINENO"; then :
49040
49041else
49042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
49043$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
49044if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
49045  $as_echo_n "(cached) " >&6
49046else
49047  ac_check_lib_save_LIBS=$LIBS
49048LIBS="-ldnet  $LIBS"
49049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49050/* end confdefs.h.  */
49051
49052/* Override any GCC internal prototype to avoid an error.
49053   Use char because int might match the return type of a GCC
49054   builtin and then its argument prototype would still apply.  */
49055#ifdef __cplusplus
49056extern "C"
49057#endif
49058char dnet_ntoa ();
49059int
49060main ()
49061{
49062return dnet_ntoa ();
49063  ;
49064  return 0;
49065}
49066_ACEOF
49067if ac_fn_cxx_try_link "$LINENO"; then :
49068  ac_cv_lib_dnet_dnet_ntoa=yes
49069else
49070  ac_cv_lib_dnet_dnet_ntoa=no
49071fi
49072rm -f core conftest.err conftest.$ac_objext \
49073    conftest$ac_exeext conftest.$ac_ext
49074LIBS=$ac_check_lib_save_LIBS
49075fi
49076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
49077$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
49078if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
49079  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
49080fi
49081
49082    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
49083      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
49084$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
49085if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
49086  $as_echo_n "(cached) " >&6
49087else
49088  ac_check_lib_save_LIBS=$LIBS
49089LIBS="-ldnet_stub  $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 dnet_ntoa ();
49100int
49101main ()
49102{
49103return dnet_ntoa ();
49104  ;
49105  return 0;
49106}
49107_ACEOF
49108if ac_fn_cxx_try_link "$LINENO"; then :
49109  ac_cv_lib_dnet_stub_dnet_ntoa=yes
49110else
49111  ac_cv_lib_dnet_stub_dnet_ntoa=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_dnet_stub_dnet_ntoa" >&5
49118$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
49119if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
49120  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
49121fi
49122
49123    fi
49124fi
49125rm -f core conftest.err conftest.$ac_objext \
49126    conftest$ac_exeext conftest.$ac_ext
49127    LIBS="$ac_xsave_LIBS"
49128
49129    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
49130    # to get the SysV transport functions.
49131    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
49132    # needs -lnsl.
49133    # The nsl library prevents programs from opening the X display
49134    # on Irix 5.2, according to T.E. Dickey.
49135    # The functions gethostbyname, getservbyname, and inet_addr are
49136    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
49137    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
49138if test "x$ac_cv_func_gethostbyname" = xyes; then :
49139
49140fi
49141
49142    if test $ac_cv_func_gethostbyname = no; then
49143      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
49144$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
49145if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
49146  $as_echo_n "(cached) " >&6
49147else
49148  ac_check_lib_save_LIBS=$LIBS
49149LIBS="-lnsl  $LIBS"
49150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49151/* end confdefs.h.  */
49152
49153/* Override any GCC internal prototype to avoid an error.
49154   Use char because int might match the return type of a GCC
49155   builtin and then its argument prototype would still apply.  */
49156#ifdef __cplusplus
49157extern "C"
49158#endif
49159char gethostbyname ();
49160int
49161main ()
49162{
49163return gethostbyname ();
49164  ;
49165  return 0;
49166}
49167_ACEOF
49168if ac_fn_cxx_try_link "$LINENO"; then :
49169  ac_cv_lib_nsl_gethostbyname=yes
49170else
49171  ac_cv_lib_nsl_gethostbyname=no
49172fi
49173rm -f core conftest.err conftest.$ac_objext \
49174    conftest$ac_exeext conftest.$ac_ext
49175LIBS=$ac_check_lib_save_LIBS
49176fi
49177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
49178$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
49179if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
49180  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
49181fi
49182
49183      if test $ac_cv_lib_nsl_gethostbyname = no; then
49184	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
49185$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
49186if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
49187  $as_echo_n "(cached) " >&6
49188else
49189  ac_check_lib_save_LIBS=$LIBS
49190LIBS="-lbsd  $LIBS"
49191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49192/* end confdefs.h.  */
49193
49194/* Override any GCC internal prototype to avoid an error.
49195   Use char because int might match the return type of a GCC
49196   builtin and then its argument prototype would still apply.  */
49197#ifdef __cplusplus
49198extern "C"
49199#endif
49200char gethostbyname ();
49201int
49202main ()
49203{
49204return gethostbyname ();
49205  ;
49206  return 0;
49207}
49208_ACEOF
49209if ac_fn_cxx_try_link "$LINENO"; then :
49210  ac_cv_lib_bsd_gethostbyname=yes
49211else
49212  ac_cv_lib_bsd_gethostbyname=no
49213fi
49214rm -f core conftest.err conftest.$ac_objext \
49215    conftest$ac_exeext conftest.$ac_ext
49216LIBS=$ac_check_lib_save_LIBS
49217fi
49218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
49219$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
49220if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
49221  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
49222fi
49223
49224      fi
49225    fi
49226
49227    # lieder@skyler.mavd.honeywell.com says without -lsocket,
49228    # socket/setsockopt and other routines are undefined under SCO ODT
49229    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
49230    # on later versions), says Simon Leinen: it contains gethostby*
49231    # variants that don't use the name server (or something).  -lsocket
49232    # must be given before -lnsl if both are needed.  We assume that
49233    # if connect needs -lnsl, so does gethostbyname.
49234    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
49235if test "x$ac_cv_func_connect" = xyes; then :
49236
49237fi
49238
49239    if test $ac_cv_func_connect = no; then
49240      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
49241$as_echo_n "checking for connect in -lsocket... " >&6; }
49242if ${ac_cv_lib_socket_connect+:} false; then :
49243  $as_echo_n "(cached) " >&6
49244else
49245  ac_check_lib_save_LIBS=$LIBS
49246LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
49247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49248/* end confdefs.h.  */
49249
49250/* Override any GCC internal prototype to avoid an error.
49251   Use char because int might match the return type of a GCC
49252   builtin and then its argument prototype would still apply.  */
49253#ifdef __cplusplus
49254extern "C"
49255#endif
49256char connect ();
49257int
49258main ()
49259{
49260return connect ();
49261  ;
49262  return 0;
49263}
49264_ACEOF
49265if ac_fn_cxx_try_link "$LINENO"; then :
49266  ac_cv_lib_socket_connect=yes
49267else
49268  ac_cv_lib_socket_connect=no
49269fi
49270rm -f core conftest.err conftest.$ac_objext \
49271    conftest$ac_exeext conftest.$ac_ext
49272LIBS=$ac_check_lib_save_LIBS
49273fi
49274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
49275$as_echo "$ac_cv_lib_socket_connect" >&6; }
49276if test "x$ac_cv_lib_socket_connect" = xyes; then :
49277  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
49278fi
49279
49280    fi
49281
49282    # Guillermo Gomez says -lposix is necessary on A/UX.
49283    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
49284if test "x$ac_cv_func_remove" = xyes; then :
49285
49286fi
49287
49288    if test $ac_cv_func_remove = no; then
49289      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
49290$as_echo_n "checking for remove in -lposix... " >&6; }
49291if ${ac_cv_lib_posix_remove+:} false; then :
49292  $as_echo_n "(cached) " >&6
49293else
49294  ac_check_lib_save_LIBS=$LIBS
49295LIBS="-lposix  $LIBS"
49296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49297/* end confdefs.h.  */
49298
49299/* Override any GCC internal prototype to avoid an error.
49300   Use char because int might match the return type of a GCC
49301   builtin and then its argument prototype would still apply.  */
49302#ifdef __cplusplus
49303extern "C"
49304#endif
49305char remove ();
49306int
49307main ()
49308{
49309return remove ();
49310  ;
49311  return 0;
49312}
49313_ACEOF
49314if ac_fn_cxx_try_link "$LINENO"; then :
49315  ac_cv_lib_posix_remove=yes
49316else
49317  ac_cv_lib_posix_remove=no
49318fi
49319rm -f core conftest.err conftest.$ac_objext \
49320    conftest$ac_exeext conftest.$ac_ext
49321LIBS=$ac_check_lib_save_LIBS
49322fi
49323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
49324$as_echo "$ac_cv_lib_posix_remove" >&6; }
49325if test "x$ac_cv_lib_posix_remove" = xyes; then :
49326  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
49327fi
49328
49329    fi
49330
49331    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
49332    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
49333if test "x$ac_cv_func_shmat" = xyes; then :
49334
49335fi
49336
49337    if test $ac_cv_func_shmat = no; then
49338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
49339$as_echo_n "checking for shmat in -lipc... " >&6; }
49340if ${ac_cv_lib_ipc_shmat+:} false; then :
49341  $as_echo_n "(cached) " >&6
49342else
49343  ac_check_lib_save_LIBS=$LIBS
49344LIBS="-lipc  $LIBS"
49345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49346/* end confdefs.h.  */
49347
49348/* Override any GCC internal prototype to avoid an error.
49349   Use char because int might match the return type of a GCC
49350   builtin and then its argument prototype would still apply.  */
49351#ifdef __cplusplus
49352extern "C"
49353#endif
49354char shmat ();
49355int
49356main ()
49357{
49358return shmat ();
49359  ;
49360  return 0;
49361}
49362_ACEOF
49363if ac_fn_cxx_try_link "$LINENO"; then :
49364  ac_cv_lib_ipc_shmat=yes
49365else
49366  ac_cv_lib_ipc_shmat=no
49367fi
49368rm -f core conftest.err conftest.$ac_objext \
49369    conftest$ac_exeext conftest.$ac_ext
49370LIBS=$ac_check_lib_save_LIBS
49371fi
49372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
49373$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
49374if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
49375  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
49376fi
49377
49378    fi
49379  fi
49380
49381  # Check for libraries that X11R6 Xt/Xaw programs need.
49382  ac_save_LDFLAGS=$LDFLAGS
49383  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
49384  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
49385  # check for ICE first), but we must link in the order -lSM -lICE or
49386  # we get undefined symbols.  So assume we have SM if we have ICE.
49387  # These have to be linked with before -lX11, unlike the other
49388  # libraries we check for below, so use a different variable.
49389  # John Interrante, Karl Berry
49390  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
49391$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
49392if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
49393  $as_echo_n "(cached) " >&6
49394else
49395  ac_check_lib_save_LIBS=$LIBS
49396LIBS="-lICE $X_EXTRA_LIBS $LIBS"
49397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49398/* end confdefs.h.  */
49399
49400/* Override any GCC internal prototype to avoid an error.
49401   Use char because int might match the return type of a GCC
49402   builtin and then its argument prototype would still apply.  */
49403#ifdef __cplusplus
49404extern "C"
49405#endif
49406char IceConnectionNumber ();
49407int
49408main ()
49409{
49410return IceConnectionNumber ();
49411  ;
49412  return 0;
49413}
49414_ACEOF
49415if ac_fn_cxx_try_link "$LINENO"; then :
49416  ac_cv_lib_ICE_IceConnectionNumber=yes
49417else
49418  ac_cv_lib_ICE_IceConnectionNumber=no
49419fi
49420rm -f core conftest.err conftest.$ac_objext \
49421    conftest$ac_exeext conftest.$ac_ext
49422LIBS=$ac_check_lib_save_LIBS
49423fi
49424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
49425$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
49426if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
49427  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
49428fi
49429
49430  LDFLAGS=$ac_save_LDFLAGS
49431
49432fi
49433
49434
49435    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
49436    # this doesn't make sense so we remove it.
49437    if test "x$COMPILE_TYPE" = xcross; then
49438      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
49439    fi
49440
49441    if test "x$no_x" = xyes; then
49442
49443  # Print a helpful message on how to acquire the necessary build dependency.
49444  # x11 is the help tag: freetype, cups, alsa etc
49445  MISSING_DEPENDENCY=x11
49446
49447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49448    cygwin_help $MISSING_DEPENDENCY
49449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49450    msys_help $MISSING_DEPENDENCY
49451  else
49452    PKGHANDLER_COMMAND=
49453
49454    case $PKGHANDLER in
49455      apt-get)
49456        apt_help     $MISSING_DEPENDENCY ;;
49457      yum)
49458        yum_help     $MISSING_DEPENDENCY ;;
49459      port)
49460        port_help    $MISSING_DEPENDENCY ;;
49461      pkgutil)
49462        pkgutil_help $MISSING_DEPENDENCY ;;
49463      pkgadd)
49464        pkgadd_help  $MISSING_DEPENDENCY ;;
49465    esac
49466
49467    if test "x$PKGHANDLER_COMMAND" != x; then
49468      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49469    fi
49470  fi
49471
49472      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
49473    fi
49474
49475    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49476      OPENWIN_HOME="/usr/openwin"
49477      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
49478      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49479          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
49480          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49481          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
49482    fi
49483
49484    ac_ext=c
49485ac_cpp='$CPP $CPPFLAGS'
49486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49488ac_compiler_gnu=$ac_cv_c_compiler_gnu
49489
49490    OLD_CFLAGS="$CFLAGS"
49491    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
49492
49493    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
49494    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
49495do :
49496  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49497ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
49498          # include <X11/Xlib.h>
49499          # include <X11/Xutil.h>
49500
49501
49502"
49503if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49504  cat >>confdefs.h <<_ACEOF
49505#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49506_ACEOF
49507 X11_HEADERS_OK=yes
49508else
49509  X11_HEADERS_OK=no; break
49510fi
49511
49512done
49513
49514
49515    if test "x$X11_HEADERS_OK" = xno; then
49516
49517  # Print a helpful message on how to acquire the necessary build dependency.
49518  # x11 is the help tag: freetype, cups, alsa etc
49519  MISSING_DEPENDENCY=x11
49520
49521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49522    cygwin_help $MISSING_DEPENDENCY
49523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49524    msys_help $MISSING_DEPENDENCY
49525  else
49526    PKGHANDLER_COMMAND=
49527
49528    case $PKGHANDLER in
49529      apt-get)
49530        apt_help     $MISSING_DEPENDENCY ;;
49531      yum)
49532        yum_help     $MISSING_DEPENDENCY ;;
49533      port)
49534        port_help    $MISSING_DEPENDENCY ;;
49535      pkgutil)
49536        pkgutil_help $MISSING_DEPENDENCY ;;
49537      pkgadd)
49538        pkgadd_help  $MISSING_DEPENDENCY ;;
49539    esac
49540
49541    if test "x$PKGHANDLER_COMMAND" != x; then
49542      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49543    fi
49544  fi
49545
49546      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
49547    fi
49548
49549    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
49550    # defined in libawt_xawt.
49551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
49552$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
49553    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49554/* end confdefs.h.  */
49555#include <X11/extensions/Xrender.h>
49556int
49557main ()
49558{
49559XLinearGradient x;
49560  ;
49561  return 0;
49562}
49563_ACEOF
49564if ac_fn_c_try_compile "$LINENO"; then :
49565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49566$as_echo "yes" >&6; }
49567else
49568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49569$as_echo "no" >&6; }
49570         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
49571fi
49572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49573
49574    CFLAGS="$OLD_CFLAGS"
49575    ac_ext=cpp
49576ac_cpp='$CXXCPP $CPPFLAGS'
49577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49580
49581  fi # NEEDS_LIB_X11
49582
49583
49584
49585
49586
49587
49588# Check whether --with-cups was given.
49589if test "${with_cups+set}" = set; then :
49590  withval=$with_cups;
49591fi
49592
49593
49594# Check whether --with-cups-include was given.
49595if test "${with_cups_include+set}" = set; then :
49596  withval=$with_cups_include;
49597fi
49598
49599
49600  if test "x$NEEDS_LIB_CUPS" = xfalse; then
49601    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
49602        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
49603      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
49604$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
49605    fi
49606    CUPS_CFLAGS=
49607  else
49608    CUPS_FOUND=no
49609
49610    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
49611      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
49612    fi
49613
49614    if test "x${with_cups}" != x; then
49615      CUPS_CFLAGS="-I${with_cups}/include"
49616      CUPS_FOUND=yes
49617    fi
49618    if test "x${with_cups_include}" != x; then
49619      CUPS_CFLAGS="-I${with_cups_include}"
49620      CUPS_FOUND=yes
49621    fi
49622    if test "x$CUPS_FOUND" = xno; then
49623      # Are the cups headers installed in the default /usr/include location?
49624      for ac_header in cups/cups.h cups/ppd.h
49625do :
49626  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49627ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49628if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49629  cat >>confdefs.h <<_ACEOF
49630#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49631_ACEOF
49632
49633          CUPS_FOUND=yes
49634          CUPS_CFLAGS=
49635          DEFAULT_CUPS=yes
49636
49637fi
49638
49639done
49640
49641    fi
49642    if test "x$CUPS_FOUND" = xno; then
49643      # Getting nervous now? Lets poke around for standard Solaris third-party
49644      # package installation locations.
49645      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
49646$as_echo_n "checking for cups headers... " >&6; }
49647      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
49648        # An SFW package seems to be installed!
49649        CUPS_FOUND=yes
49650        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
49651      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
49652        # A CSW package seems to be installed!
49653        CUPS_FOUND=yes
49654        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
49655      fi
49656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
49657$as_echo "$CUPS_FOUND" >&6; }
49658    fi
49659    if test "x$CUPS_FOUND" = xno; then
49660
49661  # Print a helpful message on how to acquire the necessary build dependency.
49662  # cups is the help tag: freetype, cups, alsa etc
49663  MISSING_DEPENDENCY=cups
49664
49665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49666    cygwin_help $MISSING_DEPENDENCY
49667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49668    msys_help $MISSING_DEPENDENCY
49669  else
49670    PKGHANDLER_COMMAND=
49671
49672    case $PKGHANDLER in
49673      apt-get)
49674        apt_help     $MISSING_DEPENDENCY ;;
49675      yum)
49676        yum_help     $MISSING_DEPENDENCY ;;
49677      port)
49678        port_help    $MISSING_DEPENDENCY ;;
49679      pkgutil)
49680        pkgutil_help $MISSING_DEPENDENCY ;;
49681      pkgadd)
49682        pkgadd_help  $MISSING_DEPENDENCY ;;
49683    esac
49684
49685    if test "x$PKGHANDLER_COMMAND" != x; then
49686      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49687    fi
49688  fi
49689
49690      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
49691    fi
49692  fi
49693
49694
49695
49696
49697
49698# Check whether --with-freetype was given.
49699if test "${with_freetype+set}" = set; then :
49700  withval=$with_freetype;
49701fi
49702
49703
49704# Check whether --with-freetype-include was given.
49705if test "${with_freetype_include+set}" = set; then :
49706  withval=$with_freetype_include;
49707fi
49708
49709
49710# Check whether --with-freetype-lib was given.
49711if test "${with_freetype_lib+set}" = set; then :
49712  withval=$with_freetype_lib;
49713fi
49714
49715
49716# Check whether --with-freetype-src was given.
49717if test "${with_freetype_src+set}" = set; then :
49718  withval=$with_freetype_src;
49719fi
49720
49721  # Check whether --enable-freetype-bundling was given.
49722if test "${enable_freetype_bundling+set}" = set; then :
49723  enableval=$enable_freetype_bundling;
49724fi
49725
49726
49727  # Need to specify explicitly since it needs to be overridden on some versions of macosx
49728  FREETYPE_BASE_NAME=freetype
49729  FREETYPE_CFLAGS=
49730  FREETYPE_LIBS=
49731  FREETYPE_BUNDLE_LIB_PATH=
49732
49733  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
49734    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
49735        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
49736        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
49737        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
49738      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
49739$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
49740    fi
49741    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
49742      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
49743$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
49744    fi
49745  else
49746    # freetype is needed to build; go get it!
49747
49748    BUNDLE_FREETYPE="$enable_freetype_bundling"
49749
49750    if  test "x$with_freetype_src" != x; then
49751      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49752        # Try to build freetype if --with-freetype-src was given on Windows
49753
49754  FREETYPE_SRC_PATH="$with_freetype_src"
49755  BUILD_FREETYPE=yes
49756
49757  # Check if the freetype sources are acessible..
49758  if ! test -d $FREETYPE_SRC_PATH; then
49759    { $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
49760$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
49761    BUILD_FREETYPE=no
49762  fi
49763  # ..and contain a vc2010 project file
49764  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
49765  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
49766    { $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
49767$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
49768    BUILD_FREETYPE=no
49769  fi
49770  # Now check if configure found a version of 'msbuild.exe'
49771  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
49772    { $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
49773$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;}
49774    BUILD_FREETYPE=no
49775  fi
49776
49777  # Ready to go..
49778  if test "x$BUILD_FREETYPE" = xyes; then
49779    # msbuild requires trailing slashes for output directories
49780    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
49781    freetype_lib_path_unix="$freetype_lib_path"
49782    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
49783
49784  unix_path="$vcxproj_path"
49785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49786    windows_path=`$CYGPATH -m "$unix_path"`
49787    vcxproj_path="$windows_path"
49788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49789    windows_path=`cmd //c echo $unix_path`
49790    vcxproj_path="$windows_path"
49791  fi
49792
49793
49794  unix_path="$freetype_lib_path"
49795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49796    windows_path=`$CYGPATH -m "$unix_path"`
49797    freetype_lib_path="$windows_path"
49798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49799    windows_path=`cmd //c echo $unix_path`
49800    freetype_lib_path="$windows_path"
49801  fi
49802
49803
49804  unix_path="$freetype_obj_path"
49805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49806    windows_path=`$CYGPATH -m "$unix_path"`
49807    freetype_obj_path="$windows_path"
49808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49809    windows_path=`cmd //c echo $unix_path`
49810    freetype_obj_path="$windows_path"
49811  fi
49812
49813    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49814      freetype_platform=x64
49815    else
49816      freetype_platform=win32
49817    fi
49818
49819    # The original freetype project file is for VS 2010 (i.e. 'v100'),
49820    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
49821    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
49822    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
49823    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
49824$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
49825
49826    # First we try to build the freetype.dll
49827    $ECHO -e "@echo off\n"\
49828        "$MSBUILD $vcxproj_path "\
49829        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49830        "/p:Configuration=\"Release Multithreaded\" "\
49831        "/p:Platform=$freetype_platform "\
49832        "/p:ConfigurationType=DynamicLibrary "\
49833        "/p:TargetName=freetype "\
49834        "/p:OutDir=\"$freetype_lib_path\" "\
49835        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
49836    cmd /c freetype.bat
49837
49838    if test -s "$freetype_lib_path_unix/freetype.dll"; then
49839      # If that succeeds we also build freetype.lib
49840      $ECHO -e "@echo off\n"\
49841          "$MSBUILD $vcxproj_path "\
49842          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49843          "/p:Configuration=\"Release Multithreaded\" "\
49844          "/p:Platform=$freetype_platform "\
49845          "/p:ConfigurationType=StaticLibrary "\
49846          "/p:TargetName=freetype "\
49847          "/p:OutDir=\"$freetype_lib_path\" "\
49848          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
49849      cmd /c freetype.bat
49850
49851      if test -s "$freetype_lib_path_unix/freetype.lib"; then
49852        # Once we build both, lib and dll, set freetype lib and include path appropriately
49853        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
49854        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
49855        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
49856$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
49857      else
49858        BUILD_FREETYPE=no
49859      fi
49860    else
49861      BUILD_FREETYPE=no
49862    fi
49863  fi
49864
49865        if test "x$BUILD_FREETYPE" = xyes; then
49866          # Okay, we built it. Check that it works.
49867
49868  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49869  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49870  METHOD="--with-freetype-src"
49871
49872  # Let's start with an optimistic view of the world :-)
49873  FOUND_FREETYPE=yes
49874
49875  # First look for the canonical freetype main include file ft2build.h.
49876  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49877    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49878    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49879    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49880      # Fail.
49881      FOUND_FREETYPE=no
49882    fi
49883  fi
49884
49885  if test "x$FOUND_FREETYPE" = xyes; then
49886    # Include file found, let's continue the sanity check.
49887    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49888$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49889
49890    # Reset to default value
49891    FREETYPE_BASE_NAME=freetype
49892    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49893    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49894      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49895          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49896        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49897        # for the .6 version explicitly.
49898        FREETYPE_BASE_NAME=freetype.6
49899        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49900        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49901$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49902      else
49903        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49904$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49905        FOUND_FREETYPE=no
49906      fi
49907    else
49908      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49909        # On Windows, we will need both .lib and .dll file.
49910        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49911          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49912$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49913          FOUND_FREETYPE=no
49914        fi
49915      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49916          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49917        # Found lib in isa dir, use that instead.
49918        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49919        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49920$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49921      fi
49922    fi
49923  fi
49924
49925  if test "x$FOUND_FREETYPE" = xyes; then
49926
49927  # Only process if variable expands to non-empty
49928
49929  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49931
49932  # Input might be given as Windows format, start by converting to
49933  # unix format.
49934  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49935  new_path=`$CYGPATH -u "$path"`
49936
49937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49940  # "foo.exe" is OK but "foo" is an error.
49941  #
49942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49943  # It is also a way to make sure we got the proper file name for the real test later on.
49944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49945  if test "x$test_shortpath" = x; then
49946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49948    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49949  fi
49950
49951  # Call helper function which possibly converts this using DOS-style short mode.
49952  # If so, the updated path is stored in $new_path.
49953
49954  input_path="$new_path"
49955  # Check if we need to convert this using DOS-style short mode. If the path
49956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49957  # take no chances and rewrite it.
49958  # Note: m4 eats our [], so we need to use [ and ] instead.
49959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49960  if test "x$has_forbidden_chars" != x; then
49961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49965      # Going to short mode and back again did indeed matter. Since short mode is
49966      # case insensitive, let's make it lowercase to improve readability.
49967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49968      # Now convert it back to Unix-style (cygpath)
49969      input_path=`$CYGPATH -u "$shortmode_path"`
49970      new_path="$input_path"
49971    fi
49972  fi
49973
49974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49975  if test "x$test_cygdrive_prefix" = x; then
49976    # As a simple fix, exclude /usr/bin since it's not a real path.
49977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49979      # a path prefixed by /cygdrive for fixpath to work.
49980      new_path="$CYGWIN_ROOT_PATH$input_path"
49981    fi
49982  fi
49983
49984
49985  if test "x$path" != "x$new_path"; then
49986    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49989  fi
49990
49991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49992
49993  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49994  has_colon=`$ECHO $path | $GREP ^.:`
49995  new_path="$path"
49996  if test "x$has_colon" = x; then
49997    # Not in mixed or Windows style, start by that.
49998    new_path=`cmd //c echo $path`
49999  fi
50000
50001
50002  input_path="$new_path"
50003  # Check if we need to convert this using DOS-style short mode. If the path
50004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50005  # take no chances and rewrite it.
50006  # Note: m4 eats our [], so we need to use [ and ] instead.
50007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50008  if test "x$has_forbidden_chars" != x; then
50009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50011  fi
50012
50013
50014  windows_path="$new_path"
50015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50016    unix_path=`$CYGPATH -u "$windows_path"`
50017    new_path="$unix_path"
50018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50020    new_path="$unix_path"
50021  fi
50022
50023  if test "x$path" != "x$new_path"; then
50024    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50026$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50027  fi
50028
50029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50031
50032    else
50033      # We're on a unix platform. Hooray! :)
50034      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50035      has_space=`$ECHO "$path" | $GREP " "`
50036      if test "x$has_space" != x; then
50037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50038$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50040      fi
50041
50042      # Use eval to expand a potential ~
50043      eval path="$path"
50044      if test ! -f "$path" && test ! -d "$path"; then
50045        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50046      fi
50047
50048      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50049    fi
50050  fi
50051
50052
50053  # Only process if variable expands to non-empty
50054
50055  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50056    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50057
50058  # Input might be given as Windows format, start by converting to
50059  # unix format.
50060  path="$POTENTIAL_FREETYPE_LIB_PATH"
50061  new_path=`$CYGPATH -u "$path"`
50062
50063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50066  # "foo.exe" is OK but "foo" is an error.
50067  #
50068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50069  # It is also a way to make sure we got the proper file name for the real test later on.
50070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50071  if test "x$test_shortpath" = x; then
50072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50073$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50074    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50075  fi
50076
50077  # Call helper function which possibly converts this using DOS-style short mode.
50078  # If so, the updated path is stored in $new_path.
50079
50080  input_path="$new_path"
50081  # Check if we need to convert this using DOS-style short mode. If the path
50082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50083  # take no chances and rewrite it.
50084  # Note: m4 eats our [], so we need to use [ and ] instead.
50085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50086  if test "x$has_forbidden_chars" != x; then
50087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50091      # Going to short mode and back again did indeed matter. Since short mode is
50092      # case insensitive, let's make it lowercase to improve readability.
50093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50094      # Now convert it back to Unix-style (cygpath)
50095      input_path=`$CYGPATH -u "$shortmode_path"`
50096      new_path="$input_path"
50097    fi
50098  fi
50099
50100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50101  if test "x$test_cygdrive_prefix" = x; then
50102    # As a simple fix, exclude /usr/bin since it's not a real path.
50103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50105      # a path prefixed by /cygdrive for fixpath to work.
50106      new_path="$CYGWIN_ROOT_PATH$input_path"
50107    fi
50108  fi
50109
50110
50111  if test "x$path" != "x$new_path"; then
50112    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50114$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50115  fi
50116
50117    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50118
50119  path="$POTENTIAL_FREETYPE_LIB_PATH"
50120  has_colon=`$ECHO $path | $GREP ^.:`
50121  new_path="$path"
50122  if test "x$has_colon" = x; then
50123    # Not in mixed or Windows style, start by that.
50124    new_path=`cmd //c echo $path`
50125  fi
50126
50127
50128  input_path="$new_path"
50129  # Check if we need to convert this using DOS-style short mode. If the path
50130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50131  # take no chances and rewrite it.
50132  # Note: m4 eats our [], so we need to use [ and ] instead.
50133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50134  if test "x$has_forbidden_chars" != x; then
50135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50137  fi
50138
50139
50140  windows_path="$new_path"
50141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50142    unix_path=`$CYGPATH -u "$windows_path"`
50143    new_path="$unix_path"
50144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50146    new_path="$unix_path"
50147  fi
50148
50149  if test "x$path" != "x$new_path"; then
50150    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50152$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50153  fi
50154
50155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50157
50158    else
50159      # We're on a unix platform. Hooray! :)
50160      path="$POTENTIAL_FREETYPE_LIB_PATH"
50161      has_space=`$ECHO "$path" | $GREP " "`
50162      if test "x$has_space" != x; then
50163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50164$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50165        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50166      fi
50167
50168      # Use eval to expand a potential ~
50169      eval path="$path"
50170      if test ! -f "$path" && test ! -d "$path"; then
50171        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50172      fi
50173
50174      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50175    fi
50176  fi
50177
50178
50179    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50181$as_echo_n "checking for freetype includes... " >&6; }
50182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50183$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50184    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50186$as_echo_n "checking for freetype libraries... " >&6; }
50187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50188$as_echo "$FREETYPE_LIB_PATH" >&6; }
50189  fi
50190
50191          if test "x$FOUND_FREETYPE" != xyes; then
50192            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
50193          fi
50194        else
50195          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
50196$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
50197          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
50198        fi
50199      else
50200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
50201$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
50202      fi
50203    fi
50204
50205    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
50206      # User has specified settings
50207
50208      if test "x$BUNDLE_FREETYPE" = x; then
50209        # If not specified, default is to bundle freetype
50210        BUNDLE_FREETYPE=yes
50211      fi
50212
50213      if test "x$with_freetype" != x; then
50214        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
50215        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
50216      fi
50217
50218      # Allow --with-freetype-lib and --with-freetype-include to override
50219      if test "x$with_freetype_include" != x; then
50220        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
50221      fi
50222      if test "x$with_freetype_lib" != x; then
50223        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
50224      fi
50225
50226      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50227        # Okay, we got it. Check that it works.
50228
50229  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50230  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50231  METHOD="--with-freetype"
50232
50233  # Let's start with an optimistic view of the world :-)
50234  FOUND_FREETYPE=yes
50235
50236  # First look for the canonical freetype main include file ft2build.h.
50237  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50238    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50239    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50240    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50241      # Fail.
50242      FOUND_FREETYPE=no
50243    fi
50244  fi
50245
50246  if test "x$FOUND_FREETYPE" = xyes; then
50247    # Include file found, let's continue the sanity check.
50248    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50249$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50250
50251    # Reset to default value
50252    FREETYPE_BASE_NAME=freetype
50253    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50254    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50255      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50256          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50257        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50258        # for the .6 version explicitly.
50259        FREETYPE_BASE_NAME=freetype.6
50260        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50261        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50262$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50263      else
50264        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50265$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50266        FOUND_FREETYPE=no
50267      fi
50268    else
50269      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50270        # On Windows, we will need both .lib and .dll file.
50271        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50272          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50273$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50274          FOUND_FREETYPE=no
50275        fi
50276      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50277          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50278        # Found lib in isa dir, use that instead.
50279        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50280        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50281$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50282      fi
50283    fi
50284  fi
50285
50286  if test "x$FOUND_FREETYPE" = xyes; then
50287
50288  # Only process if variable expands to non-empty
50289
50290  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50292
50293  # Input might be given as Windows format, start by converting to
50294  # unix format.
50295  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50296  new_path=`$CYGPATH -u "$path"`
50297
50298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50301  # "foo.exe" is OK but "foo" is an error.
50302  #
50303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50304  # It is also a way to make sure we got the proper file name for the real test later on.
50305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50306  if test "x$test_shortpath" = x; then
50307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50308$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50309    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50310  fi
50311
50312  # Call helper function which possibly converts this using DOS-style short mode.
50313  # If so, the updated path is stored in $new_path.
50314
50315  input_path="$new_path"
50316  # Check if we need to convert this using DOS-style short mode. If the path
50317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50318  # take no chances and rewrite it.
50319  # Note: m4 eats our [], so we need to use [ and ] instead.
50320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50321  if test "x$has_forbidden_chars" != x; then
50322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50326      # Going to short mode and back again did indeed matter. Since short mode is
50327      # case insensitive, let's make it lowercase to improve readability.
50328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50329      # Now convert it back to Unix-style (cygpath)
50330      input_path=`$CYGPATH -u "$shortmode_path"`
50331      new_path="$input_path"
50332    fi
50333  fi
50334
50335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50336  if test "x$test_cygdrive_prefix" = x; then
50337    # As a simple fix, exclude /usr/bin since it's not a real path.
50338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50340      # a path prefixed by /cygdrive for fixpath to work.
50341      new_path="$CYGWIN_ROOT_PATH$input_path"
50342    fi
50343  fi
50344
50345
50346  if test "x$path" != "x$new_path"; then
50347    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50349$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50350  fi
50351
50352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50353
50354  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50355  has_colon=`$ECHO $path | $GREP ^.:`
50356  new_path="$path"
50357  if test "x$has_colon" = x; then
50358    # Not in mixed or Windows style, start by that.
50359    new_path=`cmd //c echo $path`
50360  fi
50361
50362
50363  input_path="$new_path"
50364  # Check if we need to convert this using DOS-style short mode. If the path
50365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50366  # take no chances and rewrite it.
50367  # Note: m4 eats our [], so we need to use [ and ] instead.
50368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50369  if test "x$has_forbidden_chars" != x; then
50370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50372  fi
50373
50374
50375  windows_path="$new_path"
50376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50377    unix_path=`$CYGPATH -u "$windows_path"`
50378    new_path="$unix_path"
50379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50381    new_path="$unix_path"
50382  fi
50383
50384  if test "x$path" != "x$new_path"; then
50385    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50387$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50388  fi
50389
50390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50392
50393    else
50394      # We're on a unix platform. Hooray! :)
50395      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50396      has_space=`$ECHO "$path" | $GREP " "`
50397      if test "x$has_space" != x; then
50398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50399$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50400        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50401      fi
50402
50403      # Use eval to expand a potential ~
50404      eval path="$path"
50405      if test ! -f "$path" && test ! -d "$path"; then
50406        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50407      fi
50408
50409      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50410    fi
50411  fi
50412
50413
50414  # Only process if variable expands to non-empty
50415
50416  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50418
50419  # Input might be given as Windows format, start by converting to
50420  # unix format.
50421  path="$POTENTIAL_FREETYPE_LIB_PATH"
50422  new_path=`$CYGPATH -u "$path"`
50423
50424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50427  # "foo.exe" is OK but "foo" is an error.
50428  #
50429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50430  # It is also a way to make sure we got the proper file name for the real test later on.
50431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50432  if test "x$test_shortpath" = x; then
50433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50434$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50435    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50436  fi
50437
50438  # Call helper function which possibly converts this using DOS-style short mode.
50439  # If so, the updated path is stored in $new_path.
50440
50441  input_path="$new_path"
50442  # Check if we need to convert this using DOS-style short mode. If the path
50443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50444  # take no chances and rewrite it.
50445  # Note: m4 eats our [], so we need to use [ and ] instead.
50446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50447  if test "x$has_forbidden_chars" != x; then
50448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50452      # Going to short mode and back again did indeed matter. Since short mode is
50453      # case insensitive, let's make it lowercase to improve readability.
50454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50455      # Now convert it back to Unix-style (cygpath)
50456      input_path=`$CYGPATH -u "$shortmode_path"`
50457      new_path="$input_path"
50458    fi
50459  fi
50460
50461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50462  if test "x$test_cygdrive_prefix" = x; then
50463    # As a simple fix, exclude /usr/bin since it's not a real path.
50464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50466      # a path prefixed by /cygdrive for fixpath to work.
50467      new_path="$CYGWIN_ROOT_PATH$input_path"
50468    fi
50469  fi
50470
50471
50472  if test "x$path" != "x$new_path"; then
50473    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50476  fi
50477
50478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50479
50480  path="$POTENTIAL_FREETYPE_LIB_PATH"
50481  has_colon=`$ECHO $path | $GREP ^.:`
50482  new_path="$path"
50483  if test "x$has_colon" = x; then
50484    # Not in mixed or Windows style, start by that.
50485    new_path=`cmd //c echo $path`
50486  fi
50487
50488
50489  input_path="$new_path"
50490  # Check if we need to convert this using DOS-style short mode. If the path
50491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50492  # take no chances and rewrite it.
50493  # Note: m4 eats our [], so we need to use [ and ] instead.
50494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50495  if test "x$has_forbidden_chars" != x; then
50496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50498  fi
50499
50500
50501  windows_path="$new_path"
50502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50503    unix_path=`$CYGPATH -u "$windows_path"`
50504    new_path="$unix_path"
50505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50507    new_path="$unix_path"
50508  fi
50509
50510  if test "x$path" != "x$new_path"; then
50511    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50514  fi
50515
50516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50518
50519    else
50520      # We're on a unix platform. Hooray! :)
50521      path="$POTENTIAL_FREETYPE_LIB_PATH"
50522      has_space=`$ECHO "$path" | $GREP " "`
50523      if test "x$has_space" != x; then
50524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50527      fi
50528
50529      # Use eval to expand a potential ~
50530      eval path="$path"
50531      if test ! -f "$path" && test ! -d "$path"; then
50532        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50533      fi
50534
50535      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50536    fi
50537  fi
50538
50539
50540    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50542$as_echo_n "checking for freetype includes... " >&6; }
50543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50544$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50545    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50547$as_echo_n "checking for freetype libraries... " >&6; }
50548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50549$as_echo "$FREETYPE_LIB_PATH" >&6; }
50550  fi
50551
50552        if test "x$FOUND_FREETYPE" != xyes; then
50553          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
50554        fi
50555      else
50556        # User specified only one of lib or include. This is an error.
50557        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
50558          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
50559$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
50560          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50561        else
50562          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
50563$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
50564          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50565        fi
50566      fi
50567    else
50568      # User did not specify settings, but we need freetype. Try to locate it.
50569
50570      if test "x$BUNDLE_FREETYPE" = x; then
50571        # If not specified, default is to bundle freetype only on windows
50572        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50573          BUNDLE_FREETYPE=yes
50574        else
50575          BUNDLE_FREETYPE=no
50576        fi
50577      fi
50578
50579      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
50580      if test "x$SYSROOT" = x; then
50581        if test "x$FOUND_FREETYPE" != xyes; then
50582          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
50583          if test "x$PKG_CONFIG" != x; then
50584
50585pkg_failed=no
50586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
50587$as_echo_n "checking for FREETYPE... " >&6; }
50588
50589if test -n "$FREETYPE_CFLAGS"; then
50590    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
50591 elif test -n "$PKG_CONFIG"; then
50592    if test -n "$PKG_CONFIG" && \
50593    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50594  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50595  ac_status=$?
50596  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50597  test $ac_status = 0; }; then
50598  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
50599else
50600  pkg_failed=yes
50601fi
50602 else
50603    pkg_failed=untried
50604fi
50605if test -n "$FREETYPE_LIBS"; then
50606    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
50607 elif test -n "$PKG_CONFIG"; then
50608    if test -n "$PKG_CONFIG" && \
50609    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50610  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50611  ac_status=$?
50612  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50613  test $ac_status = 0; }; then
50614  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
50615else
50616  pkg_failed=yes
50617fi
50618 else
50619    pkg_failed=untried
50620fi
50621
50622
50623
50624if test $pkg_failed = yes; then
50625
50626if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50627        _pkg_short_errors_supported=yes
50628else
50629        _pkg_short_errors_supported=no
50630fi
50631        if test $_pkg_short_errors_supported = yes; then
50632	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
50633        else
50634	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
50635        fi
50636	# Put the nasty error message in config.log where it belongs
50637	echo "$FREETYPE_PKG_ERRORS" >&5
50638
50639	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50640$as_echo "no" >&6; }
50641                FOUND_FREETYPE=no
50642elif test $pkg_failed = untried; then
50643	FOUND_FREETYPE=no
50644else
50645	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
50646	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
50647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50648$as_echo "yes" >&6; }
50649	FOUND_FREETYPE=yes
50650fi
50651            if test "x$FOUND_FREETYPE" = xyes; then
50652              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
50653              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
50654              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
50655              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50656                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
50657              fi
50658              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
50659              if test "x$BUNDLE_FREETYPE" = xyes; then
50660                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
50661$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
50662                FOUND_FREETYPE=no
50663              else
50664                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
50665$as_echo_n "checking for freetype... " >&6; }
50666                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
50667$as_echo "yes (using pkg-config)" >&6; }
50668              fi
50669            fi
50670          fi
50671        fi
50672      fi
50673
50674      if test "x$FOUND_FREETYPE" != xyes; then
50675        # Check in well-known locations
50676        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50677          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
50678
50679  windows_path="$FREETYPE_BASE_DIR"
50680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50681    unix_path=`$CYGPATH -u "$windows_path"`
50682    FREETYPE_BASE_DIR="$unix_path"
50683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50685    FREETYPE_BASE_DIR="$unix_path"
50686  fi
50687
50688
50689  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50690  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50691  METHOD="well-known location"
50692
50693  # Let's start with an optimistic view of the world :-)
50694  FOUND_FREETYPE=yes
50695
50696  # First look for the canonical freetype main include file ft2build.h.
50697  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50698    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50699    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50700    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50701      # Fail.
50702      FOUND_FREETYPE=no
50703    fi
50704  fi
50705
50706  if test "x$FOUND_FREETYPE" = xyes; then
50707    # Include file found, let's continue the sanity check.
50708    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50709$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50710
50711    # Reset to default value
50712    FREETYPE_BASE_NAME=freetype
50713    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50714    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50715      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50716          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50717        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50718        # for the .6 version explicitly.
50719        FREETYPE_BASE_NAME=freetype.6
50720        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50721        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50722$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50723      else
50724        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50725$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50726        FOUND_FREETYPE=no
50727      fi
50728    else
50729      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50730        # On Windows, we will need both .lib and .dll file.
50731        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50732          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50733$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50734          FOUND_FREETYPE=no
50735        fi
50736      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50737          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50738        # Found lib in isa dir, use that instead.
50739        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50740        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50741$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50742      fi
50743    fi
50744  fi
50745
50746  if test "x$FOUND_FREETYPE" = xyes; then
50747
50748  # Only process if variable expands to non-empty
50749
50750  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50752
50753  # Input might be given as Windows format, start by converting to
50754  # unix format.
50755  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50756  new_path=`$CYGPATH -u "$path"`
50757
50758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50761  # "foo.exe" is OK but "foo" is an error.
50762  #
50763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50764  # It is also a way to make sure we got the proper file name for the real test later on.
50765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50766  if test "x$test_shortpath" = x; then
50767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50768$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50769    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50770  fi
50771
50772  # Call helper function which possibly converts this using DOS-style short mode.
50773  # If so, the updated path is stored in $new_path.
50774
50775  input_path="$new_path"
50776  # Check if we need to convert this using DOS-style short mode. If the path
50777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50778  # take no chances and rewrite it.
50779  # Note: m4 eats our [], so we need to use [ and ] instead.
50780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50781  if test "x$has_forbidden_chars" != x; then
50782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50786      # Going to short mode and back again did indeed matter. Since short mode is
50787      # case insensitive, let's make it lowercase to improve readability.
50788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50789      # Now convert it back to Unix-style (cygpath)
50790      input_path=`$CYGPATH -u "$shortmode_path"`
50791      new_path="$input_path"
50792    fi
50793  fi
50794
50795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50796  if test "x$test_cygdrive_prefix" = x; then
50797    # As a simple fix, exclude /usr/bin since it's not a real path.
50798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50800      # a path prefixed by /cygdrive for fixpath to work.
50801      new_path="$CYGWIN_ROOT_PATH$input_path"
50802    fi
50803  fi
50804
50805
50806  if test "x$path" != "x$new_path"; then
50807    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50810  fi
50811
50812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50813
50814  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50815  has_colon=`$ECHO $path | $GREP ^.:`
50816  new_path="$path"
50817  if test "x$has_colon" = x; then
50818    # Not in mixed or Windows style, start by that.
50819    new_path=`cmd //c echo $path`
50820  fi
50821
50822
50823  input_path="$new_path"
50824  # Check if we need to convert this using DOS-style short mode. If the path
50825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50826  # take no chances and rewrite it.
50827  # Note: m4 eats our [], so we need to use [ and ] instead.
50828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50829  if test "x$has_forbidden_chars" != x; then
50830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50832  fi
50833
50834
50835  windows_path="$new_path"
50836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50837    unix_path=`$CYGPATH -u "$windows_path"`
50838    new_path="$unix_path"
50839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50841    new_path="$unix_path"
50842  fi
50843
50844  if test "x$path" != "x$new_path"; then
50845    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50847$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50848  fi
50849
50850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50852
50853    else
50854      # We're on a unix platform. Hooray! :)
50855      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50856      has_space=`$ECHO "$path" | $GREP " "`
50857      if test "x$has_space" != x; then
50858        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50859$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50860        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50861      fi
50862
50863      # Use eval to expand a potential ~
50864      eval path="$path"
50865      if test ! -f "$path" && test ! -d "$path"; then
50866        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50867      fi
50868
50869      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50870    fi
50871  fi
50872
50873
50874  # Only process if variable expands to non-empty
50875
50876  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50878
50879  # Input might be given as Windows format, start by converting to
50880  # unix format.
50881  path="$POTENTIAL_FREETYPE_LIB_PATH"
50882  new_path=`$CYGPATH -u "$path"`
50883
50884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50887  # "foo.exe" is OK but "foo" is an error.
50888  #
50889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50890  # It is also a way to make sure we got the proper file name for the real test later on.
50891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50892  if test "x$test_shortpath" = x; then
50893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50895    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50896  fi
50897
50898  # Call helper function which possibly converts this using DOS-style short mode.
50899  # If so, the updated path is stored in $new_path.
50900
50901  input_path="$new_path"
50902  # Check if we need to convert this using DOS-style short mode. If the path
50903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50904  # take no chances and rewrite it.
50905  # Note: m4 eats our [], so we need to use [ and ] instead.
50906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50907  if test "x$has_forbidden_chars" != x; then
50908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50912      # Going to short mode and back again did indeed matter. Since short mode is
50913      # case insensitive, let's make it lowercase to improve readability.
50914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50915      # Now convert it back to Unix-style (cygpath)
50916      input_path=`$CYGPATH -u "$shortmode_path"`
50917      new_path="$input_path"
50918    fi
50919  fi
50920
50921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50922  if test "x$test_cygdrive_prefix" = x; then
50923    # As a simple fix, exclude /usr/bin since it's not a real path.
50924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50926      # a path prefixed by /cygdrive for fixpath to work.
50927      new_path="$CYGWIN_ROOT_PATH$input_path"
50928    fi
50929  fi
50930
50931
50932  if test "x$path" != "x$new_path"; then
50933    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50936  fi
50937
50938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50939
50940  path="$POTENTIAL_FREETYPE_LIB_PATH"
50941  has_colon=`$ECHO $path | $GREP ^.:`
50942  new_path="$path"
50943  if test "x$has_colon" = x; then
50944    # Not in mixed or Windows style, start by that.
50945    new_path=`cmd //c echo $path`
50946  fi
50947
50948
50949  input_path="$new_path"
50950  # Check if we need to convert this using DOS-style short mode. If the path
50951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50952  # take no chances and rewrite it.
50953  # Note: m4 eats our [], so we need to use [ and ] instead.
50954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50955  if test "x$has_forbidden_chars" != x; then
50956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50958  fi
50959
50960
50961  windows_path="$new_path"
50962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50963    unix_path=`$CYGPATH -u "$windows_path"`
50964    new_path="$unix_path"
50965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50967    new_path="$unix_path"
50968  fi
50969
50970  if test "x$path" != "x$new_path"; then
50971    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50974  fi
50975
50976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50978
50979    else
50980      # We're on a unix platform. Hooray! :)
50981      path="$POTENTIAL_FREETYPE_LIB_PATH"
50982      has_space=`$ECHO "$path" | $GREP " "`
50983      if test "x$has_space" != x; then
50984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50987      fi
50988
50989      # Use eval to expand a potential ~
50990      eval path="$path"
50991      if test ! -f "$path" && test ! -d "$path"; then
50992        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50993      fi
50994
50995      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50996    fi
50997  fi
50998
50999
51000    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51002$as_echo_n "checking for freetype includes... " >&6; }
51003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51004$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51005    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51007$as_echo_n "checking for freetype libraries... " >&6; }
51008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51009$as_echo "$FREETYPE_LIB_PATH" >&6; }
51010  fi
51011
51012          if test "x$FOUND_FREETYPE" != xyes; then
51013            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
51014
51015  windows_path="$FREETYPE_BASE_DIR"
51016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51017    unix_path=`$CYGPATH -u "$windows_path"`
51018    FREETYPE_BASE_DIR="$unix_path"
51019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51021    FREETYPE_BASE_DIR="$unix_path"
51022  fi
51023
51024
51025  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51026  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51027  METHOD="well-known location"
51028
51029  # Let's start with an optimistic view of the world :-)
51030  FOUND_FREETYPE=yes
51031
51032  # First look for the canonical freetype main include file ft2build.h.
51033  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51034    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51035    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51036    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51037      # Fail.
51038      FOUND_FREETYPE=no
51039    fi
51040  fi
51041
51042  if test "x$FOUND_FREETYPE" = xyes; then
51043    # Include file found, let's continue the sanity check.
51044    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51045$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51046
51047    # Reset to default value
51048    FREETYPE_BASE_NAME=freetype
51049    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51050    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51051      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51052          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51053        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51054        # for the .6 version explicitly.
51055        FREETYPE_BASE_NAME=freetype.6
51056        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51057        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51058$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51059      else
51060        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51061$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51062        FOUND_FREETYPE=no
51063      fi
51064    else
51065      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51066        # On Windows, we will need both .lib and .dll file.
51067        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51068          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51069$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51070          FOUND_FREETYPE=no
51071        fi
51072      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51073          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51074        # Found lib in isa dir, use that instead.
51075        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51076        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51077$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51078      fi
51079    fi
51080  fi
51081
51082  if test "x$FOUND_FREETYPE" = xyes; then
51083
51084  # Only process if variable expands to non-empty
51085
51086  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51088
51089  # Input might be given as Windows format, start by converting to
51090  # unix format.
51091  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51092  new_path=`$CYGPATH -u "$path"`
51093
51094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51097  # "foo.exe" is OK but "foo" is an error.
51098  #
51099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51100  # It is also a way to make sure we got the proper file name for the real test later on.
51101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51102  if test "x$test_shortpath" = x; then
51103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51104$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51105    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51106  fi
51107
51108  # Call helper function which possibly converts this using DOS-style short mode.
51109  # If so, the updated path is stored in $new_path.
51110
51111  input_path="$new_path"
51112  # Check if we need to convert this using DOS-style short mode. If the path
51113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51114  # take no chances and rewrite it.
51115  # Note: m4 eats our [], so we need to use [ and ] instead.
51116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51117  if test "x$has_forbidden_chars" != x; then
51118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51122      # Going to short mode and back again did indeed matter. Since short mode is
51123      # case insensitive, let's make it lowercase to improve readability.
51124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51125      # Now convert it back to Unix-style (cygpath)
51126      input_path=`$CYGPATH -u "$shortmode_path"`
51127      new_path="$input_path"
51128    fi
51129  fi
51130
51131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51132  if test "x$test_cygdrive_prefix" = x; then
51133    # As a simple fix, exclude /usr/bin since it's not a real path.
51134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51136      # a path prefixed by /cygdrive for fixpath to work.
51137      new_path="$CYGWIN_ROOT_PATH$input_path"
51138    fi
51139  fi
51140
51141
51142  if test "x$path" != "x$new_path"; then
51143    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51145$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51146  fi
51147
51148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51149
51150  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51151  has_colon=`$ECHO $path | $GREP ^.:`
51152  new_path="$path"
51153  if test "x$has_colon" = x; then
51154    # Not in mixed or Windows style, start by that.
51155    new_path=`cmd //c echo $path`
51156  fi
51157
51158
51159  input_path="$new_path"
51160  # Check if we need to convert this using DOS-style short mode. If the path
51161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51162  # take no chances and rewrite it.
51163  # Note: m4 eats our [], so we need to use [ and ] instead.
51164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51165  if test "x$has_forbidden_chars" != x; then
51166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51168  fi
51169
51170
51171  windows_path="$new_path"
51172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51173    unix_path=`$CYGPATH -u "$windows_path"`
51174    new_path="$unix_path"
51175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51177    new_path="$unix_path"
51178  fi
51179
51180  if test "x$path" != "x$new_path"; then
51181    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51183$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51184  fi
51185
51186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51188
51189    else
51190      # We're on a unix platform. Hooray! :)
51191      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51192      has_space=`$ECHO "$path" | $GREP " "`
51193      if test "x$has_space" != x; then
51194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51195$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51197      fi
51198
51199      # Use eval to expand a potential ~
51200      eval path="$path"
51201      if test ! -f "$path" && test ! -d "$path"; then
51202        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51203      fi
51204
51205      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51206    fi
51207  fi
51208
51209
51210  # Only process if variable expands to non-empty
51211
51212  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51214
51215  # Input might be given as Windows format, start by converting to
51216  # unix format.
51217  path="$POTENTIAL_FREETYPE_LIB_PATH"
51218  new_path=`$CYGPATH -u "$path"`
51219
51220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51223  # "foo.exe" is OK but "foo" is an error.
51224  #
51225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51226  # It is also a way to make sure we got the proper file name for the real test later on.
51227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51228  if test "x$test_shortpath" = x; then
51229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51230$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51231    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51232  fi
51233
51234  # Call helper function which possibly converts this using DOS-style short mode.
51235  # If so, the updated path is stored in $new_path.
51236
51237  input_path="$new_path"
51238  # Check if we need to convert this using DOS-style short mode. If the path
51239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51240  # take no chances and rewrite it.
51241  # Note: m4 eats our [], so we need to use [ and ] instead.
51242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51243  if test "x$has_forbidden_chars" != x; then
51244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51248      # Going to short mode and back again did indeed matter. Since short mode is
51249      # case insensitive, let's make it lowercase to improve readability.
51250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51251      # Now convert it back to Unix-style (cygpath)
51252      input_path=`$CYGPATH -u "$shortmode_path"`
51253      new_path="$input_path"
51254    fi
51255  fi
51256
51257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51258  if test "x$test_cygdrive_prefix" = x; then
51259    # As a simple fix, exclude /usr/bin since it's not a real path.
51260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51262      # a path prefixed by /cygdrive for fixpath to work.
51263      new_path="$CYGWIN_ROOT_PATH$input_path"
51264    fi
51265  fi
51266
51267
51268  if test "x$path" != "x$new_path"; then
51269    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51272  fi
51273
51274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51275
51276  path="$POTENTIAL_FREETYPE_LIB_PATH"
51277  has_colon=`$ECHO $path | $GREP ^.:`
51278  new_path="$path"
51279  if test "x$has_colon" = x; then
51280    # Not in mixed or Windows style, start by that.
51281    new_path=`cmd //c echo $path`
51282  fi
51283
51284
51285  input_path="$new_path"
51286  # Check if we need to convert this using DOS-style short mode. If the path
51287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51288  # take no chances and rewrite it.
51289  # Note: m4 eats our [], so we need to use [ and ] instead.
51290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51291  if test "x$has_forbidden_chars" != x; then
51292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51294  fi
51295
51296
51297  windows_path="$new_path"
51298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51299    unix_path=`$CYGPATH -u "$windows_path"`
51300    new_path="$unix_path"
51301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51303    new_path="$unix_path"
51304  fi
51305
51306  if test "x$path" != "x$new_path"; then
51307    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51309$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51310  fi
51311
51312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51314
51315    else
51316      # We're on a unix platform. Hooray! :)
51317      path="$POTENTIAL_FREETYPE_LIB_PATH"
51318      has_space=`$ECHO "$path" | $GREP " "`
51319      if test "x$has_space" != x; then
51320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51321$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51322        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51323      fi
51324
51325      # Use eval to expand a potential ~
51326      eval path="$path"
51327      if test ! -f "$path" && test ! -d "$path"; then
51328        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51329      fi
51330
51331      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51332    fi
51333  fi
51334
51335
51336    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51338$as_echo_n "checking for freetype includes... " >&6; }
51339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51340$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51341    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51343$as_echo_n "checking for freetype libraries... " >&6; }
51344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51345$as_echo "$FREETYPE_LIB_PATH" >&6; }
51346  fi
51347
51348          fi
51349        else
51350          FREETYPE_BASE_DIR="$SYSROOT/usr"
51351
51352  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51353  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51354  METHOD="well-known location"
51355
51356  # Let's start with an optimistic view of the world :-)
51357  FOUND_FREETYPE=yes
51358
51359  # First look for the canonical freetype main include file ft2build.h.
51360  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51361    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51362    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51363    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51364      # Fail.
51365      FOUND_FREETYPE=no
51366    fi
51367  fi
51368
51369  if test "x$FOUND_FREETYPE" = xyes; then
51370    # Include file found, let's continue the sanity check.
51371    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51372$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51373
51374    # Reset to default value
51375    FREETYPE_BASE_NAME=freetype
51376    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51377    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51378      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51379          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51380        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51381        # for the .6 version explicitly.
51382        FREETYPE_BASE_NAME=freetype.6
51383        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51384        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51385$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51386      else
51387        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51388$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51389        FOUND_FREETYPE=no
51390      fi
51391    else
51392      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51393        # On Windows, we will need both .lib and .dll file.
51394        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51395          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51396$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51397          FOUND_FREETYPE=no
51398        fi
51399      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51400          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51401        # Found lib in isa dir, use that instead.
51402        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51403        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51404$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51405      fi
51406    fi
51407  fi
51408
51409  if test "x$FOUND_FREETYPE" = xyes; then
51410
51411  # Only process if variable expands to non-empty
51412
51413  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51415
51416  # Input might be given as Windows format, start by converting to
51417  # unix format.
51418  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51419  new_path=`$CYGPATH -u "$path"`
51420
51421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51424  # "foo.exe" is OK but "foo" is an error.
51425  #
51426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51427  # It is also a way to make sure we got the proper file name for the real test later on.
51428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51429  if test "x$test_shortpath" = x; then
51430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51432    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51433  fi
51434
51435  # Call helper function which possibly converts this using DOS-style short mode.
51436  # If so, the updated path is stored in $new_path.
51437
51438  input_path="$new_path"
51439  # Check if we need to convert this using DOS-style short mode. If the path
51440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51441  # take no chances and rewrite it.
51442  # Note: m4 eats our [], so we need to use [ and ] instead.
51443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51444  if test "x$has_forbidden_chars" != x; then
51445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51449      # Going to short mode and back again did indeed matter. Since short mode is
51450      # case insensitive, let's make it lowercase to improve readability.
51451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51452      # Now convert it back to Unix-style (cygpath)
51453      input_path=`$CYGPATH -u "$shortmode_path"`
51454      new_path="$input_path"
51455    fi
51456  fi
51457
51458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51459  if test "x$test_cygdrive_prefix" = x; then
51460    # As a simple fix, exclude /usr/bin since it's not a real path.
51461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51463      # a path prefixed by /cygdrive for fixpath to work.
51464      new_path="$CYGWIN_ROOT_PATH$input_path"
51465    fi
51466  fi
51467
51468
51469  if test "x$path" != "x$new_path"; then
51470    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51473  fi
51474
51475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51476
51477  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51478  has_colon=`$ECHO $path | $GREP ^.:`
51479  new_path="$path"
51480  if test "x$has_colon" = x; then
51481    # Not in mixed or Windows style, start by that.
51482    new_path=`cmd //c echo $path`
51483  fi
51484
51485
51486  input_path="$new_path"
51487  # Check if we need to convert this using DOS-style short mode. If the path
51488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51489  # take no chances and rewrite it.
51490  # Note: m4 eats our [], so we need to use [ and ] instead.
51491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51492  if test "x$has_forbidden_chars" != x; then
51493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51495  fi
51496
51497
51498  windows_path="$new_path"
51499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51500    unix_path=`$CYGPATH -u "$windows_path"`
51501    new_path="$unix_path"
51502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51504    new_path="$unix_path"
51505  fi
51506
51507  if test "x$path" != "x$new_path"; then
51508    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51511  fi
51512
51513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51515
51516    else
51517      # We're on a unix platform. Hooray! :)
51518      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51519      has_space=`$ECHO "$path" | $GREP " "`
51520      if test "x$has_space" != x; then
51521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51524      fi
51525
51526      # Use eval to expand a potential ~
51527      eval path="$path"
51528      if test ! -f "$path" && test ! -d "$path"; then
51529        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51530      fi
51531
51532      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51533    fi
51534  fi
51535
51536
51537  # Only process if variable expands to non-empty
51538
51539  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51541
51542  # Input might be given as Windows format, start by converting to
51543  # unix format.
51544  path="$POTENTIAL_FREETYPE_LIB_PATH"
51545  new_path=`$CYGPATH -u "$path"`
51546
51547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51550  # "foo.exe" is OK but "foo" is an error.
51551  #
51552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51553  # It is also a way to make sure we got the proper file name for the real test later on.
51554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51555  if test "x$test_shortpath" = x; then
51556    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51557$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51558    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51559  fi
51560
51561  # Call helper function which possibly converts this using DOS-style short mode.
51562  # If so, the updated path is stored in $new_path.
51563
51564  input_path="$new_path"
51565  # Check if we need to convert this using DOS-style short mode. If the path
51566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51567  # take no chances and rewrite it.
51568  # Note: m4 eats our [], so we need to use [ and ] instead.
51569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51570  if test "x$has_forbidden_chars" != x; then
51571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51575      # Going to short mode and back again did indeed matter. Since short mode is
51576      # case insensitive, let's make it lowercase to improve readability.
51577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51578      # Now convert it back to Unix-style (cygpath)
51579      input_path=`$CYGPATH -u "$shortmode_path"`
51580      new_path="$input_path"
51581    fi
51582  fi
51583
51584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51585  if test "x$test_cygdrive_prefix" = x; then
51586    # As a simple fix, exclude /usr/bin since it's not a real path.
51587    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51589      # a path prefixed by /cygdrive for fixpath to work.
51590      new_path="$CYGWIN_ROOT_PATH$input_path"
51591    fi
51592  fi
51593
51594
51595  if test "x$path" != "x$new_path"; then
51596    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51598$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51599  fi
51600
51601    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51602
51603  path="$POTENTIAL_FREETYPE_LIB_PATH"
51604  has_colon=`$ECHO $path | $GREP ^.:`
51605  new_path="$path"
51606  if test "x$has_colon" = x; then
51607    # Not in mixed or Windows style, start by that.
51608    new_path=`cmd //c echo $path`
51609  fi
51610
51611
51612  input_path="$new_path"
51613  # Check if we need to convert this using DOS-style short mode. If the path
51614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51615  # take no chances and rewrite it.
51616  # Note: m4 eats our [], so we need to use [ and ] instead.
51617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51618  if test "x$has_forbidden_chars" != x; then
51619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51621  fi
51622
51623
51624  windows_path="$new_path"
51625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51626    unix_path=`$CYGPATH -u "$windows_path"`
51627    new_path="$unix_path"
51628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51630    new_path="$unix_path"
51631  fi
51632
51633  if test "x$path" != "x$new_path"; then
51634    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51636$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51637  fi
51638
51639  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51640  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51641
51642    else
51643      # We're on a unix platform. Hooray! :)
51644      path="$POTENTIAL_FREETYPE_LIB_PATH"
51645      has_space=`$ECHO "$path" | $GREP " "`
51646      if test "x$has_space" != x; then
51647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51648$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51649        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51650      fi
51651
51652      # Use eval to expand a potential ~
51653      eval path="$path"
51654      if test ! -f "$path" && test ! -d "$path"; then
51655        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51656      fi
51657
51658      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51659    fi
51660  fi
51661
51662
51663    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51665$as_echo_n "checking for freetype includes... " >&6; }
51666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51667$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51668    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51670$as_echo_n "checking for freetype libraries... " >&6; }
51671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51672$as_echo "$FREETYPE_LIB_PATH" >&6; }
51673  fi
51674
51675
51676          if test "x$FOUND_FREETYPE" != xyes; then
51677            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
51678
51679  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51680  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51681  METHOD="well-known location"
51682
51683  # Let's start with an optimistic view of the world :-)
51684  FOUND_FREETYPE=yes
51685
51686  # First look for the canonical freetype main include file ft2build.h.
51687  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51688    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51689    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51690    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51691      # Fail.
51692      FOUND_FREETYPE=no
51693    fi
51694  fi
51695
51696  if test "x$FOUND_FREETYPE" = xyes; then
51697    # Include file found, let's continue the sanity check.
51698    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51699$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51700
51701    # Reset to default value
51702    FREETYPE_BASE_NAME=freetype
51703    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51704    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51705      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51706          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51707        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51708        # for the .6 version explicitly.
51709        FREETYPE_BASE_NAME=freetype.6
51710        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51711        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51712$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51713      else
51714        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51715$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51716        FOUND_FREETYPE=no
51717      fi
51718    else
51719      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51720        # On Windows, we will need both .lib and .dll file.
51721        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51722          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51723$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51724          FOUND_FREETYPE=no
51725        fi
51726      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51727          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51728        # Found lib in isa dir, use that instead.
51729        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51730        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51731$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51732      fi
51733    fi
51734  fi
51735
51736  if test "x$FOUND_FREETYPE" = xyes; then
51737
51738  # Only process if variable expands to non-empty
51739
51740  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51742
51743  # Input might be given as Windows format, start by converting to
51744  # unix format.
51745  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51746  new_path=`$CYGPATH -u "$path"`
51747
51748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51751  # "foo.exe" is OK but "foo" is an error.
51752  #
51753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51754  # It is also a way to make sure we got the proper file name for the real test later on.
51755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51756  if test "x$test_shortpath" = x; then
51757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51759    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51760  fi
51761
51762  # Call helper function which possibly converts this using DOS-style short mode.
51763  # If so, the updated path is stored in $new_path.
51764
51765  input_path="$new_path"
51766  # Check if we need to convert this using DOS-style short mode. If the path
51767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51768  # take no chances and rewrite it.
51769  # Note: m4 eats our [], so we need to use [ and ] instead.
51770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51771  if test "x$has_forbidden_chars" != x; then
51772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51776      # Going to short mode and back again did indeed matter. Since short mode is
51777      # case insensitive, let's make it lowercase to improve readability.
51778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51779      # Now convert it back to Unix-style (cygpath)
51780      input_path=`$CYGPATH -u "$shortmode_path"`
51781      new_path="$input_path"
51782    fi
51783  fi
51784
51785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51786  if test "x$test_cygdrive_prefix" = x; then
51787    # As a simple fix, exclude /usr/bin since it's not a real path.
51788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51790      # a path prefixed by /cygdrive for fixpath to work.
51791      new_path="$CYGWIN_ROOT_PATH$input_path"
51792    fi
51793  fi
51794
51795
51796  if test "x$path" != "x$new_path"; then
51797    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51800  fi
51801
51802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51803
51804  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51805  has_colon=`$ECHO $path | $GREP ^.:`
51806  new_path="$path"
51807  if test "x$has_colon" = x; then
51808    # Not in mixed or Windows style, start by that.
51809    new_path=`cmd //c echo $path`
51810  fi
51811
51812
51813  input_path="$new_path"
51814  # Check if we need to convert this using DOS-style short mode. If the path
51815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51816  # take no chances and rewrite it.
51817  # Note: m4 eats our [], so we need to use [ and ] instead.
51818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51819  if test "x$has_forbidden_chars" != x; then
51820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51822  fi
51823
51824
51825  windows_path="$new_path"
51826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51827    unix_path=`$CYGPATH -u "$windows_path"`
51828    new_path="$unix_path"
51829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51831    new_path="$unix_path"
51832  fi
51833
51834  if test "x$path" != "x$new_path"; then
51835    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51838  fi
51839
51840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51842
51843    else
51844      # We're on a unix platform. Hooray! :)
51845      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51846      has_space=`$ECHO "$path" | $GREP " "`
51847      if test "x$has_space" != x; then
51848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51851      fi
51852
51853      # Use eval to expand a potential ~
51854      eval path="$path"
51855      if test ! -f "$path" && test ! -d "$path"; then
51856        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51857      fi
51858
51859      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51860    fi
51861  fi
51862
51863
51864  # Only process if variable expands to non-empty
51865
51866  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51868
51869  # Input might be given as Windows format, start by converting to
51870  # unix format.
51871  path="$POTENTIAL_FREETYPE_LIB_PATH"
51872  new_path=`$CYGPATH -u "$path"`
51873
51874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51877  # "foo.exe" is OK but "foo" is an error.
51878  #
51879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51880  # It is also a way to make sure we got the proper file name for the real test later on.
51881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51882  if test "x$test_shortpath" = x; then
51883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51885    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51886  fi
51887
51888  # Call helper function which possibly converts this using DOS-style short mode.
51889  # If so, the updated path is stored in $new_path.
51890
51891  input_path="$new_path"
51892  # Check if we need to convert this using DOS-style short mode. If the path
51893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51894  # take no chances and rewrite it.
51895  # Note: m4 eats our [], so we need to use [ and ] instead.
51896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51897  if test "x$has_forbidden_chars" != x; then
51898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51902      # Going to short mode and back again did indeed matter. Since short mode is
51903      # case insensitive, let's make it lowercase to improve readability.
51904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51905      # Now convert it back to Unix-style (cygpath)
51906      input_path=`$CYGPATH -u "$shortmode_path"`
51907      new_path="$input_path"
51908    fi
51909  fi
51910
51911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51912  if test "x$test_cygdrive_prefix" = x; then
51913    # As a simple fix, exclude /usr/bin since it's not a real path.
51914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51916      # a path prefixed by /cygdrive for fixpath to work.
51917      new_path="$CYGWIN_ROOT_PATH$input_path"
51918    fi
51919  fi
51920
51921
51922  if test "x$path" != "x$new_path"; then
51923    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51926  fi
51927
51928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51929
51930  path="$POTENTIAL_FREETYPE_LIB_PATH"
51931  has_colon=`$ECHO $path | $GREP ^.:`
51932  new_path="$path"
51933  if test "x$has_colon" = x; then
51934    # Not in mixed or Windows style, start by that.
51935    new_path=`cmd //c echo $path`
51936  fi
51937
51938
51939  input_path="$new_path"
51940  # Check if we need to convert this using DOS-style short mode. If the path
51941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51942  # take no chances and rewrite it.
51943  # Note: m4 eats our [], so we need to use [ and ] instead.
51944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51945  if test "x$has_forbidden_chars" != x; then
51946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51948  fi
51949
51950
51951  windows_path="$new_path"
51952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51953    unix_path=`$CYGPATH -u "$windows_path"`
51954    new_path="$unix_path"
51955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51957    new_path="$unix_path"
51958  fi
51959
51960  if test "x$path" != "x$new_path"; then
51961    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51964  fi
51965
51966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51968
51969    else
51970      # We're on a unix platform. Hooray! :)
51971      path="$POTENTIAL_FREETYPE_LIB_PATH"
51972      has_space=`$ECHO "$path" | $GREP " "`
51973      if test "x$has_space" != x; then
51974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51975$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51977      fi
51978
51979      # Use eval to expand a potential ~
51980      eval path="$path"
51981      if test ! -f "$path" && test ! -d "$path"; then
51982        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51983      fi
51984
51985      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51986    fi
51987  fi
51988
51989
51990    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51992$as_echo_n "checking for freetype includes... " >&6; }
51993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51994$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51995    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51997$as_echo_n "checking for freetype libraries... " >&6; }
51998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51999$as_echo "$FREETYPE_LIB_PATH" >&6; }
52000  fi
52001
52002          fi
52003
52004          if test "x$FOUND_FREETYPE" != xyes; then
52005            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
52006
52007  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52008  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52009  METHOD="well-known location"
52010
52011  # Let's start with an optimistic view of the world :-)
52012  FOUND_FREETYPE=yes
52013
52014  # First look for the canonical freetype main include file ft2build.h.
52015  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52016    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52017    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52018    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52019      # Fail.
52020      FOUND_FREETYPE=no
52021    fi
52022  fi
52023
52024  if test "x$FOUND_FREETYPE" = xyes; then
52025    # Include file found, let's continue the sanity check.
52026    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52027$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52028
52029    # Reset to default value
52030    FREETYPE_BASE_NAME=freetype
52031    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52032    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52033      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52034          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52035        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52036        # for the .6 version explicitly.
52037        FREETYPE_BASE_NAME=freetype.6
52038        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52039        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52040$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52041      else
52042        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52043$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52044        FOUND_FREETYPE=no
52045      fi
52046    else
52047      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52048        # On Windows, we will need both .lib and .dll file.
52049        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52050          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52051$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52052          FOUND_FREETYPE=no
52053        fi
52054      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52055          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52056        # Found lib in isa dir, use that instead.
52057        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52058        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52059$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52060      fi
52061    fi
52062  fi
52063
52064  if test "x$FOUND_FREETYPE" = xyes; then
52065
52066  # Only process if variable expands to non-empty
52067
52068  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52070
52071  # Input might be given as Windows format, start by converting to
52072  # unix format.
52073  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52074  new_path=`$CYGPATH -u "$path"`
52075
52076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52079  # "foo.exe" is OK but "foo" is an error.
52080  #
52081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52082  # It is also a way to make sure we got the proper file name for the real test later on.
52083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52084  if test "x$test_shortpath" = x; then
52085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52087    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52088  fi
52089
52090  # Call helper function which possibly converts this using DOS-style short mode.
52091  # If so, the updated path is stored in $new_path.
52092
52093  input_path="$new_path"
52094  # Check if we need to convert this using DOS-style short mode. If the path
52095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52096  # take no chances and rewrite it.
52097  # Note: m4 eats our [], so we need to use [ and ] instead.
52098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52099  if test "x$has_forbidden_chars" != x; then
52100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52104      # Going to short mode and back again did indeed matter. Since short mode is
52105      # case insensitive, let's make it lowercase to improve readability.
52106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52107      # Now convert it back to Unix-style (cygpath)
52108      input_path=`$CYGPATH -u "$shortmode_path"`
52109      new_path="$input_path"
52110    fi
52111  fi
52112
52113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52114  if test "x$test_cygdrive_prefix" = x; then
52115    # As a simple fix, exclude /usr/bin since it's not a real path.
52116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52118      # a path prefixed by /cygdrive for fixpath to work.
52119      new_path="$CYGWIN_ROOT_PATH$input_path"
52120    fi
52121  fi
52122
52123
52124  if test "x$path" != "x$new_path"; then
52125    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52128  fi
52129
52130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52131
52132  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52133  has_colon=`$ECHO $path | $GREP ^.:`
52134  new_path="$path"
52135  if test "x$has_colon" = x; then
52136    # Not in mixed or Windows style, start by that.
52137    new_path=`cmd //c echo $path`
52138  fi
52139
52140
52141  input_path="$new_path"
52142  # Check if we need to convert this using DOS-style short mode. If the path
52143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52144  # take no chances and rewrite it.
52145  # Note: m4 eats our [], so we need to use [ and ] instead.
52146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52147  if test "x$has_forbidden_chars" != x; then
52148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52150  fi
52151
52152
52153  windows_path="$new_path"
52154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52155    unix_path=`$CYGPATH -u "$windows_path"`
52156    new_path="$unix_path"
52157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52159    new_path="$unix_path"
52160  fi
52161
52162  if test "x$path" != "x$new_path"; then
52163    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52166  fi
52167
52168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52170
52171    else
52172      # We're on a unix platform. Hooray! :)
52173      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52174      has_space=`$ECHO "$path" | $GREP " "`
52175      if test "x$has_space" != x; then
52176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52179      fi
52180
52181      # Use eval to expand a potential ~
52182      eval path="$path"
52183      if test ! -f "$path" && test ! -d "$path"; then
52184        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52185      fi
52186
52187      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52188    fi
52189  fi
52190
52191
52192  # Only process if variable expands to non-empty
52193
52194  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52196
52197  # Input might be given as Windows format, start by converting to
52198  # unix format.
52199  path="$POTENTIAL_FREETYPE_LIB_PATH"
52200  new_path=`$CYGPATH -u "$path"`
52201
52202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52205  # "foo.exe" is OK but "foo" is an error.
52206  #
52207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52208  # It is also a way to make sure we got the proper file name for the real test later on.
52209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52210  if test "x$test_shortpath" = x; then
52211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52212$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52213    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52214  fi
52215
52216  # Call helper function which possibly converts this using DOS-style short mode.
52217  # If so, the updated path is stored in $new_path.
52218
52219  input_path="$new_path"
52220  # Check if we need to convert this using DOS-style short mode. If the path
52221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52222  # take no chances and rewrite it.
52223  # Note: m4 eats our [], so we need to use [ and ] instead.
52224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52225  if test "x$has_forbidden_chars" != x; then
52226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52230      # Going to short mode and back again did indeed matter. Since short mode is
52231      # case insensitive, let's make it lowercase to improve readability.
52232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52233      # Now convert it back to Unix-style (cygpath)
52234      input_path=`$CYGPATH -u "$shortmode_path"`
52235      new_path="$input_path"
52236    fi
52237  fi
52238
52239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52240  if test "x$test_cygdrive_prefix" = x; then
52241    # As a simple fix, exclude /usr/bin since it's not a real path.
52242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52244      # a path prefixed by /cygdrive for fixpath to work.
52245      new_path="$CYGWIN_ROOT_PATH$input_path"
52246    fi
52247  fi
52248
52249
52250  if test "x$path" != "x$new_path"; then
52251    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52254  fi
52255
52256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52257
52258  path="$POTENTIAL_FREETYPE_LIB_PATH"
52259  has_colon=`$ECHO $path | $GREP ^.:`
52260  new_path="$path"
52261  if test "x$has_colon" = x; then
52262    # Not in mixed or Windows style, start by that.
52263    new_path=`cmd //c echo $path`
52264  fi
52265
52266
52267  input_path="$new_path"
52268  # Check if we need to convert this using DOS-style short mode. If the path
52269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52270  # take no chances and rewrite it.
52271  # Note: m4 eats our [], so we need to use [ and ] instead.
52272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52273  if test "x$has_forbidden_chars" != x; then
52274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52276  fi
52277
52278
52279  windows_path="$new_path"
52280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52281    unix_path=`$CYGPATH -u "$windows_path"`
52282    new_path="$unix_path"
52283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52285    new_path="$unix_path"
52286  fi
52287
52288  if test "x$path" != "x$new_path"; then
52289    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52292  fi
52293
52294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52296
52297    else
52298      # We're on a unix platform. Hooray! :)
52299      path="$POTENTIAL_FREETYPE_LIB_PATH"
52300      has_space=`$ECHO "$path" | $GREP " "`
52301      if test "x$has_space" != x; then
52302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52305      fi
52306
52307      # Use eval to expand a potential ~
52308      eval path="$path"
52309      if test ! -f "$path" && test ! -d "$path"; then
52310        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52311      fi
52312
52313      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52314    fi
52315  fi
52316
52317
52318    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52320$as_echo_n "checking for freetype includes... " >&6; }
52321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52322$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52323    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52325$as_echo_n "checking for freetype libraries... " >&6; }
52326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52327$as_echo "$FREETYPE_LIB_PATH" >&6; }
52328  fi
52329
52330          fi
52331
52332          if test "x$FOUND_FREETYPE" != xyes; then
52333            FREETYPE_BASE_DIR="$SYSROOT/usr"
52334            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52335
52336  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52337  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
52338  METHOD="well-known location"
52339
52340  # Let's start with an optimistic view of the world :-)
52341  FOUND_FREETYPE=yes
52342
52343  # First look for the canonical freetype main include file ft2build.h.
52344  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52345    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52346    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52347    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52348      # Fail.
52349      FOUND_FREETYPE=no
52350    fi
52351  fi
52352
52353  if test "x$FOUND_FREETYPE" = xyes; then
52354    # Include file found, let's continue the sanity check.
52355    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52356$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52357
52358    # Reset to default value
52359    FREETYPE_BASE_NAME=freetype
52360    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52361    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52362      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52363          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52364        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52365        # for the .6 version explicitly.
52366        FREETYPE_BASE_NAME=freetype.6
52367        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52368        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52369$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52370      else
52371        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52372$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52373        FOUND_FREETYPE=no
52374      fi
52375    else
52376      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52377        # On Windows, we will need both .lib and .dll file.
52378        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52379          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52380$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52381          FOUND_FREETYPE=no
52382        fi
52383      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52384          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52385        # Found lib in isa dir, use that instead.
52386        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52387        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52388$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52389      fi
52390    fi
52391  fi
52392
52393  if test "x$FOUND_FREETYPE" = xyes; then
52394
52395  # Only process if variable expands to non-empty
52396
52397  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52399
52400  # Input might be given as Windows format, start by converting to
52401  # unix format.
52402  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52403  new_path=`$CYGPATH -u "$path"`
52404
52405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52408  # "foo.exe" is OK but "foo" is an error.
52409  #
52410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52411  # It is also a way to make sure we got the proper file name for the real test later on.
52412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52413  if test "x$test_shortpath" = x; then
52414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52415$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52416    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52417  fi
52418
52419  # Call helper function which possibly converts this using DOS-style short mode.
52420  # If so, the updated path is stored in $new_path.
52421
52422  input_path="$new_path"
52423  # Check if we need to convert this using DOS-style short mode. If the path
52424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52425  # take no chances and rewrite it.
52426  # Note: m4 eats our [], so we need to use [ and ] instead.
52427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52428  if test "x$has_forbidden_chars" != x; then
52429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52433      # Going to short mode and back again did indeed matter. Since short mode is
52434      # case insensitive, let's make it lowercase to improve readability.
52435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52436      # Now convert it back to Unix-style (cygpath)
52437      input_path=`$CYGPATH -u "$shortmode_path"`
52438      new_path="$input_path"
52439    fi
52440  fi
52441
52442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52443  if test "x$test_cygdrive_prefix" = x; then
52444    # As a simple fix, exclude /usr/bin since it's not a real path.
52445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52447      # a path prefixed by /cygdrive for fixpath to work.
52448      new_path="$CYGWIN_ROOT_PATH$input_path"
52449    fi
52450  fi
52451
52452
52453  if test "x$path" != "x$new_path"; then
52454    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52456$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52457  fi
52458
52459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52460
52461  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52462  has_colon=`$ECHO $path | $GREP ^.:`
52463  new_path="$path"
52464  if test "x$has_colon" = x; then
52465    # Not in mixed or Windows style, start by that.
52466    new_path=`cmd //c echo $path`
52467  fi
52468
52469
52470  input_path="$new_path"
52471  # Check if we need to convert this using DOS-style short mode. If the path
52472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52473  # take no chances and rewrite it.
52474  # Note: m4 eats our [], so we need to use [ and ] instead.
52475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52476  if test "x$has_forbidden_chars" != x; then
52477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52479  fi
52480
52481
52482  windows_path="$new_path"
52483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52484    unix_path=`$CYGPATH -u "$windows_path"`
52485    new_path="$unix_path"
52486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52488    new_path="$unix_path"
52489  fi
52490
52491  if test "x$path" != "x$new_path"; then
52492    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52495  fi
52496
52497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52499
52500    else
52501      # We're on a unix platform. Hooray! :)
52502      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52503      has_space=`$ECHO "$path" | $GREP " "`
52504      if test "x$has_space" != x; then
52505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52507        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52508      fi
52509
52510      # Use eval to expand a potential ~
52511      eval path="$path"
52512      if test ! -f "$path" && test ! -d "$path"; then
52513        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52514      fi
52515
52516      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52517    fi
52518  fi
52519
52520
52521  # Only process if variable expands to non-empty
52522
52523  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52525
52526  # Input might be given as Windows format, start by converting to
52527  # unix format.
52528  path="$POTENTIAL_FREETYPE_LIB_PATH"
52529  new_path=`$CYGPATH -u "$path"`
52530
52531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52534  # "foo.exe" is OK but "foo" is an error.
52535  #
52536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52537  # It is also a way to make sure we got the proper file name for the real test later on.
52538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52539  if test "x$test_shortpath" = x; then
52540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52542    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52543  fi
52544
52545  # Call helper function which possibly converts this using DOS-style short mode.
52546  # If so, the updated path is stored in $new_path.
52547
52548  input_path="$new_path"
52549  # Check if we need to convert this using DOS-style short mode. If the path
52550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52551  # take no chances and rewrite it.
52552  # Note: m4 eats our [], so we need to use [ and ] instead.
52553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52554  if test "x$has_forbidden_chars" != x; then
52555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52559      # Going to short mode and back again did indeed matter. Since short mode is
52560      # case insensitive, let's make it lowercase to improve readability.
52561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52562      # Now convert it back to Unix-style (cygpath)
52563      input_path=`$CYGPATH -u "$shortmode_path"`
52564      new_path="$input_path"
52565    fi
52566  fi
52567
52568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52569  if test "x$test_cygdrive_prefix" = x; then
52570    # As a simple fix, exclude /usr/bin since it's not a real path.
52571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52573      # a path prefixed by /cygdrive for fixpath to work.
52574      new_path="$CYGWIN_ROOT_PATH$input_path"
52575    fi
52576  fi
52577
52578
52579  if test "x$path" != "x$new_path"; then
52580    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52583  fi
52584
52585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52586
52587  path="$POTENTIAL_FREETYPE_LIB_PATH"
52588  has_colon=`$ECHO $path | $GREP ^.:`
52589  new_path="$path"
52590  if test "x$has_colon" = x; then
52591    # Not in mixed or Windows style, start by that.
52592    new_path=`cmd //c echo $path`
52593  fi
52594
52595
52596  input_path="$new_path"
52597  # Check if we need to convert this using DOS-style short mode. If the path
52598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52599  # take no chances and rewrite it.
52600  # Note: m4 eats our [], so we need to use [ and ] instead.
52601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52602  if test "x$has_forbidden_chars" != x; then
52603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52605  fi
52606
52607
52608  windows_path="$new_path"
52609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52610    unix_path=`$CYGPATH -u "$windows_path"`
52611    new_path="$unix_path"
52612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52614    new_path="$unix_path"
52615  fi
52616
52617  if test "x$path" != "x$new_path"; then
52618    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52621  fi
52622
52623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52625
52626    else
52627      # We're on a unix platform. Hooray! :)
52628      path="$POTENTIAL_FREETYPE_LIB_PATH"
52629      has_space=`$ECHO "$path" | $GREP " "`
52630      if test "x$has_space" != x; then
52631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52634      fi
52635
52636      # Use eval to expand a potential ~
52637      eval path="$path"
52638      if test ! -f "$path" && test ! -d "$path"; then
52639        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52640      fi
52641
52642      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52643    fi
52644  fi
52645
52646
52647    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52649$as_echo_n "checking for freetype includes... " >&6; }
52650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52651$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52652    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52654$as_echo_n "checking for freetype libraries... " >&6; }
52655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52656$as_echo "$FREETYPE_LIB_PATH" >&6; }
52657  fi
52658
52659            else
52660
52661  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52662  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
52663  METHOD="well-known location"
52664
52665  # Let's start with an optimistic view of the world :-)
52666  FOUND_FREETYPE=yes
52667
52668  # First look for the canonical freetype main include file ft2build.h.
52669  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52670    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52671    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52672    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52673      # Fail.
52674      FOUND_FREETYPE=no
52675    fi
52676  fi
52677
52678  if test "x$FOUND_FREETYPE" = xyes; then
52679    # Include file found, let's continue the sanity check.
52680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52681$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52682
52683    # Reset to default value
52684    FREETYPE_BASE_NAME=freetype
52685    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52686    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52687      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52688          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52689        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52690        # for the .6 version explicitly.
52691        FREETYPE_BASE_NAME=freetype.6
52692        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52693        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52694$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52695      else
52696        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52697$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52698        FOUND_FREETYPE=no
52699      fi
52700    else
52701      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52702        # On Windows, we will need both .lib and .dll file.
52703        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52704          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52705$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52706          FOUND_FREETYPE=no
52707        fi
52708      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52709          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52710        # Found lib in isa dir, use that instead.
52711        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52712        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52713$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52714      fi
52715    fi
52716  fi
52717
52718  if test "x$FOUND_FREETYPE" = xyes; then
52719
52720  # Only process if variable expands to non-empty
52721
52722  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52724
52725  # Input might be given as Windows format, start by converting to
52726  # unix format.
52727  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52728  new_path=`$CYGPATH -u "$path"`
52729
52730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52733  # "foo.exe" is OK but "foo" is an error.
52734  #
52735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52736  # It is also a way to make sure we got the proper file name for the real test later on.
52737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52738  if test "x$test_shortpath" = x; then
52739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52740$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52741    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52742  fi
52743
52744  # Call helper function which possibly converts this using DOS-style short mode.
52745  # If so, the updated path is stored in $new_path.
52746
52747  input_path="$new_path"
52748  # Check if we need to convert this using DOS-style short mode. If the path
52749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52750  # take no chances and rewrite it.
52751  # Note: m4 eats our [], so we need to use [ and ] instead.
52752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52753  if test "x$has_forbidden_chars" != x; then
52754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52758      # Going to short mode and back again did indeed matter. Since short mode is
52759      # case insensitive, let's make it lowercase to improve readability.
52760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52761      # Now convert it back to Unix-style (cygpath)
52762      input_path=`$CYGPATH -u "$shortmode_path"`
52763      new_path="$input_path"
52764    fi
52765  fi
52766
52767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52768  if test "x$test_cygdrive_prefix" = x; then
52769    # As a simple fix, exclude /usr/bin since it's not a real path.
52770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52772      # a path prefixed by /cygdrive for fixpath to work.
52773      new_path="$CYGWIN_ROOT_PATH$input_path"
52774    fi
52775  fi
52776
52777
52778  if test "x$path" != "x$new_path"; then
52779    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52781$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52782  fi
52783
52784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52785
52786  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52787  has_colon=`$ECHO $path | $GREP ^.:`
52788  new_path="$path"
52789  if test "x$has_colon" = x; then
52790    # Not in mixed or Windows style, start by that.
52791    new_path=`cmd //c echo $path`
52792  fi
52793
52794
52795  input_path="$new_path"
52796  # Check if we need to convert this using DOS-style short mode. If the path
52797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52798  # take no chances and rewrite it.
52799  # Note: m4 eats our [], so we need to use [ and ] instead.
52800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52801  if test "x$has_forbidden_chars" != x; then
52802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52804  fi
52805
52806
52807  windows_path="$new_path"
52808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52809    unix_path=`$CYGPATH -u "$windows_path"`
52810    new_path="$unix_path"
52811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52813    new_path="$unix_path"
52814  fi
52815
52816  if test "x$path" != "x$new_path"; then
52817    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52819$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52820  fi
52821
52822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52824
52825    else
52826      # We're on a unix platform. Hooray! :)
52827      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52828      has_space=`$ECHO "$path" | $GREP " "`
52829      if test "x$has_space" != x; then
52830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52833      fi
52834
52835      # Use eval to expand a potential ~
52836      eval path="$path"
52837      if test ! -f "$path" && test ! -d "$path"; then
52838        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52839      fi
52840
52841      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52842    fi
52843  fi
52844
52845
52846  # Only process if variable expands to non-empty
52847
52848  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52850
52851  # Input might be given as Windows format, start by converting to
52852  # unix format.
52853  path="$POTENTIAL_FREETYPE_LIB_PATH"
52854  new_path=`$CYGPATH -u "$path"`
52855
52856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52859  # "foo.exe" is OK but "foo" is an error.
52860  #
52861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52862  # It is also a way to make sure we got the proper file name for the real test later on.
52863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52864  if test "x$test_shortpath" = x; then
52865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52866$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52867    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52868  fi
52869
52870  # Call helper function which possibly converts this using DOS-style short mode.
52871  # If so, the updated path is stored in $new_path.
52872
52873  input_path="$new_path"
52874  # Check if we need to convert this using DOS-style short mode. If the path
52875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52876  # take no chances and rewrite it.
52877  # Note: m4 eats our [], so we need to use [ and ] instead.
52878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52879  if test "x$has_forbidden_chars" != x; then
52880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52884      # Going to short mode and back again did indeed matter. Since short mode is
52885      # case insensitive, let's make it lowercase to improve readability.
52886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52887      # Now convert it back to Unix-style (cygpath)
52888      input_path=`$CYGPATH -u "$shortmode_path"`
52889      new_path="$input_path"
52890    fi
52891  fi
52892
52893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52894  if test "x$test_cygdrive_prefix" = x; then
52895    # As a simple fix, exclude /usr/bin since it's not a real path.
52896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52898      # a path prefixed by /cygdrive for fixpath to work.
52899      new_path="$CYGWIN_ROOT_PATH$input_path"
52900    fi
52901  fi
52902
52903
52904  if test "x$path" != "x$new_path"; then
52905    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52907$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52908  fi
52909
52910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52911
52912  path="$POTENTIAL_FREETYPE_LIB_PATH"
52913  has_colon=`$ECHO $path | $GREP ^.:`
52914  new_path="$path"
52915  if test "x$has_colon" = x; then
52916    # Not in mixed or Windows style, start by that.
52917    new_path=`cmd //c echo $path`
52918  fi
52919
52920
52921  input_path="$new_path"
52922  # Check if we need to convert this using DOS-style short mode. If the path
52923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52924  # take no chances and rewrite it.
52925  # Note: m4 eats our [], so we need to use [ and ] instead.
52926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52927  if test "x$has_forbidden_chars" != x; then
52928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52930  fi
52931
52932
52933  windows_path="$new_path"
52934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52935    unix_path=`$CYGPATH -u "$windows_path"`
52936    new_path="$unix_path"
52937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52939    new_path="$unix_path"
52940  fi
52941
52942  if test "x$path" != "x$new_path"; then
52943    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52945$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52946  fi
52947
52948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52950
52951    else
52952      # We're on a unix platform. Hooray! :)
52953      path="$POTENTIAL_FREETYPE_LIB_PATH"
52954      has_space=`$ECHO "$path" | $GREP " "`
52955      if test "x$has_space" != x; then
52956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52957$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52958        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52959      fi
52960
52961      # Use eval to expand a potential ~
52962      eval path="$path"
52963      if test ! -f "$path" && test ! -d "$path"; then
52964        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52965      fi
52966
52967      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52968    fi
52969  fi
52970
52971
52972    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52974$as_echo_n "checking for freetype includes... " >&6; }
52975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52976$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52977    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52979$as_echo_n "checking for freetype libraries... " >&6; }
52980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52981$as_echo "$FREETYPE_LIB_PATH" >&6; }
52982  fi
52983
52984              if test "x$FOUND_FREETYPE" != xyes; then
52985
52986  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52987  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
52988  METHOD="well-known location"
52989
52990  # Let's start with an optimistic view of the world :-)
52991  FOUND_FREETYPE=yes
52992
52993  # First look for the canonical freetype main include file ft2build.h.
52994  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52995    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52996    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52997    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52998      # Fail.
52999      FOUND_FREETYPE=no
53000    fi
53001  fi
53002
53003  if test "x$FOUND_FREETYPE" = xyes; then
53004    # Include file found, let's continue the sanity check.
53005    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53006$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53007
53008    # Reset to default value
53009    FREETYPE_BASE_NAME=freetype
53010    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53011    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53012      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53013          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53014        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53015        # for the .6 version explicitly.
53016        FREETYPE_BASE_NAME=freetype.6
53017        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53018        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53019$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53020      else
53021        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53022$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53023        FOUND_FREETYPE=no
53024      fi
53025    else
53026      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53027        # On Windows, we will need both .lib and .dll file.
53028        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53029          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53030$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53031          FOUND_FREETYPE=no
53032        fi
53033      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53034          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53035        # Found lib in isa dir, use that instead.
53036        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53037        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53038$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53039      fi
53040    fi
53041  fi
53042
53043  if test "x$FOUND_FREETYPE" = xyes; then
53044
53045  # Only process if variable expands to non-empty
53046
53047  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53049
53050  # Input might be given as Windows format, start by converting to
53051  # unix format.
53052  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53053  new_path=`$CYGPATH -u "$path"`
53054
53055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53058  # "foo.exe" is OK but "foo" is an error.
53059  #
53060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53061  # It is also a way to make sure we got the proper file name for the real test later on.
53062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53063  if test "x$test_shortpath" = x; then
53064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53065$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53066    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53067  fi
53068
53069  # Call helper function which possibly converts this using DOS-style short mode.
53070  # If so, the updated path is stored in $new_path.
53071
53072  input_path="$new_path"
53073  # Check if we need to convert this using DOS-style short mode. If the path
53074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53075  # take no chances and rewrite it.
53076  # Note: m4 eats our [], so we need to use [ and ] instead.
53077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53078  if test "x$has_forbidden_chars" != x; then
53079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53083      # Going to short mode and back again did indeed matter. Since short mode is
53084      # case insensitive, let's make it lowercase to improve readability.
53085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53086      # Now convert it back to Unix-style (cygpath)
53087      input_path=`$CYGPATH -u "$shortmode_path"`
53088      new_path="$input_path"
53089    fi
53090  fi
53091
53092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53093  if test "x$test_cygdrive_prefix" = x; then
53094    # As a simple fix, exclude /usr/bin since it's not a real path.
53095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53097      # a path prefixed by /cygdrive for fixpath to work.
53098      new_path="$CYGWIN_ROOT_PATH$input_path"
53099    fi
53100  fi
53101
53102
53103  if test "x$path" != "x$new_path"; then
53104    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53106$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53107  fi
53108
53109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53110
53111  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53112  has_colon=`$ECHO $path | $GREP ^.:`
53113  new_path="$path"
53114  if test "x$has_colon" = x; then
53115    # Not in mixed or Windows style, start by that.
53116    new_path=`cmd //c echo $path`
53117  fi
53118
53119
53120  input_path="$new_path"
53121  # Check if we need to convert this using DOS-style short mode. If the path
53122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53123  # take no chances and rewrite it.
53124  # Note: m4 eats our [], so we need to use [ and ] instead.
53125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53126  if test "x$has_forbidden_chars" != x; then
53127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53129  fi
53130
53131
53132  windows_path="$new_path"
53133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53134    unix_path=`$CYGPATH -u "$windows_path"`
53135    new_path="$unix_path"
53136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53138    new_path="$unix_path"
53139  fi
53140
53141  if test "x$path" != "x$new_path"; then
53142    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53144$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53145  fi
53146
53147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53149
53150    else
53151      # We're on a unix platform. Hooray! :)
53152      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53153      has_space=`$ECHO "$path" | $GREP " "`
53154      if test "x$has_space" != x; then
53155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53156$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53157        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53158      fi
53159
53160      # Use eval to expand a potential ~
53161      eval path="$path"
53162      if test ! -f "$path" && test ! -d "$path"; then
53163        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53164      fi
53165
53166      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53167    fi
53168  fi
53169
53170
53171  # Only process if variable expands to non-empty
53172
53173  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53175
53176  # Input might be given as Windows format, start by converting to
53177  # unix format.
53178  path="$POTENTIAL_FREETYPE_LIB_PATH"
53179  new_path=`$CYGPATH -u "$path"`
53180
53181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53184  # "foo.exe" is OK but "foo" is an error.
53185  #
53186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53187  # It is also a way to make sure we got the proper file name for the real test later on.
53188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53189  if test "x$test_shortpath" = x; then
53190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53191$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53192    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53193  fi
53194
53195  # Call helper function which possibly converts this using DOS-style short mode.
53196  # If so, the updated path is stored in $new_path.
53197
53198  input_path="$new_path"
53199  # Check if we need to convert this using DOS-style short mode. If the path
53200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53201  # take no chances and rewrite it.
53202  # Note: m4 eats our [], so we need to use [ and ] instead.
53203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53204  if test "x$has_forbidden_chars" != x; then
53205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53209      # Going to short mode and back again did indeed matter. Since short mode is
53210      # case insensitive, let's make it lowercase to improve readability.
53211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53212      # Now convert it back to Unix-style (cygpath)
53213      input_path=`$CYGPATH -u "$shortmode_path"`
53214      new_path="$input_path"
53215    fi
53216  fi
53217
53218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53219  if test "x$test_cygdrive_prefix" = x; then
53220    # As a simple fix, exclude /usr/bin since it's not a real path.
53221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53223      # a path prefixed by /cygdrive for fixpath to work.
53224      new_path="$CYGWIN_ROOT_PATH$input_path"
53225    fi
53226  fi
53227
53228
53229  if test "x$path" != "x$new_path"; then
53230    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53232$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53233  fi
53234
53235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53236
53237  path="$POTENTIAL_FREETYPE_LIB_PATH"
53238  has_colon=`$ECHO $path | $GREP ^.:`
53239  new_path="$path"
53240  if test "x$has_colon" = x; then
53241    # Not in mixed or Windows style, start by that.
53242    new_path=`cmd //c echo $path`
53243  fi
53244
53245
53246  input_path="$new_path"
53247  # Check if we need to convert this using DOS-style short mode. If the path
53248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53249  # take no chances and rewrite it.
53250  # Note: m4 eats our [], so we need to use [ and ] instead.
53251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53252  if test "x$has_forbidden_chars" != x; then
53253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53255  fi
53256
53257
53258  windows_path="$new_path"
53259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53260    unix_path=`$CYGPATH -u "$windows_path"`
53261    new_path="$unix_path"
53262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53264    new_path="$unix_path"
53265  fi
53266
53267  if test "x$path" != "x$new_path"; then
53268    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53270$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53271  fi
53272
53273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53275
53276    else
53277      # We're on a unix platform. Hooray! :)
53278      path="$POTENTIAL_FREETYPE_LIB_PATH"
53279      has_space=`$ECHO "$path" | $GREP " "`
53280      if test "x$has_space" != x; then
53281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53282$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53284      fi
53285
53286      # Use eval to expand a potential ~
53287      eval path="$path"
53288      if test ! -f "$path" && test ! -d "$path"; then
53289        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53290      fi
53291
53292      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53293    fi
53294  fi
53295
53296
53297    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53299$as_echo_n "checking for freetype includes... " >&6; }
53300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53301$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53302    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53304$as_echo_n "checking for freetype libraries... " >&6; }
53305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53306$as_echo "$FREETYPE_LIB_PATH" >&6; }
53307  fi
53308
53309              fi
53310            fi
53311          fi
53312        fi
53313      fi # end check in well-known locations
53314
53315      if test "x$FOUND_FREETYPE" != xyes; then
53316
53317  # Print a helpful message on how to acquire the necessary build dependency.
53318  # freetype is the help tag: freetype, cups, alsa etc
53319  MISSING_DEPENDENCY=freetype
53320
53321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53322    cygwin_help $MISSING_DEPENDENCY
53323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53324    msys_help $MISSING_DEPENDENCY
53325  else
53326    PKGHANDLER_COMMAND=
53327
53328    case $PKGHANDLER in
53329      apt-get)
53330        apt_help     $MISSING_DEPENDENCY ;;
53331      yum)
53332        yum_help     $MISSING_DEPENDENCY ;;
53333      port)
53334        port_help    $MISSING_DEPENDENCY ;;
53335      pkgutil)
53336        pkgutil_help $MISSING_DEPENDENCY ;;
53337      pkgadd)
53338        pkgadd_help  $MISSING_DEPENDENCY ;;
53339    esac
53340
53341    if test "x$PKGHANDLER_COMMAND" != x; then
53342      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53343    fi
53344  fi
53345
53346        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
53347      fi
53348    fi # end user specified settings
53349
53350    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
53351    if test "x$FREETYPE_CFLAGS" = x; then
53352
53353  # Only process if variable expands to non-empty
53354
53355  if test "x$FREETYPE_INCLUDE_PATH" != x; then
53356    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53357
53358  # Input might be given as Windows format, start by converting to
53359  # unix format.
53360  path="$FREETYPE_INCLUDE_PATH"
53361  new_path=`$CYGPATH -u "$path"`
53362
53363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53366  # "foo.exe" is OK but "foo" is an error.
53367  #
53368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53369  # It is also a way to make sure we got the proper file name for the real test later on.
53370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53371  if test "x$test_shortpath" = x; then
53372    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53373$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53374    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
53375  fi
53376
53377  # Call helper function which possibly converts this using DOS-style short mode.
53378  # If so, the updated path is stored in $new_path.
53379
53380  input_path="$new_path"
53381  # Check if we need to convert this using DOS-style short mode. If the path
53382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53383  # take no chances and rewrite it.
53384  # Note: m4 eats our [], so we need to use [ and ] instead.
53385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53386  if test "x$has_forbidden_chars" != x; then
53387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53391      # Going to short mode and back again did indeed matter. Since short mode is
53392      # case insensitive, let's make it lowercase to improve readability.
53393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53394      # Now convert it back to Unix-style (cygpath)
53395      input_path=`$CYGPATH -u "$shortmode_path"`
53396      new_path="$input_path"
53397    fi
53398  fi
53399
53400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53401  if test "x$test_cygdrive_prefix" = x; then
53402    # As a simple fix, exclude /usr/bin since it's not a real path.
53403    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53405      # a path prefixed by /cygdrive for fixpath to work.
53406      new_path="$CYGWIN_ROOT_PATH$input_path"
53407    fi
53408  fi
53409
53410
53411  if test "x$path" != "x$new_path"; then
53412    FREETYPE_INCLUDE_PATH="$new_path"
53413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53414$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53415  fi
53416
53417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53418
53419  path="$FREETYPE_INCLUDE_PATH"
53420  has_colon=`$ECHO $path | $GREP ^.:`
53421  new_path="$path"
53422  if test "x$has_colon" = x; then
53423    # Not in mixed or Windows style, start by that.
53424    new_path=`cmd //c echo $path`
53425  fi
53426
53427
53428  input_path="$new_path"
53429  # Check if we need to convert this using DOS-style short mode. If the path
53430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53431  # take no chances and rewrite it.
53432  # Note: m4 eats our [], so we need to use [ and ] instead.
53433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53434  if test "x$has_forbidden_chars" != x; then
53435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53437  fi
53438
53439
53440  windows_path="$new_path"
53441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53442    unix_path=`$CYGPATH -u "$windows_path"`
53443    new_path="$unix_path"
53444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53446    new_path="$unix_path"
53447  fi
53448
53449  if test "x$path" != "x$new_path"; then
53450    FREETYPE_INCLUDE_PATH="$new_path"
53451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53452$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53453  fi
53454
53455  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53456  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53457
53458    else
53459      # We're on a unix platform. Hooray! :)
53460      path="$FREETYPE_INCLUDE_PATH"
53461      has_space=`$ECHO "$path" | $GREP " "`
53462      if test "x$has_space" != x; then
53463        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53464$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53465        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53466      fi
53467
53468      # Use eval to expand a potential ~
53469      eval path="$path"
53470      if test ! -f "$path" && test ! -d "$path"; then
53471        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53472      fi
53473
53474      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53475    fi
53476  fi
53477
53478      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
53479        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
53480      else
53481        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
53482      fi
53483    fi
53484
53485    if test "x$FREETYPE_LIBS" = x; then
53486
53487  # Only process if variable expands to non-empty
53488
53489  if test "x$FREETYPE_LIB_PATH" != x; then
53490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53491
53492  # Input might be given as Windows format, start by converting to
53493  # unix format.
53494  path="$FREETYPE_LIB_PATH"
53495  new_path=`$CYGPATH -u "$path"`
53496
53497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53500  # "foo.exe" is OK but "foo" is an error.
53501  #
53502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53503  # It is also a way to make sure we got the proper file name for the real test later on.
53504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53505  if test "x$test_shortpath" = x; then
53506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53507$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53508    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
53509  fi
53510
53511  # Call helper function which possibly converts this using DOS-style short mode.
53512  # If so, the updated path is stored in $new_path.
53513
53514  input_path="$new_path"
53515  # Check if we need to convert this using DOS-style short mode. If the path
53516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53517  # take no chances and rewrite it.
53518  # Note: m4 eats our [], so we need to use [ and ] instead.
53519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53520  if test "x$has_forbidden_chars" != x; then
53521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53525      # Going to short mode and back again did indeed matter. Since short mode is
53526      # case insensitive, let's make it lowercase to improve readability.
53527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53528      # Now convert it back to Unix-style (cygpath)
53529      input_path=`$CYGPATH -u "$shortmode_path"`
53530      new_path="$input_path"
53531    fi
53532  fi
53533
53534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53535  if test "x$test_cygdrive_prefix" = x; then
53536    # As a simple fix, exclude /usr/bin since it's not a real path.
53537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53539      # a path prefixed by /cygdrive for fixpath to work.
53540      new_path="$CYGWIN_ROOT_PATH$input_path"
53541    fi
53542  fi
53543
53544
53545  if test "x$path" != "x$new_path"; then
53546    FREETYPE_LIB_PATH="$new_path"
53547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53548$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53549  fi
53550
53551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53552
53553  path="$FREETYPE_LIB_PATH"
53554  has_colon=`$ECHO $path | $GREP ^.:`
53555  new_path="$path"
53556  if test "x$has_colon" = x; then
53557    # Not in mixed or Windows style, start by that.
53558    new_path=`cmd //c echo $path`
53559  fi
53560
53561
53562  input_path="$new_path"
53563  # Check if we need to convert this using DOS-style short mode. If the path
53564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53565  # take no chances and rewrite it.
53566  # Note: m4 eats our [], so we need to use [ and ] instead.
53567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53568  if test "x$has_forbidden_chars" != x; then
53569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53571  fi
53572
53573
53574  windows_path="$new_path"
53575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53576    unix_path=`$CYGPATH -u "$windows_path"`
53577    new_path="$unix_path"
53578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53580    new_path="$unix_path"
53581  fi
53582
53583  if test "x$path" != "x$new_path"; then
53584    FREETYPE_LIB_PATH="$new_path"
53585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53586$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53587  fi
53588
53589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53591
53592    else
53593      # We're on a unix platform. Hooray! :)
53594      path="$FREETYPE_LIB_PATH"
53595      has_space=`$ECHO "$path" | $GREP " "`
53596      if test "x$has_space" != x; then
53597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53598$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53599        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53600      fi
53601
53602      # Use eval to expand a potential ~
53603      eval path="$path"
53604      if test ! -f "$path" && test ! -d "$path"; then
53605        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53606      fi
53607
53608      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53609    fi
53610  fi
53611
53612      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53613        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
53614      else
53615        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
53616      fi
53617    fi
53618
53619    # Try to compile it
53620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
53621$as_echo_n "checking if we can compile and link with freetype... " >&6; }
53622    ac_ext=cpp
53623ac_cpp='$CXXCPP $CPPFLAGS'
53624ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53625ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53626ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53627
53628    PREV_CXXCFLAGS="$CXXFLAGS"
53629    PREV_LIBS="$LIBS"
53630    PREV_CXX="$CXX"
53631    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
53632    LIBS="$LIBS $FREETYPE_LIBS"
53633    CXX="$FIXPATH $CXX"
53634    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53635/* end confdefs.h.  */
53636
53637          #include<ft2build.h>
53638          #include FT_FREETYPE_H
53639          int main () {
53640            FT_Init_FreeType(NULL);
53641            return 0;
53642          }
53643
53644_ACEOF
53645if ac_fn_cxx_try_link "$LINENO"; then :
53646
53647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53648$as_echo "yes" >&6; }
53649
53650else
53651
53652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53653$as_echo "no" >&6; }
53654          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
53655$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
53656          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
53657$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
53658
53659
53660  # Print a helpful message on how to acquire the necessary build dependency.
53661  # freetype is the help tag: freetype, cups, alsa etc
53662  MISSING_DEPENDENCY=freetype
53663
53664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53665    cygwin_help $MISSING_DEPENDENCY
53666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53667    msys_help $MISSING_DEPENDENCY
53668  else
53669    PKGHANDLER_COMMAND=
53670
53671    case $PKGHANDLER in
53672      apt-get)
53673        apt_help     $MISSING_DEPENDENCY ;;
53674      yum)
53675        yum_help     $MISSING_DEPENDENCY ;;
53676      port)
53677        port_help    $MISSING_DEPENDENCY ;;
53678      pkgutil)
53679        pkgutil_help $MISSING_DEPENDENCY ;;
53680      pkgadd)
53681        pkgadd_help  $MISSING_DEPENDENCY ;;
53682    esac
53683
53684    if test "x$PKGHANDLER_COMMAND" != x; then
53685      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53686    fi
53687  fi
53688
53689
53690          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
53691
53692
53693fi
53694rm -f core conftest.err conftest.$ac_objext \
53695    conftest$ac_exeext conftest.$ac_ext
53696    CXXCFLAGS="$PREV_CXXFLAGS"
53697    LIBS="$PREV_LIBS"
53698    CXX="$PREV_CXX"
53699    ac_ext=cpp
53700ac_cpp='$CXXCPP $CPPFLAGS'
53701ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53702ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53703ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53704
53705
53706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
53707$as_echo_n "checking if we should bundle freetype... " >&6; }
53708    if test "x$BUNDLE_FREETYPE" = xyes; then
53709      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
53710    fi
53711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
53712$as_echo "$BUNDLE_FREETYPE" >&6; }
53713
53714  fi # end freetype needed
53715
53716
53717
53718
53719
53720
53721
53722# Check whether --with-alsa was given.
53723if test "${with_alsa+set}" = set; then :
53724  withval=$with_alsa;
53725fi
53726
53727
53728# Check whether --with-alsa-include was given.
53729if test "${with_alsa_include+set}" = set; then :
53730  withval=$with_alsa_include;
53731fi
53732
53733
53734# Check whether --with-alsa-lib was given.
53735if test "${with_alsa_lib+set}" = set; then :
53736  withval=$with_alsa_lib;
53737fi
53738
53739
53740  if test "x$NEEDS_LIB_ALSA" = xfalse; then
53741    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
53742        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
53743        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
53744      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
53745$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
53746    fi
53747    ALSA_CFLAGS=
53748    ALSA_LIBS=
53749  else
53750    ALSA_FOUND=no
53751
53752    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
53753      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
53754    fi
53755
53756    if test "x${with_alsa}" != x; then
53757      ALSA_LIBS="-L${with_alsa}/lib -lasound"
53758      ALSA_CFLAGS="-I${with_alsa}/include"
53759      ALSA_FOUND=yes
53760    fi
53761    if test "x${with_alsa_include}" != x; then
53762      ALSA_CFLAGS="-I${with_alsa_include}"
53763      ALSA_FOUND=yes
53764    fi
53765    if test "x${with_alsa_lib}" != x; then
53766      ALSA_LIBS="-L${with_alsa_lib} -lasound"
53767      ALSA_FOUND=yes
53768    fi
53769    # Do not try pkg-config if we have a sysroot set.
53770    if test "x$SYSROOT" = x; then
53771      if test "x$ALSA_FOUND" = xno; then
53772
53773pkg_failed=no
53774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
53775$as_echo_n "checking for ALSA... " >&6; }
53776
53777if test -n "$ALSA_CFLAGS"; then
53778    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
53779 elif test -n "$PKG_CONFIG"; then
53780    if test -n "$PKG_CONFIG" && \
53781    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53782  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53783  ac_status=$?
53784  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53785  test $ac_status = 0; }; then
53786  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
53787else
53788  pkg_failed=yes
53789fi
53790 else
53791    pkg_failed=untried
53792fi
53793if test -n "$ALSA_LIBS"; then
53794    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
53795 elif test -n "$PKG_CONFIG"; then
53796    if test -n "$PKG_CONFIG" && \
53797    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53798  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53799  ac_status=$?
53800  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53801  test $ac_status = 0; }; then
53802  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
53803else
53804  pkg_failed=yes
53805fi
53806 else
53807    pkg_failed=untried
53808fi
53809
53810
53811
53812if test $pkg_failed = yes; then
53813
53814if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53815        _pkg_short_errors_supported=yes
53816else
53817        _pkg_short_errors_supported=no
53818fi
53819        if test $_pkg_short_errors_supported = yes; then
53820	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
53821        else
53822	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
53823        fi
53824	# Put the nasty error message in config.log where it belongs
53825	echo "$ALSA_PKG_ERRORS" >&5
53826
53827	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53828$as_echo "no" >&6; }
53829                ALSA_FOUND=no
53830elif test $pkg_failed = untried; then
53831	ALSA_FOUND=no
53832else
53833	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
53834	ALSA_LIBS=$pkg_cv_ALSA_LIBS
53835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53836$as_echo "yes" >&6; }
53837	ALSA_FOUND=yes
53838fi
53839      fi
53840    fi
53841    if test "x$ALSA_FOUND" = xno; then
53842      for ac_header in alsa/asoundlib.h
53843do :
53844  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
53845if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
53846  cat >>confdefs.h <<_ACEOF
53847#define HAVE_ALSA_ASOUNDLIB_H 1
53848_ACEOF
53849
53850            ALSA_FOUND=yes
53851            ALSA_CFLAGS=-Iignoreme
53852            ALSA_LIBS=-lasound
53853            DEFAULT_ALSA=yes
53854
53855else
53856  ALSA_FOUND=no
53857
53858fi
53859
53860done
53861
53862    fi
53863    if test "x$ALSA_FOUND" = xno; then
53864
53865  # Print a helpful message on how to acquire the necessary build dependency.
53866  # alsa is the help tag: freetype, cups, alsa etc
53867  MISSING_DEPENDENCY=alsa
53868
53869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53870    cygwin_help $MISSING_DEPENDENCY
53871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53872    msys_help $MISSING_DEPENDENCY
53873  else
53874    PKGHANDLER_COMMAND=
53875
53876    case $PKGHANDLER in
53877      apt-get)
53878        apt_help     $MISSING_DEPENDENCY ;;
53879      yum)
53880        yum_help     $MISSING_DEPENDENCY ;;
53881      port)
53882        port_help    $MISSING_DEPENDENCY ;;
53883      pkgutil)
53884        pkgutil_help $MISSING_DEPENDENCY ;;
53885      pkgadd)
53886        pkgadd_help  $MISSING_DEPENDENCY ;;
53887    esac
53888
53889    if test "x$PKGHANDLER_COMMAND" != x; then
53890      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53891    fi
53892  fi
53893
53894      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
53895    fi
53896  fi
53897
53898
53899
53900
53901
53902
53903# Check whether --with-libffi was given.
53904if test "${with_libffi+set}" = set; then :
53905  withval=$with_libffi;
53906fi
53907
53908
53909# Check whether --with-libffi-include was given.
53910if test "${with_libffi_include+set}" = set; then :
53911  withval=$with_libffi_include;
53912fi
53913
53914
53915# Check whether --with-libffi-lib was given.
53916if test "${with_libffi_lib+set}" = set; then :
53917  withval=$with_libffi_lib;
53918fi
53919
53920
53921  if test "x$NEEDS_LIB_FFI" = xfalse; then
53922    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
53923        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
53924        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
53925      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
53926$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
53927    fi
53928    LIBFFI_CFLAGS=
53929    LIBFFI_LIBS=
53930  else
53931    LIBFFI_FOUND=no
53932
53933    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
53934      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
53935    fi
53936
53937    if test "x${with_libffi}" != x; then
53938      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
53939      LIBFFI_CFLAGS="-I${with_libffi}/include"
53940      LIBFFI_FOUND=yes
53941    fi
53942    if test "x${with_libffi_include}" != x; then
53943      LIBFFI_CFLAGS="-I${with_libffi_include}"
53944      LIBFFI_FOUND=yes
53945    fi
53946    if test "x${with_libffi_lib}" != x; then
53947      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
53948      LIBFFI_FOUND=yes
53949    fi
53950    # Do not try pkg-config if we have a sysroot set.
53951    if test "x$SYSROOT" = x; then
53952      if test "x$LIBFFI_FOUND" = xno; then
53953        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
53954
53955pkg_failed=no
53956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
53957$as_echo_n "checking for LIBFFI... " >&6; }
53958
53959if test -n "$LIBFFI_CFLAGS"; then
53960    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
53961 elif test -n "$PKG_CONFIG"; then
53962    if test -n "$PKG_CONFIG" && \
53963    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53964  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53965  ac_status=$?
53966  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53967  test $ac_status = 0; }; then
53968  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
53969else
53970  pkg_failed=yes
53971fi
53972 else
53973    pkg_failed=untried
53974fi
53975if test -n "$LIBFFI_LIBS"; then
53976    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
53977 elif test -n "$PKG_CONFIG"; then
53978    if test -n "$PKG_CONFIG" && \
53979    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53980  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53981  ac_status=$?
53982  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53983  test $ac_status = 0; }; then
53984  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
53985else
53986  pkg_failed=yes
53987fi
53988 else
53989    pkg_failed=untried
53990fi
53991
53992
53993
53994if test $pkg_failed = yes; then
53995
53996if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53997        _pkg_short_errors_supported=yes
53998else
53999        _pkg_short_errors_supported=no
54000fi
54001        if test $_pkg_short_errors_supported = yes; then
54002	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
54003        else
54004	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
54005        fi
54006	# Put the nasty error message in config.log where it belongs
54007	echo "$LIBFFI_PKG_ERRORS" >&5
54008
54009	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54010$as_echo "no" >&6; }
54011                LIBFFI_FOUND=no
54012elif test $pkg_failed = untried; then
54013	LIBFFI_FOUND=no
54014else
54015	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
54016	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
54017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54018$as_echo "yes" >&6; }
54019	LIBFFI_FOUND=yes
54020fi
54021      fi
54022    fi
54023    if test "x$LIBFFI_FOUND" = xno; then
54024      for ac_header in ffi.h
54025do :
54026  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
54027if test "x$ac_cv_header_ffi_h" = xyes; then :
54028  cat >>confdefs.h <<_ACEOF
54029#define HAVE_FFI_H 1
54030_ACEOF
54031
54032            LIBFFI_FOUND=yes
54033            LIBFFI_CFLAGS=
54034            LIBFFI_LIBS=-lffi
54035
54036else
54037  LIBFFI_FOUND=no
54038
54039fi
54040
54041done
54042
54043    fi
54044    if test "x$LIBFFI_FOUND" = xno; then
54045
54046  # Print a helpful message on how to acquire the necessary build dependency.
54047  # ffi is the help tag: freetype, cups, alsa etc
54048  MISSING_DEPENDENCY=ffi
54049
54050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54051    cygwin_help $MISSING_DEPENDENCY
54052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54053    msys_help $MISSING_DEPENDENCY
54054  else
54055    PKGHANDLER_COMMAND=
54056
54057    case $PKGHANDLER in
54058      apt-get)
54059        apt_help     $MISSING_DEPENDENCY ;;
54060      yum)
54061        yum_help     $MISSING_DEPENDENCY ;;
54062      port)
54063        port_help    $MISSING_DEPENDENCY ;;
54064      pkgutil)
54065        pkgutil_help $MISSING_DEPENDENCY ;;
54066      pkgadd)
54067        pkgadd_help  $MISSING_DEPENDENCY ;;
54068    esac
54069
54070    if test "x$PKGHANDLER_COMMAND" != x; then
54071      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54072    fi
54073  fi
54074
54075      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
54076    fi
54077
54078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
54079$as_echo_n "checking if libffi works... " >&6; }
54080    ac_ext=c
54081ac_cpp='$CPP $CPPFLAGS'
54082ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54083ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54084ac_compiler_gnu=$ac_cv_c_compiler_gnu
54085
54086    OLD_CFLAGS="$CFLAGS"
54087    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
54088    OLD_LIBS="$LIBS"
54089    LIBS="$LIBS $LIBFFI_LIBS"
54090    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54091/* end confdefs.h.  */
54092#include <ffi.h>
54093int
54094main ()
54095{
54096
54097          ffi_call(NULL, NULL, NULL, NULL);
54098          return 0;
54099
54100  ;
54101  return 0;
54102}
54103_ACEOF
54104if ac_fn_c_try_link "$LINENO"; then :
54105  LIBFFI_WORKS=yes
54106else
54107  LIBFFI_WORKS=no
54108
54109fi
54110rm -f core conftest.err conftest.$ac_objext \
54111    conftest$ac_exeext conftest.$ac_ext
54112    CFLAGS="$OLD_CFLAGS"
54113    LIBS="$OLD_LIBS"
54114    ac_ext=cpp
54115ac_cpp='$CXXCPP $CPPFLAGS'
54116ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54117ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54118ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54119
54120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
54121$as_echo "$LIBFFI_WORKS" >&6; }
54122
54123    if test "x$LIBFFI_WORKS" = xno; then
54124
54125  # Print a helpful message on how to acquire the necessary build dependency.
54126  # ffi is the help tag: freetype, cups, alsa etc
54127  MISSING_DEPENDENCY=ffi
54128
54129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54130    cygwin_help $MISSING_DEPENDENCY
54131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54132    msys_help $MISSING_DEPENDENCY
54133  else
54134    PKGHANDLER_COMMAND=
54135
54136    case $PKGHANDLER in
54137      apt-get)
54138        apt_help     $MISSING_DEPENDENCY ;;
54139      yum)
54140        yum_help     $MISSING_DEPENDENCY ;;
54141      port)
54142        port_help    $MISSING_DEPENDENCY ;;
54143      pkgutil)
54144        pkgutil_help $MISSING_DEPENDENCY ;;
54145      pkgadd)
54146        pkgadd_help  $MISSING_DEPENDENCY ;;
54147    esac
54148
54149    if test "x$PKGHANDLER_COMMAND" != x; then
54150      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54151    fi
54152  fi
54153
54154      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
54155    fi
54156  fi
54157
54158
54159
54160
54161
54162  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
54163    # Extract the first word of "llvm-config", so it can be a program name with args.
54164set dummy llvm-config; ac_word=$2
54165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
54166$as_echo_n "checking for $ac_word... " >&6; }
54167if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
54168  $as_echo_n "(cached) " >&6
54169else
54170  if test -n "$LLVM_CONFIG"; then
54171  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
54172else
54173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54174for as_dir in $PATH
54175do
54176  IFS=$as_save_IFS
54177  test -z "$as_dir" && as_dir=.
54178    for ac_exec_ext in '' $ac_executable_extensions; do
54179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
54180    ac_cv_prog_LLVM_CONFIG="llvm-config"
54181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
54182    break 2
54183  fi
54184done
54185  done
54186IFS=$as_save_IFS
54187
54188fi
54189fi
54190LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
54191if test -n "$LLVM_CONFIG"; then
54192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
54193$as_echo "$LLVM_CONFIG" >&6; }
54194else
54195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54196$as_echo "no" >&6; }
54197fi
54198
54199
54200
54201    if test "x$LLVM_CONFIG" != xllvm-config; then
54202      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
54203    fi
54204
54205    llvm_components="jit mcjit engine nativecodegen native"
54206    unset LLVM_CFLAGS
54207    for flag in $("$LLVM_CONFIG" --cxxflags); do
54208      if echo "${flag}" | grep -q '^-[ID]'; then
54209        if test "${flag}" != "-D_DEBUG" ; then
54210          if test "${LLVM_CFLAGS}" != "" ; then
54211            LLVM_CFLAGS="${LLVM_CFLAGS} "
54212          fi
54213          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
54214        fi
54215      fi
54216    done
54217    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
54218    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
54219
54220    unset LLVM_LDFLAGS
54221    for flag in $("${LLVM_CONFIG}" --ldflags); do
54222      if echo "${flag}" | grep -q '^-L'; then
54223        if test "${LLVM_LDFLAGS}" != ""; then
54224          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
54225        fi
54226        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
54227      fi
54228    done
54229
54230    unset LLVM_LIBS
54231    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
54232      if echo "${flag}" | grep -q '^-l'; then
54233        if test "${LLVM_LIBS}" != ""; then
54234          LLVM_LIBS="${LLVM_LIBS} "
54235        fi
54236        LLVM_LIBS="${LLVM_LIBS}${flag}"
54237      fi
54238    done
54239
54240
54241
54242
54243  fi
54244
54245
54246
54247# Check whether --with-libjpeg was given.
54248if test "${with_libjpeg+set}" = set; then :
54249  withval=$with_libjpeg;
54250fi
54251
54252
54253  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
54254$as_echo_n "checking for which libjpeg to use... " >&6; }
54255  # default is bundled
54256  DEFAULT_LIBJPEG=bundled
54257  # if user didn't specify, use DEFAULT_LIBJPEG
54258  if test "x${with_libjpeg}" = "x"; then
54259    with_libjpeg=${DEFAULT_LIBJPEG}
54260  fi
54261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
54262$as_echo "${with_libjpeg}" >&6; }
54263
54264  if test "x${with_libjpeg}" = "xbundled"; then
54265    USE_EXTERNAL_LIBJPEG=false
54266  elif test "x${with_libjpeg}" = "xsystem"; then
54267    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
54268if test "x$ac_cv_header_jpeglib_h" = xyes; then :
54269
54270else
54271   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
54272fi
54273
54274
54275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
54276$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
54277if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
54278  $as_echo_n "(cached) " >&6
54279else
54280  ac_check_lib_save_LIBS=$LIBS
54281LIBS="-ljpeg  $LIBS"
54282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54283/* end confdefs.h.  */
54284
54285/* Override any GCC internal prototype to avoid an error.
54286   Use char because int might match the return type of a GCC
54287   builtin and then its argument prototype would still apply.  */
54288#ifdef __cplusplus
54289extern "C"
54290#endif
54291char jpeg_CreateDecompress ();
54292int
54293main ()
54294{
54295return jpeg_CreateDecompress ();
54296  ;
54297  return 0;
54298}
54299_ACEOF
54300if ac_fn_cxx_try_link "$LINENO"; then :
54301  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
54302else
54303  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
54304fi
54305rm -f core conftest.err conftest.$ac_objext \
54306    conftest$ac_exeext conftest.$ac_ext
54307LIBS=$ac_check_lib_save_LIBS
54308fi
54309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
54310$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
54311if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
54312  cat >>confdefs.h <<_ACEOF
54313#define HAVE_LIBJPEG 1
54314_ACEOF
54315
54316  LIBS="-ljpeg $LIBS"
54317
54318else
54319   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
54320fi
54321
54322
54323    USE_EXTERNAL_LIBJPEG=true
54324  else
54325    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
54326  fi
54327
54328
54329
54330
54331
54332# Check whether --with-giflib was given.
54333if test "${with_giflib+set}" = set; then :
54334  withval=$with_giflib;
54335fi
54336
54337
54338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
54339$as_echo_n "checking for which giflib to use... " >&6; }
54340  # default is bundled
54341  DEFAULT_GIFLIB=bundled
54342  # if user didn't specify, use DEFAULT_GIFLIB
54343  if test "x${with_giflib}" = "x"; then
54344    with_giflib=${DEFAULT_GIFLIB}
54345  fi
54346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
54347$as_echo "${with_giflib}" >&6; }
54348
54349  if test "x${with_giflib}" = "xbundled"; then
54350    USE_EXTERNAL_LIBGIF=false
54351  elif test "x${with_giflib}" = "xsystem"; then
54352    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
54353if test "x$ac_cv_header_gif_lib_h" = xyes; then :
54354
54355else
54356   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
54357fi
54358
54359
54360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
54361$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
54362if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
54363  $as_echo_n "(cached) " >&6
54364else
54365  ac_check_lib_save_LIBS=$LIBS
54366LIBS="-lgif  $LIBS"
54367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54368/* end confdefs.h.  */
54369
54370/* Override any GCC internal prototype to avoid an error.
54371   Use char because int might match the return type of a GCC
54372   builtin and then its argument prototype would still apply.  */
54373#ifdef __cplusplus
54374extern "C"
54375#endif
54376char DGifGetCode ();
54377int
54378main ()
54379{
54380return DGifGetCode ();
54381  ;
54382  return 0;
54383}
54384_ACEOF
54385if ac_fn_cxx_try_link "$LINENO"; then :
54386  ac_cv_lib_gif_DGifGetCode=yes
54387else
54388  ac_cv_lib_gif_DGifGetCode=no
54389fi
54390rm -f core conftest.err conftest.$ac_objext \
54391    conftest$ac_exeext conftest.$ac_ext
54392LIBS=$ac_check_lib_save_LIBS
54393fi
54394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
54395$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
54396if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
54397  cat >>confdefs.h <<_ACEOF
54398#define HAVE_LIBGIF 1
54399_ACEOF
54400
54401  LIBS="-lgif $LIBS"
54402
54403else
54404   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
54405fi
54406
54407
54408    USE_EXTERNAL_LIBGIF=true
54409  else
54410    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
54411  fi
54412
54413
54414
54415
54416
54417# Check whether --with-libpng was given.
54418if test "${with_libpng+set}" = set; then :
54419  withval=$with_libpng;
54420fi
54421
54422
54423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
54424$as_echo_n "checking for which libpng to use... " >&6; }
54425
54426  # default is bundled
54427  DEFAULT_LIBPNG=bundled
54428  # if user didn't specify, use DEFAULT_LIBPNG
54429  if test "x${with_libpng}" = "x"; then
54430      with_libpng=${DEFAULT_LIBPNG}
54431  fi
54432
54433  if test "x${with_libpng}" = "xbundled"; then
54434      USE_EXTERNAL_LIBPNG=false
54435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54436$as_echo "bundled" >&6; }
54437  elif test "x${with_libpng}" = "xsystem"; then
54438
54439pkg_failed=no
54440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
54441$as_echo_n "checking for PNG... " >&6; }
54442
54443if test -n "$PNG_CFLAGS"; then
54444    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
54445 elif test -n "$PKG_CONFIG"; then
54446    if test -n "$PKG_CONFIG" && \
54447    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54448  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54449  ac_status=$?
54450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54451  test $ac_status = 0; }; then
54452  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
54453else
54454  pkg_failed=yes
54455fi
54456 else
54457    pkg_failed=untried
54458fi
54459if test -n "$PNG_LIBS"; then
54460    pkg_cv_PNG_LIBS="$PNG_LIBS"
54461 elif test -n "$PKG_CONFIG"; then
54462    if test -n "$PKG_CONFIG" && \
54463    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54464  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54465  ac_status=$?
54466  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54467  test $ac_status = 0; }; then
54468  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
54469else
54470  pkg_failed=yes
54471fi
54472 else
54473    pkg_failed=untried
54474fi
54475
54476
54477
54478if test $pkg_failed = yes; then
54479
54480if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54481        _pkg_short_errors_supported=yes
54482else
54483        _pkg_short_errors_supported=no
54484fi
54485        if test $_pkg_short_errors_supported = yes; then
54486	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
54487        else
54488	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
54489        fi
54490	# Put the nasty error message in config.log where it belongs
54491	echo "$PNG_PKG_ERRORS" >&5
54492
54493	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54494$as_echo "no" >&6; }
54495                 LIBPNG_FOUND=no
54496elif test $pkg_failed = untried; then
54497	 LIBPNG_FOUND=no
54498else
54499	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
54500	PNG_LIBS=$pkg_cv_PNG_LIBS
54501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54502$as_echo "yes" >&6; }
54503	 LIBPNG_FOUND=yes
54504fi
54505      if test "x${LIBPNG_FOUND}" = "xyes"; then
54506          USE_EXTERNAL_LIBPNG=true
54507          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54508$as_echo "system" >&6; }
54509      else
54510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54511$as_echo "system not found" >&6; }
54512          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
54513      fi
54514  else
54515      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
54516  fi
54517
54518
54519
54520
54521
54522# Check whether --with-zlib was given.
54523if test "${with_zlib+set}" = set; then :
54524  withval=$with_zlib;
54525fi
54526
54527
54528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
54529$as_echo_n "checking for compress in -lz... " >&6; }
54530if ${ac_cv_lib_z_compress+:} false; then :
54531  $as_echo_n "(cached) " >&6
54532else
54533  ac_check_lib_save_LIBS=$LIBS
54534LIBS="-lz  $LIBS"
54535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54536/* end confdefs.h.  */
54537
54538/* Override any GCC internal prototype to avoid an error.
54539   Use char because int might match the return type of a GCC
54540   builtin and then its argument prototype would still apply.  */
54541#ifdef __cplusplus
54542extern "C"
54543#endif
54544char compress ();
54545int
54546main ()
54547{
54548return compress ();
54549  ;
54550  return 0;
54551}
54552_ACEOF
54553if ac_fn_cxx_try_link "$LINENO"; then :
54554  ac_cv_lib_z_compress=yes
54555else
54556  ac_cv_lib_z_compress=no
54557fi
54558rm -f core conftest.err conftest.$ac_objext \
54559    conftest$ac_exeext conftest.$ac_ext
54560LIBS=$ac_check_lib_save_LIBS
54561fi
54562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
54563$as_echo "$ac_cv_lib_z_compress" >&6; }
54564if test "x$ac_cv_lib_z_compress" = xyes; then :
54565   ZLIB_FOUND=yes
54566else
54567   ZLIB_FOUND=no
54568fi
54569
54570
54571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
54572$as_echo_n "checking for which zlib to use... " >&6; }
54573
54574  DEFAULT_ZLIB=bundled
54575  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
54576    # On macosx default is system...on others default is bundled
54577    DEFAULT_ZLIB=system
54578  fi
54579
54580  if test "x${ZLIB_FOUND}" != "xyes"; then
54581    # If we don't find any system...set default to bundled
54582    DEFAULT_ZLIB=bundled
54583  fi
54584
54585  # If user didn't specify, use DEFAULT_ZLIB
54586  if test "x${with_zlib}" = "x"; then
54587    with_zlib=${DEFAULT_ZLIB}
54588  fi
54589
54590  if test "x${with_zlib}" = "xbundled"; then
54591    USE_EXTERNAL_LIBZ=false
54592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54593$as_echo "bundled" >&6; }
54594  elif test "x${with_zlib}" = "xsystem"; then
54595    if test "x${ZLIB_FOUND}" = "xyes"; then
54596      USE_EXTERNAL_LIBZ=true
54597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54598$as_echo "system" >&6; }
54599    else
54600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54601$as_echo "system not found" >&6; }
54602      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
54603    fi
54604  else
54605    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
54606  fi
54607
54608
54609
54610
54611
54612# Check whether --with-lcms was given.
54613if test "${with_lcms+set}" = set; then :
54614  withval=$with_lcms;
54615fi
54616
54617
54618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
54619$as_echo_n "checking for which lcms to use... " >&6; }
54620
54621  DEFAULT_LCMS=bundled
54622  # If user didn't specify, use DEFAULT_LCMS
54623  if test "x${with_lcms}" = "x"; then
54624      with_lcms=${DEFAULT_LCMS}
54625  fi
54626
54627  if test "x${with_lcms}" = "xbundled"; then
54628    USE_EXTERNAL_LCMS=false
54629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54630$as_echo "bundled" >&6; }
54631  elif test "x${with_lcms}" = "xsystem"; then
54632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54633$as_echo "system" >&6; }
54634
54635pkg_failed=no
54636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
54637$as_echo_n "checking for LCMS... " >&6; }
54638
54639if test -n "$LCMS_CFLAGS"; then
54640    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
54641 elif test -n "$PKG_CONFIG"; then
54642    if test -n "$PKG_CONFIG" && \
54643    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54644  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54645  ac_status=$?
54646  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54647  test $ac_status = 0; }; then
54648  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
54649else
54650  pkg_failed=yes
54651fi
54652 else
54653    pkg_failed=untried
54654fi
54655if test -n "$LCMS_LIBS"; then
54656    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
54657 elif test -n "$PKG_CONFIG"; then
54658    if test -n "$PKG_CONFIG" && \
54659    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54660  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54661  ac_status=$?
54662  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54663  test $ac_status = 0; }; then
54664  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
54665else
54666  pkg_failed=yes
54667fi
54668 else
54669    pkg_failed=untried
54670fi
54671
54672
54673
54674if test $pkg_failed = yes; then
54675
54676if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54677        _pkg_short_errors_supported=yes
54678else
54679        _pkg_short_errors_supported=no
54680fi
54681        if test $_pkg_short_errors_supported = yes; then
54682	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
54683        else
54684	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
54685        fi
54686	# Put the nasty error message in config.log where it belongs
54687	echo "$LCMS_PKG_ERRORS" >&5
54688
54689	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54690$as_echo "no" >&6; }
54691                LCMS_FOUND=no
54692elif test $pkg_failed = untried; then
54693	LCMS_FOUND=no
54694else
54695	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
54696	LCMS_LIBS=$pkg_cv_LCMS_LIBS
54697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54698$as_echo "yes" >&6; }
54699	LCMS_FOUND=yes
54700fi
54701    if test "x${LCMS_FOUND}" = "xyes"; then
54702      USE_EXTERNAL_LCMS=true
54703    else
54704      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
54705    fi
54706  else
54707    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
54708  fi
54709
54710
54711
54712
54713
54714
54715
54716
54717
54718
54719
54720  # Setup libm (the maths library)
54721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
54722$as_echo_n "checking for cos in -lm... " >&6; }
54723if ${ac_cv_lib_m_cos+:} false; then :
54724  $as_echo_n "(cached) " >&6
54725else
54726  ac_check_lib_save_LIBS=$LIBS
54727LIBS="-lm  $LIBS"
54728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54729/* end confdefs.h.  */
54730
54731/* Override any GCC internal prototype to avoid an error.
54732   Use char because int might match the return type of a GCC
54733   builtin and then its argument prototype would still apply.  */
54734#ifdef __cplusplus
54735extern "C"
54736#endif
54737char cos ();
54738int
54739main ()
54740{
54741return cos ();
54742  ;
54743  return 0;
54744}
54745_ACEOF
54746if ac_fn_cxx_try_link "$LINENO"; then :
54747  ac_cv_lib_m_cos=yes
54748else
54749  ac_cv_lib_m_cos=no
54750fi
54751rm -f core conftest.err conftest.$ac_objext \
54752    conftest$ac_exeext conftest.$ac_ext
54753LIBS=$ac_check_lib_save_LIBS
54754fi
54755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
54756$as_echo "$ac_cv_lib_m_cos" >&6; }
54757if test "x$ac_cv_lib_m_cos" = xyes; then :
54758  cat >>confdefs.h <<_ACEOF
54759#define HAVE_LIBM 1
54760_ACEOF
54761
54762  LIBS="-lm $LIBS"
54763
54764else
54765
54766      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
54767$as_echo "$as_me: Maths library was not found" >&6;}
54768
54769fi
54770
54771  LIBM=-lm
54772
54773
54774  # Setup libdl (for dynamic library loading)
54775  save_LIBS="$LIBS"
54776  LIBS=""
54777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54778$as_echo_n "checking for dlopen in -ldl... " >&6; }
54779if ${ac_cv_lib_dl_dlopen+:} false; then :
54780  $as_echo_n "(cached) " >&6
54781else
54782  ac_check_lib_save_LIBS=$LIBS
54783LIBS="-ldl  $LIBS"
54784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54785/* end confdefs.h.  */
54786
54787/* Override any GCC internal prototype to avoid an error.
54788   Use char because int might match the return type of a GCC
54789   builtin and then its argument prototype would still apply.  */
54790#ifdef __cplusplus
54791extern "C"
54792#endif
54793char dlopen ();
54794int
54795main ()
54796{
54797return dlopen ();
54798  ;
54799  return 0;
54800}
54801_ACEOF
54802if ac_fn_cxx_try_link "$LINENO"; then :
54803  ac_cv_lib_dl_dlopen=yes
54804else
54805  ac_cv_lib_dl_dlopen=no
54806fi
54807rm -f core conftest.err conftest.$ac_objext \
54808    conftest$ac_exeext conftest.$ac_ext
54809LIBS=$ac_check_lib_save_LIBS
54810fi
54811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54812$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
54813if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
54814  cat >>confdefs.h <<_ACEOF
54815#define HAVE_LIBDL 1
54816_ACEOF
54817
54818  LIBS="-ldl $LIBS"
54819
54820fi
54821
54822  LIBDL="$LIBS"
54823
54824  LIBS="$save_LIBS"
54825
54826  # Deprecated libraries, keep the flags for backwards compatibility
54827  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54828
54829
54830# Check whether --with-dxsdk was given.
54831if test "${with_dxsdk+set}" = set; then :
54832  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
54833$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
54834fi
54835
54836
54837
54838
54839# Check whether --with-dxsdk-lib was given.
54840if test "${with_dxsdk_lib+set}" = set; then :
54841  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
54842$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
54843fi
54844
54845
54846
54847
54848# Check whether --with-dxsdk-include was given.
54849if test "${with_dxsdk_include+set}" = set; then :
54850  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
54851$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
54852fi
54853
54854
54855  fi
54856
54857  # Control if libzip can use mmap. Available for purposes of overriding.
54858  LIBZIP_CAN_USE_MMAP=true
54859
54860
54861
54862
54863
54864
54865
54866
54867
54868
54869
54870
54871
54872
54873###############################################################################
54874#
54875# We need to do some final tweaking, when everything else is done.
54876#
54877###############################################################################
54878
54879
54880  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
54881
54882
54883  # The name of the Service Agent jar.
54884  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
54885  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54886    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
54887  fi
54888
54889
54890
54891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
54892$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
54893
54894  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
54895    ENABLE_INTREE_EC=yes
54896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54897$as_echo "yes" >&6; }
54898  else
54899    ENABLE_INTREE_EC=no
54900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54901$as_echo "no" >&6; }
54902  fi
54903
54904
54905
54906
54907###############################################################################
54908#
54909# Configure parts of the build that only affect the build performance,
54910# not the result.
54911#
54912###############################################################################
54913
54914
54915  # How many cores do we have on this build system?
54916
54917# Check whether --with-num-cores was given.
54918if test "${with_num_cores+set}" = set; then :
54919  withval=$with_num_cores;
54920fi
54921
54922  if test "x$with_num_cores" = x; then
54923    # The number of cores were not specified, try to probe them.
54924
54925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
54926$as_echo_n "checking for number of cores... " >&6; }
54927  NUM_CORES=1
54928  FOUND_CORES=no
54929
54930  if test -f /proc/cpuinfo; then
54931    # Looks like a Linux (or cygwin) system
54932    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
54933    FOUND_CORES=yes
54934  elif test -x /usr/sbin/psrinfo; then
54935    # Looks like a Solaris system
54936    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
54937    FOUND_CORES=yes
54938  elif test -x /usr/sbin/system_profiler; then
54939    # Looks like a MacOSX system
54940    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
54941    FOUND_CORES=yes
54942  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
54943    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
54944    FOUND_CORES=yes
54945  elif test -n "$NUMBER_OF_PROCESSORS"; then
54946    # On windows, look in the env
54947    NUM_CORES=$NUMBER_OF_PROCESSORS
54948    FOUND_CORES=yes
54949  fi
54950
54951  if test "x$FOUND_CORES" = xyes; then
54952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
54953$as_echo "$NUM_CORES" >&6; }
54954  else
54955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
54956$as_echo "could not detect number of cores, defaulting to 1" >&6; }
54957    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
54958$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
54959  fi
54960
54961  else
54962    NUM_CORES=$with_num_cores
54963  fi
54964
54965
54966
54967  # How much memory do we have on this build system?
54968
54969# Check whether --with-memory-size was given.
54970if test "${with_memory_size+set}" = set; then :
54971  withval=$with_memory_size;
54972fi
54973
54974  if test "x$with_memory_size" = x; then
54975    # The memory size was not specified, try to probe it.
54976
54977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
54978$as_echo_n "checking for memory size... " >&6; }
54979  # Default to 1024 MB
54980  MEMORY_SIZE=1024
54981  FOUND_MEM=no
54982
54983  if test -f /proc/meminfo; then
54984    # Looks like a Linux (or cygwin) system
54985    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
54986    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
54987    FOUND_MEM=yes
54988  elif test -x /usr/sbin/prtconf; then
54989    # Looks like a Solaris or AIX system
54990    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
54991    FOUND_MEM=yes
54992  elif test -x /usr/sbin/system_profiler; then
54993    # Looks like a MacOSX system
54994    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
54995    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
54996    FOUND_MEM=yes
54997  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
54998    # Windows, but without cygwin
54999    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
55000    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
55001    FOUND_MEM=yes
55002  fi
55003
55004  if test "x$FOUND_MEM" = xyes; then
55005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
55006$as_echo "$MEMORY_SIZE MB" >&6; }
55007  else
55008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
55009$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
55010    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
55011$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
55012  fi
55013
55014  else
55015    MEMORY_SIZE=$with_memory_size
55016  fi
55017
55018
55019
55020  # Provide a decent default number of parallel jobs for make depending on
55021  # number of cores, amount of memory and machine architecture.
55022
55023# Check whether --with-jobs was given.
55024if test "${with_jobs+set}" = set; then :
55025  withval=$with_jobs;
55026fi
55027
55028  if test "x$with_jobs" = x; then
55029    # Number of jobs was not specified, calculate.
55030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
55031$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
55032    # Approximate memory in GB.
55033    memory_gb=`expr $MEMORY_SIZE / 1024`
55034    # Pick the lowest of memory in gb and number of cores.
55035    if test "$memory_gb" -lt "$NUM_CORES"; then
55036      JOBS="$memory_gb"
55037    else
55038      JOBS="$NUM_CORES"
55039      # On bigger machines, leave some room for other processes to run
55040      if test "$JOBS" -gt "4"; then
55041        JOBS=`expr $JOBS '*' 90 / 100`
55042      fi
55043    fi
55044    # Cap number of jobs to 16
55045    if test "$JOBS" -gt "16"; then
55046      JOBS=16
55047    fi
55048    if test "$JOBS" -eq "0"; then
55049      JOBS=1
55050    fi
55051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
55052$as_echo "$JOBS" >&6; }
55053  else
55054    JOBS=$with_jobs
55055  fi
55056
55057
55058
55059# Setup arguments for the boot jdk (after cores and memory have been setup)
55060
55061  ##############################################################################
55062  #
55063  # Specify jvm options for anything that is run with the Boot JDK.
55064  # Not all JVM:s accept the same arguments on the command line.
55065  #
55066
55067# Check whether --with-boot-jdk-jvmargs was given.
55068if test "${with_boot_jdk_jvmargs+set}" = set; then :
55069  withval=$with_boot_jdk_jvmargs;
55070fi
55071
55072
55073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
55074$as_echo_n "checking flags for boot jdk java command ... " >&6; }
55075
55076  # Disable special log output when a debug build is used as Boot JDK...
55077
55078  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
55079  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
55080  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
55081  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55082  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55083  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55084    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
55085    JVM_ARG_OK=true
55086  else
55087    $ECHO "Arg failed:" >&5
55088    $ECHO "$OUTPUT" >&5
55089    JVM_ARG_OK=false
55090  fi
55091
55092
55093  # Apply user provided options.
55094
55095  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
55096  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
55097  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
55098  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55099  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55100  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55101    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
55102    JVM_ARG_OK=true
55103  else
55104    $ECHO "Arg failed:" >&5
55105    $ECHO "$OUTPUT" >&5
55106    JVM_ARG_OK=false
55107  fi
55108
55109
55110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
55111$as_echo "$boot_jdk_jvmargs" >&6; }
55112
55113  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
55114  JAVA_FLAGS=$boot_jdk_jvmargs
55115
55116
55117
55118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
55119$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
55120
55121  # Starting amount of heap memory.
55122
55123  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
55124  $ECHO "Command: $JAVA -Xms64M -version" >&5
55125  OUTPUT=`$JAVA -Xms64M -version 2>&1`
55126  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55127  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55128  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55129    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
55130    JVM_ARG_OK=true
55131  else
55132    $ECHO "Arg failed:" >&5
55133    $ECHO "$OUTPUT" >&5
55134    JVM_ARG_OK=false
55135  fi
55136
55137
55138  # Maximum amount of heap memory.
55139  # Maximum stack size.
55140  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
55141  if test "x$BOOT_JDK_BITS" = "x32"; then
55142    if test "$JVM_MAX_HEAP" -gt "1100"; then
55143      JVM_MAX_HEAP=1100
55144    elif test "$JVM_MAX_HEAP" -lt "512"; then
55145      JVM_MAX_HEAP=512
55146    fi
55147    STACK_SIZE=768
55148  else
55149    # Running a 64 bit JVM allows for and requires a bigger heap
55150    if test "$JVM_MAX_HEAP" -gt "1600"; then
55151      JVM_MAX_HEAP=1600
55152    elif test "$JVM_MAX_HEAP" -lt "512"; then
55153      JVM_MAX_HEAP=512
55154    fi
55155    STACK_SIZE=1536
55156  fi
55157
55158  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
55159  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
55160  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
55161  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55162  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55163  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55164    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
55165    JVM_ARG_OK=true
55166  else
55167    $ECHO "Arg failed:" >&5
55168    $ECHO "$OUTPUT" >&5
55169    JVM_ARG_OK=false
55170  fi
55171
55172
55173  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
55174  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
55175  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
55176  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55177  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55178  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55179    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
55180    JVM_ARG_OK=true
55181  else
55182    $ECHO "Arg failed:" >&5
55183    $ECHO "$OUTPUT" >&5
55184    JVM_ARG_OK=false
55185  fi
55186
55187
55188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
55189$as_echo "$boot_jdk_jvmargs_big" >&6; }
55190
55191  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
55192
55193
55194
55195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
55196$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
55197
55198  # Use serial gc for small short lived tools if possible
55199
55200  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
55201  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
55202  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
55203  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55204  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55205  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55206    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
55207    JVM_ARG_OK=true
55208  else
55209    $ECHO "Arg failed:" >&5
55210    $ECHO "$OUTPUT" >&5
55211    JVM_ARG_OK=false
55212  fi
55213
55214
55215  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
55216  $ECHO "Command: $JAVA -Xms32M -version" >&5
55217  OUTPUT=`$JAVA -Xms32M -version 2>&1`
55218  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55219  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55220  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55221    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
55222    JVM_ARG_OK=true
55223  else
55224    $ECHO "Arg failed:" >&5
55225    $ECHO "$OUTPUT" >&5
55226    JVM_ARG_OK=false
55227  fi
55228
55229
55230  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
55231  $ECHO "Command: $JAVA -Xmx512M -version" >&5
55232  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
55233  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55234  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55235  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55236    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
55237    JVM_ARG_OK=true
55238  else
55239    $ECHO "Arg failed:" >&5
55240    $ECHO "$OUTPUT" >&5
55241    JVM_ARG_OK=false
55242  fi
55243
55244
55245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
55246$as_echo "$boot_jdk_jvmargs_small" >&6; }
55247
55248  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
55249
55250
55251  JAVA_TOOL_FLAGS_SMALL=""
55252  for f in $JAVA_FLAGS_SMALL; do
55253    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
55254  done
55255
55256
55257
55258# Setup smart javac (after cores and memory have been setup)
55259
55260
55261# Check whether --with-sjavac-server-java was given.
55262if test "${with_sjavac_server_java+set}" = set; then :
55263  withval=$with_sjavac_server_java;
55264fi
55265
55266
55267  if test "x$with_sjavac_server_java" != x; then
55268    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
55269    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
55270    if test "x$FOUND_VERSION" = x; then
55271      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
55272    fi
55273  else
55274    SJAVAC_SERVER_JAVA="$JAVA"
55275  fi
55276
55277
55278  if test "$MEMORY_SIZE" -gt "3000"; then
55279
55280  $ECHO "Check if jvm arg is ok: -d64" >&5
55281  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
55282  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
55283  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55284  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55285  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55286    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
55287    JVM_ARG_OK=true
55288  else
55289    $ECHO "Arg failed:" >&5
55290    $ECHO "$OUTPUT" >&5
55291    JVM_ARG_OK=false
55292  fi
55293
55294    if test "$JVM_ARG_OK" = true; then
55295      JVM_64BIT=true
55296      JVM_ARG_OK=false
55297    fi
55298  fi
55299
55300  MX_VALUE=`expr $MEMORY_SIZE / 2`
55301  if test "$JVM_64BIT" = true; then
55302    # Set ms lower than mx since more than one instance of the server might
55303    # get launched at the same time before they figure out which instance won.
55304    MS_VALUE=512
55305    if test "$MX_VALUE" -gt "2048"; then
55306      MX_VALUE=2048
55307    fi
55308  else
55309    MS_VALUE=256
55310    if test "$MX_VALUE" -gt "1500"; then
55311      MX_VALUE=1500
55312    fi
55313  fi
55314  if test "$MX_VALUE" -lt "512"; then
55315    MX_VALUE=512
55316  fi
55317
55318  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
55319  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
55320  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
55321  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55322  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55323  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55324    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
55325    JVM_ARG_OK=true
55326  else
55327    $ECHO "Arg failed:" >&5
55328    $ECHO "$OUTPUT" >&5
55329    JVM_ARG_OK=false
55330  fi
55331
55332
55333
55334  # Check whether --enable-sjavac was given.
55335if test "${enable_sjavac+set}" = set; then :
55336  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
55337else
55338  ENABLE_SJAVAC="no"
55339fi
55340
55341  if test "x$JVM_ARG_OK" = "xfalse"; then
55342    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
55343$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
55344    ENABLE_SJAVAC="no"
55345  fi
55346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
55347$as_echo_n "checking whether to use sjavac... " >&6; }
55348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
55349$as_echo "$ENABLE_SJAVAC" >&6; }
55350
55351
55352  # Check whether --enable-javac-server was given.
55353if test "${enable_javac_server+set}" = set; then :
55354  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
55355else
55356  ENABLE_JAVAC_SERVER="no"
55357fi
55358
55359  if test "x$JVM_ARG_OK" = "xfalse"; then
55360    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
55361$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
55362    ENABLE_JAVAC_SERVER="no"
55363  fi
55364  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
55365$as_echo_n "checking whether to use javac server... " >&6; }
55366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
55367$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
55368
55369
55370
55371# Can the C/C++ compiler use precompiled headers?
55372
55373
55374  ###############################################################################
55375  #
55376  # Can the C/C++ compiler use precompiled headers?
55377  #
55378  # Check whether --enable-precompiled-headers was given.
55379if test "${enable_precompiled_headers+set}" = set; then :
55380  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
55381else
55382  ENABLE_PRECOMPH=yes
55383fi
55384
55385
55386  USE_PRECOMPILED_HEADER=1
55387  if test "x$ENABLE_PRECOMPH" = xno; then
55388    USE_PRECOMPILED_HEADER=0
55389  fi
55390
55391  if test "x$ENABLE_PRECOMPH" = xyes; then
55392    # Check that the compiler actually supports precomp headers.
55393    if test "x$TOOLCHAIN_TYPE" = xgcc; then
55394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
55395$as_echo_n "checking that precompiled headers work... " >&6; }
55396      echo "int alfa();" > conftest.h
55397      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
55398      if test ! -f conftest.hpp.gch; then
55399        USE_PRECOMPILED_HEADER=0
55400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55401$as_echo "no" >&6; }
55402      else
55403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55404$as_echo "yes" >&6; }
55405      fi
55406      rm -f conftest.h conftest.hpp.gch
55407    fi
55408  fi
55409
55410
55411
55412
55413# Setup use of ccache, if available
55414
55415  # Check whether --enable-ccache was given.
55416if test "${enable_ccache+set}" = set; then :
55417  enableval=$enable_ccache;
55418fi
55419
55420
55421  CCACHE=
55422  CCACHE_STATUS=
55423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
55424$as_echo_n "checking is ccache enabled... " >&6; }
55425  if test "x$enable_ccache" = xyes; then
55426    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
55427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55428$as_echo "yes" >&6; }
55429      OLD_PATH="$PATH"
55430      if test "x$TOOLCHAIN_PATH" != x; then
55431        PATH=$TOOLCHAIN_PATH:$PATH
55432      fi
55433
55434
55435
55436  # Publish this variable in the help.
55437
55438
55439  if [ -z "${CCACHE+x}" ]; then
55440    # The variable is not set by user, try to locate tool using the code snippet
55441    for ac_prog in ccache
55442do
55443  # Extract the first word of "$ac_prog", so it can be a program name with args.
55444set dummy $ac_prog; ac_word=$2
55445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55446$as_echo_n "checking for $ac_word... " >&6; }
55447if ${ac_cv_path_CCACHE+:} false; then :
55448  $as_echo_n "(cached) " >&6
55449else
55450  case $CCACHE in
55451  [\\/]* | ?:[\\/]*)
55452  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55453  ;;
55454  *)
55455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55456for as_dir in $PATH
55457do
55458  IFS=$as_save_IFS
55459  test -z "$as_dir" && as_dir=.
55460    for ac_exec_ext in '' $ac_executable_extensions; do
55461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55462    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55464    break 2
55465  fi
55466done
55467  done
55468IFS=$as_save_IFS
55469
55470  ;;
55471esac
55472fi
55473CCACHE=$ac_cv_path_CCACHE
55474if test -n "$CCACHE"; then
55475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55476$as_echo "$CCACHE" >&6; }
55477else
55478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55479$as_echo "no" >&6; }
55480fi
55481
55482
55483  test -n "$CCACHE" && break
55484done
55485
55486  else
55487    # The variable is set, but is it from the command line or the environment?
55488
55489    # Try to remove the string !CCACHE! from our list.
55490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
55491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
55492      # If it failed, the variable was not from the command line. Ignore it,
55493      # but warn the user (except for BASH, which is always set by the calling BASH).
55494      if test "xCCACHE" != xBASH; then
55495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
55496$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
55497      fi
55498      # Try to locate tool using the code snippet
55499      for ac_prog in ccache
55500do
55501  # Extract the first word of "$ac_prog", so it can be a program name with args.
55502set dummy $ac_prog; ac_word=$2
55503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55504$as_echo_n "checking for $ac_word... " >&6; }
55505if ${ac_cv_path_CCACHE+:} false; then :
55506  $as_echo_n "(cached) " >&6
55507else
55508  case $CCACHE in
55509  [\\/]* | ?:[\\/]*)
55510  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55511  ;;
55512  *)
55513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55514for as_dir in $PATH
55515do
55516  IFS=$as_save_IFS
55517  test -z "$as_dir" && as_dir=.
55518    for ac_exec_ext in '' $ac_executable_extensions; do
55519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55520    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55522    break 2
55523  fi
55524done
55525  done
55526IFS=$as_save_IFS
55527
55528  ;;
55529esac
55530fi
55531CCACHE=$ac_cv_path_CCACHE
55532if test -n "$CCACHE"; then
55533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55534$as_echo "$CCACHE" >&6; }
55535else
55536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55537$as_echo "no" >&6; }
55538fi
55539
55540
55541  test -n "$CCACHE" && break
55542done
55543
55544    else
55545      # If it succeeded, then it was overridden by the user. We will use it
55546      # for the tool.
55547
55548      # First remove it from the list of overridden variables, so we can test
55549      # for unknown variables in the end.
55550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
55551
55552      # Check if we try to supply an empty value
55553      if test "x$CCACHE" = x; then
55554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
55555$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
55556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55557$as_echo_n "checking for CCACHE... " >&6; }
55558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
55559$as_echo "disabled" >&6; }
55560      else
55561        # Check if the provided tool contains a complete path.
55562        tool_specified="$CCACHE"
55563        tool_basename="${tool_specified##*/}"
55564        if test "x$tool_basename" = "x$tool_specified"; then
55565          # A command without a complete path is provided, search $PATH.
55566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
55567$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
55568          # Extract the first word of "$tool_basename", so it can be a program name with args.
55569set dummy $tool_basename; ac_word=$2
55570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55571$as_echo_n "checking for $ac_word... " >&6; }
55572if ${ac_cv_path_CCACHE+:} false; then :
55573  $as_echo_n "(cached) " >&6
55574else
55575  case $CCACHE in
55576  [\\/]* | ?:[\\/]*)
55577  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55578  ;;
55579  *)
55580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55581for as_dir in $PATH
55582do
55583  IFS=$as_save_IFS
55584  test -z "$as_dir" && as_dir=.
55585    for ac_exec_ext in '' $ac_executable_extensions; do
55586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55587    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55589    break 2
55590  fi
55591done
55592  done
55593IFS=$as_save_IFS
55594
55595  ;;
55596esac
55597fi
55598CCACHE=$ac_cv_path_CCACHE
55599if test -n "$CCACHE"; then
55600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55601$as_echo "$CCACHE" >&6; }
55602else
55603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55604$as_echo "no" >&6; }
55605fi
55606
55607
55608          if test "x$CCACHE" = x; then
55609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
55610          fi
55611        else
55612          # Otherwise we believe it is a complete path. Use it as it is.
55613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
55614$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
55615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55616$as_echo_n "checking for CCACHE... " >&6; }
55617          if test ! -x "$tool_specified"; then
55618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
55619$as_echo "not found" >&6; }
55620            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
55621          fi
55622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
55623$as_echo "$tool_specified" >&6; }
55624        fi
55625      fi
55626    fi
55627
55628  fi
55629
55630
55631
55632  if test "x$CCACHE" = x; then
55633    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
55634  fi
55635
55636
55637      PATH="$OLD_PATH"
55638      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
55639      CCACHE_STATUS="Active ($CCACHE_VERSION)"
55640    else
55641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55642$as_echo "no" >&6; }
55643      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
55644$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
55645    fi
55646  elif test "x$enable_ccache" = xno; then
55647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
55648$as_echo "no, explicitly disabled" >&6; }
55649    CCACHE_STATUS="Disabled"
55650  elif test "x$enable_ccache" = x; then
55651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55652$as_echo "no" >&6; }
55653  else
55654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
55655$as_echo "unknown" >&6; }
55656    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
55657  fi
55658
55659
55660
55661# Check whether --with-ccache-dir was given.
55662if test "${with_ccache_dir+set}" = set; then :
55663  withval=$with_ccache_dir;
55664fi
55665
55666
55667  if test "x$with_ccache_dir" != x; then
55668    # When using a non home ccache directory, assume the use is to share ccache files
55669    # with other users. Thus change the umask.
55670    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
55671    if test "x$CCACHE" = x; then
55672      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
55673$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
55674    fi
55675  fi
55676
55677  if test "x$CCACHE" != x; then
55678
55679  if test "x$CCACHE" != x; then
55680    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
55681      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
55682          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
55683      if test "x$HAS_BAD_CCACHE" != "x"; then
55684        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
55685      fi
55686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
55687$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
55688      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
55689      PUSHED_FLAGS="$CXXFLAGS"
55690      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
55691      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55692/* end confdefs.h.  */
55693
55694int
55695main ()
55696{
55697
55698  ;
55699  return 0;
55700}
55701_ACEOF
55702if ac_fn_cxx_try_compile "$LINENO"; then :
55703  CC_KNOWS_CCACHE_TRICK=yes
55704else
55705  CC_KNOWS_CCACHE_TRICK=no
55706fi
55707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55708      CXXFLAGS="$PUSHED_FLAGS"
55709      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
55710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55711$as_echo "yes" >&6; }
55712        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
55713
55714        CCACHE_SLOPPINESS=pch_defines,time_macros
55715      else
55716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55717$as_echo "no" >&6; }
55718        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
55719      fi
55720    fi
55721
55722    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
55723        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
55724
55725    if test "x$SET_CCACHE_DIR" != x; then
55726      mkdir -p $CCACHE_DIR > /dev/null 2>&1
55727      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
55728    fi
55729  fi
55730
55731  fi
55732
55733
55734###############################################################################
55735#
55736# And now the finish...
55737#
55738###############################################################################
55739
55740# Check for some common pitfalls
55741
55742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55743    file_to_test="$SRC_ROOT/LICENSE"
55744    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
55745      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
55746    fi
55747  fi
55748
55749
55750  # Did user specify any unknown variables?
55751
55752  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
55753    # Replace the separating ! with spaces before presenting for end user.
55754    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
55755    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
55756$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
55757  fi
55758
55759
55760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
55761$as_echo_n "checking if build directory is on local disk... " >&6; }
55762
55763  # df -l lists only local disks; if the given directory is not found then
55764  # a non-zero exit code is given
55765  if test "x$DF" = x; then
55766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55767      # msys does not have df; use Windows "net use" instead.
55768      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
55769      if test "x$IS_NETWORK_DISK" = x; then
55770        OUTPUT_DIR_IS_LOCAL="yes"
55771      else
55772        OUTPUT_DIR_IS_LOCAL="no"
55773      fi
55774    else
55775      # No df here, say it's local
55776      OUTPUT_DIR_IS_LOCAL="yes"
55777    fi
55778  else
55779    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
55780      OUTPUT_DIR_IS_LOCAL="yes"
55781    else
55782      OUTPUT_DIR_IS_LOCAL="no"
55783    fi
55784  fi
55785
55786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
55787$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
55788
55789
55790
55791  # Check if the user has any old-style ALT_ variables set.
55792  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
55793
55794  # Before generating output files, test if they exist. If they do, this is a reconfigure.
55795  # Since we can't properly handle the dependencies for this, warn the user about the situation
55796  if test -e $OUTPUT_ROOT/spec.gmk; then
55797    IS_RECONFIGURE=yes
55798  else
55799    IS_RECONFIGURE=no
55800  fi
55801
55802
55803# At the end, call the custom hook. (Dummy macro if no custom sources available)
55804
55805
55806# We're messing a bit with internal autoconf variables to put the config.status
55807# in the output directory instead of the current directory.
55808CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
55809
55810# Create the actual output files. Now the main work of configure is done.
55811cat >confcache <<\_ACEOF
55812# This file is a shell script that caches the results of configure
55813# tests run on this system so they can be shared between configure
55814# scripts and configure runs, see configure's option --config-cache.
55815# It is not useful on other systems.  If it contains results you don't
55816# want to keep, you may remove or edit it.
55817#
55818# config.status only pays attention to the cache file if you give it
55819# the --recheck option to rerun configure.
55820#
55821# `ac_cv_env_foo' variables (set or unset) will be overridden when
55822# loading this file, other *unset* `ac_cv_foo' will be assigned the
55823# following values.
55824
55825_ACEOF
55826
55827# The following way of writing the cache mishandles newlines in values,
55828# but we know of no workaround that is simple, portable, and efficient.
55829# So, we kill variables containing newlines.
55830# Ultrix sh set writes to stderr and can't be redirected directly,
55831# and sets the high bit in the cache file unless we assign to the vars.
55832(
55833  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
55834    eval ac_val=\$$ac_var
55835    case $ac_val in #(
55836    *${as_nl}*)
55837      case $ac_var in #(
55838      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
55839$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
55840      esac
55841      case $ac_var in #(
55842      _ | IFS | as_nl) ;; #(
55843      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
55844      *) { eval $ac_var=; unset $ac_var;} ;;
55845      esac ;;
55846    esac
55847  done
55848
55849  (set) 2>&1 |
55850    case $as_nl`(ac_space=' '; set) 2>&1` in #(
55851    *${as_nl}ac_space=\ *)
55852      # `set' does not quote correctly, so add quotes: double-quote
55853      # substitution turns \\\\ into \\, and sed turns \\ into \.
55854      sed -n \
55855	"s/'/'\\\\''/g;
55856	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
55857      ;; #(
55858    *)
55859      # `set' quotes correctly as required by POSIX, so do not add quotes.
55860      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
55861      ;;
55862    esac |
55863    sort
55864) |
55865  sed '
55866     /^ac_cv_env_/b end
55867     t clear
55868     :clear
55869     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
55870     t end
55871     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
55872     :end' >>confcache
55873if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
55874  if test -w "$cache_file"; then
55875    if test "x$cache_file" != "x/dev/null"; then
55876      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
55877$as_echo "$as_me: updating cache $cache_file" >&6;}
55878      if test ! -f "$cache_file" || test -h "$cache_file"; then
55879	cat confcache >"$cache_file"
55880      else
55881        case $cache_file in #(
55882        */* | ?:*)
55883	  mv -f confcache "$cache_file"$$ &&
55884	  mv -f "$cache_file"$$ "$cache_file" ;; #(
55885        *)
55886	  mv -f confcache "$cache_file" ;;
55887	esac
55888      fi
55889    fi
55890  else
55891    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
55892$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
55893  fi
55894fi
55895rm -f confcache
55896
55897test "x$prefix" = xNONE && prefix=$ac_default_prefix
55898# Let make expand exec_prefix.
55899test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
55900
55901# Transform confdefs.h into DEFS.
55902# Protect against shell expansion while executing Makefile rules.
55903# Protect against Makefile macro expansion.
55904#
55905# If the first sed substitution is executed (which looks for macros that
55906# take arguments), then branch to the quote section.  Otherwise,
55907# look for a macro that doesn't take arguments.
55908ac_script='
55909:mline
55910/\\$/{
55911 N
55912 s,\\\n,,
55913 b mline
55914}
55915t clear
55916:clear
55917s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
55918t quote
55919s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
55920t quote
55921b any
55922:quote
55923s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
55924s/\[/\\&/g
55925s/\]/\\&/g
55926s/\$/$$/g
55927H
55928:any
55929${
55930	g
55931	s/^\n//
55932	s/\n/ /g
55933	p
55934}
55935'
55936DEFS=`sed -n "$ac_script" confdefs.h`
55937
55938
55939ac_libobjs=
55940ac_ltlibobjs=
55941U=
55942for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
55943  # 1. Remove the extension, and $U if already installed.
55944  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
55945  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
55946  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
55947  #    will be set to the directory where LIBOBJS objects are built.
55948  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
55949  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
55950done
55951LIBOBJS=$ac_libobjs
55952
55953LTLIBOBJS=$ac_ltlibobjs
55954
55955
55956
55957: "${CONFIG_STATUS=./config.status}"
55958ac_write_fail=0
55959ac_clean_files_save=$ac_clean_files
55960ac_clean_files="$ac_clean_files $CONFIG_STATUS"
55961{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
55962$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
55963as_write_fail=0
55964cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
55965#! $SHELL
55966# Generated by $as_me.
55967# Run this file to recreate the current configuration.
55968# Compiler output produced by configure, useful for debugging
55969# configure, is in config.log if it exists.
55970
55971debug=false
55972ac_cs_recheck=false
55973ac_cs_silent=false
55974
55975SHELL=\${CONFIG_SHELL-$SHELL}
55976export SHELL
55977_ASEOF
55978cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
55979## -------------------- ##
55980## M4sh Initialization. ##
55981## -------------------- ##
55982
55983# Be more Bourne compatible
55984DUALCASE=1; export DUALCASE # for MKS sh
55985if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
55986  emulate sh
55987  NULLCMD=:
55988  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
55989  # is contrary to our usage.  Disable this feature.
55990  alias -g '${1+"$@"}'='"$@"'
55991  setopt NO_GLOB_SUBST
55992else
55993  case `(set -o) 2>/dev/null` in #(
55994  *posix*) :
55995    set -o posix ;; #(
55996  *) :
55997     ;;
55998esac
55999fi
56000
56001
56002as_nl='
56003'
56004export as_nl
56005# Printing a long string crashes Solaris 7 /usr/bin/printf.
56006as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
56007as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
56008as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
56009# Prefer a ksh shell builtin over an external printf program on Solaris,
56010# but without wasting forks for bash or zsh.
56011if test -z "$BASH_VERSION$ZSH_VERSION" \
56012    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
56013  as_echo='print -r --'
56014  as_echo_n='print -rn --'
56015elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56016  as_echo='printf %s\n'
56017  as_echo_n='printf %s'
56018else
56019  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56020    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56021    as_echo_n='/usr/ucb/echo -n'
56022  else
56023    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56024    as_echo_n_body='eval
56025      arg=$1;
56026      case $arg in #(
56027      *"$as_nl"*)
56028	expr "X$arg" : "X\\(.*\\)$as_nl";
56029	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
56030      esac;
56031      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
56032    '
56033    export as_echo_n_body
56034    as_echo_n='sh -c $as_echo_n_body as_echo'
56035  fi
56036  export as_echo_body
56037  as_echo='sh -c $as_echo_body as_echo'
56038fi
56039
56040# The user is always right.
56041if test "${PATH_SEPARATOR+set}" != set; then
56042  PATH_SEPARATOR=:
56043  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
56044    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
56045      PATH_SEPARATOR=';'
56046  }
56047fi
56048
56049
56050# IFS
56051# We need space, tab and new line, in precisely that order.  Quoting is
56052# there to prevent editors from complaining about space-tab.
56053# (If _AS_PATH_WALK were called with IFS unset, it would disable word
56054# splitting by setting IFS to empty value.)
56055IFS=" ""	$as_nl"
56056
56057# Find who we are.  Look in the path if we contain no directory separator.
56058as_myself=
56059case $0 in #((
56060  *[\\/]* ) as_myself=$0 ;;
56061  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56062for as_dir in $PATH
56063do
56064  IFS=$as_save_IFS
56065  test -z "$as_dir" && as_dir=.
56066    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
56067  done
56068IFS=$as_save_IFS
56069
56070     ;;
56071esac
56072# We did not find ourselves, most probably we were run as `sh COMMAND'
56073# in which case we are not to be found in the path.
56074if test "x$as_myself" = x; then
56075  as_myself=$0
56076fi
56077if test ! -f "$as_myself"; then
56078  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
56079  exit 1
56080fi
56081
56082# Unset variables that we do not need and which cause bugs (e.g. in
56083# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
56084# suppresses any "Segmentation fault" message there.  '((' could
56085# trigger a bug in pdksh 5.2.14.
56086for as_var in BASH_ENV ENV MAIL MAILPATH
56087do eval test x\${$as_var+set} = xset \
56088  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
56089done
56090PS1='$ '
56091PS2='> '
56092PS4='+ '
56093
56094# NLS nuisances.
56095LC_ALL=C
56096export LC_ALL
56097LANGUAGE=C
56098export LANGUAGE
56099
56100# CDPATH.
56101(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
56102
56103
56104# as_fn_error STATUS ERROR [LINENO LOG_FD]
56105# ----------------------------------------
56106# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
56107# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
56108# script with STATUS, using 1 if that was 0.
56109as_fn_error ()
56110{
56111  as_status=$1; test $as_status -eq 0 && as_status=1
56112  if test "$4"; then
56113    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
56114    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
56115  fi
56116  $as_echo "$as_me: error: $2" >&2
56117  as_fn_exit $as_status
56118} # as_fn_error
56119
56120
56121# as_fn_set_status STATUS
56122# -----------------------
56123# Set $? to STATUS, without forking.
56124as_fn_set_status ()
56125{
56126  return $1
56127} # as_fn_set_status
56128
56129# as_fn_exit STATUS
56130# -----------------
56131# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
56132as_fn_exit ()
56133{
56134  set +e
56135  as_fn_set_status $1
56136  exit $1
56137} # as_fn_exit
56138
56139# as_fn_unset VAR
56140# ---------------
56141# Portably unset VAR.
56142as_fn_unset ()
56143{
56144  { eval $1=; unset $1;}
56145}
56146as_unset=as_fn_unset
56147# as_fn_append VAR VALUE
56148# ----------------------
56149# Append the text in VALUE to the end of the definition contained in VAR. Take
56150# advantage of any shell optimizations that allow amortized linear growth over
56151# repeated appends, instead of the typical quadratic growth present in naive
56152# implementations.
56153if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
56154  eval 'as_fn_append ()
56155  {
56156    eval $1+=\$2
56157  }'
56158else
56159  as_fn_append ()
56160  {
56161    eval $1=\$$1\$2
56162  }
56163fi # as_fn_append
56164
56165# as_fn_arith ARG...
56166# ------------------
56167# Perform arithmetic evaluation on the ARGs, and store the result in the
56168# global $as_val. Take advantage of shells that can avoid forks. The arguments
56169# must be portable across $(()) and expr.
56170if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
56171  eval 'as_fn_arith ()
56172  {
56173    as_val=$(( $* ))
56174  }'
56175else
56176  as_fn_arith ()
56177  {
56178    as_val=`expr "$@" || test $? -eq 1`
56179  }
56180fi # as_fn_arith
56181
56182
56183if expr a : '\(a\)' >/dev/null 2>&1 &&
56184   test "X`expr 00001 : '.*\(...\)'`" = X001; then
56185  as_expr=expr
56186else
56187  as_expr=false
56188fi
56189
56190if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
56191  as_basename=basename
56192else
56193  as_basename=false
56194fi
56195
56196if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
56197  as_dirname=dirname
56198else
56199  as_dirname=false
56200fi
56201
56202as_me=`$as_basename -- "$0" ||
56203$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
56204	 X"$0" : 'X\(//\)$' \| \
56205	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
56206$as_echo X/"$0" |
56207    sed '/^.*\/\([^/][^/]*\)\/*$/{
56208	    s//\1/
56209	    q
56210	  }
56211	  /^X\/\(\/\/\)$/{
56212	    s//\1/
56213	    q
56214	  }
56215	  /^X\/\(\/\).*/{
56216	    s//\1/
56217	    q
56218	  }
56219	  s/.*/./; q'`
56220
56221# Avoid depending upon Character Ranges.
56222as_cr_letters='abcdefghijklmnopqrstuvwxyz'
56223as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
56224as_cr_Letters=$as_cr_letters$as_cr_LETTERS
56225as_cr_digits='0123456789'
56226as_cr_alnum=$as_cr_Letters$as_cr_digits
56227
56228ECHO_C= ECHO_N= ECHO_T=
56229case `echo -n x` in #(((((
56230-n*)
56231  case `echo 'xy\c'` in
56232  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
56233  xy)  ECHO_C='\c';;
56234  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
56235       ECHO_T='	';;
56236  esac;;
56237*)
56238  ECHO_N='-n';;
56239esac
56240
56241rm -f conf$$ conf$$.exe conf$$.file
56242if test -d conf$$.dir; then
56243  rm -f conf$$.dir/conf$$.file
56244else
56245  rm -f conf$$.dir
56246  mkdir conf$$.dir 2>/dev/null
56247fi
56248if (echo >conf$$.file) 2>/dev/null; then
56249  if ln -s conf$$.file conf$$ 2>/dev/null; then
56250    as_ln_s='ln -s'
56251    # ... but there are two gotchas:
56252    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
56253    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
56254    # In both cases, we have to default to `cp -pR'.
56255    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
56256      as_ln_s='cp -pR'
56257  elif ln conf$$.file conf$$ 2>/dev/null; then
56258    as_ln_s=ln
56259  else
56260    as_ln_s='cp -pR'
56261  fi
56262else
56263  as_ln_s='cp -pR'
56264fi
56265rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
56266rmdir conf$$.dir 2>/dev/null
56267
56268
56269# as_fn_mkdir_p
56270# -------------
56271# Create "$as_dir" as a directory, including parents if necessary.
56272as_fn_mkdir_p ()
56273{
56274
56275  case $as_dir in #(
56276  -*) as_dir=./$as_dir;;
56277  esac
56278  test -d "$as_dir" || eval $as_mkdir_p || {
56279    as_dirs=
56280    while :; do
56281      case $as_dir in #(
56282      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
56283      *) as_qdir=$as_dir;;
56284      esac
56285      as_dirs="'$as_qdir' $as_dirs"
56286      as_dir=`$as_dirname -- "$as_dir" ||
56287$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56288	 X"$as_dir" : 'X\(//\)[^/]' \| \
56289	 X"$as_dir" : 'X\(//\)$' \| \
56290	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
56291$as_echo X"$as_dir" |
56292    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56293	    s//\1/
56294	    q
56295	  }
56296	  /^X\(\/\/\)[^/].*/{
56297	    s//\1/
56298	    q
56299	  }
56300	  /^X\(\/\/\)$/{
56301	    s//\1/
56302	    q
56303	  }
56304	  /^X\(\/\).*/{
56305	    s//\1/
56306	    q
56307	  }
56308	  s/.*/./; q'`
56309      test -d "$as_dir" && break
56310    done
56311    test -z "$as_dirs" || eval "mkdir $as_dirs"
56312  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
56313
56314
56315} # as_fn_mkdir_p
56316if mkdir -p . 2>/dev/null; then
56317  as_mkdir_p='mkdir -p "$as_dir"'
56318else
56319  test -d ./-p && rmdir ./-p
56320  as_mkdir_p=false
56321fi
56322
56323
56324# as_fn_executable_p FILE
56325# -----------------------
56326# Test if FILE is an executable regular file.
56327as_fn_executable_p ()
56328{
56329  test -f "$1" && test -x "$1"
56330} # as_fn_executable_p
56331as_test_x='test -x'
56332as_executable_p=as_fn_executable_p
56333
56334# Sed expression to map a string onto a valid CPP name.
56335as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
56336
56337# Sed expression to map a string onto a valid variable name.
56338as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
56339
56340
56341exec 6>&1
56342## ----------------------------------- ##
56343## Main body of $CONFIG_STATUS script. ##
56344## ----------------------------------- ##
56345_ASEOF
56346test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
56347
56348cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56349# Save the log message, to keep $0 and so on meaningful, and to
56350# report actual input values of CONFIG_FILES etc. instead of their
56351# values after options handling.
56352ac_log="
56353This file was extended by OpenJDK $as_me jdk9, which was
56354generated by GNU Autoconf 2.69.  Invocation command line was
56355
56356  CONFIG_FILES    = $CONFIG_FILES
56357  CONFIG_HEADERS  = $CONFIG_HEADERS
56358  CONFIG_LINKS    = $CONFIG_LINKS
56359  CONFIG_COMMANDS = $CONFIG_COMMANDS
56360  $ $0 $@
56361
56362on `(hostname || uname -n) 2>/dev/null | sed 1q`
56363"
56364
56365_ACEOF
56366
56367case $ac_config_files in *"
56368"*) set x $ac_config_files; shift; ac_config_files=$*;;
56369esac
56370
56371
56372
56373cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56374# Files that config.status was made for.
56375config_files="$ac_config_files"
56376
56377_ACEOF
56378
56379cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56380ac_cs_usage="\
56381\`$as_me' instantiates files and other configuration actions
56382from templates according to the current configuration.  Unless the files
56383and actions are specified as TAGs, all are instantiated by default.
56384
56385Usage: $0 [OPTION]... [TAG]...
56386
56387  -h, --help       print this help, then exit
56388  -V, --version    print version number and configuration settings, then exit
56389      --config     print configuration, then exit
56390  -q, --quiet, --silent
56391                   do not print progress messages
56392  -d, --debug      don't remove temporary files
56393      --recheck    update $as_me by reconfiguring in the same conditions
56394      --file=FILE[:TEMPLATE]
56395                   instantiate the configuration file FILE
56396
56397Configuration files:
56398$config_files
56399
56400Report bugs to <build-dev@openjdk.java.net>.
56401OpenJDK home page: <http://openjdk.java.net>."
56402
56403_ACEOF
56404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56405ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
56406ac_cs_version="\\
56407OpenJDK config.status jdk9
56408configured by $0, generated by GNU Autoconf 2.69,
56409  with options \\"\$ac_cs_config\\"
56410
56411Copyright (C) 2012 Free Software Foundation, Inc.
56412This config.status script is free software; the Free Software Foundation
56413gives unlimited permission to copy, distribute and modify it."
56414
56415ac_pwd='$ac_pwd'
56416srcdir='$srcdir'
56417AWK='$AWK'
56418test -n "\$AWK" || AWK=awk
56419_ACEOF
56420
56421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56422# The default lists apply if the user does not specify any file.
56423ac_need_defaults=:
56424while test $# != 0
56425do
56426  case $1 in
56427  --*=?*)
56428    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56429    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
56430    ac_shift=:
56431    ;;
56432  --*=)
56433    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56434    ac_optarg=
56435    ac_shift=:
56436    ;;
56437  *)
56438    ac_option=$1
56439    ac_optarg=$2
56440    ac_shift=shift
56441    ;;
56442  esac
56443
56444  case $ac_option in
56445  # Handling of the options.
56446  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
56447    ac_cs_recheck=: ;;
56448  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
56449    $as_echo "$ac_cs_version"; exit ;;
56450  --config | --confi | --conf | --con | --co | --c )
56451    $as_echo "$ac_cs_config"; exit ;;
56452  --debug | --debu | --deb | --de | --d | -d )
56453    debug=: ;;
56454  --file | --fil | --fi | --f )
56455    $ac_shift
56456    case $ac_optarg in
56457    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
56458    '') as_fn_error $? "missing file argument" ;;
56459    esac
56460    as_fn_append CONFIG_FILES " '$ac_optarg'"
56461    ac_need_defaults=false;;
56462  --he | --h |  --help | --hel | -h )
56463    $as_echo "$ac_cs_usage"; exit ;;
56464  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
56465  | -silent | --silent | --silen | --sile | --sil | --si | --s)
56466    ac_cs_silent=: ;;
56467
56468  # This is an error.
56469  -*) as_fn_error $? "unrecognized option: \`$1'
56470Try \`$0 --help' for more information." ;;
56471
56472  *) as_fn_append ac_config_targets " $1"
56473     ac_need_defaults=false ;;
56474
56475  esac
56476  shift
56477done
56478
56479ac_configure_extra_args=
56480
56481if $ac_cs_silent; then
56482  exec 6>/dev/null
56483  ac_configure_extra_args="$ac_configure_extra_args --silent"
56484fi
56485
56486_ACEOF
56487cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56488if \$ac_cs_recheck; then
56489  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
56490  shift
56491  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
56492  CONFIG_SHELL='$SHELL'
56493  export CONFIG_SHELL
56494  exec "\$@"
56495fi
56496
56497_ACEOF
56498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56499exec 5>>config.log
56500{
56501  echo
56502  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
56503## Running $as_me. ##
56504_ASBOX
56505  $as_echo "$ac_log"
56506} >&5
56507
56508_ACEOF
56509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56510_ACEOF
56511
56512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56513
56514# Handling of arguments.
56515for ac_config_target in $ac_config_targets
56516do
56517  case $ac_config_target in
56518    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
56519    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
56520    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
56521    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
56522    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
56523
56524  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
56525  esac
56526done
56527
56528
56529# If the user did not use the arguments to specify the items to instantiate,
56530# then the envvar interface is used.  Set only those that are not.
56531# We use the long form for the default assignment because of an extremely
56532# bizarre bug on SunOS 4.1.3.
56533if $ac_need_defaults; then
56534  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
56535fi
56536
56537# Have a temporary directory for convenience.  Make it in the build tree
56538# simply because there is no reason against having it here, and in addition,
56539# creating and moving files from /tmp can sometimes cause problems.
56540# Hook for its removal unless debugging.
56541# Note that there is a small window in which the directory will not be cleaned:
56542# after its creation but before its name has been assigned to `$tmp'.
56543$debug ||
56544{
56545  tmp= ac_tmp=
56546  trap 'exit_status=$?
56547  : "${ac_tmp:=$tmp}"
56548  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
56549' 0
56550  trap 'as_fn_exit 1' 1 2 13 15
56551}
56552# Create a (secure) tmp directory for tmp files.
56553
56554{
56555  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
56556  test -d "$tmp"
56557}  ||
56558{
56559  tmp=./conf$$-$RANDOM
56560  (umask 077 && mkdir "$tmp")
56561} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
56562ac_tmp=$tmp
56563
56564# Set up the scripts for CONFIG_FILES section.
56565# No need to generate them if there are no CONFIG_FILES.
56566# This happens for instance with `./config.status config.h'.
56567if test -n "$CONFIG_FILES"; then
56568
56569
56570ac_cr=`echo X | tr X '\015'`
56571# On cygwin, bash can eat \r inside `` if the user requested igncr.
56572# But we know of no other shell where ac_cr would be empty at this
56573# point, so we can use a bashism as a fallback.
56574if test "x$ac_cr" = x; then
56575  eval ac_cr=\$\'\\r\'
56576fi
56577ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
56578if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
56579  ac_cs_awk_cr='\\r'
56580else
56581  ac_cs_awk_cr=$ac_cr
56582fi
56583
56584echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
56585_ACEOF
56586
56587
56588{
56589  echo "cat >conf$$subs.awk <<_ACEOF" &&
56590  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
56591  echo "_ACEOF"
56592} >conf$$subs.sh ||
56593  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56594ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
56595ac_delim='%!_!# '
56596for ac_last_try in false false false false false :; do
56597  . ./conf$$subs.sh ||
56598    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56599
56600  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
56601  if test $ac_delim_n = $ac_delim_num; then
56602    break
56603  elif $ac_last_try; then
56604    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56605  else
56606    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
56607  fi
56608done
56609rm -f conf$$subs.sh
56610
56611cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56612cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
56613_ACEOF
56614sed -n '
56615h
56616s/^/S["/; s/!.*/"]=/
56617p
56618g
56619s/^[^!]*!//
56620:repl
56621t repl
56622s/'"$ac_delim"'$//
56623t delim
56624:nl
56625h
56626s/\(.\{148\}\)..*/\1/
56627t more1
56628s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
56629p
56630n
56631b repl
56632:more1
56633s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56634p
56635g
56636s/.\{148\}//
56637t nl
56638:delim
56639h
56640s/\(.\{148\}\)..*/\1/
56641t more2
56642s/["\\]/\\&/g; s/^/"/; s/$/"/
56643p
56644b
56645:more2
56646s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56647p
56648g
56649s/.\{148\}//
56650t delim
56651' <conf$$subs.awk | sed '
56652/^[^""]/{
56653  N
56654  s/\n//
56655}
56656' >>$CONFIG_STATUS || ac_write_fail=1
56657rm -f conf$$subs.awk
56658cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56659_ACAWK
56660cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
56661  for (key in S) S_is_set[key] = 1
56662  FS = ""
56663
56664}
56665{
56666  line = $ 0
56667  nfields = split(line, field, "@")
56668  substed = 0
56669  len = length(field[1])
56670  for (i = 2; i < nfields; i++) {
56671    key = field[i]
56672    keylen = length(key)
56673    if (S_is_set[key]) {
56674      value = S[key]
56675      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
56676      len += length(value) + length(field[++i])
56677      substed = 1
56678    } else
56679      len += 1 + keylen
56680  }
56681
56682  print line
56683}
56684
56685_ACAWK
56686_ACEOF
56687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56688if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
56689  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
56690else
56691  cat
56692fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
56693  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
56694_ACEOF
56695
56696# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
56697# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
56698# trailing colons and then remove the whole line if VPATH becomes empty
56699# (actually we leave an empty line to preserve line numbers).
56700if test "x$srcdir" = x.; then
56701  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
56702h
56703s///
56704s/^/:/
56705s/[	 ]*$/:/
56706s/:\$(srcdir):/:/g
56707s/:\${srcdir}:/:/g
56708s/:@srcdir@:/:/g
56709s/^:*//
56710s/:*$//
56711x
56712s/\(=[	 ]*\).*/\1/
56713G
56714s/\n//
56715s/^[^=]*=[	 ]*$//
56716}'
56717fi
56718
56719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56720fi # test -n "$CONFIG_FILES"
56721
56722
56723eval set X "  :F $CONFIG_FILES      "
56724shift
56725for ac_tag
56726do
56727  case $ac_tag in
56728  :[FHLC]) ac_mode=$ac_tag; continue;;
56729  esac
56730  case $ac_mode$ac_tag in
56731  :[FHL]*:*);;
56732  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
56733  :[FH]-) ac_tag=-:-;;
56734  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
56735  esac
56736  ac_save_IFS=$IFS
56737  IFS=:
56738  set x $ac_tag
56739  IFS=$ac_save_IFS
56740  shift
56741  ac_file=$1
56742  shift
56743
56744  case $ac_mode in
56745  :L) ac_source=$1;;
56746  :[FH])
56747    ac_file_inputs=
56748    for ac_f
56749    do
56750      case $ac_f in
56751      -) ac_f="$ac_tmp/stdin";;
56752      *) # Look for the file first in the build tree, then in the source tree
56753	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
56754	 # because $ac_f cannot contain `:'.
56755	 test -f "$ac_f" ||
56756	   case $ac_f in
56757	   [\\/$]*) false;;
56758	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
56759	   esac ||
56760	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
56761      esac
56762      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
56763      as_fn_append ac_file_inputs " '$ac_f'"
56764    done
56765
56766    # Let's still pretend it is `configure' which instantiates (i.e., don't
56767    # use $as_me), people would be surprised to read:
56768    #    /* config.h.  Generated by config.status.  */
56769    configure_input='Generated from '`
56770	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
56771	`' by configure.'
56772    if test x"$ac_file" != x-; then
56773      configure_input="$ac_file.  $configure_input"
56774      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
56775$as_echo "$as_me: creating $ac_file" >&6;}
56776    fi
56777    # Neutralize special characters interpreted by sed in replacement strings.
56778    case $configure_input in #(
56779    *\&* | *\|* | *\\* )
56780       ac_sed_conf_input=`$as_echo "$configure_input" |
56781       sed 's/[\\\\&|]/\\\\&/g'`;; #(
56782    *) ac_sed_conf_input=$configure_input;;
56783    esac
56784
56785    case $ac_tag in
56786    *:-:* | *:-) cat >"$ac_tmp/stdin" \
56787      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
56788    esac
56789    ;;
56790  esac
56791
56792  ac_dir=`$as_dirname -- "$ac_file" ||
56793$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56794	 X"$ac_file" : 'X\(//\)[^/]' \| \
56795	 X"$ac_file" : 'X\(//\)$' \| \
56796	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
56797$as_echo X"$ac_file" |
56798    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56799	    s//\1/
56800	    q
56801	  }
56802	  /^X\(\/\/\)[^/].*/{
56803	    s//\1/
56804	    q
56805	  }
56806	  /^X\(\/\/\)$/{
56807	    s//\1/
56808	    q
56809	  }
56810	  /^X\(\/\).*/{
56811	    s//\1/
56812	    q
56813	  }
56814	  s/.*/./; q'`
56815  as_dir="$ac_dir"; as_fn_mkdir_p
56816  ac_builddir=.
56817
56818case "$ac_dir" in
56819.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
56820*)
56821  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
56822  # A ".." for each directory in $ac_dir_suffix.
56823  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
56824  case $ac_top_builddir_sub in
56825  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
56826  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
56827  esac ;;
56828esac
56829ac_abs_top_builddir=$ac_pwd
56830ac_abs_builddir=$ac_pwd$ac_dir_suffix
56831# for backward compatibility:
56832ac_top_builddir=$ac_top_build_prefix
56833
56834case $srcdir in
56835  .)  # We are building in place.
56836    ac_srcdir=.
56837    ac_top_srcdir=$ac_top_builddir_sub
56838    ac_abs_top_srcdir=$ac_pwd ;;
56839  [\\/]* | ?:[\\/]* )  # Absolute name.
56840    ac_srcdir=$srcdir$ac_dir_suffix;
56841    ac_top_srcdir=$srcdir
56842    ac_abs_top_srcdir=$srcdir ;;
56843  *) # Relative name.
56844    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
56845    ac_top_srcdir=$ac_top_build_prefix$srcdir
56846    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
56847esac
56848ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
56849
56850
56851  case $ac_mode in
56852  :F)
56853  #
56854  # CONFIG_FILE
56855  #
56856
56857_ACEOF
56858
56859cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56860# If the template does not know about datarootdir, expand it.
56861# FIXME: This hack should be removed a few years after 2.60.
56862ac_datarootdir_hack=; ac_datarootdir_seen=
56863ac_sed_dataroot='
56864/datarootdir/ {
56865  p
56866  q
56867}
56868/@datadir@/p
56869/@docdir@/p
56870/@infodir@/p
56871/@localedir@/p
56872/@mandir@/p'
56873case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
56874*datarootdir*) ac_datarootdir_seen=yes;;
56875*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
56876  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
56877$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
56878_ACEOF
56879cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56880  ac_datarootdir_hack='
56881  s&@datadir@&$datadir&g
56882  s&@docdir@&$docdir&g
56883  s&@infodir@&$infodir&g
56884  s&@localedir@&$localedir&g
56885  s&@mandir@&$mandir&g
56886  s&\\\${datarootdir}&$datarootdir&g' ;;
56887esac
56888_ACEOF
56889
56890# Neutralize VPATH when `$srcdir' = `.'.
56891# Shell code in configure.ac might set extrasub.
56892# FIXME: do we really want to maintain this feature?
56893cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56894ac_sed_extra="$ac_vpsub
56895$extrasub
56896_ACEOF
56897cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56898:t
56899/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
56900s|@configure_input@|$ac_sed_conf_input|;t t
56901s&@top_builddir@&$ac_top_builddir_sub&;t t
56902s&@top_build_prefix@&$ac_top_build_prefix&;t t
56903s&@srcdir@&$ac_srcdir&;t t
56904s&@abs_srcdir@&$ac_abs_srcdir&;t t
56905s&@top_srcdir@&$ac_top_srcdir&;t t
56906s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
56907s&@builddir@&$ac_builddir&;t t
56908s&@abs_builddir@&$ac_abs_builddir&;t t
56909s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
56910$ac_datarootdir_hack
56911"
56912eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
56913  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56914
56915test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
56916  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
56917  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
56918      "$ac_tmp/out"`; test -z "$ac_out"; } &&
56919  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56920which seems to be undefined.  Please make sure it is defined" >&5
56921$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56922which seems to be undefined.  Please make sure it is defined" >&2;}
56923
56924  rm -f "$ac_tmp/stdin"
56925  case $ac_file in
56926  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
56927  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
56928  esac \
56929  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56930 ;;
56931
56932
56933
56934  esac
56935
56936done # for ac_tag
56937
56938
56939as_fn_exit 0
56940_ACEOF
56941ac_clean_files=$ac_clean_files_save
56942
56943test $ac_write_fail = 0 ||
56944  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
56945
56946
56947# configure is writing to config.log, and then calls config.status.
56948# config.status does its own redirection, appending to config.log.
56949# Unfortunately, on DOS this fails, as config.log is still kept open
56950# by configure, so config.status won't be able to write to it; its
56951# output is simply discarded.  So we exec the FD to /dev/null,
56952# effectively closing config.log, so it can be properly (re)opened and
56953# appended to by config.status.  When coming back to configure, we
56954# need to make the FD available again.
56955if test "$no_create" != yes; then
56956  ac_cs_success=:
56957  ac_config_status_args=
56958  test "$silent" = yes &&
56959    ac_config_status_args="$ac_config_status_args --quiet"
56960  exec 5>/dev/null
56961  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
56962  exec 5>>config.log
56963  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
56964  # would make configure fail if this is the last instruction.
56965  $ac_cs_success || as_fn_exit 1
56966fi
56967if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
56968  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
56969$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
56970fi
56971
56972
56973# After AC_OUTPUT, we need to do final work
56974
56975
56976  # Try to move config.log (generated by autoconf) to the configure-support directory.
56977  if test -e ./config.log; then
56978    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
56979  fi
56980
56981  # Rotate our log file (configure.log)
56982  if test -e "$OUTPUT_ROOT/configure.log.old"; then
56983    $RM -f "$OUTPUT_ROOT/configure.log.old"
56984  fi
56985  if test -e "$OUTPUT_ROOT/configure.log"; then
56986    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
56987  fi
56988
56989  # Move configure.log from current directory to the build output root
56990  if test -e ./configure.log; then
56991    echo found it
56992    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
56993  fi
56994
56995  # Make the compare script executable
56996  $CHMOD +x $OUTPUT_ROOT/compare.sh
56997
56998
56999# Finally output some useful information to the user
57000
57001  # Finally output some useful information to the user
57002
57003  printf "\n"
57004  printf "====================================================\n"
57005  if test "x$no_create" != "xyes"; then
57006    if test "x$IS_RECONFIGURE" != "xyes"; then
57007      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
57008    else
57009      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
57010    fi
57011  else
57012    if test "x$IS_RECONFIGURE" != "xyes"; then
57013      printf "A configuration has been successfully checked but not created\n"
57014    else
57015      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
57016    fi
57017  fi
57018  if test "x$CONFIGURE_COMMAND_LINE" != x; then
57019    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
57020  else
57021    printf "using default settings.\n"
57022  fi
57023
57024  printf "\n"
57025  printf "Configuration summary:\n"
57026  printf "* Debug level:    $DEBUG_LEVEL\n"
57027  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
57028  printf "* JDK variant:    $JDK_VARIANT\n"
57029  printf "* JVM variants:   $with_jvm_variants\n"
57030  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
57031  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
57032
57033  printf "\n"
57034  printf "Tools summary:\n"
57035  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
57036    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
57037  fi
57038  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
57039  if test "x$TOOLCHAIN_VERSION" != "x"; then
57040    print_version=" $TOOLCHAIN_VERSION"
57041  fi
57042  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
57043  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
57044  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
57045
57046  printf "\n"
57047  printf "Build performance summary:\n"
57048  printf "* Cores to use:   $JOBS\n"
57049  printf "* Memory limit:   $MEMORY_SIZE MB\n"
57050  if test "x$CCACHE_STATUS" != "x"; then
57051    printf "* ccache status:  $CCACHE_STATUS\n"
57052  fi
57053  printf "\n"
57054
57055  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
57056    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
57057    printf "will result in longer build times.\n"
57058    printf "\n"
57059  fi
57060
57061  if test "x$FOUND_ALT_VARIABLES" != "x"; then
57062    printf "WARNING: You have old-style ALT_ environment variables set.\n"
57063    printf "These are not respected, and will be ignored. It is recommended\n"
57064    printf "that you clean your environment. The following variables are set:\n"
57065    printf "$FOUND_ALT_VARIABLES\n"
57066    printf "\n"
57067  fi
57068
57069  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
57070    printf "WARNING: Your build output directory is not on a local disk.\n"
57071    printf "This will severely degrade build performance!\n"
57072    printf "It is recommended that you create an output directory on a local disk,\n"
57073    printf "and run the configure script again from that directory.\n"
57074    printf "\n"
57075  fi
57076
57077  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
57078    printf "WARNING: The result of this configuration has overridden an older\n"
57079    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
57080    printf "proper build. Failure to do so might result in strange build problems.\n"
57081    printf "\n"
57082  fi
57083
57084  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
57085    printf "WARNING: The result of this configuration was not saved.\n"
57086    printf "You should run without '--no-create | -n' to create the configuration.\n"
57087    printf "\n"
57088  fi
57089
57090
57091
57092  # Locate config.log.
57093  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
57094    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
57095  elif test -e "./config.log"; then
57096    CONFIG_LOG_PATH="."
57097  fi
57098
57099  if test -e "$CONFIG_LOG_PATH/config.log"; then
57100    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
57101    if test $? -eq 0; then
57102      printf "The following warnings were produced. Repeated here for convenience:\n"
57103      # We must quote sed expression (using []) to stop m4 from eating the [].
57104      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
57105      printf "\n"
57106    fi
57107  fi
57108
57109