generated-configure.sh revision 1714:5f7679c96d7d
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_JAVAC_SERVER
636ENABLE_SJAVAC
637SJAVAC_SERVER_JAVA_FLAGS
638SJAVAC_SERVER_JAVA
639JAVA_TOOL_FLAGS_SMALL
640JAVA_FLAGS_SMALL
641JAVA_FLAGS_BIG
642JAVA_FLAGS
643JOBS
644MEMORY_SIZE
645NUM_CORES
646ENABLE_INTREE_EC
647SALIB_NAME
648HOTSPOT_MAKE_ARGS
649LIBZIP_CAN_USE_MMAP
650LIBDL
651LIBM
652USE_EXTERNAL_LCMS
653LCMS_LIBS
654LCMS_CFLAGS
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LIBGIF
660USE_EXTERNAL_LIBJPEG
661LLVM_LIBS
662LLVM_LDFLAGS
663LLVM_CFLAGS
664LLVM_CONFIG
665LIBFFI_LIBS
666LIBFFI_CFLAGS
667ALSA_LIBS
668ALSA_CFLAGS
669FREETYPE_BUNDLE_LIB_PATH
670FREETYPE_LIBS
671FREETYPE_CFLAGS
672CUPS_CFLAGS
673X_EXTRA_LIBS
674X_LIBS
675X_PRE_LIBS
676X_CFLAGS
677XMKMF
678MSVCP_DLL
679MSVCR_DLL
680LIBCXX
681STATIC_CXX_SETTING
682FIXPATH
683GCOV_ENABLED
684ZIP_DEBUGINFO_FILES
685ENABLE_DEBUG_SYMBOLS
686CFLAGS_WARNINGS_ARE_ERRORS
687DISABLE_WARNING_PREFIX
688WARNINGS_AS_ERRORS
689COMPILER_SUPPORTS_TARGET_BITS_FLAG
690ZERO_ARCHFLAG
691LDFLAGS_TESTEXE
692LDFLAGS_TESTLIB
693LDFLAGS_CXX_JDK
694JDKEXE_LIBS
695JDKLIB_LIBS
696LDFLAGS_JDKEXE
697LDFLAGS_JDKLIB
698CXXFLAGS_TESTEXE
699CXXFLAGS_TESTLIB
700CFLAGS_TESTEXE
701CFLAGS_TESTLIB
702CXXFLAGS_JDKEXE
703CXXFLAGS_JDKLIB
704CFLAGS_JDKEXE
705CFLAGS_JDKLIB
706MACOSX_VERSION_MIN
707CXX_O_FLAG_NONE
708CXX_O_FLAG_DEBUG
709CXX_O_FLAG_NORM
710CXX_O_FLAG_HI
711CXX_O_FLAG_HIGHEST
712C_O_FLAG_NONE
713C_O_FLAG_DEBUG
714C_O_FLAG_NORM
715C_O_FLAG_HI
716C_O_FLAG_HIGHEST
717CXXFLAGS_DEBUG_SYMBOLS
718CFLAGS_DEBUG_SYMBOLS
719CXX_FLAG_DEPS
720C_FLAG_DEPS
721SET_SHARED_LIBRARY_MAPFILE
722SET_SHARED_LIBRARY_NAME
723SET_SHARED_LIBRARY_ORIGIN
724SET_EXECUTABLE_ORIGIN
725CXX_FLAG_REORDER
726C_FLAG_REORDER
727RC_FLAGS
728AR_OUT_OPTION
729LD_OUT_OPTION
730EXE_OUT_OPTION
731CC_OUT_OPTION
732STRIPFLAGS
733ARFLAGS
734COMPILER_TARGET_BITS_FLAG
735JT_HOME
736JTREGEXE
737USING_BROKEN_SUSE_LD
738PACKAGE_PATH
739USE_CLANG
740HOTSPOT_LD
741HOTSPOT_CXX
742HOTSPOT_RC
743HOTSPOT_MT
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747BUILD_SYSROOT_LDFLAGS
748BUILD_SYSROOT_CFLAGS
749ac_ct_OBJDUMP
750OBJDUMP
751ac_ct_OBJCOPY
752OBJCOPY
753ac_ct_NM
754ac_ct_STRIP
755GNM
756NM
757STRIP
758MSBUILD
759DUMPBIN
760RC
761MT
762LIPO
763ac_ct_AR
764AR
765AS
766LDCXX
767LD
768CXXCPP
769CPP
770ac_ct_CXX
771CXXFLAGS
772CXX
773ac_ct_PROPER_COMPILER_CXX
774PROPER_COMPILER_CXX
775TOOLCHAIN_PATH_CXX
776POTENTIAL_CXX
777OBJEXT
778EXEEXT
779ac_ct_CC
780CPPFLAGS
781LDFLAGS
782CFLAGS
783CC
784ac_ct_PROPER_COMPILER_CC
785PROPER_COMPILER_CC
786TOOLCHAIN_PATH_CC
787POTENTIAL_CC
788VS_LIB
789VS_INCLUDE
790VS_PATH
791CYGWIN_LINK
792SYSROOT_LDFLAGS
793SYSROOT_CFLAGS
794LEGACY_EXTRA_LDFLAGS
795LEGACY_EXTRA_CXXFLAGS
796LEGACY_EXTRA_CFLAGS
797EXE_SUFFIX
798OBJ_SUFFIX
799STATIC_LIBRARY
800SHARED_LIBRARY
801STATIC_LIBRARY_SUFFIX
802SHARED_LIBRARY_SUFFIX
803LIBRARY_PREFIX
804TOOLCHAIN_TYPE
805BUILD_HOTSPOT
806HOTSPOT_DIST
807BUILD_OUTPUT
808OVERRIDE_SRC_ROOT
809ADD_SRC_ROOT
810JDK_TOPDIR
811NASHORN_TOPDIR
812HOTSPOT_TOPDIR
813JAXWS_TOPDIR
814JAXP_TOPDIR
815CORBA_TOPDIR
816LANGTOOLS_TOPDIR
817BOOT_JDK_BITS
818JAVAC_FLAGS
819BOOT_JDK_SOURCETARGET
820JARSIGNER
821JAR
822JAVAH
823JAVAC
824JAVA
825BOOT_JDK
826JAVA_CHECK
827JAVAC_CHECK
828COOKED_BUILD_NUMBER
829JDK_VERSION
830COPYRIGHT_YEAR
831MACOSX_BUNDLE_ID_BASE
832MACOSX_BUNDLE_NAME_BASE
833COMPANY_NAME
834JDK_RC_PLATFORM_NAME
835PRODUCT_SUFFIX
836PRODUCT_NAME
837LAUNCHER_NAME
838MILESTONE
839JDK_BUILD_NUMBER
840JDK_UPDATE_VERSION
841JDK_MICRO_VERSION
842JDK_MINOR_VERSION
843JDK_MAJOR_VERSION
844USER_RELEASE_SUFFIX
845COMPRESS_JARS
846UNLIMITED_CRYPTO
847CACERTS_FILE
848TEST_IN_BUILD
849BUILD_HEADLESS
850SUPPORT_HEADFUL
851SUPPORT_HEADLESS
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856BASH_ARGS
857SETFILE
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862PATCH
863TIME
864STAT
865HG
866READELF
867OTOOL
868LDD
869ZIP
870UNZIP
871FIND_DELETE
872OUTPUT_SYNC
873OUTPUT_SYNC_SUPPORTED
874MAKE
875CHECK_TOOLSDIR_MAKE
876CHECK_TOOLSDIR_GMAKE
877CHECK_MAKE
878CHECK_GMAKE
879PKGHANDLER
880CONFIGURESUPPORT_OUTPUTDIR
881OUTPUT_ROOT
882CONF_NAME
883SPEC
884SDKROOT
885XCODEBUILD
886BUILD_VARIANT_RELEASE
887DEBUG_CLASSFILES
888FASTDEBUG
889VARIANT
890DEBUG_LEVEL
891MACOSX_UNIVERSAL
892INCLUDE_SA
893JVM_VARIANT_CORE
894JVM_VARIANT_ZEROSHARK
895JVM_VARIANT_ZERO
896JVM_VARIANT_KERNEL
897JVM_VARIANT_MINIMAL1
898JVM_VARIANT_CLIENT
899JVM_VARIANT_SERVER
900JVM_VARIANTS
901JVM_INTERPRETER
902JDK_VARIANT
903SET_OPENJDK
904CANONICAL_TOPDIR
905ORIGINAL_TOPDIR
906TOPDIR
907PATH_SEP
908ZERO_ARCHDEF
909DEFINE_CROSS_COMPILE_ARCH
910LP64
911OPENJDK_TARGET_OS_EXPORT_DIR
912OPENJDK_TARGET_CPU_JLI_CFLAGS
913OPENJDK_TARGET_CPU_OSARCH
914OPENJDK_TARGET_CPU_ISADIR
915OPENJDK_TARGET_CPU_LIBDIR
916OPENJDK_TARGET_CPU_LEGACY_LIB
917OPENJDK_TARGET_CPU_LEGACY
918REQUIRED_OS_VERSION
919REQUIRED_OS_NAME
920COMPILE_TYPE
921OPENJDK_TARGET_CPU_ENDIAN
922OPENJDK_TARGET_CPU_BITS
923OPENJDK_TARGET_CPU_ARCH
924OPENJDK_TARGET_CPU
925OPENJDK_TARGET_OS_ENV
926OPENJDK_TARGET_OS_TYPE
927OPENJDK_TARGET_OS
928OPENJDK_BUILD_CPU_ENDIAN
929OPENJDK_BUILD_CPU_BITS
930OPENJDK_BUILD_CPU_ARCH
931OPENJDK_BUILD_CPU
932OPENJDK_BUILD_OS_ENV
933OPENJDK_BUILD_OS_TYPE
934OPENJDK_BUILD_OS
935OPENJDK_BUILD_AUTOCONF_NAME
936OPENJDK_TARGET_AUTOCONF_NAME
937target_os
938target_vendor
939target_cpu
940target
941host_os
942host_vendor
943host_cpu
944host
945build_os
946build_vendor
947build_cpu
948build
949NICE
950CPIO
951DF
952READLINK
953CYGPATH
954SED
955FGREP
956EGREP
957GREP
958AWK
959XARGS
960WHICH
961WC
962UNIQ
963UNAME
964TR
965TOUCH
966TEE
967TAR
968TAIL
969SORT
970SH
971RMDIR
972RM
973PRINTF
974NAWK
975MV
976MKTEMP
977MKDIR
978LS
979LN
980HEAD
981FIND
982FILE
983EXPR
984ECHO
985DIRNAME
986DIFF
987DATE
988CUT
989CP
990COMM
991CMP
992CHMOD
993CAT
994BASH
995BASENAME
996DATE_WHEN_CONFIGURED
997ORIGINAL_PATH
998CONFIGURE_COMMAND_LINE
999target_alias
1000host_alias
1001build_alias
1002LIBS
1003ECHO_T
1004ECHO_N
1005ECHO_C
1006DEFS
1007mandir
1008localedir
1009libdir
1010psdir
1011pdfdir
1012dvidir
1013htmldir
1014infodir
1015docdir
1016oldincludedir
1017includedir
1018localstatedir
1019sharedstatedir
1020sysconfdir
1021datadir
1022datarootdir
1023libexecdir
1024sbindir
1025bindir
1026program_transform_name
1027prefix
1028exec_prefix
1029PACKAGE_URL
1030PACKAGE_BUGREPORT
1031PACKAGE_STRING
1032PACKAGE_VERSION
1033PACKAGE_TARNAME
1034PACKAGE_NAME
1035PATH_SEPARATOR
1036SHELL'
1037ac_subst_files=''
1038ac_user_opts='
1039enable_option_checking
1040with_target_bits
1041enable_openjdk_only
1042with_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057enable_headful
1058enable_hotspot_test_in_build
1059with_cacerts_file
1060enable_unlimited_crypto
1061with_milestone
1062with_update_version
1063with_user_release_suffix
1064with_build_number
1065with_copyright_year
1066with_boot_jdk
1067with_add_source_root
1068with_override_source_root
1069with_adds_and_overrides
1070with_override_langtools
1071with_override_corba
1072with_override_jaxp
1073with_override_jaxws
1074with_override_hotspot
1075with_override_nashorn
1076with_override_jdk
1077with_import_hotspot
1078with_toolchain_type
1079with_extra_cflags
1080with_extra_cxxflags
1081with_extra_ldflags
1082with_toolchain_version
1083with_build_devkit
1084with_jtreg
1085enable_warnings_as_errors
1086enable_debug_symbols
1087enable_zip_debug_info
1088enable_native_coverage
1089with_stdc__lib
1090with_msvcr_dll
1091with_msvcp_dll
1092with_x
1093with_cups
1094with_cups_include
1095with_freetype
1096with_freetype_include
1097with_freetype_lib
1098with_freetype_src
1099enable_freetype_bundling
1100with_alsa
1101with_alsa_include
1102with_alsa_lib
1103with_libffi
1104with_libffi_include
1105with_libffi_lib
1106with_libjpeg
1107with_giflib
1108with_libpng
1109with_zlib
1110with_lcms
1111with_dxsdk
1112with_dxsdk_lib
1113with_dxsdk_include
1114with_num_cores
1115with_memory_size
1116with_jobs
1117with_boot_jdk_jvmargs
1118with_sjavac_server_java
1119enable_sjavac
1120enable_javac_server
1121enable_precompiled_headers
1122enable_ccache
1123with_ccache_dir
1124'
1125      ac_precious_vars='build_alias
1126host_alias
1127target_alias
1128BASENAME
1129BASH
1130CAT
1131CHMOD
1132CMP
1133COMM
1134CP
1135CUT
1136DATE
1137DIFF
1138DIRNAME
1139ECHO
1140EXPR
1141FILE
1142FIND
1143HEAD
1144LN
1145LS
1146MKDIR
1147MKTEMP
1148MV
1149NAWK
1150PRINTF
1151RM
1152RMDIR
1153SH
1154SORT
1155TAIL
1156TAR
1157TEE
1158TOUCH
1159TR
1160UNAME
1161UNIQ
1162WC
1163WHICH
1164XARGS
1165AWK
1166GREP
1167EGREP
1168FGREP
1169SED
1170CYGPATH
1171READLINK
1172DF
1173CPIO
1174NICE
1175UNZIP
1176ZIP
1177LDD
1178OTOOL
1179READELF
1180HG
1181STAT
1182TIME
1183PATCH
1184DSYMUTIL
1185XATTR
1186CODESIGN
1187SETFILE
1188PKG_CONFIG
1189JAVA
1190JAVAC
1191JAVAH
1192JAR
1193JARSIGNER
1194CC
1195CFLAGS
1196LDFLAGS
1197LIBS
1198CPPFLAGS
1199CXX
1200CXXFLAGS
1201CCC
1202CPP
1203CXXCPP
1204AS
1205AR
1206LIPO
1207STRIP
1208NM
1209GNM
1210OBJCOPY
1211OBJDUMP
1212BUILD_CC
1213BUILD_CXX
1214JTREGEXE
1215XMKMF
1216FREETYPE_CFLAGS
1217FREETYPE_LIBS
1218ALSA_CFLAGS
1219ALSA_LIBS
1220LIBFFI_CFLAGS
1221LIBFFI_LIBS
1222PNG_CFLAGS
1223PNG_LIBS
1224LCMS_CFLAGS
1225LCMS_LIBS
1226CCACHE'
1227
1228
1229# Initialize some variables set by options.
1230ac_init_help=
1231ac_init_version=false
1232ac_unrecognized_opts=
1233ac_unrecognized_sep=
1234# The variables have the same names as the options, with
1235# dashes changed to underlines.
1236cache_file=/dev/null
1237exec_prefix=NONE
1238no_create=
1239no_recursion=
1240prefix=NONE
1241program_prefix=NONE
1242program_suffix=NONE
1243program_transform_name=s,x,x,
1244silent=
1245site=
1246srcdir=
1247verbose=
1248x_includes=NONE
1249x_libraries=NONE
1250
1251# Installation directory options.
1252# These are left unexpanded so users can "make install exec_prefix=/foo"
1253# and all the variables that are supposed to be based on exec_prefix
1254# by default will actually change.
1255# Use braces instead of parens because sh, perl, etc. also accept them.
1256# (The list follows the same order as the GNU Coding Standards.)
1257bindir='${exec_prefix}/bin'
1258sbindir='${exec_prefix}/sbin'
1259libexecdir='${exec_prefix}/libexec'
1260datarootdir='${prefix}/share'
1261datadir='${datarootdir}'
1262sysconfdir='${prefix}/etc'
1263sharedstatedir='${prefix}/com'
1264localstatedir='${prefix}/var'
1265includedir='${prefix}/include'
1266oldincludedir='/usr/include'
1267docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1268infodir='${datarootdir}/info'
1269htmldir='${docdir}'
1270dvidir='${docdir}'
1271pdfdir='${docdir}'
1272psdir='${docdir}'
1273libdir='${exec_prefix}/lib'
1274localedir='${datarootdir}/locale'
1275mandir='${datarootdir}/man'
1276
1277ac_prev=
1278ac_dashdash=
1279for ac_option
1280do
1281  # If the previous option needs an argument, assign it.
1282  if test -n "$ac_prev"; then
1283    eval $ac_prev=\$ac_option
1284    ac_prev=
1285    continue
1286  fi
1287
1288  case $ac_option in
1289  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1290  *=)   ac_optarg= ;;
1291  *)    ac_optarg=yes ;;
1292  esac
1293
1294  # Accept the important Cygnus configure options, so we can diagnose typos.
1295
1296  case $ac_dashdash$ac_option in
1297  --)
1298    ac_dashdash=yes ;;
1299
1300  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1301    ac_prev=bindir ;;
1302  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1303    bindir=$ac_optarg ;;
1304
1305  -build | --build | --buil | --bui | --bu)
1306    ac_prev=build_alias ;;
1307  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1308    build_alias=$ac_optarg ;;
1309
1310  -cache-file | --cache-file | --cache-fil | --cache-fi \
1311  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1312    ac_prev=cache_file ;;
1313  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1314  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1315    cache_file=$ac_optarg ;;
1316
1317  --config-cache | -C)
1318    cache_file=config.cache ;;
1319
1320  -datadir | --datadir | --datadi | --datad)
1321    ac_prev=datadir ;;
1322  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1323    datadir=$ac_optarg ;;
1324
1325  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1326  | --dataroo | --dataro | --datar)
1327    ac_prev=datarootdir ;;
1328  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1329  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1330    datarootdir=$ac_optarg ;;
1331
1332  -disable-* | --disable-*)
1333    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1334    # Reject names that are not valid shell variable names.
1335    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1336      as_fn_error $? "invalid feature name: $ac_useropt"
1337    ac_useropt_orig=$ac_useropt
1338    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1339    case $ac_user_opts in
1340      *"
1341"enable_$ac_useropt"
1342"*) ;;
1343      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1344	 ac_unrecognized_sep=', ';;
1345    esac
1346    eval enable_$ac_useropt=no ;;
1347
1348  -docdir | --docdir | --docdi | --doc | --do)
1349    ac_prev=docdir ;;
1350  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1351    docdir=$ac_optarg ;;
1352
1353  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1354    ac_prev=dvidir ;;
1355  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1356    dvidir=$ac_optarg ;;
1357
1358  -enable-* | --enable-*)
1359    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1360    # Reject names that are not valid shell variable names.
1361    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1362      as_fn_error $? "invalid feature name: $ac_useropt"
1363    ac_useropt_orig=$ac_useropt
1364    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1365    case $ac_user_opts in
1366      *"
1367"enable_$ac_useropt"
1368"*) ;;
1369      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1370	 ac_unrecognized_sep=', ';;
1371    esac
1372    eval enable_$ac_useropt=\$ac_optarg ;;
1373
1374  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1375  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1376  | --exec | --exe | --ex)
1377    ac_prev=exec_prefix ;;
1378  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1379  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1380  | --exec=* | --exe=* | --ex=*)
1381    exec_prefix=$ac_optarg ;;
1382
1383  -gas | --gas | --ga | --g)
1384    # Obsolete; use --with-gas.
1385    with_gas=yes ;;
1386
1387  -help | --help | --hel | --he | -h)
1388    ac_init_help=long ;;
1389  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1390    ac_init_help=recursive ;;
1391  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1392    ac_init_help=short ;;
1393
1394  -host | --host | --hos | --ho)
1395    ac_prev=host_alias ;;
1396  -host=* | --host=* | --hos=* | --ho=*)
1397    host_alias=$ac_optarg ;;
1398
1399  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1400    ac_prev=htmldir ;;
1401  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1402  | --ht=*)
1403    htmldir=$ac_optarg ;;
1404
1405  -includedir | --includedir | --includedi | --included | --include \
1406  | --includ | --inclu | --incl | --inc)
1407    ac_prev=includedir ;;
1408  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1409  | --includ=* | --inclu=* | --incl=* | --inc=*)
1410    includedir=$ac_optarg ;;
1411
1412  -infodir | --infodir | --infodi | --infod | --info | --inf)
1413    ac_prev=infodir ;;
1414  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1415    infodir=$ac_optarg ;;
1416
1417  -libdir | --libdir | --libdi | --libd)
1418    ac_prev=libdir ;;
1419  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1420    libdir=$ac_optarg ;;
1421
1422  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1423  | --libexe | --libex | --libe)
1424    ac_prev=libexecdir ;;
1425  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1426  | --libexe=* | --libex=* | --libe=*)
1427    libexecdir=$ac_optarg ;;
1428
1429  -localedir | --localedir | --localedi | --localed | --locale)
1430    ac_prev=localedir ;;
1431  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1432    localedir=$ac_optarg ;;
1433
1434  -localstatedir | --localstatedir | --localstatedi | --localstated \
1435  | --localstate | --localstat | --localsta | --localst | --locals)
1436    ac_prev=localstatedir ;;
1437  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1438  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1439    localstatedir=$ac_optarg ;;
1440
1441  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1442    ac_prev=mandir ;;
1443  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1444    mandir=$ac_optarg ;;
1445
1446  -nfp | --nfp | --nf)
1447    # Obsolete; use --without-fp.
1448    with_fp=no ;;
1449
1450  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1451  | --no-cr | --no-c | -n)
1452    no_create=yes ;;
1453
1454  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1455  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1456    no_recursion=yes ;;
1457
1458  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1459  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1460  | --oldin | --oldi | --old | --ol | --o)
1461    ac_prev=oldincludedir ;;
1462  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1463  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1464  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1465    oldincludedir=$ac_optarg ;;
1466
1467  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1468    ac_prev=prefix ;;
1469  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1470    prefix=$ac_optarg ;;
1471
1472  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1473  | --program-pre | --program-pr | --program-p)
1474    ac_prev=program_prefix ;;
1475  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1476  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1477    program_prefix=$ac_optarg ;;
1478
1479  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1480  | --program-suf | --program-su | --program-s)
1481    ac_prev=program_suffix ;;
1482  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1483  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1484    program_suffix=$ac_optarg ;;
1485
1486  -program-transform-name | --program-transform-name \
1487  | --program-transform-nam | --program-transform-na \
1488  | --program-transform-n | --program-transform- \
1489  | --program-transform | --program-transfor \
1490  | --program-transfo | --program-transf \
1491  | --program-trans | --program-tran \
1492  | --progr-tra | --program-tr | --program-t)
1493    ac_prev=program_transform_name ;;
1494  -program-transform-name=* | --program-transform-name=* \
1495  | --program-transform-nam=* | --program-transform-na=* \
1496  | --program-transform-n=* | --program-transform-=* \
1497  | --program-transform=* | --program-transfor=* \
1498  | --program-transfo=* | --program-transf=* \
1499  | --program-trans=* | --program-tran=* \
1500  | --progr-tra=* | --program-tr=* | --program-t=*)
1501    program_transform_name=$ac_optarg ;;
1502
1503  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1504    ac_prev=pdfdir ;;
1505  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1506    pdfdir=$ac_optarg ;;
1507
1508  -psdir | --psdir | --psdi | --psd | --ps)
1509    ac_prev=psdir ;;
1510  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1511    psdir=$ac_optarg ;;
1512
1513  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1514  | -silent | --silent | --silen | --sile | --sil)
1515    silent=yes ;;
1516
1517  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1518    ac_prev=sbindir ;;
1519  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1520  | --sbi=* | --sb=*)
1521    sbindir=$ac_optarg ;;
1522
1523  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1524  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1525  | --sharedst | --shareds | --shared | --share | --shar \
1526  | --sha | --sh)
1527    ac_prev=sharedstatedir ;;
1528  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1529  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1530  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1531  | --sha=* | --sh=*)
1532    sharedstatedir=$ac_optarg ;;
1533
1534  -site | --site | --sit)
1535    ac_prev=site ;;
1536  -site=* | --site=* | --sit=*)
1537    site=$ac_optarg ;;
1538
1539  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1540    ac_prev=srcdir ;;
1541  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1542    srcdir=$ac_optarg ;;
1543
1544  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1545  | --syscon | --sysco | --sysc | --sys | --sy)
1546    ac_prev=sysconfdir ;;
1547  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1548  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1549    sysconfdir=$ac_optarg ;;
1550
1551  -target | --target | --targe | --targ | --tar | --ta | --t)
1552    ac_prev=target_alias ;;
1553  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1554    target_alias=$ac_optarg ;;
1555
1556  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1557    verbose=yes ;;
1558
1559  -version | --version | --versio | --versi | --vers | -V)
1560    ac_init_version=: ;;
1561
1562  -with-* | --with-*)
1563    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1564    # Reject names that are not valid shell variable names.
1565    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1566      as_fn_error $? "invalid package name: $ac_useropt"
1567    ac_useropt_orig=$ac_useropt
1568    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1569    case $ac_user_opts in
1570      *"
1571"with_$ac_useropt"
1572"*) ;;
1573      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1574	 ac_unrecognized_sep=', ';;
1575    esac
1576    eval with_$ac_useropt=\$ac_optarg ;;
1577
1578  -without-* | --without-*)
1579    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1580    # Reject names that are not valid shell variable names.
1581    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1582      as_fn_error $? "invalid package name: $ac_useropt"
1583    ac_useropt_orig=$ac_useropt
1584    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1585    case $ac_user_opts in
1586      *"
1587"with_$ac_useropt"
1588"*) ;;
1589      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1590	 ac_unrecognized_sep=', ';;
1591    esac
1592    eval with_$ac_useropt=no ;;
1593
1594  --x)
1595    # Obsolete; use --with-x.
1596    with_x=yes ;;
1597
1598  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1599  | --x-incl | --x-inc | --x-in | --x-i)
1600    ac_prev=x_includes ;;
1601  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1602  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1603    x_includes=$ac_optarg ;;
1604
1605  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1606  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1607    ac_prev=x_libraries ;;
1608  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1609  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1610    x_libraries=$ac_optarg ;;
1611
1612  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1613Try \`$0 --help' for more information"
1614    ;;
1615
1616  *=*)
1617    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1618    # Reject names that are not valid shell variable names.
1619    case $ac_envvar in #(
1620      '' | [0-9]* | *[!_$as_cr_alnum]* )
1621      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1622    esac
1623    eval $ac_envvar=\$ac_optarg
1624    export $ac_envvar ;;
1625
1626  *)
1627    # FIXME: should be removed in autoconf 3.0.
1628    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1629    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1630      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1631    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1632    ;;
1633
1634  esac
1635done
1636
1637if test -n "$ac_prev"; then
1638  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1639  as_fn_error $? "missing argument to $ac_option"
1640fi
1641
1642if test -n "$ac_unrecognized_opts"; then
1643  case $enable_option_checking in
1644    no) ;;
1645    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1646    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1647  esac
1648fi
1649
1650# Check all directory arguments for consistency.
1651for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1652		datadir sysconfdir sharedstatedir localstatedir includedir \
1653		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1654		libdir localedir mandir
1655do
1656  eval ac_val=\$$ac_var
1657  # Remove trailing slashes.
1658  case $ac_val in
1659    */ )
1660      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1661      eval $ac_var=\$ac_val;;
1662  esac
1663  # Be sure to have absolute directory names.
1664  case $ac_val in
1665    [\\/$]* | ?:[\\/]* )  continue;;
1666    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1667  esac
1668  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1669done
1670
1671# There might be people who depend on the old broken behavior: `$host'
1672# used to hold the argument of --host etc.
1673# FIXME: To remove some day.
1674build=$build_alias
1675host=$host_alias
1676target=$target_alias
1677
1678# FIXME: To remove some day.
1679if test "x$host_alias" != x; then
1680  if test "x$build_alias" = x; then
1681    cross_compiling=maybe
1682  elif test "x$build_alias" != "x$host_alias"; then
1683    cross_compiling=yes
1684  fi
1685fi
1686
1687ac_tool_prefix=
1688test -n "$host_alias" && ac_tool_prefix=$host_alias-
1689
1690test "$silent" = yes && exec 6>/dev/null
1691
1692
1693ac_pwd=`pwd` && test -n "$ac_pwd" &&
1694ac_ls_di=`ls -di .` &&
1695ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1696  as_fn_error $? "working directory cannot be determined"
1697test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1698  as_fn_error $? "pwd does not report name of working directory"
1699
1700
1701# Find the source files, if location was not specified.
1702if test -z "$srcdir"; then
1703  ac_srcdir_defaulted=yes
1704  # Try the directory containing this script, then the parent directory.
1705  ac_confdir=`$as_dirname -- "$as_myself" ||
1706$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1707	 X"$as_myself" : 'X\(//\)[^/]' \| \
1708	 X"$as_myself" : 'X\(//\)$' \| \
1709	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1710$as_echo X"$as_myself" |
1711    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\/\)[^/].*/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\/\)$/{
1720	    s//\1/
1721	    q
1722	  }
1723	  /^X\(\/\).*/{
1724	    s//\1/
1725	    q
1726	  }
1727	  s/.*/./; q'`
1728  srcdir=$ac_confdir
1729  if test ! -r "$srcdir/$ac_unique_file"; then
1730    srcdir=..
1731  fi
1732else
1733  ac_srcdir_defaulted=no
1734fi
1735if test ! -r "$srcdir/$ac_unique_file"; then
1736  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1737  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1738fi
1739ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1740ac_abs_confdir=`(
1741	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1742	pwd)`
1743# When building in place, set srcdir=.
1744if test "$ac_abs_confdir" = "$ac_pwd"; then
1745  srcdir=.
1746fi
1747# Remove unnecessary trailing slashes from srcdir.
1748# Double slashes in file names in object file debugging info
1749# mess up M-x gdb in Emacs.
1750case $srcdir in
1751*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1752esac
1753for ac_var in $ac_precious_vars; do
1754  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1755  eval ac_env_${ac_var}_value=\$${ac_var}
1756  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1757  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1758done
1759
1760#
1761# Report the --help message.
1762#
1763if test "$ac_init_help" = "long"; then
1764  # Omit some internal or obsolete options to make the list less imposing.
1765  # This message is too long to be a string in the A/UX 3.1 sh.
1766  cat <<_ACEOF
1767\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1768
1769Usage: $0 [OPTION]... [VAR=VALUE]...
1770
1771To assign environment variables (e.g., CC, CFLAGS...), specify them as
1772VAR=VALUE.  See below for descriptions of some of the useful variables.
1773
1774Defaults for the options are specified in brackets.
1775
1776Configuration:
1777  -h, --help              display this help and exit
1778      --help=short        display options specific to this package
1779      --help=recursive    display the short help of all the included packages
1780  -V, --version           display version information and exit
1781  -q, --quiet, --silent   do not print \`checking ...' messages
1782      --cache-file=FILE   cache test results in FILE [disabled]
1783  -C, --config-cache      alias for \`--cache-file=config.cache'
1784  -n, --no-create         do not create output files
1785      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1786
1787Installation directories:
1788  --prefix=PREFIX         install architecture-independent files in PREFIX
1789                          [$ac_default_prefix]
1790  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1791                          [PREFIX]
1792
1793By default, \`make install' will install all the files in
1794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1796for instance \`--prefix=\$HOME'.
1797
1798For better control, use the options below.
1799
1800Fine tuning of the installation directories:
1801  --bindir=DIR            user executables [EPREFIX/bin]
1802  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1803  --libexecdir=DIR        program executables [EPREFIX/libexec]
1804  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1805  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1806  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1807  --libdir=DIR            object code libraries [EPREFIX/lib]
1808  --includedir=DIR        C header files [PREFIX/include]
1809  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1810  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1811  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1812  --infodir=DIR           info documentation [DATAROOTDIR/info]
1813  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1814  --mandir=DIR            man documentation [DATAROOTDIR/man]
1815  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1816  --htmldir=DIR           html documentation [DOCDIR]
1817  --dvidir=DIR            dvi documentation [DOCDIR]
1818  --pdfdir=DIR            pdf documentation [DOCDIR]
1819  --psdir=DIR             ps documentation [DOCDIR]
1820_ACEOF
1821
1822  cat <<\_ACEOF
1823
1824X features:
1825  --x-includes=DIR    X include files are in DIR
1826  --x-libraries=DIR   X library files are in DIR
1827
1828System types:
1829  --build=BUILD     configure for building on BUILD [guessed]
1830  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1831  --target=TARGET   configure for building compilers for TARGET [HOST]
1832_ACEOF
1833fi
1834
1835if test -n "$ac_init_help"; then
1836  case $ac_init_help in
1837     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1838   esac
1839  cat <<\_ACEOF
1840
1841Optional Features:
1842  --disable-option-checking  ignore unrecognized --enable/--with options
1843  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1844  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1845  --enable-openjdk-only   suppress building custom source even if present
1846                          [disabled]
1847  --enable-debug          set the debug level to fastdebug (shorthand for
1848                          --with-debug-level=fastdebug) [disabled]
1849  --disable-headful       disable building headful support (graphical UI
1850                          support) [enabled]
1851  --enable-hotspot-test-in-build
1852                          run the Queens test after Hotspot build [disabled]
1853  --enable-unlimited-crypto
1854                          Enable unlimited crypto policy [disabled]
1855  --disable-warnings-as-errors
1856                          do not consider native warnings to be an error
1857                          [enabled]
1858  --disable-debug-symbols disable generation of debug symbols [enabled]
1859  --disable-zip-debug-info
1860                          disable zipping of debug-info files [enabled]
1861  --enable-native-coverage
1862                          enable native compilation with code coverage
1863                          data[disabled]
1864  --disable-freetype-bundling
1865                          disable bundling of the freetype library with the
1866                          build result [enabled on Windows or when using
1867                          --with-freetype, disabled otherwise]
1868  --enable-sjavac         use sjavac to do fast incremental compiles
1869                          [disabled]
1870  --enable-javac-server   use only the server part of sjavac for faster javac
1871                          compiles [disabled]
1872  --disable-precompiled-headers
1873                          disable using precompiled headers when compiling C++
1874                          [enabled]
1875  --enable-ccache         enable using ccache to speed up recompilations
1876                          [disabled]
1877
1878Optional Packages:
1879  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1880  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1881  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1882                          support it), e.g. --with-target-bits=32 [guessed]
1883  --with-custom-make-dir  Deprecated. Option is kept for backwards
1884                          compatibility and is ignored
1885  --with-jdk-variant      JDK variant to build (normal) [normal]
1886  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1887  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1888                          client, minimal1, kernel, zero, zeroshark, core)
1889                          [server]
1890  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1891                          optimized (HotSpot build only)) [release]
1892  --with-devkit           use this devkit for compilers, tools and resources
1893  --with-sys-root         alias for --with-sysroot for backwards compatability
1894  --with-sysroot          use this directory as sysroot
1895  --with-tools-dir        alias for --with-toolchain-path for backwards
1896                          compatibility
1897  --with-toolchain-path   prepend these directories when searching for
1898                          toolchain binaries (compilers etc)
1899  --with-extra-path       prepend these directories to the default path
1900  --with-sdk-name         use the platform SDK of the given name. [macosx]
1901  --with-conf-name        use this as the name of the configuration [generated
1902                          from important configuration options]
1903  --with-output-sync      set make output sync type if supported by make.
1904                          [recurse]
1905  --with-cacerts-file     specify alternative cacerts file
1906  --with-milestone        Set milestone value for build [internal]
1907  --with-update-version   Set update version value for build [b00]
1908  --with-user-release-suffix
1909                          Add a custom string to the version string if build
1910                          number is not set.[username_builddateb00]
1911  --with-build-number     Set build number value for build [b00]
1912  --with-copyright-year   Set copyright year value for build [current year]
1913  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1914  --with-add-source-root  for each and every source directory, look in this
1915                          additional source root for the same directory; if it
1916                          exists and have files in it, include it in the build
1917  --with-override-source-root
1918                          for each and every source directory, look in this
1919                          override source root for the same directory; if it
1920                          exists, use that directory instead and ignore the
1921                          directory in the original source root
1922  --with-adds-and-overrides
1923                          use the subdirs 'adds' and 'overrides' in the
1924                          specified directory as add-source-root and
1925                          override-source-root
1926  --with-override-langtools
1927                          use this langtools dir for the build
1928  --with-override-corba   use this corba dir for the build
1929  --with-override-jaxp    use this jaxp dir for the build
1930  --with-override-jaxws   use this jaxws dir for the build
1931  --with-override-hotspot use this hotspot dir for the build
1932  --with-override-nashorn use this nashorn dir for the build
1933  --with-override-jdk     use this jdk dir for the build
1934  --with-import-hotspot   import hotspot binaries from this jdk image or
1935                          hotspot build dist dir instead of building from
1936                          source
1937  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1938                          to show possible values [platform dependent]
1939  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1940  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1941  --with-extra-ldflags    extra flags to be used when linking jdk
1942  --with-toolchain-version
1943                          the version of the toolchain to look for, use
1944                          '--help' to show possible values [platform
1945                          dependent]
1946  --with-build-devkit     Devkit to use for the build platform toolchain
1947  --with-jtreg            Regression Test Harness [probed]
1948  --with-stdc++lib=<static>,<dynamic>,<default>
1949                          force linking of the C++ runtime on Linux to either
1950                          static or dynamic, default is static with dynamic as
1951                          fallback
1952  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1953                          (Windows only) [probed]
1954  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1955                          (Windows only) [probed]
1956  --with-x                use the X Window System
1957  --with-cups             specify prefix directory for the cups package
1958                          (expecting the headers under PATH/include)
1959  --with-cups-include     specify directory for the cups include files
1960  --with-freetype         specify prefix directory for the freetype package
1961                          (expecting the libraries under PATH/lib and the
1962                          headers under PATH/include)
1963  --with-freetype-include specify directory for the freetype include files
1964  --with-freetype-lib     specify directory for the freetype library
1965  --with-freetype-src     specify directory with freetype sources to
1966                          automatically build the library (experimental,
1967                          Windows-only)
1968  --with-alsa             specify prefix directory for the alsa package
1969                          (expecting the libraries under PATH/lib and the
1970                          headers under PATH/include)
1971  --with-alsa-include     specify directory for the alsa include files
1972  --with-alsa-lib         specify directory for the alsa library
1973  --with-libffi           specify prefix directory for the libffi package
1974                          (expecting the libraries under PATH/lib and the
1975                          headers under PATH/include)
1976  --with-libffi-include   specify directory for the libffi include files
1977  --with-libffi-lib       specify directory for the libffi library
1978  --with-libjpeg          use libjpeg from build system or OpenJDK source
1979                          (system, bundled) [bundled]
1980  --with-giflib           use giflib from build system or OpenJDK source
1981                          (system, bundled) [bundled]
1982  --with-libpng           use libpng from build system or OpenJDK source
1983                          (system, bundled) [bundled]
1984  --with-zlib             use zlib from build system or OpenJDK source
1985                          (system, bundled) [bundled]
1986  --with-lcms             use lcms2 from build system or OpenJDK source
1987                          (system, bundled) [bundled]
1988  --with-dxsdk            Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-dxsdk-include    Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-num-cores        number of cores in the build system, e.g.
1995                          --with-num-cores=8 [probed]
1996  --with-memory-size      memory (in MB) available in the build system, e.g.
1997                          --with-memory-size=1024 [probed]
1998  --with-jobs             number of parallel jobs to let make run [calculated
1999                          based on cores and memory]
2000  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2001                          invocations of boot JDK, overriding the default
2002                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2003                          -enableassertions"
2004  --with-sjavac-server-java
2005                          use this java binary for running the sjavac
2006                          background server [Boot JDK java]
2007  --with-ccache-dir       where to store ccache files [~/.ccache]
2008
2009Some influential environment variables:
2010  BASENAME    Override default value for BASENAME
2011  BASH        Override default value for BASH
2012  CAT         Override default value for CAT
2013  CHMOD       Override default value for CHMOD
2014  CMP         Override default value for CMP
2015  COMM        Override default value for COMM
2016  CP          Override default value for CP
2017  CUT         Override default value for CUT
2018  DATE        Override default value for DATE
2019  DIFF        Override default value for DIFF
2020  DIRNAME     Override default value for DIRNAME
2021  ECHO        Override default value for ECHO
2022  EXPR        Override default value for EXPR
2023  FILE        Override default value for FILE
2024  FIND        Override default value for FIND
2025  HEAD        Override default value for HEAD
2026  LN          Override default value for LN
2027  LS          Override default value for LS
2028  MKDIR       Override default value for MKDIR
2029  MKTEMP      Override default value for MKTEMP
2030  MV          Override default value for MV
2031  NAWK        Override default value for NAWK
2032  PRINTF      Override default value for PRINTF
2033  RM          Override default value for RM
2034  RMDIR       Override default value for RMDIR
2035  SH          Override default value for SH
2036  SORT        Override default value for SORT
2037  TAIL        Override default value for TAIL
2038  TAR         Override default value for TAR
2039  TEE         Override default value for TEE
2040  TOUCH       Override default value for TOUCH
2041  TR          Override default value for TR
2042  UNAME       Override default value for UNAME
2043  UNIQ        Override default value for UNIQ
2044  WC          Override default value for WC
2045  WHICH       Override default value for WHICH
2046  XARGS       Override default value for XARGS
2047  AWK         Override default value for AWK
2048  GREP        Override default value for GREP
2049  EGREP       Override default value for EGREP
2050  FGREP       Override default value for FGREP
2051  SED         Override default value for SED
2052  CYGPATH     Override default value for CYGPATH
2053  READLINK    Override default value for READLINK
2054  DF          Override default value for DF
2055  CPIO        Override default value for CPIO
2056  NICE        Override default value for NICE
2057  UNZIP       Override default value for UNZIP
2058  ZIP         Override default value for ZIP
2059  LDD         Override default value for LDD
2060  OTOOL       Override default value for OTOOL
2061  READELF     Override default value for READELF
2062  HG          Override default value for HG
2063  STAT        Override default value for STAT
2064  TIME        Override default value for TIME
2065  PATCH       Override default value for PATCH
2066  DSYMUTIL    Override default value for DSYMUTIL
2067  XATTR       Override default value for XATTR
2068  CODESIGN    Override default value for CODESIGN
2069  SETFILE     Override default value for SETFILE
2070  PKG_CONFIG  path to pkg-config utility
2071  JAVA        Override default value for JAVA
2072  JAVAC       Override default value for JAVAC
2073  JAVAH       Override default value for JAVAH
2074  JAR         Override default value for JAR
2075  JARSIGNER   Override default value for JARSIGNER
2076  CC          C compiler command
2077  CFLAGS      C compiler flags
2078  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2079              nonstandard directory <lib dir>
2080  LIBS        libraries to pass to the linker, e.g. -l<library>
2081  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2082              you have headers in a nonstandard directory <include dir>
2083  CXX         C++ compiler command
2084  CXXFLAGS    C++ compiler flags
2085  CPP         C preprocessor
2086  CXXCPP      C++ preprocessor
2087  AS          Override default value for AS
2088  AR          Override default value for AR
2089  LIPO        Override default value for LIPO
2090  STRIP       Override default value for STRIP
2091  NM          Override default value for NM
2092  GNM         Override default value for GNM
2093  OBJCOPY     Override default value for OBJCOPY
2094  OBJDUMP     Override default value for OBJDUMP
2095  BUILD_CC    Override default value for BUILD_CC
2096  BUILD_CXX   Override default value for BUILD_CXX
2097  JTREGEXE    Override default value for JTREGEXE
2098  XMKMF       Path to xmkmf, Makefile generator for X Window System
2099  FREETYPE_CFLAGS
2100              C compiler flags for FREETYPE, overriding pkg-config
2101  FREETYPE_LIBS
2102              linker flags for FREETYPE, overriding pkg-config
2103  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2104  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2105  LIBFFI_CFLAGS
2106              C compiler flags for LIBFFI, overriding pkg-config
2107  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2108  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2109  PNG_LIBS    linker flags for PNG, overriding pkg-config
2110  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2111  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2112  CCACHE      Override default value for CCACHE
2113
2114Use these variables to override the choices made by `configure' or to help
2115it to find libraries and programs with nonstandard names/locations.
2116
2117Report bugs to <build-dev@openjdk.java.net>.
2118OpenJDK home page: <http://openjdk.java.net>.
2119_ACEOF
2120ac_status=$?
2121fi
2122
2123if test "$ac_init_help" = "recursive"; then
2124  # If there are subdirs, report their specific --help.
2125  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2126    test -d "$ac_dir" ||
2127      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2128      continue
2129    ac_builddir=.
2130
2131case "$ac_dir" in
2132.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2133*)
2134  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2135  # A ".." for each directory in $ac_dir_suffix.
2136  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2137  case $ac_top_builddir_sub in
2138  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2139  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2140  esac ;;
2141esac
2142ac_abs_top_builddir=$ac_pwd
2143ac_abs_builddir=$ac_pwd$ac_dir_suffix
2144# for backward compatibility:
2145ac_top_builddir=$ac_top_build_prefix
2146
2147case $srcdir in
2148  .)  # We are building in place.
2149    ac_srcdir=.
2150    ac_top_srcdir=$ac_top_builddir_sub
2151    ac_abs_top_srcdir=$ac_pwd ;;
2152  [\\/]* | ?:[\\/]* )  # Absolute name.
2153    ac_srcdir=$srcdir$ac_dir_suffix;
2154    ac_top_srcdir=$srcdir
2155    ac_abs_top_srcdir=$srcdir ;;
2156  *) # Relative name.
2157    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2158    ac_top_srcdir=$ac_top_build_prefix$srcdir
2159    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2160esac
2161ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2162
2163    cd "$ac_dir" || { ac_status=$?; continue; }
2164    # Check for guested configure.
2165    if test -f "$ac_srcdir/configure.gnu"; then
2166      echo &&
2167      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2168    elif test -f "$ac_srcdir/configure"; then
2169      echo &&
2170      $SHELL "$ac_srcdir/configure" --help=recursive
2171    else
2172      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2173    fi || ac_status=$?
2174    cd "$ac_pwd" || { ac_status=$?; break; }
2175  done
2176fi
2177
2178test -n "$ac_init_help" && exit $ac_status
2179if $ac_init_version; then
2180  cat <<\_ACEOF
2181OpenJDK configure jdk9
2182generated by GNU Autoconf 2.69
2183
2184Copyright (C) 2012 Free Software Foundation, Inc.
2185This configure script is free software; the Free Software Foundation
2186gives unlimited permission to copy, distribute and modify it.
2187_ACEOF
2188  exit
2189fi
2190
2191## ------------------------ ##
2192## Autoconf initialization. ##
2193## ------------------------ ##
2194
2195# ac_fn_c_try_compile LINENO
2196# --------------------------
2197# Try to compile conftest.$ac_ext, and return whether this succeeded.
2198ac_fn_c_try_compile ()
2199{
2200  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2201  rm -f conftest.$ac_objext
2202  if { { ac_try="$ac_compile"
2203case "(($ac_try" in
2204  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2205  *) ac_try_echo=$ac_try;;
2206esac
2207eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2208$as_echo "$ac_try_echo"; } >&5
2209  (eval "$ac_compile") 2>conftest.err
2210  ac_status=$?
2211  if test -s conftest.err; then
2212    grep -v '^ *+' conftest.err >conftest.er1
2213    cat conftest.er1 >&5
2214    mv -f conftest.er1 conftest.err
2215  fi
2216  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2217  test $ac_status = 0; } && {
2218	 test -z "$ac_c_werror_flag" ||
2219	 test ! -s conftest.err
2220       } && test -s conftest.$ac_objext; then :
2221  ac_retval=0
2222else
2223  $as_echo "$as_me: failed program was:" >&5
2224sed 's/^/| /' conftest.$ac_ext >&5
2225
2226	ac_retval=1
2227fi
2228  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2229  as_fn_set_status $ac_retval
2230
2231} # ac_fn_c_try_compile
2232
2233# ac_fn_cxx_try_compile LINENO
2234# ----------------------------
2235# Try to compile conftest.$ac_ext, and return whether this succeeded.
2236ac_fn_cxx_try_compile ()
2237{
2238  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239  rm -f conftest.$ac_objext
2240  if { { ac_try="$ac_compile"
2241case "(($ac_try" in
2242  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2243  *) ac_try_echo=$ac_try;;
2244esac
2245eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2246$as_echo "$ac_try_echo"; } >&5
2247  (eval "$ac_compile") 2>conftest.err
2248  ac_status=$?
2249  if test -s conftest.err; then
2250    grep -v '^ *+' conftest.err >conftest.er1
2251    cat conftest.er1 >&5
2252    mv -f conftest.er1 conftest.err
2253  fi
2254  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2255  test $ac_status = 0; } && {
2256	 test -z "$ac_cxx_werror_flag" ||
2257	 test ! -s conftest.err
2258       } && test -s conftest.$ac_objext; then :
2259  ac_retval=0
2260else
2261  $as_echo "$as_me: failed program was:" >&5
2262sed 's/^/| /' conftest.$ac_ext >&5
2263
2264	ac_retval=1
2265fi
2266  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2267  as_fn_set_status $ac_retval
2268
2269} # ac_fn_cxx_try_compile
2270
2271# ac_fn_c_try_cpp LINENO
2272# ----------------------
2273# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2274ac_fn_c_try_cpp ()
2275{
2276  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2277  if { { ac_try="$ac_cpp conftest.$ac_ext"
2278case "(($ac_try" in
2279  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2280  *) ac_try_echo=$ac_try;;
2281esac
2282eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2283$as_echo "$ac_try_echo"; } >&5
2284  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2285  ac_status=$?
2286  if test -s conftest.err; then
2287    grep -v '^ *+' conftest.err >conftest.er1
2288    cat conftest.er1 >&5
2289    mv -f conftest.er1 conftest.err
2290  fi
2291  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2292  test $ac_status = 0; } > conftest.i && {
2293	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2294	 test ! -s conftest.err
2295       }; then :
2296  ac_retval=0
2297else
2298  $as_echo "$as_me: failed program was:" >&5
2299sed 's/^/| /' conftest.$ac_ext >&5
2300
2301    ac_retval=1
2302fi
2303  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2304  as_fn_set_status $ac_retval
2305
2306} # ac_fn_c_try_cpp
2307
2308# ac_fn_cxx_try_cpp LINENO
2309# ------------------------
2310# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2311ac_fn_cxx_try_cpp ()
2312{
2313  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2314  if { { ac_try="$ac_cpp conftest.$ac_ext"
2315case "(($ac_try" in
2316  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2317  *) ac_try_echo=$ac_try;;
2318esac
2319eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2320$as_echo "$ac_try_echo"; } >&5
2321  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2322  ac_status=$?
2323  if test -s conftest.err; then
2324    grep -v '^ *+' conftest.err >conftest.er1
2325    cat conftest.er1 >&5
2326    mv -f conftest.er1 conftest.err
2327  fi
2328  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2329  test $ac_status = 0; } > conftest.i && {
2330	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2331	 test ! -s conftest.err
2332       }; then :
2333  ac_retval=0
2334else
2335  $as_echo "$as_me: failed program was:" >&5
2336sed 's/^/| /' conftest.$ac_ext >&5
2337
2338    ac_retval=1
2339fi
2340  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2341  as_fn_set_status $ac_retval
2342
2343} # ac_fn_cxx_try_cpp
2344
2345# ac_fn_c_try_link LINENO
2346# -----------------------
2347# Try to link conftest.$ac_ext, and return whether this succeeded.
2348ac_fn_c_try_link ()
2349{
2350  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2351  rm -f conftest.$ac_objext conftest$ac_exeext
2352  if { { ac_try="$ac_link"
2353case "(($ac_try" in
2354  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2355  *) ac_try_echo=$ac_try;;
2356esac
2357eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2358$as_echo "$ac_try_echo"; } >&5
2359  (eval "$ac_link") 2>conftest.err
2360  ac_status=$?
2361  if test -s conftest.err; then
2362    grep -v '^ *+' conftest.err >conftest.er1
2363    cat conftest.er1 >&5
2364    mv -f conftest.er1 conftest.err
2365  fi
2366  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2367  test $ac_status = 0; } && {
2368	 test -z "$ac_c_werror_flag" ||
2369	 test ! -s conftest.err
2370       } && test -s conftest$ac_exeext && {
2371	 test "$cross_compiling" = yes ||
2372	 test -x conftest$ac_exeext
2373       }; then :
2374  ac_retval=0
2375else
2376  $as_echo "$as_me: failed program was:" >&5
2377sed 's/^/| /' conftest.$ac_ext >&5
2378
2379	ac_retval=1
2380fi
2381  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2382  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2383  # interfere with the next link command; also delete a directory that is
2384  # left behind by Apple's compiler.  We do this before executing the actions.
2385  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2386  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2387  as_fn_set_status $ac_retval
2388
2389} # ac_fn_c_try_link
2390
2391# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2392# ---------------------------------------------------------
2393# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2394# the include files in INCLUDES and setting the cache variable VAR
2395# accordingly.
2396ac_fn_cxx_check_header_mongrel ()
2397{
2398  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399  if eval \${$3+:} false; then :
2400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2401$as_echo_n "checking for $2... " >&6; }
2402if eval \${$3+:} false; then :
2403  $as_echo_n "(cached) " >&6
2404fi
2405eval ac_res=\$$3
2406	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2407$as_echo "$ac_res" >&6; }
2408else
2409  # Is the header compilable?
2410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2411$as_echo_n "checking $2 usability... " >&6; }
2412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2413/* end confdefs.h.  */
2414$4
2415#include <$2>
2416_ACEOF
2417if ac_fn_cxx_try_compile "$LINENO"; then :
2418  ac_header_compiler=yes
2419else
2420  ac_header_compiler=no
2421fi
2422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2424$as_echo "$ac_header_compiler" >&6; }
2425
2426# Is the header present?
2427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2428$as_echo_n "checking $2 presence... " >&6; }
2429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430/* end confdefs.h.  */
2431#include <$2>
2432_ACEOF
2433if ac_fn_cxx_try_cpp "$LINENO"; then :
2434  ac_header_preproc=yes
2435else
2436  ac_header_preproc=no
2437fi
2438rm -f conftest.err conftest.i conftest.$ac_ext
2439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2440$as_echo "$ac_header_preproc" >&6; }
2441
2442# So?  What about this header?
2443case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2444  yes:no: )
2445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2446$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2448$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2449    ;;
2450  no:yes:* )
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2452$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2454$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2456$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2458$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2459    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2460$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2461( $as_echo "## ----------------------------------------- ##
2462## Report this to build-dev@openjdk.java.net ##
2463## ----------------------------------------- ##"
2464     ) | sed "s/^/$as_me: WARNING:     /" >&2
2465    ;;
2466esac
2467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2468$as_echo_n "checking for $2... " >&6; }
2469if eval \${$3+:} false; then :
2470  $as_echo_n "(cached) " >&6
2471else
2472  eval "$3=\$ac_header_compiler"
2473fi
2474eval ac_res=\$$3
2475	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2476$as_echo "$ac_res" >&6; }
2477fi
2478  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2479
2480} # ac_fn_cxx_check_header_mongrel
2481
2482# ac_fn_cxx_try_run LINENO
2483# ------------------------
2484# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2485# that executables *can* be run.
2486ac_fn_cxx_try_run ()
2487{
2488  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2489  if { { ac_try="$ac_link"
2490case "(($ac_try" in
2491  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2492  *) ac_try_echo=$ac_try;;
2493esac
2494eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2495$as_echo "$ac_try_echo"; } >&5
2496  (eval "$ac_link") 2>&5
2497  ac_status=$?
2498  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2499  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2500  { { case "(($ac_try" in
2501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2502  *) ac_try_echo=$ac_try;;
2503esac
2504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2505$as_echo "$ac_try_echo"; } >&5
2506  (eval "$ac_try") 2>&5
2507  ac_status=$?
2508  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2509  test $ac_status = 0; }; }; then :
2510  ac_retval=0
2511else
2512  $as_echo "$as_me: program exited with status $ac_status" >&5
2513       $as_echo "$as_me: failed program was:" >&5
2514sed 's/^/| /' conftest.$ac_ext >&5
2515
2516       ac_retval=$ac_status
2517fi
2518  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2519  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2520  as_fn_set_status $ac_retval
2521
2522} # ac_fn_cxx_try_run
2523
2524# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2525# ---------------------------------------------------------
2526# Tests whether HEADER exists and can be compiled using the include files in
2527# INCLUDES, setting the cache variable VAR accordingly.
2528ac_fn_cxx_check_header_compile ()
2529{
2530  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2532$as_echo_n "checking for $2... " >&6; }
2533if eval \${$3+:} false; then :
2534  $as_echo_n "(cached) " >&6
2535else
2536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2537/* end confdefs.h.  */
2538$4
2539#include <$2>
2540_ACEOF
2541if ac_fn_cxx_try_compile "$LINENO"; then :
2542  eval "$3=yes"
2543else
2544  eval "$3=no"
2545fi
2546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2547fi
2548eval ac_res=\$$3
2549	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550$as_echo "$ac_res" >&6; }
2551  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2552
2553} # ac_fn_cxx_check_header_compile
2554
2555# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2556# ----------------------------------------------
2557# Tries to find the compile-time value of EXPR in a program that includes
2558# INCLUDES, setting VAR accordingly. Returns whether the value could be
2559# computed
2560ac_fn_cxx_compute_int ()
2561{
2562  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2563  if test "$cross_compiling" = yes; then
2564    # Depending upon the size, compute the lo and hi bounds.
2565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2566/* end confdefs.h.  */
2567$4
2568int
2569main ()
2570{
2571static int test_array [1 - 2 * !(($2) >= 0)];
2572test_array [0] = 0;
2573return test_array [0];
2574
2575  ;
2576  return 0;
2577}
2578_ACEOF
2579if ac_fn_cxx_try_compile "$LINENO"; then :
2580  ac_lo=0 ac_mid=0
2581  while :; do
2582    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2583/* end confdefs.h.  */
2584$4
2585int
2586main ()
2587{
2588static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2589test_array [0] = 0;
2590return test_array [0];
2591
2592  ;
2593  return 0;
2594}
2595_ACEOF
2596if ac_fn_cxx_try_compile "$LINENO"; then :
2597  ac_hi=$ac_mid; break
2598else
2599  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2600			if test $ac_lo -le $ac_mid; then
2601			  ac_lo= ac_hi=
2602			  break
2603			fi
2604			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2605fi
2606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2607  done
2608else
2609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610/* end confdefs.h.  */
2611$4
2612int
2613main ()
2614{
2615static int test_array [1 - 2 * !(($2) < 0)];
2616test_array [0] = 0;
2617return test_array [0];
2618
2619  ;
2620  return 0;
2621}
2622_ACEOF
2623if ac_fn_cxx_try_compile "$LINENO"; then :
2624  ac_hi=-1 ac_mid=-1
2625  while :; do
2626    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627/* end confdefs.h.  */
2628$4
2629int
2630main ()
2631{
2632static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2633test_array [0] = 0;
2634return test_array [0];
2635
2636  ;
2637  return 0;
2638}
2639_ACEOF
2640if ac_fn_cxx_try_compile "$LINENO"; then :
2641  ac_lo=$ac_mid; break
2642else
2643  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2644			if test $ac_mid -le $ac_hi; then
2645			  ac_lo= ac_hi=
2646			  break
2647			fi
2648			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2649fi
2650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2651  done
2652else
2653  ac_lo= ac_hi=
2654fi
2655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2656fi
2657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2658# Binary search between lo and hi bounds.
2659while test "x$ac_lo" != "x$ac_hi"; do
2660  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2662/* end confdefs.h.  */
2663$4
2664int
2665main ()
2666{
2667static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2668test_array [0] = 0;
2669return test_array [0];
2670
2671  ;
2672  return 0;
2673}
2674_ACEOF
2675if ac_fn_cxx_try_compile "$LINENO"; then :
2676  ac_hi=$ac_mid
2677else
2678  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681done
2682case $ac_lo in #((
2683?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2684'') ac_retval=1 ;;
2685esac
2686  else
2687    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2688/* end confdefs.h.  */
2689$4
2690static long int longval () { return $2; }
2691static unsigned long int ulongval () { return $2; }
2692#include <stdio.h>
2693#include <stdlib.h>
2694int
2695main ()
2696{
2697
2698  FILE *f = fopen ("conftest.val", "w");
2699  if (! f)
2700    return 1;
2701  if (($2) < 0)
2702    {
2703      long int i = longval ();
2704      if (i != ($2))
2705	return 1;
2706      fprintf (f, "%ld", i);
2707    }
2708  else
2709    {
2710      unsigned long int i = ulongval ();
2711      if (i != ($2))
2712	return 1;
2713      fprintf (f, "%lu", i);
2714    }
2715  /* Do not output a trailing newline, as this causes \r\n confusion
2716     on some platforms.  */
2717  return ferror (f) || fclose (f) != 0;
2718
2719  ;
2720  return 0;
2721}
2722_ACEOF
2723if ac_fn_cxx_try_run "$LINENO"; then :
2724  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2725else
2726  ac_retval=1
2727fi
2728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2729  conftest.$ac_objext conftest.beam conftest.$ac_ext
2730rm -f conftest.val
2731
2732  fi
2733  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2734  as_fn_set_status $ac_retval
2735
2736} # ac_fn_cxx_compute_int
2737
2738# ac_fn_cxx_try_link LINENO
2739# -------------------------
2740# Try to link conftest.$ac_ext, and return whether this succeeded.
2741ac_fn_cxx_try_link ()
2742{
2743  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2744  rm -f conftest.$ac_objext conftest$ac_exeext
2745  if { { ac_try="$ac_link"
2746case "(($ac_try" in
2747  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2748  *) ac_try_echo=$ac_try;;
2749esac
2750eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2751$as_echo "$ac_try_echo"; } >&5
2752  (eval "$ac_link") 2>conftest.err
2753  ac_status=$?
2754  if test -s conftest.err; then
2755    grep -v '^ *+' conftest.err >conftest.er1
2756    cat conftest.er1 >&5
2757    mv -f conftest.er1 conftest.err
2758  fi
2759  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2760  test $ac_status = 0; } && {
2761	 test -z "$ac_cxx_werror_flag" ||
2762	 test ! -s conftest.err
2763       } && test -s conftest$ac_exeext && {
2764	 test "$cross_compiling" = yes ||
2765	 test -x conftest$ac_exeext
2766       }; then :
2767  ac_retval=0
2768else
2769  $as_echo "$as_me: failed program was:" >&5
2770sed 's/^/| /' conftest.$ac_ext >&5
2771
2772	ac_retval=1
2773fi
2774  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2775  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2776  # interfere with the next link command; also delete a directory that is
2777  # left behind by Apple's compiler.  We do this before executing the actions.
2778  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2779  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2780  as_fn_set_status $ac_retval
2781
2782} # ac_fn_cxx_try_link
2783
2784# ac_fn_cxx_check_func LINENO FUNC VAR
2785# ------------------------------------
2786# Tests whether FUNC exists, setting the cache variable VAR accordingly
2787ac_fn_cxx_check_func ()
2788{
2789  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2791$as_echo_n "checking for $2... " >&6; }
2792if eval \${$3+:} false; then :
2793  $as_echo_n "(cached) " >&6
2794else
2795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2796/* end confdefs.h.  */
2797/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2798   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2799#define $2 innocuous_$2
2800
2801/* System header to define __stub macros and hopefully few prototypes,
2802    which can conflict with char $2 (); below.
2803    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2804    <limits.h> exists even on freestanding compilers.  */
2805
2806#ifdef __STDC__
2807# include <limits.h>
2808#else
2809# include <assert.h>
2810#endif
2811
2812#undef $2
2813
2814/* Override any GCC internal prototype to avoid an error.
2815   Use char because int might match the return type of a GCC
2816   builtin and then its argument prototype would still apply.  */
2817#ifdef __cplusplus
2818extern "C"
2819#endif
2820char $2 ();
2821/* The GNU C library defines this for functions which it implements
2822    to always fail with ENOSYS.  Some functions are actually named
2823    something starting with __ and the normal name is an alias.  */
2824#if defined __stub_$2 || defined __stub___$2
2825choke me
2826#endif
2827
2828int
2829main ()
2830{
2831return $2 ();
2832  ;
2833  return 0;
2834}
2835_ACEOF
2836if ac_fn_cxx_try_link "$LINENO"; then :
2837  eval "$3=yes"
2838else
2839  eval "$3=no"
2840fi
2841rm -f core conftest.err conftest.$ac_objext \
2842    conftest$ac_exeext conftest.$ac_ext
2843fi
2844eval ac_res=\$$3
2845	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2846$as_echo "$ac_res" >&6; }
2847  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2848
2849} # ac_fn_cxx_check_func
2850
2851# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2852# -------------------------------------------------------
2853# Tests whether HEADER exists and can be compiled using the include files in
2854# INCLUDES, setting the cache variable VAR accordingly.
2855ac_fn_c_check_header_compile ()
2856{
2857  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2859$as_echo_n "checking for $2... " >&6; }
2860if eval \${$3+:} false; then :
2861  $as_echo_n "(cached) " >&6
2862else
2863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2864/* end confdefs.h.  */
2865$4
2866#include <$2>
2867_ACEOF
2868if ac_fn_c_try_compile "$LINENO"; then :
2869  eval "$3=yes"
2870else
2871  eval "$3=no"
2872fi
2873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2874fi
2875eval ac_res=\$$3
2876	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2877$as_echo "$ac_res" >&6; }
2878  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2879
2880} # ac_fn_c_check_header_compile
2881cat >config.log <<_ACEOF
2882This file contains any messages produced by compilers while
2883running configure, to aid debugging if configure makes a mistake.
2884
2885It was created by OpenJDK $as_me jdk9, which was
2886generated by GNU Autoconf 2.69.  Invocation command line was
2887
2888  $ $0 $@
2889
2890_ACEOF
2891exec 5>>config.log
2892{
2893cat <<_ASUNAME
2894## --------- ##
2895## Platform. ##
2896## --------- ##
2897
2898hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2899uname -m = `(uname -m) 2>/dev/null || echo unknown`
2900uname -r = `(uname -r) 2>/dev/null || echo unknown`
2901uname -s = `(uname -s) 2>/dev/null || echo unknown`
2902uname -v = `(uname -v) 2>/dev/null || echo unknown`
2903
2904/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2905/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2906
2907/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2908/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2909/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2910/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2911/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2912/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2913/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2914
2915_ASUNAME
2916
2917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2918for as_dir in $PATH
2919do
2920  IFS=$as_save_IFS
2921  test -z "$as_dir" && as_dir=.
2922    $as_echo "PATH: $as_dir"
2923  done
2924IFS=$as_save_IFS
2925
2926} >&5
2927
2928cat >&5 <<_ACEOF
2929
2930
2931## ----------- ##
2932## Core tests. ##
2933## ----------- ##
2934
2935_ACEOF
2936
2937
2938# Keep a trace of the command line.
2939# Strip out --no-create and --no-recursion so they do not pile up.
2940# Strip out --silent because we don't want to record it for future runs.
2941# Also quote any args containing shell meta-characters.
2942# Make two passes to allow for proper duplicate-argument suppression.
2943ac_configure_args=
2944ac_configure_args0=
2945ac_configure_args1=
2946ac_must_keep_next=false
2947for ac_pass in 1 2
2948do
2949  for ac_arg
2950  do
2951    case $ac_arg in
2952    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2953    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2954    | -silent | --silent | --silen | --sile | --sil)
2955      continue ;;
2956    *\'*)
2957      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2958    esac
2959    case $ac_pass in
2960    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2961    2)
2962      as_fn_append ac_configure_args1 " '$ac_arg'"
2963      if test $ac_must_keep_next = true; then
2964	ac_must_keep_next=false # Got value, back to normal.
2965      else
2966	case $ac_arg in
2967	  *=* | --config-cache | -C | -disable-* | --disable-* \
2968	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2969	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2970	  | -with-* | --with-* | -without-* | --without-* | --x)
2971	    case "$ac_configure_args0 " in
2972	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2973	    esac
2974	    ;;
2975	  -* ) ac_must_keep_next=true ;;
2976	esac
2977      fi
2978      as_fn_append ac_configure_args " '$ac_arg'"
2979      ;;
2980    esac
2981  done
2982done
2983{ ac_configure_args0=; unset ac_configure_args0;}
2984{ ac_configure_args1=; unset ac_configure_args1;}
2985
2986# When interrupted or exit'd, cleanup temporary files, and complete
2987# config.log.  We remove comments because anyway the quotes in there
2988# would cause problems or look ugly.
2989# WARNING: Use '\'' to represent an apostrophe within the trap.
2990# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2991trap 'exit_status=$?
2992  # Save into config.log some information that might help in debugging.
2993  {
2994    echo
2995
2996    $as_echo "## ---------------- ##
2997## Cache variables. ##
2998## ---------------- ##"
2999    echo
3000    # The following way of writing the cache mishandles newlines in values,
3001(
3002  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3003    eval ac_val=\$$ac_var
3004    case $ac_val in #(
3005    *${as_nl}*)
3006      case $ac_var in #(
3007      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3008$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3009      esac
3010      case $ac_var in #(
3011      _ | IFS | as_nl) ;; #(
3012      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3013      *) { eval $ac_var=; unset $ac_var;} ;;
3014      esac ;;
3015    esac
3016  done
3017  (set) 2>&1 |
3018    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3019    *${as_nl}ac_space=\ *)
3020      sed -n \
3021	"s/'\''/'\''\\\\'\'''\''/g;
3022	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3023      ;; #(
3024    *)
3025      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3026      ;;
3027    esac |
3028    sort
3029)
3030    echo
3031
3032    $as_echo "## ----------------- ##
3033## Output variables. ##
3034## ----------------- ##"
3035    echo
3036    for ac_var in $ac_subst_vars
3037    do
3038      eval ac_val=\$$ac_var
3039      case $ac_val in
3040      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3041      esac
3042      $as_echo "$ac_var='\''$ac_val'\''"
3043    done | sort
3044    echo
3045
3046    if test -n "$ac_subst_files"; then
3047      $as_echo "## ------------------- ##
3048## File substitutions. ##
3049## ------------------- ##"
3050      echo
3051      for ac_var in $ac_subst_files
3052      do
3053	eval ac_val=\$$ac_var
3054	case $ac_val in
3055	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3056	esac
3057	$as_echo "$ac_var='\''$ac_val'\''"
3058      done | sort
3059      echo
3060    fi
3061
3062    if test -s confdefs.h; then
3063      $as_echo "## ----------- ##
3064## confdefs.h. ##
3065## ----------- ##"
3066      echo
3067      cat confdefs.h
3068      echo
3069    fi
3070    test "$ac_signal" != 0 &&
3071      $as_echo "$as_me: caught signal $ac_signal"
3072    $as_echo "$as_me: exit $exit_status"
3073  } >&5
3074  rm -f core *.core core.conftest.* &&
3075    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3076    exit $exit_status
3077' 0
3078for ac_signal in 1 2 13 15; do
3079  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3080done
3081ac_signal=0
3082
3083# confdefs.h avoids OS command line length limits that DEFS can exceed.
3084rm -f -r conftest* confdefs.h
3085
3086$as_echo "/* confdefs.h */" > confdefs.h
3087
3088# Predefined preprocessor variables.
3089
3090cat >>confdefs.h <<_ACEOF
3091#define PACKAGE_NAME "$PACKAGE_NAME"
3092_ACEOF
3093
3094cat >>confdefs.h <<_ACEOF
3095#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3096_ACEOF
3097
3098cat >>confdefs.h <<_ACEOF
3099#define PACKAGE_VERSION "$PACKAGE_VERSION"
3100_ACEOF
3101
3102cat >>confdefs.h <<_ACEOF
3103#define PACKAGE_STRING "$PACKAGE_STRING"
3104_ACEOF
3105
3106cat >>confdefs.h <<_ACEOF
3107#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3108_ACEOF
3109
3110cat >>confdefs.h <<_ACEOF
3111#define PACKAGE_URL "$PACKAGE_URL"
3112_ACEOF
3113
3114
3115# Let the site file select an alternate cache file if it wants to.
3116# Prefer an explicitly selected file to automatically selected ones.
3117ac_site_file1=NONE
3118ac_site_file2=NONE
3119if test -n "$CONFIG_SITE"; then
3120  # We do not want a PATH search for config.site.
3121  case $CONFIG_SITE in #((
3122    -*)  ac_site_file1=./$CONFIG_SITE;;
3123    */*) ac_site_file1=$CONFIG_SITE;;
3124    *)   ac_site_file1=./$CONFIG_SITE;;
3125  esac
3126elif test "x$prefix" != xNONE; then
3127  ac_site_file1=$prefix/share/config.site
3128  ac_site_file2=$prefix/etc/config.site
3129else
3130  ac_site_file1=$ac_default_prefix/share/config.site
3131  ac_site_file2=$ac_default_prefix/etc/config.site
3132fi
3133for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3134do
3135  test "x$ac_site_file" = xNONE && continue
3136  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3137    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3138$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3139    sed 's/^/| /' "$ac_site_file" >&5
3140    . "$ac_site_file" \
3141      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3143as_fn_error $? "failed to load site script $ac_site_file
3144See \`config.log' for more details" "$LINENO" 5; }
3145  fi
3146done
3147
3148if test -r "$cache_file"; then
3149  # Some versions of bash will fail to source /dev/null (special files
3150  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3151  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3152    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3153$as_echo "$as_me: loading cache $cache_file" >&6;}
3154    case $cache_file in
3155      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3156      *)                      . "./$cache_file";;
3157    esac
3158  fi
3159else
3160  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3161$as_echo "$as_me: creating cache $cache_file" >&6;}
3162  >$cache_file
3163fi
3164
3165# Check that the precious variables saved in the cache have kept the same
3166# value.
3167ac_cache_corrupted=false
3168for ac_var in $ac_precious_vars; do
3169  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3170  eval ac_new_set=\$ac_env_${ac_var}_set
3171  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3172  eval ac_new_val=\$ac_env_${ac_var}_value
3173  case $ac_old_set,$ac_new_set in
3174    set,)
3175      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3176$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3177      ac_cache_corrupted=: ;;
3178    ,set)
3179      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3180$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3181      ac_cache_corrupted=: ;;
3182    ,);;
3183    *)
3184      if test "x$ac_old_val" != "x$ac_new_val"; then
3185	# differences in whitespace do not lead to failure.
3186	ac_old_val_w=`echo x $ac_old_val`
3187	ac_new_val_w=`echo x $ac_new_val`
3188	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3189	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3190$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3191	  ac_cache_corrupted=:
3192	else
3193	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3194$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3195	  eval $ac_var=\$ac_old_val
3196	fi
3197	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3198$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3199	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3200$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3201      fi;;
3202  esac
3203  # Pass precious variables to config.status.
3204  if test "$ac_new_set" = set; then
3205    case $ac_new_val in
3206    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3207    *) ac_arg=$ac_var=$ac_new_val ;;
3208    esac
3209    case " $ac_configure_args " in
3210      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3211      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3212    esac
3213  fi
3214done
3215if $ac_cache_corrupted; then
3216  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3217$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3218  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3219$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3220  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3221fi
3222## -------------------- ##
3223## Main body of script. ##
3224## -------------------- ##
3225
3226ac_ext=c
3227ac_cpp='$CPP $CPPFLAGS'
3228ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3229ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3230ac_compiler_gnu=$ac_cv_c_compiler_gnu
3231
3232
3233
3234ac_aux_dir=
3235for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3236  if test -f "$ac_dir/install-sh"; then
3237    ac_aux_dir=$ac_dir
3238    ac_install_sh="$ac_aux_dir/install-sh -c"
3239    break
3240  elif test -f "$ac_dir/install.sh"; then
3241    ac_aux_dir=$ac_dir
3242    ac_install_sh="$ac_aux_dir/install.sh -c"
3243    break
3244  elif test -f "$ac_dir/shtool"; then
3245    ac_aux_dir=$ac_dir
3246    ac_install_sh="$ac_aux_dir/shtool install -c"
3247    break
3248  fi
3249done
3250if test -z "$ac_aux_dir"; then
3251  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
3252fi
3253
3254# These three variables are undocumented and unsupported,
3255# and are intended to be withdrawn in a future Autoconf release.
3256# They can cause serious problems if a builder's source tree is in a directory
3257# whose full name contains unusual characters.
3258ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3259ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3260ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3261
3262
3263# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3264
3265#
3266# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3267# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3268#
3269# This code is free software; you can redistribute it and/or modify it
3270# under the terms of the GNU General Public License version 2 only, as
3271# published by the Free Software Foundation.  Oracle designates this
3272# particular file as subject to the "Classpath" exception as provided
3273# by Oracle in the LICENSE file that accompanied this code.
3274#
3275# This code is distributed in the hope that it will be useful, but WITHOUT
3276# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3277# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3278# version 2 for more details (a copy is included in the LICENSE file that
3279# accompanied this code).
3280#
3281# You should have received a copy of the GNU General Public License version
3282# 2 along with this work; if not, write to the Free Software Foundation,
3283# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3284#
3285# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3286# or visit www.oracle.com if you need additional information or have any
3287# questions.
3288#
3289
3290#
3291# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3292#
3293# This program is free software; you can redistribute it and/or modify
3294# it under the terms of the GNU General Public License as published by
3295# the Free Software Foundation; either version 2 of the License, or
3296# (at your option) any later version.
3297#
3298# This program is distributed in the hope that it will be useful, but
3299# WITHOUT ANY WARRANTY; without even the implied warranty of
3300# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3301# General Public License for more details.
3302#
3303# You should have received a copy of the GNU General Public License
3304# along with this program; if not, write to the Free Software
3305# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3306#
3307# As a special exception to the GNU General Public License, if you
3308# distribute this file as part of a program that contains a
3309# configuration script generated by Autoconf, you may include it under
3310# the same distribution terms that you use for the rest of that program.
3311
3312# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3313# ----------------------------------
3314# PKG_PROG_PKG_CONFIG
3315
3316# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3317#
3318# Check to see whether a particular set of modules exists.  Similar
3319# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3320#
3321#
3322# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3323# this or PKG_CHECK_MODULES is called, or make sure to call
3324# PKG_CHECK_EXISTS manually
3325# --------------------------------------------------------------
3326
3327
3328
3329# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3330# ---------------------------------------------
3331# _PKG_CONFIG
3332
3333# _PKG_SHORT_ERRORS_SUPPORTED
3334# -----------------------------
3335# _PKG_SHORT_ERRORS_SUPPORTED
3336
3337
3338# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3339# [ACTION-IF-NOT-FOUND])
3340#
3341#
3342# Note that if there is a possibility the first call to
3343# PKG_CHECK_MODULES might not happen, you should be sure to include an
3344# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3345#
3346#
3347# --------------------------------------------------------------
3348# PKG_CHECK_MODULES
3349
3350
3351# Include these first...
3352#
3353# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3354# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3355#
3356# This code is free software; you can redistribute it and/or modify it
3357# under the terms of the GNU General Public License version 2 only, as
3358# published by the Free Software Foundation.  Oracle designates this
3359# particular file as subject to the "Classpath" exception as provided
3360# by Oracle in the LICENSE file that accompanied this code.
3361#
3362# This code is distributed in the hope that it will be useful, but WITHOUT
3363# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3364# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3365# version 2 for more details (a copy is included in the LICENSE file that
3366# accompanied this code).
3367#
3368# You should have received a copy of the GNU General Public License version
3369# 2 along with this work; if not, write to the Free Software Foundation,
3370# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3371#
3372# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3373# or visit www.oracle.com if you need additional information or have any
3374# questions.
3375#
3376
3377# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3378# If so, then append $1 to $2 \
3379# Also set JVM_ARG_OK to true/false depending on outcome.
3380
3381
3382# Appends a string to a path variable, only adding the : when needed.
3383
3384
3385# Prepends a string to a path variable, only adding the : when needed.
3386
3387
3388# This will make sure the given variable points to a full and proper
3389# path. This means:
3390# 1) There will be no spaces in the path. On unix platforms,
3391#    spaces in the path will result in an error. On Windows,
3392#    the path will be rewritten using short-style to be space-free.
3393# 2) The path will be absolute, and it will be in unix-style (on
3394#     cygwin).
3395# $1: The name of the variable to fix
3396
3397
3398# This will make sure the given variable points to a executable
3399# with a full and proper path. This means:
3400# 1) There will be no spaces in the path. On unix platforms,
3401#    spaces in the path will result in an error. On Windows,
3402#    the path will be rewritten using short-style to be space-free.
3403# 2) The path will be absolute, and it will be in unix-style (on
3404#     cygwin).
3405# Any arguments given to the executable is preserved.
3406# If the input variable does not have a directory specification, then
3407# it need to be in the PATH.
3408# $1: The name of the variable to fix
3409
3410
3411
3412
3413# Register a --with argument but mark it as deprecated
3414# $1: The name of the with argument to deprecate, not including --with-
3415
3416
3417# Register a --enable argument but mark it as deprecated
3418# $1: The name of the with argument to deprecate, not including --enable-
3419# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3420
3421
3422
3423
3424# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3425# $1: variable to check
3426
3427
3428# Check that there are no unprocessed overridden variables left.
3429# If so, they are an incorrect argument and we will exit with an error.
3430
3431
3432# Setup a tool for the given variable. If correctly specified by the user,
3433# use that value, otherwise search for the tool using the supplied code snippet.
3434# $1: variable to set
3435# $2: code snippet to call to look for the tool
3436
3437
3438# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3439# $1: variable to set
3440# $2: executable name (or list of names) to look for
3441
3442
3443# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3444# $1: variable to set
3445# $2: executable name (or list of names) to look for
3446
3447
3448# Like BASIC_PATH_PROGS but fails if no tool was found.
3449# $1: variable to set
3450# $2: executable name (or list of names) to look for
3451
3452
3453# Like BASIC_SETUP_TOOL but fails if no tool was found.
3454# $1: variable to set
3455# $2: autoconf macro to call to look for the special tool
3456
3457
3458# Setup the most fundamental tools that relies on not much else to set up,
3459# but is used by much of the early bootstrap code.
3460
3461
3462# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3463
3464
3465# Evaluates platform specific overrides for devkit variables.
3466# $1: Name of variable
3467
3468
3469
3470
3471
3472
3473#%%% Simple tools %%%
3474
3475# Check if we have found a usable version of make
3476# $1: the path to a potential make binary (or empty)
3477# $2: the description on how we found this
3478
3479
3480
3481
3482# Goes looking for a usable version of GNU make.
3483
3484
3485
3486
3487
3488
3489# Check if build directory is on local disk. If not possible to determine,
3490# we prefer to claim it's local.
3491# Argument 1: directory to test
3492# Argument 2: what to do if it is on local disk
3493# Argument 3: what to do otherwise (remote disk or failure)
3494
3495
3496# Check that source files have basic read permissions set. This might
3497# not be the case in cygwin in certain conditions.
3498
3499
3500
3501
3502# Check for support for specific options in bash
3503
3504
3505# Code to run after AC_OUTPUT
3506
3507
3508#
3509# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3510# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3511#
3512# This code is free software; you can redistribute it and/or modify it
3513# under the terms of the GNU General Public License version 2 only, as
3514# published by the Free Software Foundation.  Oracle designates this
3515# particular file as subject to the "Classpath" exception as provided
3516# by Oracle in the LICENSE file that accompanied this code.
3517#
3518# This code is distributed in the hope that it will be useful, but WITHOUT
3519# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3520# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3521# version 2 for more details (a copy is included in the LICENSE file that
3522# accompanied this code).
3523#
3524# You should have received a copy of the GNU General Public License version
3525# 2 along with this work; if not, write to the Free Software Foundation,
3526# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3527#
3528# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3529# or visit www.oracle.com if you need additional information or have any
3530# questions.
3531#
3532
3533
3534
3535
3536
3537# Helper function which possibly converts a path using DOS-style short mode.
3538# If so, the updated path is stored in $new_path.
3539# $1: The path to check
3540
3541
3542# Helper function which possibly converts a path using DOS-style short mode.
3543# If so, the updated path is stored in $new_path.
3544# $1: The path to check
3545
3546
3547# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3548# and could probably be heavily simplified. However, all changes in this
3549# area tend to need lot of testing in different scenarios, and in lack of
3550# proper unit testing, cleaning this up has not been deemed worth the effort
3551# at the moment.
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3562
3563
3564
3565
3566# ... then the rest
3567#
3568# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3569# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3570#
3571# This code is free software; you can redistribute it and/or modify it
3572# under the terms of the GNU General Public License version 2 only, as
3573# published by the Free Software Foundation.  Oracle designates this
3574# particular file as subject to the "Classpath" exception as provided
3575# by Oracle in the LICENSE file that accompanied this code.
3576#
3577# This code is distributed in the hope that it will be useful, but WITHOUT
3578# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3579# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3580# version 2 for more details (a copy is included in the LICENSE file that
3581# accompanied this code).
3582#
3583# You should have received a copy of the GNU General Public License version
3584# 2 along with this work; if not, write to the Free Software Foundation,
3585# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3586#
3587# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3588# or visit www.oracle.com if you need additional information or have any
3589# questions.
3590#
3591
3592########################################################################
3593# This file handles detection of the Boot JDK. The Boot JDK detection
3594# process has been developed as a response to solve a complex real-world
3595# problem. Initially, it was simple, but it has grown as platform after
3596# platform, idiosyncracy after idiosyncracy has been supported.
3597#
3598# The basic idea is this:
3599# 1) You need an acceptable *) JDK to use as a Boot JDK
3600# 2) There are several ways to locate a JDK, that are mostly platform
3601#    dependent **)
3602# 3) You can have multiple JDKs installed
3603# 4) If possible, configure should try to dig out an acceptable JDK
3604#    automatically, without having to resort to command-line options
3605#
3606# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3607#     javac) and not a JRE, etc.
3608#
3609# **) On Windows we typically use a well-known path.
3610#     On MacOSX we typically use the tool java_home.
3611#     On Linux we typically find javac in the $PATH, and then follow a
3612#     chain of symlinks that often ends up in a real JDK.
3613#
3614# This leads to the code where we check in different ways to locate a
3615# JDK, and if one is found, check if it is acceptable. If not, we print
3616# our reasons for rejecting it (useful when debugging non-working
3617# configure situations) and continue checking the next one.
3618########################################################################
3619
3620# Execute the check given as argument, and verify the result
3621# If the Boot JDK was previously found, do nothing
3622# $1 A command line (typically autoconf macro) to execute
3623
3624
3625# Test: Is bootjdk explicitely set by command line arguments?
3626
3627
3628# Test: Is $JAVA_HOME set?
3629
3630
3631# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3632
3633
3634# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3635# $1: Argument to the java_home binary (optional)
3636
3637
3638# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3639
3640
3641# Look for a jdk in the given path. If there are multiple, try to select the newest.
3642# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3643# $1 = Path to directory containing jdk installations.
3644# $2 = String to append to the found JDK directory to get the proper JDK home
3645
3646
3647# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3648# environmental variable as base for where to look.
3649# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3650
3651
3652# Test: Is there a JDK installed in default, well-known locations?
3653
3654
3655# Check that a command-line tool in the Boot JDK is correct
3656# $1 = name of variable to assign
3657# $2 = name of binary
3658
3659
3660###############################################################################
3661#
3662# We need a Boot JDK to bootstrap the build.
3663#
3664
3665
3666
3667
3668
3669#
3670# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3671# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3672#
3673# This code is free software; you can redistribute it and/or modify it
3674# under the terms of the GNU General Public License version 2 only, as
3675# published by the Free Software Foundation.  Oracle designates this
3676# particular file as subject to the "Classpath" exception as provided
3677# by Oracle in the LICENSE file that accompanied this code.
3678#
3679# This code is distributed in the hope that it will be useful, but WITHOUT
3680# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3681# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3682# version 2 for more details (a copy is included in the LICENSE file that
3683# accompanied this code).
3684#
3685# You should have received a copy of the GNU General Public License version
3686# 2 along with this work; if not, write to the Free Software Foundation,
3687# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3688#
3689# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3690# or visit www.oracle.com if you need additional information or have any
3691# questions.
3692#
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713#
3714# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3715# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3716#
3717# This code is free software; you can redistribute it and/or modify it
3718# under the terms of the GNU General Public License version 2 only, as
3719# published by the Free Software Foundation.  Oracle designates this
3720# particular file as subject to the "Classpath" exception as provided
3721# by Oracle in the LICENSE file that accompanied this code.
3722#
3723# This code is distributed in the hope that it will be useful, but WITHOUT
3724# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3725# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3726# version 2 for more details (a copy is included in the LICENSE file that
3727# accompanied this code).
3728#
3729# You should have received a copy of the GNU General Public License version
3730# 2 along with this work; if not, write to the Free Software Foundation,
3731# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3732#
3733# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3734# or visit www.oracle.com if you need additional information or have any
3735# questions.
3736#
3737
3738# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3739# corresponding configure arguments instead
3740
3741
3742# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3743# that configure can use them while detecting compilers.
3744# TOOLCHAIN_TYPE is available here.
3745# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3746
3747
3748
3749
3750
3751
3752# Documentation on common flags used for solstudio in HIGHEST.
3753#
3754# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3755#          done with care, there are some assumptions below that need to
3756#          be understood about the use of pointers, and IEEE behavior.
3757#
3758# -fns: Use non-standard floating point mode (not IEEE 754)
3759# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3760# -fsingle: Use single precision floating point with 'float'
3761# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3762#   (Source with excessing pointer casting and data access with mixed
3763#    pointer types are not recommended)
3764# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3765#   (If you expect perfect errno behavior, do not use this)
3766# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3767# -xrestrict: Pointer parameters to functions do not overlap
3768#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3769#    If you pass in multiple pointers to the same data, do not use this)
3770# -xlibmil: Inline some library routines
3771#   (If you expect perfect errno behavior, do not use this)
3772# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3773#   (If you expect perfect errno behavior, do not use this)
3774#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3775
3776    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3777    # Bug?
3778    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3779    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3780    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3781    #fi
3782
3783
3784
3785
3786
3787# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3788#                                   [RUN-IF-FALSE])
3789# ------------------------------------------------------------
3790# Check that the c and c++ compilers support an argument
3791
3792
3793# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3794#                                    [RUN-IF-FALSE])
3795# ------------------------------------------------------------
3796# Check that the linker support an argument
3797
3798
3799
3800
3801#
3802# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3803# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3804#
3805# This code is free software; you can redistribute it and/or modify it
3806# under the terms of the GNU General Public License version 2 only, as
3807# published by the Free Software Foundation.  Oracle designates this
3808# particular file as subject to the "Classpath" exception as provided
3809# by Oracle in the LICENSE file that accompanied this code.
3810#
3811# This code is distributed in the hope that it will be useful, but WITHOUT
3812# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3813# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3814# version 2 for more details (a copy is included in the LICENSE file that
3815# accompanied this code).
3816#
3817# You should have received a copy of the GNU General Public License version
3818# 2 along with this work; if not, write to the Free Software Foundation,
3819# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3820#
3821# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3822# or visit www.oracle.com if you need additional information or have any
3823# questions.
3824#
3825
3826
3827
3828
3829
3830cygwin_help() {
3831  case $1 in
3832    unzip)
3833      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3834      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3835      ;;
3836    zip)
3837      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3838      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3839      ;;
3840    make)
3841      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3842      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3843      ;;
3844    freetype)
3845      HELP_MSG="
3846The freetype library can now be build during the configure process.
3847Download the freetype sources and unpack them into an arbitrary directory:
3848
3849wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3850tar -xzf freetype-2.5.3.tar.gz
3851
3852Then run configure with '--with-freetype-src=<freetype_src>'. This will
3853automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3854builds or into '<freetype_src>/lib32' for 32-bit builds.
3855Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3856and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3857      ;;
3858  esac
3859}
3860
3861msys_help() {
3862  PKGHANDLER_COMMAND=""
3863}
3864
3865apt_help() {
3866  case $1 in
3867    reduced)
3868      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3869    devkit)
3870      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3871    openjdk)
3872      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3873    alsa)
3874      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3875    cups)
3876      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3877    freetype)
3878      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3879    ffi)
3880      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3881    x11)
3882      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3883    ccache)
3884      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3885  esac
3886}
3887
3888yum_help() {
3889  case $1 in
3890    devkit)
3891      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3892    openjdk)
3893      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3894    alsa)
3895      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3896    cups)
3897      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3898    freetype)
3899      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3900    x11)
3901      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3902    ccache)
3903      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3904  esac
3905}
3906
3907port_help() {
3908  PKGHANDLER_COMMAND=""
3909}
3910
3911pkgutil_help() {
3912  PKGHANDLER_COMMAND=""
3913}
3914
3915pkgadd_help() {
3916  PKGHANDLER_COMMAND=""
3917}
3918
3919# This function will check if we're called from the "configure" wrapper while
3920# printing --help. If so, we will print out additional information that can
3921# only be extracted within the autoconf script, and then exit. This must be
3922# called at the very beginning in configure.ac.
3923
3924
3925
3926
3927
3928
3929#
3930# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3931# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3932#
3933# This code is free software; you can redistribute it and/or modify it
3934# under the terms of the GNU General Public License version 2 only, as
3935# published by the Free Software Foundation.  Oracle designates this
3936# particular file as subject to the "Classpath" exception as provided
3937# by Oracle in the LICENSE file that accompanied this code.
3938#
3939# This code is distributed in the hope that it will be useful, but WITHOUT
3940# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3941# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3942# version 2 for more details (a copy is included in the LICENSE file that
3943# accompanied this code).
3944#
3945# You should have received a copy of the GNU General Public License version
3946# 2 along with this work; if not, write to the Free Software Foundation,
3947# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3948#
3949# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3950# or visit www.oracle.com if you need additional information or have any
3951# questions.
3952#
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963###############################################################################
3964#
3965# Should we build only OpenJDK even if closed sources are present?
3966#
3967
3968
3969
3970
3971###############################################################################
3972#
3973# Setup version numbers
3974#
3975
3976
3977
3978
3979
3980
3981################################################################################
3982#
3983# Gcov coverage data for hotspot
3984#
3985
3986
3987#
3988# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3989# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3990#
3991# This code is free software; you can redistribute it and/or modify it
3992# under the terms of the GNU General Public License version 2 only, as
3993# published by the Free Software Foundation.  Oracle designates this
3994# particular file as subject to the "Classpath" exception as provided
3995# by Oracle in the LICENSE file that accompanied this code.
3996#
3997# This code is distributed in the hope that it will be useful, but WITHOUT
3998# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3999# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4000# version 2 for more details (a copy is included in the LICENSE file that
4001# accompanied this code).
4002#
4003# You should have received a copy of the GNU General Public License version
4004# 2 along with this work; if not, write to the Free Software Foundation,
4005# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4006#
4007# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4008# or visit www.oracle.com if you need additional information or have any
4009# questions.
4010#
4011
4012# Major library component reside in separate files.
4013#
4014# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4015# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4016#
4017# This code is free software; you can redistribute it and/or modify it
4018# under the terms of the GNU General Public License version 2 only, as
4019# published by the Free Software Foundation.  Oracle designates this
4020# particular file as subject to the "Classpath" exception as provided
4021# by Oracle in the LICENSE file that accompanied this code.
4022#
4023# This code is distributed in the hope that it will be useful, but WITHOUT
4024# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4025# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4026# version 2 for more details (a copy is included in the LICENSE file that
4027# accompanied this code).
4028#
4029# You should have received a copy of the GNU General Public License version
4030# 2 along with this work; if not, write to the Free Software Foundation,
4031# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4032#
4033# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4034# or visit www.oracle.com if you need additional information or have any
4035# questions.
4036#
4037
4038################################################################################
4039# Setup alsa (Advanced Linux Sound Architecture)
4040################################################################################
4041
4042
4043#
4044# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4045# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4046#
4047# This code is free software; you can redistribute it and/or modify it
4048# under the terms of the GNU General Public License version 2 only, as
4049# published by the Free Software Foundation.  Oracle designates this
4050# particular file as subject to the "Classpath" exception as provided
4051# by Oracle in the LICENSE file that accompanied this code.
4052#
4053# This code is distributed in the hope that it will be useful, but WITHOUT
4054# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4055# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4056# version 2 for more details (a copy is included in the LICENSE file that
4057# accompanied this code).
4058#
4059# You should have received a copy of the GNU General Public License version
4060# 2 along with this work; if not, write to the Free Software Foundation,
4061# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4062#
4063# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4064# or visit www.oracle.com if you need additional information or have any
4065# questions.
4066#
4067
4068################################################################################
4069# Setup bundled libraries.
4070#
4071# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4072# OpenJDK repository. Default is to use these libraries as bundled, but they
4073# might be replaced by en external version by the user.
4074################################################################################
4075
4076
4077################################################################################
4078# Setup libjpeg
4079################################################################################
4080
4081
4082################################################################################
4083# Setup giflib
4084################################################################################
4085
4086
4087################################################################################
4088# Setup libpng
4089################################################################################
4090
4091
4092################################################################################
4093# Setup zlib
4094################################################################################
4095
4096
4097################################################################################
4098# Setup lcms (Little CMS)
4099################################################################################
4100
4101
4102#
4103# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4104# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4105#
4106# This code is free software; you can redistribute it and/or modify it
4107# under the terms of the GNU General Public License version 2 only, as
4108# published by the Free Software Foundation.  Oracle designates this
4109# particular file as subject to the "Classpath" exception as provided
4110# by Oracle in the LICENSE file that accompanied this code.
4111#
4112# This code is distributed in the hope that it will be useful, but WITHOUT
4113# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4114# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4115# version 2 for more details (a copy is included in the LICENSE file that
4116# accompanied this code).
4117#
4118# You should have received a copy of the GNU General Public License version
4119# 2 along with this work; if not, write to the Free Software Foundation,
4120# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4121#
4122# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4123# or visit www.oracle.com if you need additional information or have any
4124# questions.
4125#
4126
4127################################################################################
4128# Setup cups (Common Unix Printing System)
4129################################################################################
4130
4131
4132#
4133# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4134# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4135#
4136# This code is free software; you can redistribute it and/or modify it
4137# under the terms of the GNU General Public License version 2 only, as
4138# published by the Free Software Foundation.  Oracle designates this
4139# particular file as subject to the "Classpath" exception as provided
4140# by Oracle in the LICENSE file that accompanied this code.
4141#
4142# This code is distributed in the hope that it will be useful, but WITHOUT
4143# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4144# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4145# version 2 for more details (a copy is included in the LICENSE file that
4146# accompanied this code).
4147#
4148# You should have received a copy of the GNU General Public License version
4149# 2 along with this work; if not, write to the Free Software Foundation,
4150# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4151#
4152# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4153# or visit www.oracle.com if you need additional information or have any
4154# questions.
4155#
4156
4157################################################################################
4158# Setup libffi (Foreign Function Interface)
4159################################################################################
4160
4161
4162#
4163# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4164# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4165#
4166# This code is free software; you can redistribute it and/or modify it
4167# under the terms of the GNU General Public License version 2 only, as
4168# published by the Free Software Foundation.  Oracle designates this
4169# particular file as subject to the "Classpath" exception as provided
4170# by Oracle in the LICENSE file that accompanied this code.
4171#
4172# This code is distributed in the hope that it will be useful, but WITHOUT
4173# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4174# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4175# version 2 for more details (a copy is included in the LICENSE file that
4176# accompanied this code).
4177#
4178# You should have received a copy of the GNU General Public License version
4179# 2 along with this work; if not, write to the Free Software Foundation,
4180# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4181#
4182# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4183# or visit www.oracle.com if you need additional information or have any
4184# questions.
4185#
4186
4187################################################################################
4188# Build the freetype lib from source
4189################################################################################
4190
4191
4192################################################################################
4193# Check if a potential freeype library match is correct and usable
4194################################################################################
4195
4196
4197################################################################################
4198# Setup freetype (The FreeType2 font rendering library)
4199################################################################################
4200
4201
4202#
4203# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4204# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4205#
4206# This code is free software; you can redistribute it and/or modify it
4207# under the terms of the GNU General Public License version 2 only, as
4208# published by the Free Software Foundation.  Oracle designates this
4209# particular file as subject to the "Classpath" exception as provided
4210# by Oracle in the LICENSE file that accompanied this code.
4211#
4212# This code is distributed in the hope that it will be useful, but WITHOUT
4213# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4214# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4215# version 2 for more details (a copy is included in the LICENSE file that
4216# accompanied this code).
4217#
4218# You should have received a copy of the GNU General Public License version
4219# 2 along with this work; if not, write to the Free Software Foundation,
4220# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4221#
4222# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4223# or visit www.oracle.com if you need additional information or have any
4224# questions.
4225#
4226
4227################################################################################
4228# Setup the standard C/C++ runtime libraries.
4229#
4230# Most importantly, determine if stdc++ should be linked statically or
4231# dynamically.
4232################################################################################
4233
4234
4235#
4236# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4237# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4238#
4239# This code is free software; you can redistribute it and/or modify it
4240# under the terms of the GNU General Public License version 2 only, as
4241# published by the Free Software Foundation.  Oracle designates this
4242# particular file as subject to the "Classpath" exception as provided
4243# by Oracle in the LICENSE file that accompanied this code.
4244#
4245# This code is distributed in the hope that it will be useful, but WITHOUT
4246# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4247# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4248# version 2 for more details (a copy is included in the LICENSE file that
4249# accompanied this code).
4250#
4251# You should have received a copy of the GNU General Public License version
4252# 2 along with this work; if not, write to the Free Software Foundation,
4253# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4254#
4255# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4256# or visit www.oracle.com if you need additional information or have any
4257# questions.
4258#
4259
4260################################################################################
4261# Setup X11 Windows system
4262################################################################################
4263
4264
4265
4266################################################################################
4267# Determine which libraries are needed for this configuration
4268################################################################################
4269
4270
4271################################################################################
4272# Parse library options, and setup needed libraries
4273################################################################################
4274
4275
4276################################################################################
4277# Setup llvm (Low-Level VM)
4278################################################################################
4279
4280
4281################################################################################
4282# Setup various libraries, typically small system libraries
4283################################################################################
4284
4285
4286#
4287# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4288# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4289#
4290# This code is free software; you can redistribute it and/or modify it
4291# under the terms of the GNU General Public License version 2 only, as
4292# published by the Free Software Foundation.  Oracle designates this
4293# particular file as subject to the "Classpath" exception as provided
4294# by Oracle in the LICENSE file that accompanied this code.
4295#
4296# This code is distributed in the hope that it will be useful, but WITHOUT
4297# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4298# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4299# version 2 for more details (a copy is included in the LICENSE file that
4300# accompanied this code).
4301#
4302# You should have received a copy of the GNU General Public License version
4303# 2 along with this work; if not, write to the Free Software Foundation,
4304# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4305#
4306# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4307# or visit www.oracle.com if you need additional information or have any
4308# questions.
4309#
4310
4311# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4312# Converts autoconf style CPU name to OpenJDK style, into
4313# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4314
4315
4316# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4317# Converts autoconf style OS name to OpenJDK style, into
4318# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4319
4320
4321# Expects $host_os $host_cpu $build_os and $build_cpu
4322# and $with_target_bits to have been setup!
4323#
4324# Translate the standard triplet(quadruplet) definition
4325# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4326# OPENJDK_BUILD_OS, etc.
4327
4328
4329# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4330# accordingly. Must be done after setting up build and target system, but before
4331# doing anything else with these values.
4332
4333
4334# Setup the legacy variables, for controlling the old makefiles.
4335#
4336
4337
4338
4339
4340#%%% Build and target systems %%%
4341
4342
4343
4344
4345# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4346# Add -mX to various FLAGS variables.
4347
4348
4349
4350
4351
4352
4353#
4354# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4355# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4356#
4357# This code is free software; you can redistribute it and/or modify it
4358# under the terms of the GNU General Public License version 2 only, as
4359# published by the Free Software Foundation.  Oracle designates this
4360# particular file as subject to the "Classpath" exception as provided
4361# by Oracle in the LICENSE file that accompanied this code.
4362#
4363# This code is distributed in the hope that it will be useful, but WITHOUT
4364# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4365# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4366# version 2 for more details (a copy is included in the LICENSE file that
4367# accompanied this code).
4368#
4369# You should have received a copy of the GNU General Public License version
4370# 2 along with this work; if not, write to the Free Software Foundation,
4371# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4372#
4373# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4374# or visit www.oracle.com if you need additional information or have any
4375# questions.
4376#
4377
4378
4379
4380
4381
4382
4383
4384
4385#
4386# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4387# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4388#
4389# This code is free software; you can redistribute it and/or modify it
4390# under the terms of the GNU General Public License version 2 only, as
4391# published by the Free Software Foundation.  Oracle designates this
4392# particular file as subject to the "Classpath" exception as provided
4393# by Oracle in the LICENSE file that accompanied this code.
4394#
4395# This code is distributed in the hope that it will be useful, but WITHOUT
4396# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4397# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4398# version 2 for more details (a copy is included in the LICENSE file that
4399# accompanied this code).
4400#
4401# You should have received a copy of the GNU General Public License version
4402# 2 along with this work; if not, write to the Free Software Foundation,
4403# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4404#
4405# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4406# or visit www.oracle.com if you need additional information or have any
4407# questions.
4408#
4409
4410########################################################################
4411# This file is responsible for detecting, verifying and setting up the
4412# toolchain, i.e. the compiler, linker and related utilities. It will setup
4413# proper paths to the binaries, but it will not setup any flags.
4414#
4415# The binaries used is determined by the toolchain type, which is the family of
4416# compilers and related tools that are used.
4417########################################################################
4418
4419
4420# All valid toolchains, regardless of platform (used by help.m4)
4421VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4422
4423# These toolchains are valid on different platforms
4424VALID_TOOLCHAINS_linux="gcc clang"
4425VALID_TOOLCHAINS_solaris="solstudio"
4426VALID_TOOLCHAINS_macosx="gcc clang"
4427VALID_TOOLCHAINS_aix="xlc"
4428VALID_TOOLCHAINS_windows="microsoft"
4429
4430# Toolchain descriptions
4431TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4432TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4433TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4434TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4435TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4436
4437# Setup a number of variables describing how native output files are
4438# named on this platform/toolchain.
4439
4440
4441# Determine which toolchain type to use, and make sure it is valid for this
4442# platform. Setup various information about the selected toolchain.
4443
4444
4445# Before we start detecting the toolchain executables, we might need some
4446# special setup, e.g. additional paths etc.
4447
4448
4449# Restore path, etc
4450
4451
4452# Check if a compiler is of the toolchain type we expect, and save the version
4453# information from it. If the compiler does not match the expected type,
4454# this function will abort using AC_MSG_ERROR. If it matches, the version will
4455# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4456# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4457#
4458# $1 = compiler to test (CC or CXX)
4459# $2 = human readable name of compiler (C or C++)
4460
4461
4462# Try to locate the given C or C++ compiler in the path, or otherwise.
4463#
4464# $1 = compiler to test (CC or CXX)
4465# $2 = human readable name of compiler (C or C++)
4466# $3 = list of compiler names to search for
4467
4468
4469# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4470# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4471# archiver (AR). Verify that the compilers are correct according to the
4472# toolchain type.
4473
4474
4475# Setup additional tools that is considered a part of the toolchain, but not the
4476# core part. Many of these are highly platform-specific and do not exist,
4477# and/or are not needed on all platforms.
4478
4479
4480# Setup the build tools (i.e, the compiler and linker used to build programs
4481# that should be run on the build platform, not the target platform, as a build
4482# helper). Since the non-cross-compile case uses the normal, target compilers
4483# for this, we can only do this after these have been setup.
4484
4485
4486# Setup legacy variables that are still needed as alternative ways to refer to
4487# parts of the toolchain.
4488
4489
4490# Do some additional checks on the detected tools.
4491
4492
4493# Setup the JTReg Regression Test Harness.
4494
4495
4496#
4497# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4498# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4499#
4500# This code is free software; you can redistribute it and/or modify it
4501# under the terms of the GNU General Public License version 2 only, as
4502# published by the Free Software Foundation.  Oracle designates this
4503# particular file as subject to the "Classpath" exception as provided
4504# by Oracle in the LICENSE file that accompanied this code.
4505#
4506# This code is distributed in the hope that it will be useful, but WITHOUT
4507# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4508# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4509# version 2 for more details (a copy is included in the LICENSE file that
4510# accompanied this code).
4511#
4512# You should have received a copy of the GNU General Public License version
4513# 2 along with this work; if not, write to the Free Software Foundation,
4514# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4515#
4516# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4517# or visit www.oracle.com if you need additional information or have any
4518# questions.
4519#
4520
4521################################################################################
4522# The order of these defines the priority by which we try to find them.
4523VALID_VS_VERSIONS="2013 2012 2010"
4524
4525VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4526VS_VERSION_INTERNAL_2010=100
4527VS_MSVCR_2010=msvcr100.dll
4528# We don't use msvcp on Visual Studio 2010
4529#VS_MSVCP_2010=msvcp100.dll
4530VS_ENVVAR_2010="VS100COMNTOOLS"
4531VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4532VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4533VS_VS_PLATFORM_NAME_2010="v100"
4534VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4535
4536VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4537VS_VERSION_INTERNAL_2012=110
4538VS_MSVCR_2012=msvcr110.dll
4539VS_MSVCP_2012=msvcp110.dll
4540VS_ENVVAR_2012="VS110COMNTOOLS"
4541VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4542VS_SDK_INSTALLDIR_2012=
4543VS_VS_PLATFORM_NAME_2012="v110"
4544VS_SDK_PLATFORM_NAME_2012=
4545
4546VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4547VS_VERSION_INTERNAL_2013=120
4548VS_MSVCR_2013=msvcr120.dll
4549VS_MSVCP_2013=msvcp120.dll
4550VS_ENVVAR_2013="VS120COMNTOOLS"
4551VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4552VS_SDK_INSTALLDIR_2013=
4553VS_VS_PLATFORM_NAME_2013="v120"
4554VS_SDK_PLATFORM_NAME_2013=
4555
4556################################################################################
4557
4558
4559
4560################################################################################
4561
4562
4563
4564################################################################################
4565# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4566# build environment and assigns it to VS_ENV_CMD
4567
4568
4569################################################################################
4570
4571
4572
4573################################################################################
4574# Check if the VS env variables were setup prior to running configure.
4575# If not, then find vcvarsall.bat and run it automatically, and integrate
4576# the set env variables into the spec file.
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591# This line needs to be here, verbatim, after all includes and the dummy hook
4592# definitions. It is replaced with custom functionality when building
4593# custom sources.
4594#CUSTOM_AUTOCONF_INCLUDE
4595
4596# Do not change or remove the following line, it is needed for consistency checks:
4597DATE_WHEN_GENERATED=1446135011
4598
4599###############################################################################
4600#
4601# Initialization / Boot-strapping
4602#
4603# The bootstrapping process needs to solve the "chicken or the egg" problem,
4604# thus it jumps back and forth, each time gaining something needed later on.
4605#
4606###############################################################################
4607
4608# If we are requested to print additional help, do that and then exit.
4609# This must be the very first call.
4610
4611  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4612    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4613    $PRINTF "Which are valid to use depends on the build platform.\n"
4614    for toolchain in $VALID_TOOLCHAINS_all; do
4615      # Use indirect variable referencing
4616      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4617      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4618      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4619    done
4620
4621    # And now exit directly
4622    exit 0
4623  fi
4624
4625
4626# Basic initialization that must happen first of all in the normal process.
4627
4628  # Save the original command line. This is passed to us by the wrapper configure script.
4629
4630  # Save the path variable before it gets changed
4631  ORIGINAL_PATH="$PATH"
4632
4633  DATE_WHEN_CONFIGURED=`LANG=C date`
4634
4635  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4636$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4637  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4638$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4639
4640
4641  # Start with tools that do not need have cross compilation support
4642  # and can be expected to be found in the default PATH. These tools are
4643  # used by configure.
4644
4645  # First are all the simple required tools.
4646
4647
4648
4649  # Publish this variable in the help.
4650
4651
4652  if [ -z "${BASENAME+x}" ]; then
4653    # The variable is not set by user, try to locate tool using the code snippet
4654    for ac_prog in basename
4655do
4656  # Extract the first word of "$ac_prog", so it can be a program name with args.
4657set dummy $ac_prog; ac_word=$2
4658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4659$as_echo_n "checking for $ac_word... " >&6; }
4660if ${ac_cv_path_BASENAME+:} false; then :
4661  $as_echo_n "(cached) " >&6
4662else
4663  case $BASENAME in
4664  [\\/]* | ?:[\\/]*)
4665  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4666  ;;
4667  *)
4668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4669for as_dir in $PATH
4670do
4671  IFS=$as_save_IFS
4672  test -z "$as_dir" && as_dir=.
4673    for ac_exec_ext in '' $ac_executable_extensions; do
4674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4675    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4677    break 2
4678  fi
4679done
4680  done
4681IFS=$as_save_IFS
4682
4683  ;;
4684esac
4685fi
4686BASENAME=$ac_cv_path_BASENAME
4687if test -n "$BASENAME"; then
4688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4689$as_echo "$BASENAME" >&6; }
4690else
4691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692$as_echo "no" >&6; }
4693fi
4694
4695
4696  test -n "$BASENAME" && break
4697done
4698
4699  else
4700    # The variable is set, but is it from the command line or the environment?
4701
4702    # Try to remove the string !BASENAME! from our list.
4703    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4704    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4705      # If it failed, the variable was not from the command line. Ignore it,
4706      # but warn the user (except for BASH, which is always set by the calling BASH).
4707      if test "xBASENAME" != xBASH; then
4708        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4709$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4710      fi
4711      # Try to locate tool using the code snippet
4712      for ac_prog in basename
4713do
4714  # Extract the first word of "$ac_prog", so it can be a program name with args.
4715set dummy $ac_prog; ac_word=$2
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
4718if ${ac_cv_path_BASENAME+:} false; then :
4719  $as_echo_n "(cached) " >&6
4720else
4721  case $BASENAME in
4722  [\\/]* | ?:[\\/]*)
4723  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4724  ;;
4725  *)
4726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in $PATH
4728do
4729  IFS=$as_save_IFS
4730  test -z "$as_dir" && as_dir=.
4731    for ac_exec_ext in '' $ac_executable_extensions; do
4732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4733    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4735    break 2
4736  fi
4737done
4738  done
4739IFS=$as_save_IFS
4740
4741  ;;
4742esac
4743fi
4744BASENAME=$ac_cv_path_BASENAME
4745if test -n "$BASENAME"; then
4746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4747$as_echo "$BASENAME" >&6; }
4748else
4749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
4751fi
4752
4753
4754  test -n "$BASENAME" && break
4755done
4756
4757    else
4758      # If it succeeded, then it was overridden by the user. We will use it
4759      # for the tool.
4760
4761      # First remove it from the list of overridden variables, so we can test
4762      # for unknown variables in the end.
4763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4764
4765      # Check if we try to supply an empty value
4766      if test "x$BASENAME" = x; then
4767        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4768$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4770$as_echo_n "checking for BASENAME... " >&6; }
4771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4772$as_echo "disabled" >&6; }
4773      else
4774        # Check if the provided tool contains a complete path.
4775        tool_specified="$BASENAME"
4776        tool_basename="${tool_specified##*/}"
4777        if test "x$tool_basename" = "x$tool_specified"; then
4778          # A command without a complete path is provided, search $PATH.
4779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4780$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4781          # Extract the first word of "$tool_basename", so it can be a program name with args.
4782set dummy $tool_basename; ac_word=$2
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4784$as_echo_n "checking for $ac_word... " >&6; }
4785if ${ac_cv_path_BASENAME+:} false; then :
4786  $as_echo_n "(cached) " >&6
4787else
4788  case $BASENAME in
4789  [\\/]* | ?:[\\/]*)
4790  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4791  ;;
4792  *)
4793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4794for as_dir in $PATH
4795do
4796  IFS=$as_save_IFS
4797  test -z "$as_dir" && as_dir=.
4798    for ac_exec_ext in '' $ac_executable_extensions; do
4799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4800    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4802    break 2
4803  fi
4804done
4805  done
4806IFS=$as_save_IFS
4807
4808  ;;
4809esac
4810fi
4811BASENAME=$ac_cv_path_BASENAME
4812if test -n "$BASENAME"; then
4813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4814$as_echo "$BASENAME" >&6; }
4815else
4816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4817$as_echo "no" >&6; }
4818fi
4819
4820
4821          if test "x$BASENAME" = x; then
4822            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4823          fi
4824        else
4825          # Otherwise we believe it is a complete path. Use it as it is.
4826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4827$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4828          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4829$as_echo_n "checking for BASENAME... " >&6; }
4830          if test ! -x "$tool_specified"; then
4831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4832$as_echo "not found" >&6; }
4833            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4834          fi
4835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4836$as_echo "$tool_specified" >&6; }
4837        fi
4838      fi
4839    fi
4840  fi
4841
4842
4843
4844  if test "x$BASENAME" = x; then
4845    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4846  fi
4847
4848
4849
4850
4851
4852  # Publish this variable in the help.
4853
4854
4855  if [ -z "${BASH+x}" ]; then
4856    # The variable is not set by user, try to locate tool using the code snippet
4857    for ac_prog in bash
4858do
4859  # Extract the first word of "$ac_prog", so it can be a program name with args.
4860set dummy $ac_prog; ac_word=$2
4861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4862$as_echo_n "checking for $ac_word... " >&6; }
4863if ${ac_cv_path_BASH+:} false; then :
4864  $as_echo_n "(cached) " >&6
4865else
4866  case $BASH in
4867  [\\/]* | ?:[\\/]*)
4868  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4869  ;;
4870  *)
4871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4872for as_dir in $PATH
4873do
4874  IFS=$as_save_IFS
4875  test -z "$as_dir" && as_dir=.
4876    for ac_exec_ext in '' $ac_executable_extensions; do
4877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4878    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4880    break 2
4881  fi
4882done
4883  done
4884IFS=$as_save_IFS
4885
4886  ;;
4887esac
4888fi
4889BASH=$ac_cv_path_BASH
4890if test -n "$BASH"; then
4891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4892$as_echo "$BASH" >&6; }
4893else
4894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895$as_echo "no" >&6; }
4896fi
4897
4898
4899  test -n "$BASH" && break
4900done
4901
4902  else
4903    # The variable is set, but is it from the command line or the environment?
4904
4905    # Try to remove the string !BASH! from our list.
4906    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4907    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4908      # If it failed, the variable was not from the command line. Ignore it,
4909      # but warn the user (except for BASH, which is always set by the calling BASH).
4910      if test "xBASH" != xBASH; then
4911        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4912$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4913      fi
4914      # Try to locate tool using the code snippet
4915      for ac_prog in bash
4916do
4917  # Extract the first word of "$ac_prog", so it can be a program name with args.
4918set dummy $ac_prog; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_BASH+:} false; then :
4922  $as_echo_n "(cached) " >&6
4923else
4924  case $BASH in
4925  [\\/]* | ?:[\\/]*)
4926  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4927  ;;
4928  *)
4929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in $PATH
4931do
4932  IFS=$as_save_IFS
4933  test -z "$as_dir" && as_dir=.
4934    for ac_exec_ext in '' $ac_executable_extensions; do
4935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938    break 2
4939  fi
4940done
4941  done
4942IFS=$as_save_IFS
4943
4944  ;;
4945esac
4946fi
4947BASH=$ac_cv_path_BASH
4948if test -n "$BASH"; then
4949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4950$as_echo "$BASH" >&6; }
4951else
4952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956
4957  test -n "$BASH" && break
4958done
4959
4960    else
4961      # If it succeeded, then it was overridden by the user. We will use it
4962      # for the tool.
4963
4964      # First remove it from the list of overridden variables, so we can test
4965      # for unknown variables in the end.
4966      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4967
4968      # Check if we try to supply an empty value
4969      if test "x$BASH" = x; then
4970        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4971$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4973$as_echo_n "checking for BASH... " >&6; }
4974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4975$as_echo "disabled" >&6; }
4976      else
4977        # Check if the provided tool contains a complete path.
4978        tool_specified="$BASH"
4979        tool_basename="${tool_specified##*/}"
4980        if test "x$tool_basename" = "x$tool_specified"; then
4981          # A command without a complete path is provided, search $PATH.
4982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4983$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4984          # Extract the first word of "$tool_basename", so it can be a program name with args.
4985set dummy $tool_basename; ac_word=$2
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987$as_echo_n "checking for $ac_word... " >&6; }
4988if ${ac_cv_path_BASH+:} false; then :
4989  $as_echo_n "(cached) " >&6
4990else
4991  case $BASH in
4992  [\\/]* | ?:[\\/]*)
4993  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4994  ;;
4995  *)
4996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4997for as_dir in $PATH
4998do
4999  IFS=$as_save_IFS
5000  test -z "$as_dir" && as_dir=.
5001    for ac_exec_ext in '' $ac_executable_extensions; do
5002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5003    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5005    break 2
5006  fi
5007done
5008  done
5009IFS=$as_save_IFS
5010
5011  ;;
5012esac
5013fi
5014BASH=$ac_cv_path_BASH
5015if test -n "$BASH"; then
5016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5017$as_echo "$BASH" >&6; }
5018else
5019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5020$as_echo "no" >&6; }
5021fi
5022
5023
5024          if test "x$BASH" = x; then
5025            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5026          fi
5027        else
5028          # Otherwise we believe it is a complete path. Use it as it is.
5029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5030$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5031          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5032$as_echo_n "checking for BASH... " >&6; }
5033          if test ! -x "$tool_specified"; then
5034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5035$as_echo "not found" >&6; }
5036            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5037          fi
5038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5039$as_echo "$tool_specified" >&6; }
5040        fi
5041      fi
5042    fi
5043  fi
5044
5045
5046
5047  if test "x$BASH" = x; then
5048    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5049  fi
5050
5051
5052
5053
5054
5055  # Publish this variable in the help.
5056
5057
5058  if [ -z "${CAT+x}" ]; then
5059    # The variable is not set by user, try to locate tool using the code snippet
5060    for ac_prog in cat
5061do
5062  # Extract the first word of "$ac_prog", so it can be a program name with args.
5063set dummy $ac_prog; ac_word=$2
5064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5065$as_echo_n "checking for $ac_word... " >&6; }
5066if ${ac_cv_path_CAT+:} false; then :
5067  $as_echo_n "(cached) " >&6
5068else
5069  case $CAT in
5070  [\\/]* | ?:[\\/]*)
5071  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5072  ;;
5073  *)
5074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5075for as_dir in $PATH
5076do
5077  IFS=$as_save_IFS
5078  test -z "$as_dir" && as_dir=.
5079    for ac_exec_ext in '' $ac_executable_extensions; do
5080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5081    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5083    break 2
5084  fi
5085done
5086  done
5087IFS=$as_save_IFS
5088
5089  ;;
5090esac
5091fi
5092CAT=$ac_cv_path_CAT
5093if test -n "$CAT"; then
5094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5095$as_echo "$CAT" >&6; }
5096else
5097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5098$as_echo "no" >&6; }
5099fi
5100
5101
5102  test -n "$CAT" && break
5103done
5104
5105  else
5106    # The variable is set, but is it from the command line or the environment?
5107
5108    # Try to remove the string !CAT! from our list.
5109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5111      # If it failed, the variable was not from the command line. Ignore it,
5112      # but warn the user (except for BASH, which is always set by the calling BASH).
5113      if test "xCAT" != xBASH; then
5114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5115$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5116      fi
5117      # Try to locate tool using the code snippet
5118      for ac_prog in cat
5119do
5120  # Extract the first word of "$ac_prog", so it can be a program name with args.
5121set dummy $ac_prog; ac_word=$2
5122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5123$as_echo_n "checking for $ac_word... " >&6; }
5124if ${ac_cv_path_CAT+:} false; then :
5125  $as_echo_n "(cached) " >&6
5126else
5127  case $CAT in
5128  [\\/]* | ?:[\\/]*)
5129  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5130  ;;
5131  *)
5132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5133for as_dir in $PATH
5134do
5135  IFS=$as_save_IFS
5136  test -z "$as_dir" && as_dir=.
5137    for ac_exec_ext in '' $ac_executable_extensions; do
5138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5139    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5141    break 2
5142  fi
5143done
5144  done
5145IFS=$as_save_IFS
5146
5147  ;;
5148esac
5149fi
5150CAT=$ac_cv_path_CAT
5151if test -n "$CAT"; then
5152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5153$as_echo "$CAT" >&6; }
5154else
5155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156$as_echo "no" >&6; }
5157fi
5158
5159
5160  test -n "$CAT" && break
5161done
5162
5163    else
5164      # If it succeeded, then it was overridden by the user. We will use it
5165      # for the tool.
5166
5167      # First remove it from the list of overridden variables, so we can test
5168      # for unknown variables in the end.
5169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5170
5171      # Check if we try to supply an empty value
5172      if test "x$CAT" = x; then
5173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5174$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5176$as_echo_n "checking for CAT... " >&6; }
5177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5178$as_echo "disabled" >&6; }
5179      else
5180        # Check if the provided tool contains a complete path.
5181        tool_specified="$CAT"
5182        tool_basename="${tool_specified##*/}"
5183        if test "x$tool_basename" = "x$tool_specified"; then
5184          # A command without a complete path is provided, search $PATH.
5185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5186$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5187          # Extract the first word of "$tool_basename", so it can be a program name with args.
5188set dummy $tool_basename; ac_word=$2
5189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5190$as_echo_n "checking for $ac_word... " >&6; }
5191if ${ac_cv_path_CAT+:} false; then :
5192  $as_echo_n "(cached) " >&6
5193else
5194  case $CAT in
5195  [\\/]* | ?:[\\/]*)
5196  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5197  ;;
5198  *)
5199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5200for as_dir in $PATH
5201do
5202  IFS=$as_save_IFS
5203  test -z "$as_dir" && as_dir=.
5204    for ac_exec_ext in '' $ac_executable_extensions; do
5205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5206    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5208    break 2
5209  fi
5210done
5211  done
5212IFS=$as_save_IFS
5213
5214  ;;
5215esac
5216fi
5217CAT=$ac_cv_path_CAT
5218if test -n "$CAT"; then
5219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5220$as_echo "$CAT" >&6; }
5221else
5222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5223$as_echo "no" >&6; }
5224fi
5225
5226
5227          if test "x$CAT" = x; then
5228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5229          fi
5230        else
5231          # Otherwise we believe it is a complete path. Use it as it is.
5232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5233$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5235$as_echo_n "checking for CAT... " >&6; }
5236          if test ! -x "$tool_specified"; then
5237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5238$as_echo "not found" >&6; }
5239            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5240          fi
5241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5242$as_echo "$tool_specified" >&6; }
5243        fi
5244      fi
5245    fi
5246  fi
5247
5248
5249
5250  if test "x$CAT" = x; then
5251    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5252  fi
5253
5254
5255
5256
5257
5258  # Publish this variable in the help.
5259
5260
5261  if [ -z "${CHMOD+x}" ]; then
5262    # The variable is not set by user, try to locate tool using the code snippet
5263    for ac_prog in chmod
5264do
5265  # Extract the first word of "$ac_prog", so it can be a program name with args.
5266set dummy $ac_prog; ac_word=$2
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5268$as_echo_n "checking for $ac_word... " >&6; }
5269if ${ac_cv_path_CHMOD+:} false; then :
5270  $as_echo_n "(cached) " >&6
5271else
5272  case $CHMOD in
5273  [\\/]* | ?:[\\/]*)
5274  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5275  ;;
5276  *)
5277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278for as_dir in $PATH
5279do
5280  IFS=$as_save_IFS
5281  test -z "$as_dir" && as_dir=.
5282    for ac_exec_ext in '' $ac_executable_extensions; do
5283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5284    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5286    break 2
5287  fi
5288done
5289  done
5290IFS=$as_save_IFS
5291
5292  ;;
5293esac
5294fi
5295CHMOD=$ac_cv_path_CHMOD
5296if test -n "$CHMOD"; then
5297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5298$as_echo "$CHMOD" >&6; }
5299else
5300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301$as_echo "no" >&6; }
5302fi
5303
5304
5305  test -n "$CHMOD" && break
5306done
5307
5308  else
5309    # The variable is set, but is it from the command line or the environment?
5310
5311    # Try to remove the string !CHMOD! from our list.
5312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5314      # If it failed, the variable was not from the command line. Ignore it,
5315      # but warn the user (except for BASH, which is always set by the calling BASH).
5316      if test "xCHMOD" != xBASH; then
5317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5318$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5319      fi
5320      # Try to locate tool using the code snippet
5321      for ac_prog in chmod
5322do
5323  # Extract the first word of "$ac_prog", so it can be a program name with args.
5324set dummy $ac_prog; ac_word=$2
5325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5326$as_echo_n "checking for $ac_word... " >&6; }
5327if ${ac_cv_path_CHMOD+:} false; then :
5328  $as_echo_n "(cached) " >&6
5329else
5330  case $CHMOD in
5331  [\\/]* | ?:[\\/]*)
5332  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5333  ;;
5334  *)
5335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5336for as_dir in $PATH
5337do
5338  IFS=$as_save_IFS
5339  test -z "$as_dir" && as_dir=.
5340    for ac_exec_ext in '' $ac_executable_extensions; do
5341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5342    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5344    break 2
5345  fi
5346done
5347  done
5348IFS=$as_save_IFS
5349
5350  ;;
5351esac
5352fi
5353CHMOD=$ac_cv_path_CHMOD
5354if test -n "$CHMOD"; then
5355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5356$as_echo "$CHMOD" >&6; }
5357else
5358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5359$as_echo "no" >&6; }
5360fi
5361
5362
5363  test -n "$CHMOD" && break
5364done
5365
5366    else
5367      # If it succeeded, then it was overridden by the user. We will use it
5368      # for the tool.
5369
5370      # First remove it from the list of overridden variables, so we can test
5371      # for unknown variables in the end.
5372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5373
5374      # Check if we try to supply an empty value
5375      if test "x$CHMOD" = x; then
5376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5377$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5379$as_echo_n "checking for CHMOD... " >&6; }
5380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5381$as_echo "disabled" >&6; }
5382      else
5383        # Check if the provided tool contains a complete path.
5384        tool_specified="$CHMOD"
5385        tool_basename="${tool_specified##*/}"
5386        if test "x$tool_basename" = "x$tool_specified"; then
5387          # A command without a complete path is provided, search $PATH.
5388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5389$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5390          # Extract the first word of "$tool_basename", so it can be a program name with args.
5391set dummy $tool_basename; ac_word=$2
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393$as_echo_n "checking for $ac_word... " >&6; }
5394if ${ac_cv_path_CHMOD+:} false; then :
5395  $as_echo_n "(cached) " >&6
5396else
5397  case $CHMOD in
5398  [\\/]* | ?:[\\/]*)
5399  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5400  ;;
5401  *)
5402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403for as_dir in $PATH
5404do
5405  IFS=$as_save_IFS
5406  test -z "$as_dir" && as_dir=.
5407    for ac_exec_ext in '' $ac_executable_extensions; do
5408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5409    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411    break 2
5412  fi
5413done
5414  done
5415IFS=$as_save_IFS
5416
5417  ;;
5418esac
5419fi
5420CHMOD=$ac_cv_path_CHMOD
5421if test -n "$CHMOD"; then
5422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5423$as_echo "$CHMOD" >&6; }
5424else
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426$as_echo "no" >&6; }
5427fi
5428
5429
5430          if test "x$CHMOD" = x; then
5431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5432          fi
5433        else
5434          # Otherwise we believe it is a complete path. Use it as it is.
5435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5436$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5438$as_echo_n "checking for CHMOD... " >&6; }
5439          if test ! -x "$tool_specified"; then
5440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5441$as_echo "not found" >&6; }
5442            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5443          fi
5444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5445$as_echo "$tool_specified" >&6; }
5446        fi
5447      fi
5448    fi
5449  fi
5450
5451
5452
5453  if test "x$CHMOD" = x; then
5454    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5455  fi
5456
5457
5458
5459
5460
5461  # Publish this variable in the help.
5462
5463
5464  if [ -z "${CMP+x}" ]; then
5465    # The variable is not set by user, try to locate tool using the code snippet
5466    for ac_prog in cmp
5467do
5468  # Extract the first word of "$ac_prog", so it can be a program name with args.
5469set dummy $ac_prog; ac_word=$2
5470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5471$as_echo_n "checking for $ac_word... " >&6; }
5472if ${ac_cv_path_CMP+:} false; then :
5473  $as_echo_n "(cached) " >&6
5474else
5475  case $CMP in
5476  [\\/]* | ?:[\\/]*)
5477  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5478  ;;
5479  *)
5480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5481for as_dir in $PATH
5482do
5483  IFS=$as_save_IFS
5484  test -z "$as_dir" && as_dir=.
5485    for ac_exec_ext in '' $ac_executable_extensions; do
5486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5487    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5489    break 2
5490  fi
5491done
5492  done
5493IFS=$as_save_IFS
5494
5495  ;;
5496esac
5497fi
5498CMP=$ac_cv_path_CMP
5499if test -n "$CMP"; then
5500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5501$as_echo "$CMP" >&6; }
5502else
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5504$as_echo "no" >&6; }
5505fi
5506
5507
5508  test -n "$CMP" && break
5509done
5510
5511  else
5512    # The variable is set, but is it from the command line or the environment?
5513
5514    # Try to remove the string !CMP! from our list.
5515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5517      # If it failed, the variable was not from the command line. Ignore it,
5518      # but warn the user (except for BASH, which is always set by the calling BASH).
5519      if test "xCMP" != xBASH; then
5520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5521$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5522      fi
5523      # Try to locate tool using the code snippet
5524      for ac_prog in cmp
5525do
5526  # Extract the first word of "$ac_prog", so it can be a program name with args.
5527set dummy $ac_prog; ac_word=$2
5528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5529$as_echo_n "checking for $ac_word... " >&6; }
5530if ${ac_cv_path_CMP+:} false; then :
5531  $as_echo_n "(cached) " >&6
5532else
5533  case $CMP in
5534  [\\/]* | ?:[\\/]*)
5535  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5536  ;;
5537  *)
5538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5539for as_dir in $PATH
5540do
5541  IFS=$as_save_IFS
5542  test -z "$as_dir" && as_dir=.
5543    for ac_exec_ext in '' $ac_executable_extensions; do
5544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5545    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5547    break 2
5548  fi
5549done
5550  done
5551IFS=$as_save_IFS
5552
5553  ;;
5554esac
5555fi
5556CMP=$ac_cv_path_CMP
5557if test -n "$CMP"; then
5558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5559$as_echo "$CMP" >&6; }
5560else
5561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5562$as_echo "no" >&6; }
5563fi
5564
5565
5566  test -n "$CMP" && break
5567done
5568
5569    else
5570      # If it succeeded, then it was overridden by the user. We will use it
5571      # for the tool.
5572
5573      # First remove it from the list of overridden variables, so we can test
5574      # for unknown variables in the end.
5575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5576
5577      # Check if we try to supply an empty value
5578      if test "x$CMP" = x; then
5579        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5580$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5582$as_echo_n "checking for CMP... " >&6; }
5583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5584$as_echo "disabled" >&6; }
5585      else
5586        # Check if the provided tool contains a complete path.
5587        tool_specified="$CMP"
5588        tool_basename="${tool_specified##*/}"
5589        if test "x$tool_basename" = "x$tool_specified"; then
5590          # A command without a complete path is provided, search $PATH.
5591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5592$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5593          # Extract the first word of "$tool_basename", so it can be a program name with args.
5594set dummy $tool_basename; ac_word=$2
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5596$as_echo_n "checking for $ac_word... " >&6; }
5597if ${ac_cv_path_CMP+:} false; then :
5598  $as_echo_n "(cached) " >&6
5599else
5600  case $CMP in
5601  [\\/]* | ?:[\\/]*)
5602  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5603  ;;
5604  *)
5605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5606for as_dir in $PATH
5607do
5608  IFS=$as_save_IFS
5609  test -z "$as_dir" && as_dir=.
5610    for ac_exec_ext in '' $ac_executable_extensions; do
5611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5612    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5614    break 2
5615  fi
5616done
5617  done
5618IFS=$as_save_IFS
5619
5620  ;;
5621esac
5622fi
5623CMP=$ac_cv_path_CMP
5624if test -n "$CMP"; then
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5626$as_echo "$CMP" >&6; }
5627else
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5629$as_echo "no" >&6; }
5630fi
5631
5632
5633          if test "x$CMP" = x; then
5634            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5635          fi
5636        else
5637          # Otherwise we believe it is a complete path. Use it as it is.
5638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5639$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5640          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5641$as_echo_n "checking for CMP... " >&6; }
5642          if test ! -x "$tool_specified"; then
5643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5644$as_echo "not found" >&6; }
5645            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5646          fi
5647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5648$as_echo "$tool_specified" >&6; }
5649        fi
5650      fi
5651    fi
5652  fi
5653
5654
5655
5656  if test "x$CMP" = x; then
5657    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5658  fi
5659
5660
5661
5662
5663
5664  # Publish this variable in the help.
5665
5666
5667  if [ -z "${COMM+x}" ]; then
5668    # The variable is not set by user, try to locate tool using the code snippet
5669    for ac_prog in comm
5670do
5671  # Extract the first word of "$ac_prog", so it can be a program name with args.
5672set dummy $ac_prog; ac_word=$2
5673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5674$as_echo_n "checking for $ac_word... " >&6; }
5675if ${ac_cv_path_COMM+:} false; then :
5676  $as_echo_n "(cached) " >&6
5677else
5678  case $COMM in
5679  [\\/]* | ?:[\\/]*)
5680  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5681  ;;
5682  *)
5683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5684for as_dir in $PATH
5685do
5686  IFS=$as_save_IFS
5687  test -z "$as_dir" && as_dir=.
5688    for ac_exec_ext in '' $ac_executable_extensions; do
5689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5690    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5692    break 2
5693  fi
5694done
5695  done
5696IFS=$as_save_IFS
5697
5698  ;;
5699esac
5700fi
5701COMM=$ac_cv_path_COMM
5702if test -n "$COMM"; then
5703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5704$as_echo "$COMM" >&6; }
5705else
5706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5707$as_echo "no" >&6; }
5708fi
5709
5710
5711  test -n "$COMM" && break
5712done
5713
5714  else
5715    # The variable is set, but is it from the command line or the environment?
5716
5717    # Try to remove the string !COMM! from our list.
5718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5720      # If it failed, the variable was not from the command line. Ignore it,
5721      # but warn the user (except for BASH, which is always set by the calling BASH).
5722      if test "xCOMM" != xBASH; then
5723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5724$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5725      fi
5726      # Try to locate tool using the code snippet
5727      for ac_prog in comm
5728do
5729  # Extract the first word of "$ac_prog", so it can be a program name with args.
5730set dummy $ac_prog; ac_word=$2
5731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5732$as_echo_n "checking for $ac_word... " >&6; }
5733if ${ac_cv_path_COMM+:} false; then :
5734  $as_echo_n "(cached) " >&6
5735else
5736  case $COMM in
5737  [\\/]* | ?:[\\/]*)
5738  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5739  ;;
5740  *)
5741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5742for as_dir in $PATH
5743do
5744  IFS=$as_save_IFS
5745  test -z "$as_dir" && as_dir=.
5746    for ac_exec_ext in '' $ac_executable_extensions; do
5747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5748    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5750    break 2
5751  fi
5752done
5753  done
5754IFS=$as_save_IFS
5755
5756  ;;
5757esac
5758fi
5759COMM=$ac_cv_path_COMM
5760if test -n "$COMM"; then
5761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5762$as_echo "$COMM" >&6; }
5763else
5764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765$as_echo "no" >&6; }
5766fi
5767
5768
5769  test -n "$COMM" && break
5770done
5771
5772    else
5773      # If it succeeded, then it was overridden by the user. We will use it
5774      # for the tool.
5775
5776      # First remove it from the list of overridden variables, so we can test
5777      # for unknown variables in the end.
5778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5779
5780      # Check if we try to supply an empty value
5781      if test "x$COMM" = x; then
5782        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5783$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5785$as_echo_n "checking for COMM... " >&6; }
5786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5787$as_echo "disabled" >&6; }
5788      else
5789        # Check if the provided tool contains a complete path.
5790        tool_specified="$COMM"
5791        tool_basename="${tool_specified##*/}"
5792        if test "x$tool_basename" = "x$tool_specified"; then
5793          # A command without a complete path is provided, search $PATH.
5794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5795$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5796          # Extract the first word of "$tool_basename", so it can be a program name with args.
5797set dummy $tool_basename; ac_word=$2
5798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5799$as_echo_n "checking for $ac_word... " >&6; }
5800if ${ac_cv_path_COMM+:} false; then :
5801  $as_echo_n "(cached) " >&6
5802else
5803  case $COMM in
5804  [\\/]* | ?:[\\/]*)
5805  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5806  ;;
5807  *)
5808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5809for as_dir in $PATH
5810do
5811  IFS=$as_save_IFS
5812  test -z "$as_dir" && as_dir=.
5813    for ac_exec_ext in '' $ac_executable_extensions; do
5814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5815    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5817    break 2
5818  fi
5819done
5820  done
5821IFS=$as_save_IFS
5822
5823  ;;
5824esac
5825fi
5826COMM=$ac_cv_path_COMM
5827if test -n "$COMM"; then
5828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5829$as_echo "$COMM" >&6; }
5830else
5831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5832$as_echo "no" >&6; }
5833fi
5834
5835
5836          if test "x$COMM" = x; then
5837            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5838          fi
5839        else
5840          # Otherwise we believe it is a complete path. Use it as it is.
5841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5842$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5843          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5844$as_echo_n "checking for COMM... " >&6; }
5845          if test ! -x "$tool_specified"; then
5846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5847$as_echo "not found" >&6; }
5848            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5849          fi
5850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5851$as_echo "$tool_specified" >&6; }
5852        fi
5853      fi
5854    fi
5855  fi
5856
5857
5858
5859  if test "x$COMM" = x; then
5860    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5861  fi
5862
5863
5864
5865
5866
5867  # Publish this variable in the help.
5868
5869
5870  if [ -z "${CP+x}" ]; then
5871    # The variable is not set by user, try to locate tool using the code snippet
5872    for ac_prog in cp
5873do
5874  # Extract the first word of "$ac_prog", so it can be a program name with args.
5875set dummy $ac_prog; ac_word=$2
5876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5877$as_echo_n "checking for $ac_word... " >&6; }
5878if ${ac_cv_path_CP+:} false; then :
5879  $as_echo_n "(cached) " >&6
5880else
5881  case $CP in
5882  [\\/]* | ?:[\\/]*)
5883  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5884  ;;
5885  *)
5886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5887for as_dir in $PATH
5888do
5889  IFS=$as_save_IFS
5890  test -z "$as_dir" && as_dir=.
5891    for ac_exec_ext in '' $ac_executable_extensions; do
5892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5893    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5895    break 2
5896  fi
5897done
5898  done
5899IFS=$as_save_IFS
5900
5901  ;;
5902esac
5903fi
5904CP=$ac_cv_path_CP
5905if test -n "$CP"; then
5906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5907$as_echo "$CP" >&6; }
5908else
5909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910$as_echo "no" >&6; }
5911fi
5912
5913
5914  test -n "$CP" && break
5915done
5916
5917  else
5918    # The variable is set, but is it from the command line or the environment?
5919
5920    # Try to remove the string !CP! from our list.
5921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5923      # If it failed, the variable was not from the command line. Ignore it,
5924      # but warn the user (except for BASH, which is always set by the calling BASH).
5925      if test "xCP" != xBASH; then
5926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5927$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5928      fi
5929      # Try to locate tool using the code snippet
5930      for ac_prog in cp
5931do
5932  # Extract the first word of "$ac_prog", so it can be a program name with args.
5933set dummy $ac_prog; ac_word=$2
5934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5935$as_echo_n "checking for $ac_word... " >&6; }
5936if ${ac_cv_path_CP+:} false; then :
5937  $as_echo_n "(cached) " >&6
5938else
5939  case $CP in
5940  [\\/]* | ?:[\\/]*)
5941  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5942  ;;
5943  *)
5944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5945for as_dir in $PATH
5946do
5947  IFS=$as_save_IFS
5948  test -z "$as_dir" && as_dir=.
5949    for ac_exec_ext in '' $ac_executable_extensions; do
5950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5951    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5953    break 2
5954  fi
5955done
5956  done
5957IFS=$as_save_IFS
5958
5959  ;;
5960esac
5961fi
5962CP=$ac_cv_path_CP
5963if test -n "$CP"; then
5964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5965$as_echo "$CP" >&6; }
5966else
5967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5968$as_echo "no" >&6; }
5969fi
5970
5971
5972  test -n "$CP" && break
5973done
5974
5975    else
5976      # If it succeeded, then it was overridden by the user. We will use it
5977      # for the tool.
5978
5979      # First remove it from the list of overridden variables, so we can test
5980      # for unknown variables in the end.
5981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5982
5983      # Check if we try to supply an empty value
5984      if test "x$CP" = x; then
5985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
5986$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
5987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5988$as_echo_n "checking for CP... " >&6; }
5989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5990$as_echo "disabled" >&6; }
5991      else
5992        # Check if the provided tool contains a complete path.
5993        tool_specified="$CP"
5994        tool_basename="${tool_specified##*/}"
5995        if test "x$tool_basename" = "x$tool_specified"; then
5996          # A command without a complete path is provided, search $PATH.
5997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5998$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5999          # Extract the first word of "$tool_basename", so it can be a program name with args.
6000set dummy $tool_basename; ac_word=$2
6001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6002$as_echo_n "checking for $ac_word... " >&6; }
6003if ${ac_cv_path_CP+:} false; then :
6004  $as_echo_n "(cached) " >&6
6005else
6006  case $CP in
6007  [\\/]* | ?:[\\/]*)
6008  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6009  ;;
6010  *)
6011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6012for as_dir in $PATH
6013do
6014  IFS=$as_save_IFS
6015  test -z "$as_dir" && as_dir=.
6016    for ac_exec_ext in '' $ac_executable_extensions; do
6017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6018    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6020    break 2
6021  fi
6022done
6023  done
6024IFS=$as_save_IFS
6025
6026  ;;
6027esac
6028fi
6029CP=$ac_cv_path_CP
6030if test -n "$CP"; then
6031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6032$as_echo "$CP" >&6; }
6033else
6034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6035$as_echo "no" >&6; }
6036fi
6037
6038
6039          if test "x$CP" = x; then
6040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6041          fi
6042        else
6043          # Otherwise we believe it is a complete path. Use it as it is.
6044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6045$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6047$as_echo_n "checking for CP... " >&6; }
6048          if test ! -x "$tool_specified"; then
6049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6050$as_echo "not found" >&6; }
6051            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6052          fi
6053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6054$as_echo "$tool_specified" >&6; }
6055        fi
6056      fi
6057    fi
6058  fi
6059
6060
6061
6062  if test "x$CP" = x; then
6063    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6064  fi
6065
6066
6067
6068
6069
6070  # Publish this variable in the help.
6071
6072
6073  if [ -z "${CUT+x}" ]; then
6074    # The variable is not set by user, try to locate tool using the code snippet
6075    for ac_prog in cut
6076do
6077  # Extract the first word of "$ac_prog", so it can be a program name with args.
6078set dummy $ac_prog; ac_word=$2
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6080$as_echo_n "checking for $ac_word... " >&6; }
6081if ${ac_cv_path_CUT+:} false; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084  case $CUT in
6085  [\\/]* | ?:[\\/]*)
6086  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6087  ;;
6088  *)
6089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092  IFS=$as_save_IFS
6093  test -z "$as_dir" && as_dir=.
6094    for ac_exec_ext in '' $ac_executable_extensions; do
6095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6096    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6098    break 2
6099  fi
6100done
6101  done
6102IFS=$as_save_IFS
6103
6104  ;;
6105esac
6106fi
6107CUT=$ac_cv_path_CUT
6108if test -n "$CUT"; then
6109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6110$as_echo "$CUT" >&6; }
6111else
6112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113$as_echo "no" >&6; }
6114fi
6115
6116
6117  test -n "$CUT" && break
6118done
6119
6120  else
6121    # The variable is set, but is it from the command line or the environment?
6122
6123    # Try to remove the string !CUT! from our list.
6124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6126      # If it failed, the variable was not from the command line. Ignore it,
6127      # but warn the user (except for BASH, which is always set by the calling BASH).
6128      if test "xCUT" != xBASH; then
6129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6130$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6131      fi
6132      # Try to locate tool using the code snippet
6133      for ac_prog in cut
6134do
6135  # Extract the first word of "$ac_prog", so it can be a program name with args.
6136set dummy $ac_prog; ac_word=$2
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6138$as_echo_n "checking for $ac_word... " >&6; }
6139if ${ac_cv_path_CUT+:} false; then :
6140  $as_echo_n "(cached) " >&6
6141else
6142  case $CUT in
6143  [\\/]* | ?:[\\/]*)
6144  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6145  ;;
6146  *)
6147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148for as_dir in $PATH
6149do
6150  IFS=$as_save_IFS
6151  test -z "$as_dir" && as_dir=.
6152    for ac_exec_ext in '' $ac_executable_extensions; do
6153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6154    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6156    break 2
6157  fi
6158done
6159  done
6160IFS=$as_save_IFS
6161
6162  ;;
6163esac
6164fi
6165CUT=$ac_cv_path_CUT
6166if test -n "$CUT"; then
6167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6168$as_echo "$CUT" >&6; }
6169else
6170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6171$as_echo "no" >&6; }
6172fi
6173
6174
6175  test -n "$CUT" && break
6176done
6177
6178    else
6179      # If it succeeded, then it was overridden by the user. We will use it
6180      # for the tool.
6181
6182      # First remove it from the list of overridden variables, so we can test
6183      # for unknown variables in the end.
6184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6185
6186      # Check if we try to supply an empty value
6187      if test "x$CUT" = x; then
6188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6189$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6191$as_echo_n "checking for CUT... " >&6; }
6192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6193$as_echo "disabled" >&6; }
6194      else
6195        # Check if the provided tool contains a complete path.
6196        tool_specified="$CUT"
6197        tool_basename="${tool_specified##*/}"
6198        if test "x$tool_basename" = "x$tool_specified"; then
6199          # A command without a complete path is provided, search $PATH.
6200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6201$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6202          # Extract the first word of "$tool_basename", so it can be a program name with args.
6203set dummy $tool_basename; ac_word=$2
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6205$as_echo_n "checking for $ac_word... " >&6; }
6206if ${ac_cv_path_CUT+:} false; then :
6207  $as_echo_n "(cached) " >&6
6208else
6209  case $CUT in
6210  [\\/]* | ?:[\\/]*)
6211  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6212  ;;
6213  *)
6214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6215for as_dir in $PATH
6216do
6217  IFS=$as_save_IFS
6218  test -z "$as_dir" && as_dir=.
6219    for ac_exec_ext in '' $ac_executable_extensions; do
6220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6221    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6223    break 2
6224  fi
6225done
6226  done
6227IFS=$as_save_IFS
6228
6229  ;;
6230esac
6231fi
6232CUT=$ac_cv_path_CUT
6233if test -n "$CUT"; then
6234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6235$as_echo "$CUT" >&6; }
6236else
6237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6238$as_echo "no" >&6; }
6239fi
6240
6241
6242          if test "x$CUT" = x; then
6243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6244          fi
6245        else
6246          # Otherwise we believe it is a complete path. Use it as it is.
6247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6248$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6250$as_echo_n "checking for CUT... " >&6; }
6251          if test ! -x "$tool_specified"; then
6252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6253$as_echo "not found" >&6; }
6254            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6255          fi
6256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6257$as_echo "$tool_specified" >&6; }
6258        fi
6259      fi
6260    fi
6261  fi
6262
6263
6264
6265  if test "x$CUT" = x; then
6266    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6267  fi
6268
6269
6270
6271
6272
6273  # Publish this variable in the help.
6274
6275
6276  if [ -z "${DATE+x}" ]; then
6277    # The variable is not set by user, try to locate tool using the code snippet
6278    for ac_prog in date
6279do
6280  # Extract the first word of "$ac_prog", so it can be a program name with args.
6281set dummy $ac_prog; ac_word=$2
6282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6283$as_echo_n "checking for $ac_word... " >&6; }
6284if ${ac_cv_path_DATE+:} false; then :
6285  $as_echo_n "(cached) " >&6
6286else
6287  case $DATE in
6288  [\\/]* | ?:[\\/]*)
6289  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6290  ;;
6291  *)
6292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6293for as_dir in $PATH
6294do
6295  IFS=$as_save_IFS
6296  test -z "$as_dir" && as_dir=.
6297    for ac_exec_ext in '' $ac_executable_extensions; do
6298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6299    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6301    break 2
6302  fi
6303done
6304  done
6305IFS=$as_save_IFS
6306
6307  ;;
6308esac
6309fi
6310DATE=$ac_cv_path_DATE
6311if test -n "$DATE"; then
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6313$as_echo "$DATE" >&6; }
6314else
6315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6316$as_echo "no" >&6; }
6317fi
6318
6319
6320  test -n "$DATE" && break
6321done
6322
6323  else
6324    # The variable is set, but is it from the command line or the environment?
6325
6326    # Try to remove the string !DATE! from our list.
6327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6329      # If it failed, the variable was not from the command line. Ignore it,
6330      # but warn the user (except for BASH, which is always set by the calling BASH).
6331      if test "xDATE" != xBASH; then
6332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6333$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6334      fi
6335      # Try to locate tool using the code snippet
6336      for ac_prog in date
6337do
6338  # Extract the first word of "$ac_prog", so it can be a program name with args.
6339set dummy $ac_prog; ac_word=$2
6340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6341$as_echo_n "checking for $ac_word... " >&6; }
6342if ${ac_cv_path_DATE+:} false; then :
6343  $as_echo_n "(cached) " >&6
6344else
6345  case $DATE in
6346  [\\/]* | ?:[\\/]*)
6347  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6348  ;;
6349  *)
6350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6351for as_dir in $PATH
6352do
6353  IFS=$as_save_IFS
6354  test -z "$as_dir" && as_dir=.
6355    for ac_exec_ext in '' $ac_executable_extensions; do
6356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6357    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6359    break 2
6360  fi
6361done
6362  done
6363IFS=$as_save_IFS
6364
6365  ;;
6366esac
6367fi
6368DATE=$ac_cv_path_DATE
6369if test -n "$DATE"; then
6370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6371$as_echo "$DATE" >&6; }
6372else
6373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6374$as_echo "no" >&6; }
6375fi
6376
6377
6378  test -n "$DATE" && break
6379done
6380
6381    else
6382      # If it succeeded, then it was overridden by the user. We will use it
6383      # for the tool.
6384
6385      # First remove it from the list of overridden variables, so we can test
6386      # for unknown variables in the end.
6387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6388
6389      # Check if we try to supply an empty value
6390      if test "x$DATE" = x; then
6391        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6392$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6394$as_echo_n "checking for DATE... " >&6; }
6395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6396$as_echo "disabled" >&6; }
6397      else
6398        # Check if the provided tool contains a complete path.
6399        tool_specified="$DATE"
6400        tool_basename="${tool_specified##*/}"
6401        if test "x$tool_basename" = "x$tool_specified"; then
6402          # A command without a complete path is provided, search $PATH.
6403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6404$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6405          # Extract the first word of "$tool_basename", so it can be a program name with args.
6406set dummy $tool_basename; ac_word=$2
6407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6408$as_echo_n "checking for $ac_word... " >&6; }
6409if ${ac_cv_path_DATE+:} false; then :
6410  $as_echo_n "(cached) " >&6
6411else
6412  case $DATE in
6413  [\\/]* | ?:[\\/]*)
6414  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6415  ;;
6416  *)
6417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6418for as_dir in $PATH
6419do
6420  IFS=$as_save_IFS
6421  test -z "$as_dir" && as_dir=.
6422    for ac_exec_ext in '' $ac_executable_extensions; do
6423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6424    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6426    break 2
6427  fi
6428done
6429  done
6430IFS=$as_save_IFS
6431
6432  ;;
6433esac
6434fi
6435DATE=$ac_cv_path_DATE
6436if test -n "$DATE"; then
6437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6438$as_echo "$DATE" >&6; }
6439else
6440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6441$as_echo "no" >&6; }
6442fi
6443
6444
6445          if test "x$DATE" = x; then
6446            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6447          fi
6448        else
6449          # Otherwise we believe it is a complete path. Use it as it is.
6450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6451$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6452          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6453$as_echo_n "checking for DATE... " >&6; }
6454          if test ! -x "$tool_specified"; then
6455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6456$as_echo "not found" >&6; }
6457            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6458          fi
6459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6460$as_echo "$tool_specified" >&6; }
6461        fi
6462      fi
6463    fi
6464  fi
6465
6466
6467
6468  if test "x$DATE" = x; then
6469    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6470  fi
6471
6472
6473
6474
6475
6476  # Publish this variable in the help.
6477
6478
6479  if [ -z "${DIFF+x}" ]; then
6480    # The variable is not set by user, try to locate tool using the code snippet
6481    for ac_prog in gdiff diff
6482do
6483  # Extract the first word of "$ac_prog", so it can be a program name with args.
6484set dummy $ac_prog; ac_word=$2
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6486$as_echo_n "checking for $ac_word... " >&6; }
6487if ${ac_cv_path_DIFF+:} false; then :
6488  $as_echo_n "(cached) " >&6
6489else
6490  case $DIFF in
6491  [\\/]* | ?:[\\/]*)
6492  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6493  ;;
6494  *)
6495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496for as_dir in $PATH
6497do
6498  IFS=$as_save_IFS
6499  test -z "$as_dir" && as_dir=.
6500    for ac_exec_ext in '' $ac_executable_extensions; do
6501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6502    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6504    break 2
6505  fi
6506done
6507  done
6508IFS=$as_save_IFS
6509
6510  ;;
6511esac
6512fi
6513DIFF=$ac_cv_path_DIFF
6514if test -n "$DIFF"; then
6515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6516$as_echo "$DIFF" >&6; }
6517else
6518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519$as_echo "no" >&6; }
6520fi
6521
6522
6523  test -n "$DIFF" && break
6524done
6525
6526  else
6527    # The variable is set, but is it from the command line or the environment?
6528
6529    # Try to remove the string !DIFF! from our list.
6530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6532      # If it failed, the variable was not from the command line. Ignore it,
6533      # but warn the user (except for BASH, which is always set by the calling BASH).
6534      if test "xDIFF" != xBASH; then
6535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6536$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6537      fi
6538      # Try to locate tool using the code snippet
6539      for ac_prog in gdiff diff
6540do
6541  # Extract the first word of "$ac_prog", so it can be a program name with args.
6542set dummy $ac_prog; ac_word=$2
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6544$as_echo_n "checking for $ac_word... " >&6; }
6545if ${ac_cv_path_DIFF+:} false; then :
6546  $as_echo_n "(cached) " >&6
6547else
6548  case $DIFF in
6549  [\\/]* | ?:[\\/]*)
6550  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6551  ;;
6552  *)
6553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6554for as_dir in $PATH
6555do
6556  IFS=$as_save_IFS
6557  test -z "$as_dir" && as_dir=.
6558    for ac_exec_ext in '' $ac_executable_extensions; do
6559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6560    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6562    break 2
6563  fi
6564done
6565  done
6566IFS=$as_save_IFS
6567
6568  ;;
6569esac
6570fi
6571DIFF=$ac_cv_path_DIFF
6572if test -n "$DIFF"; then
6573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6574$as_echo "$DIFF" >&6; }
6575else
6576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6577$as_echo "no" >&6; }
6578fi
6579
6580
6581  test -n "$DIFF" && break
6582done
6583
6584    else
6585      # If it succeeded, then it was overridden by the user. We will use it
6586      # for the tool.
6587
6588      # First remove it from the list of overridden variables, so we can test
6589      # for unknown variables in the end.
6590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6591
6592      # Check if we try to supply an empty value
6593      if test "x$DIFF" = x; then
6594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6595$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6597$as_echo_n "checking for DIFF... " >&6; }
6598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6599$as_echo "disabled" >&6; }
6600      else
6601        # Check if the provided tool contains a complete path.
6602        tool_specified="$DIFF"
6603        tool_basename="${tool_specified##*/}"
6604        if test "x$tool_basename" = "x$tool_specified"; then
6605          # A command without a complete path is provided, search $PATH.
6606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6607$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6608          # Extract the first word of "$tool_basename", so it can be a program name with args.
6609set dummy $tool_basename; ac_word=$2
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6611$as_echo_n "checking for $ac_word... " >&6; }
6612if ${ac_cv_path_DIFF+:} false; then :
6613  $as_echo_n "(cached) " >&6
6614else
6615  case $DIFF in
6616  [\\/]* | ?:[\\/]*)
6617  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6618  ;;
6619  *)
6620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621for as_dir in $PATH
6622do
6623  IFS=$as_save_IFS
6624  test -z "$as_dir" && as_dir=.
6625    for ac_exec_ext in '' $ac_executable_extensions; do
6626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6627    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6629    break 2
6630  fi
6631done
6632  done
6633IFS=$as_save_IFS
6634
6635  ;;
6636esac
6637fi
6638DIFF=$ac_cv_path_DIFF
6639if test -n "$DIFF"; then
6640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6641$as_echo "$DIFF" >&6; }
6642else
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6644$as_echo "no" >&6; }
6645fi
6646
6647
6648          if test "x$DIFF" = x; then
6649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6650          fi
6651        else
6652          # Otherwise we believe it is a complete path. Use it as it is.
6653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6654$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6656$as_echo_n "checking for DIFF... " >&6; }
6657          if test ! -x "$tool_specified"; then
6658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6659$as_echo "not found" >&6; }
6660            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6661          fi
6662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6663$as_echo "$tool_specified" >&6; }
6664        fi
6665      fi
6666    fi
6667  fi
6668
6669
6670
6671  if test "x$DIFF" = x; then
6672    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6673  fi
6674
6675
6676
6677
6678
6679  # Publish this variable in the help.
6680
6681
6682  if [ -z "${DIRNAME+x}" ]; then
6683    # The variable is not set by user, try to locate tool using the code snippet
6684    for ac_prog in dirname
6685do
6686  # Extract the first word of "$ac_prog", so it can be a program name with args.
6687set dummy $ac_prog; ac_word=$2
6688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6689$as_echo_n "checking for $ac_word... " >&6; }
6690if ${ac_cv_path_DIRNAME+:} false; then :
6691  $as_echo_n "(cached) " >&6
6692else
6693  case $DIRNAME in
6694  [\\/]* | ?:[\\/]*)
6695  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6696  ;;
6697  *)
6698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6699for as_dir in $PATH
6700do
6701  IFS=$as_save_IFS
6702  test -z "$as_dir" && as_dir=.
6703    for ac_exec_ext in '' $ac_executable_extensions; do
6704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6705    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6707    break 2
6708  fi
6709done
6710  done
6711IFS=$as_save_IFS
6712
6713  ;;
6714esac
6715fi
6716DIRNAME=$ac_cv_path_DIRNAME
6717if test -n "$DIRNAME"; then
6718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6719$as_echo "$DIRNAME" >&6; }
6720else
6721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6722$as_echo "no" >&6; }
6723fi
6724
6725
6726  test -n "$DIRNAME" && break
6727done
6728
6729  else
6730    # The variable is set, but is it from the command line or the environment?
6731
6732    # Try to remove the string !DIRNAME! from our list.
6733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6735      # If it failed, the variable was not from the command line. Ignore it,
6736      # but warn the user (except for BASH, which is always set by the calling BASH).
6737      if test "xDIRNAME" != xBASH; then
6738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6739$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6740      fi
6741      # Try to locate tool using the code snippet
6742      for ac_prog in dirname
6743do
6744  # Extract the first word of "$ac_prog", so it can be a program name with args.
6745set dummy $ac_prog; ac_word=$2
6746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6747$as_echo_n "checking for $ac_word... " >&6; }
6748if ${ac_cv_path_DIRNAME+:} false; then :
6749  $as_echo_n "(cached) " >&6
6750else
6751  case $DIRNAME in
6752  [\\/]* | ?:[\\/]*)
6753  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6754  ;;
6755  *)
6756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6757for as_dir in $PATH
6758do
6759  IFS=$as_save_IFS
6760  test -z "$as_dir" && as_dir=.
6761    for ac_exec_ext in '' $ac_executable_extensions; do
6762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6763    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6765    break 2
6766  fi
6767done
6768  done
6769IFS=$as_save_IFS
6770
6771  ;;
6772esac
6773fi
6774DIRNAME=$ac_cv_path_DIRNAME
6775if test -n "$DIRNAME"; then
6776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6777$as_echo "$DIRNAME" >&6; }
6778else
6779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6780$as_echo "no" >&6; }
6781fi
6782
6783
6784  test -n "$DIRNAME" && break
6785done
6786
6787    else
6788      # If it succeeded, then it was overridden by the user. We will use it
6789      # for the tool.
6790
6791      # First remove it from the list of overridden variables, so we can test
6792      # for unknown variables in the end.
6793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6794
6795      # Check if we try to supply an empty value
6796      if test "x$DIRNAME" = x; then
6797        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6798$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6800$as_echo_n "checking for DIRNAME... " >&6; }
6801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6802$as_echo "disabled" >&6; }
6803      else
6804        # Check if the provided tool contains a complete path.
6805        tool_specified="$DIRNAME"
6806        tool_basename="${tool_specified##*/}"
6807        if test "x$tool_basename" = "x$tool_specified"; then
6808          # A command without a complete path is provided, search $PATH.
6809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6810$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6811          # Extract the first word of "$tool_basename", so it can be a program name with args.
6812set dummy $tool_basename; ac_word=$2
6813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6814$as_echo_n "checking for $ac_word... " >&6; }
6815if ${ac_cv_path_DIRNAME+:} false; then :
6816  $as_echo_n "(cached) " >&6
6817else
6818  case $DIRNAME in
6819  [\\/]* | ?:[\\/]*)
6820  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6821  ;;
6822  *)
6823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6824for as_dir in $PATH
6825do
6826  IFS=$as_save_IFS
6827  test -z "$as_dir" && as_dir=.
6828    for ac_exec_ext in '' $ac_executable_extensions; do
6829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6830    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6832    break 2
6833  fi
6834done
6835  done
6836IFS=$as_save_IFS
6837
6838  ;;
6839esac
6840fi
6841DIRNAME=$ac_cv_path_DIRNAME
6842if test -n "$DIRNAME"; then
6843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6844$as_echo "$DIRNAME" >&6; }
6845else
6846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6847$as_echo "no" >&6; }
6848fi
6849
6850
6851          if test "x$DIRNAME" = x; then
6852            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6853          fi
6854        else
6855          # Otherwise we believe it is a complete path. Use it as it is.
6856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6857$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6858          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6859$as_echo_n "checking for DIRNAME... " >&6; }
6860          if test ! -x "$tool_specified"; then
6861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6862$as_echo "not found" >&6; }
6863            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6864          fi
6865          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6866$as_echo "$tool_specified" >&6; }
6867        fi
6868      fi
6869    fi
6870  fi
6871
6872
6873
6874  if test "x$DIRNAME" = x; then
6875    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6876  fi
6877
6878
6879
6880
6881
6882  # Publish this variable in the help.
6883
6884
6885  if [ -z "${ECHO+x}" ]; then
6886    # The variable is not set by user, try to locate tool using the code snippet
6887    for ac_prog in echo
6888do
6889  # Extract the first word of "$ac_prog", so it can be a program name with args.
6890set dummy $ac_prog; ac_word=$2
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892$as_echo_n "checking for $ac_word... " >&6; }
6893if ${ac_cv_path_ECHO+:} false; then :
6894  $as_echo_n "(cached) " >&6
6895else
6896  case $ECHO in
6897  [\\/]* | ?:[\\/]*)
6898  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6899  ;;
6900  *)
6901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902for as_dir in $PATH
6903do
6904  IFS=$as_save_IFS
6905  test -z "$as_dir" && as_dir=.
6906    for ac_exec_ext in '' $ac_executable_extensions; do
6907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6908    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6910    break 2
6911  fi
6912done
6913  done
6914IFS=$as_save_IFS
6915
6916  ;;
6917esac
6918fi
6919ECHO=$ac_cv_path_ECHO
6920if test -n "$ECHO"; then
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6922$as_echo "$ECHO" >&6; }
6923else
6924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6925$as_echo "no" >&6; }
6926fi
6927
6928
6929  test -n "$ECHO" && break
6930done
6931
6932  else
6933    # The variable is set, but is it from the command line or the environment?
6934
6935    # Try to remove the string !ECHO! from our list.
6936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6938      # If it failed, the variable was not from the command line. Ignore it,
6939      # but warn the user (except for BASH, which is always set by the calling BASH).
6940      if test "xECHO" != xBASH; then
6941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6942$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6943      fi
6944      # Try to locate tool using the code snippet
6945      for ac_prog in echo
6946do
6947  # Extract the first word of "$ac_prog", so it can be a program name with args.
6948set dummy $ac_prog; ac_word=$2
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6950$as_echo_n "checking for $ac_word... " >&6; }
6951if ${ac_cv_path_ECHO+:} false; then :
6952  $as_echo_n "(cached) " >&6
6953else
6954  case $ECHO in
6955  [\\/]* | ?:[\\/]*)
6956  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6957  ;;
6958  *)
6959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6960for as_dir in $PATH
6961do
6962  IFS=$as_save_IFS
6963  test -z "$as_dir" && as_dir=.
6964    for ac_exec_ext in '' $ac_executable_extensions; do
6965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6966    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6968    break 2
6969  fi
6970done
6971  done
6972IFS=$as_save_IFS
6973
6974  ;;
6975esac
6976fi
6977ECHO=$ac_cv_path_ECHO
6978if test -n "$ECHO"; then
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6980$as_echo "$ECHO" >&6; }
6981else
6982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6983$as_echo "no" >&6; }
6984fi
6985
6986
6987  test -n "$ECHO" && break
6988done
6989
6990    else
6991      # If it succeeded, then it was overridden by the user. We will use it
6992      # for the tool.
6993
6994      # First remove it from the list of overridden variables, so we can test
6995      # for unknown variables in the end.
6996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6997
6998      # Check if we try to supply an empty value
6999      if test "x$ECHO" = x; then
7000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7001$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7003$as_echo_n "checking for ECHO... " >&6; }
7004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7005$as_echo "disabled" >&6; }
7006      else
7007        # Check if the provided tool contains a complete path.
7008        tool_specified="$ECHO"
7009        tool_basename="${tool_specified##*/}"
7010        if test "x$tool_basename" = "x$tool_specified"; then
7011          # A command without a complete path is provided, search $PATH.
7012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7013$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7014          # Extract the first word of "$tool_basename", so it can be a program name with args.
7015set dummy $tool_basename; ac_word=$2
7016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7017$as_echo_n "checking for $ac_word... " >&6; }
7018if ${ac_cv_path_ECHO+:} false; then :
7019  $as_echo_n "(cached) " >&6
7020else
7021  case $ECHO in
7022  [\\/]* | ?:[\\/]*)
7023  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7024  ;;
7025  *)
7026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7027for as_dir in $PATH
7028do
7029  IFS=$as_save_IFS
7030  test -z "$as_dir" && as_dir=.
7031    for ac_exec_ext in '' $ac_executable_extensions; do
7032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7033    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7035    break 2
7036  fi
7037done
7038  done
7039IFS=$as_save_IFS
7040
7041  ;;
7042esac
7043fi
7044ECHO=$ac_cv_path_ECHO
7045if test -n "$ECHO"; then
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7047$as_echo "$ECHO" >&6; }
7048else
7049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7050$as_echo "no" >&6; }
7051fi
7052
7053
7054          if test "x$ECHO" = x; then
7055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7056          fi
7057        else
7058          # Otherwise we believe it is a complete path. Use it as it is.
7059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7060$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7062$as_echo_n "checking for ECHO... " >&6; }
7063          if test ! -x "$tool_specified"; then
7064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7065$as_echo "not found" >&6; }
7066            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7067          fi
7068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7069$as_echo "$tool_specified" >&6; }
7070        fi
7071      fi
7072    fi
7073  fi
7074
7075
7076
7077  if test "x$ECHO" = x; then
7078    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7079  fi
7080
7081
7082
7083
7084
7085  # Publish this variable in the help.
7086
7087
7088  if [ -z "${EXPR+x}" ]; then
7089    # The variable is not set by user, try to locate tool using the code snippet
7090    for ac_prog in expr
7091do
7092  # Extract the first word of "$ac_prog", so it can be a program name with args.
7093set dummy $ac_prog; ac_word=$2
7094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7095$as_echo_n "checking for $ac_word... " >&6; }
7096if ${ac_cv_path_EXPR+:} false; then :
7097  $as_echo_n "(cached) " >&6
7098else
7099  case $EXPR in
7100  [\\/]* | ?:[\\/]*)
7101  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7102  ;;
7103  *)
7104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7105for as_dir in $PATH
7106do
7107  IFS=$as_save_IFS
7108  test -z "$as_dir" && as_dir=.
7109    for ac_exec_ext in '' $ac_executable_extensions; do
7110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7111    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7113    break 2
7114  fi
7115done
7116  done
7117IFS=$as_save_IFS
7118
7119  ;;
7120esac
7121fi
7122EXPR=$ac_cv_path_EXPR
7123if test -n "$EXPR"; then
7124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7125$as_echo "$EXPR" >&6; }
7126else
7127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128$as_echo "no" >&6; }
7129fi
7130
7131
7132  test -n "$EXPR" && break
7133done
7134
7135  else
7136    # The variable is set, but is it from the command line or the environment?
7137
7138    # Try to remove the string !EXPR! from our list.
7139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7141      # If it failed, the variable was not from the command line. Ignore it,
7142      # but warn the user (except for BASH, which is always set by the calling BASH).
7143      if test "xEXPR" != xBASH; then
7144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7145$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7146      fi
7147      # Try to locate tool using the code snippet
7148      for ac_prog in expr
7149do
7150  # Extract the first word of "$ac_prog", so it can be a program name with args.
7151set dummy $ac_prog; ac_word=$2
7152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7153$as_echo_n "checking for $ac_word... " >&6; }
7154if ${ac_cv_path_EXPR+:} false; then :
7155  $as_echo_n "(cached) " >&6
7156else
7157  case $EXPR in
7158  [\\/]* | ?:[\\/]*)
7159  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7160  ;;
7161  *)
7162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7163for as_dir in $PATH
7164do
7165  IFS=$as_save_IFS
7166  test -z "$as_dir" && as_dir=.
7167    for ac_exec_ext in '' $ac_executable_extensions; do
7168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7169    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7171    break 2
7172  fi
7173done
7174  done
7175IFS=$as_save_IFS
7176
7177  ;;
7178esac
7179fi
7180EXPR=$ac_cv_path_EXPR
7181if test -n "$EXPR"; then
7182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7183$as_echo "$EXPR" >&6; }
7184else
7185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7186$as_echo "no" >&6; }
7187fi
7188
7189
7190  test -n "$EXPR" && break
7191done
7192
7193    else
7194      # If it succeeded, then it was overridden by the user. We will use it
7195      # for the tool.
7196
7197      # First remove it from the list of overridden variables, so we can test
7198      # for unknown variables in the end.
7199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7200
7201      # Check if we try to supply an empty value
7202      if test "x$EXPR" = x; then
7203        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7204$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7205        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7206$as_echo_n "checking for EXPR... " >&6; }
7207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7208$as_echo "disabled" >&6; }
7209      else
7210        # Check if the provided tool contains a complete path.
7211        tool_specified="$EXPR"
7212        tool_basename="${tool_specified##*/}"
7213        if test "x$tool_basename" = "x$tool_specified"; then
7214          # A command without a complete path is provided, search $PATH.
7215          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7216$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7217          # Extract the first word of "$tool_basename", so it can be a program name with args.
7218set dummy $tool_basename; ac_word=$2
7219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7220$as_echo_n "checking for $ac_word... " >&6; }
7221if ${ac_cv_path_EXPR+:} false; then :
7222  $as_echo_n "(cached) " >&6
7223else
7224  case $EXPR in
7225  [\\/]* | ?:[\\/]*)
7226  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7227  ;;
7228  *)
7229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7230for as_dir in $PATH
7231do
7232  IFS=$as_save_IFS
7233  test -z "$as_dir" && as_dir=.
7234    for ac_exec_ext in '' $ac_executable_extensions; do
7235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7236    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7238    break 2
7239  fi
7240done
7241  done
7242IFS=$as_save_IFS
7243
7244  ;;
7245esac
7246fi
7247EXPR=$ac_cv_path_EXPR
7248if test -n "$EXPR"; then
7249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7250$as_echo "$EXPR" >&6; }
7251else
7252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7253$as_echo "no" >&6; }
7254fi
7255
7256
7257          if test "x$EXPR" = x; then
7258            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7259          fi
7260        else
7261          # Otherwise we believe it is a complete path. Use it as it is.
7262          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7263$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7264          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7265$as_echo_n "checking for EXPR... " >&6; }
7266          if test ! -x "$tool_specified"; then
7267            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7268$as_echo "not found" >&6; }
7269            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7270          fi
7271          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7272$as_echo "$tool_specified" >&6; }
7273        fi
7274      fi
7275    fi
7276  fi
7277
7278
7279
7280  if test "x$EXPR" = x; then
7281    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7282  fi
7283
7284
7285
7286
7287
7288  # Publish this variable in the help.
7289
7290
7291  if [ -z "${FILE+x}" ]; then
7292    # The variable is not set by user, try to locate tool using the code snippet
7293    for ac_prog in file
7294do
7295  # Extract the first word of "$ac_prog", so it can be a program name with args.
7296set dummy $ac_prog; ac_word=$2
7297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7298$as_echo_n "checking for $ac_word... " >&6; }
7299if ${ac_cv_path_FILE+:} false; then :
7300  $as_echo_n "(cached) " >&6
7301else
7302  case $FILE in
7303  [\\/]* | ?:[\\/]*)
7304  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7305  ;;
7306  *)
7307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7308for as_dir in $PATH
7309do
7310  IFS=$as_save_IFS
7311  test -z "$as_dir" && as_dir=.
7312    for ac_exec_ext in '' $ac_executable_extensions; do
7313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7314    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7316    break 2
7317  fi
7318done
7319  done
7320IFS=$as_save_IFS
7321
7322  ;;
7323esac
7324fi
7325FILE=$ac_cv_path_FILE
7326if test -n "$FILE"; then
7327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7328$as_echo "$FILE" >&6; }
7329else
7330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7331$as_echo "no" >&6; }
7332fi
7333
7334
7335  test -n "$FILE" && break
7336done
7337
7338  else
7339    # The variable is set, but is it from the command line or the environment?
7340
7341    # Try to remove the string !FILE! from our list.
7342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7344      # If it failed, the variable was not from the command line. Ignore it,
7345      # but warn the user (except for BASH, which is always set by the calling BASH).
7346      if test "xFILE" != xBASH; then
7347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7348$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7349      fi
7350      # Try to locate tool using the code snippet
7351      for ac_prog in file
7352do
7353  # Extract the first word of "$ac_prog", so it can be a program name with args.
7354set dummy $ac_prog; ac_word=$2
7355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7356$as_echo_n "checking for $ac_word... " >&6; }
7357if ${ac_cv_path_FILE+:} false; then :
7358  $as_echo_n "(cached) " >&6
7359else
7360  case $FILE in
7361  [\\/]* | ?:[\\/]*)
7362  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7363  ;;
7364  *)
7365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366for as_dir in $PATH
7367do
7368  IFS=$as_save_IFS
7369  test -z "$as_dir" && as_dir=.
7370    for ac_exec_ext in '' $ac_executable_extensions; do
7371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7372    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7374    break 2
7375  fi
7376done
7377  done
7378IFS=$as_save_IFS
7379
7380  ;;
7381esac
7382fi
7383FILE=$ac_cv_path_FILE
7384if test -n "$FILE"; then
7385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7386$as_echo "$FILE" >&6; }
7387else
7388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7389$as_echo "no" >&6; }
7390fi
7391
7392
7393  test -n "$FILE" && break
7394done
7395
7396    else
7397      # If it succeeded, then it was overridden by the user. We will use it
7398      # for the tool.
7399
7400      # First remove it from the list of overridden variables, so we can test
7401      # for unknown variables in the end.
7402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7403
7404      # Check if we try to supply an empty value
7405      if test "x$FILE" = x; then
7406        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7407$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7409$as_echo_n "checking for FILE... " >&6; }
7410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7411$as_echo "disabled" >&6; }
7412      else
7413        # Check if the provided tool contains a complete path.
7414        tool_specified="$FILE"
7415        tool_basename="${tool_specified##*/}"
7416        if test "x$tool_basename" = "x$tool_specified"; then
7417          # A command without a complete path is provided, search $PATH.
7418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7419$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7420          # Extract the first word of "$tool_basename", so it can be a program name with args.
7421set dummy $tool_basename; ac_word=$2
7422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7423$as_echo_n "checking for $ac_word... " >&6; }
7424if ${ac_cv_path_FILE+:} false; then :
7425  $as_echo_n "(cached) " >&6
7426else
7427  case $FILE in
7428  [\\/]* | ?:[\\/]*)
7429  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7430  ;;
7431  *)
7432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7433for as_dir in $PATH
7434do
7435  IFS=$as_save_IFS
7436  test -z "$as_dir" && as_dir=.
7437    for ac_exec_ext in '' $ac_executable_extensions; do
7438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7439    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7441    break 2
7442  fi
7443done
7444  done
7445IFS=$as_save_IFS
7446
7447  ;;
7448esac
7449fi
7450FILE=$ac_cv_path_FILE
7451if test -n "$FILE"; then
7452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7453$as_echo "$FILE" >&6; }
7454else
7455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7456$as_echo "no" >&6; }
7457fi
7458
7459
7460          if test "x$FILE" = x; then
7461            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7462          fi
7463        else
7464          # Otherwise we believe it is a complete path. Use it as it is.
7465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7466$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7467          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7468$as_echo_n "checking for FILE... " >&6; }
7469          if test ! -x "$tool_specified"; then
7470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7471$as_echo "not found" >&6; }
7472            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7473          fi
7474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7475$as_echo "$tool_specified" >&6; }
7476        fi
7477      fi
7478    fi
7479  fi
7480
7481
7482
7483  if test "x$FILE" = x; then
7484    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7485  fi
7486
7487
7488
7489
7490
7491  # Publish this variable in the help.
7492
7493
7494  if [ -z "${FIND+x}" ]; then
7495    # The variable is not set by user, try to locate tool using the code snippet
7496    for ac_prog in find
7497do
7498  # Extract the first word of "$ac_prog", so it can be a program name with args.
7499set dummy $ac_prog; ac_word=$2
7500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7501$as_echo_n "checking for $ac_word... " >&6; }
7502if ${ac_cv_path_FIND+:} false; then :
7503  $as_echo_n "(cached) " >&6
7504else
7505  case $FIND in
7506  [\\/]* | ?:[\\/]*)
7507  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7508  ;;
7509  *)
7510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7511for as_dir in $PATH
7512do
7513  IFS=$as_save_IFS
7514  test -z "$as_dir" && as_dir=.
7515    for ac_exec_ext in '' $ac_executable_extensions; do
7516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7517    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7519    break 2
7520  fi
7521done
7522  done
7523IFS=$as_save_IFS
7524
7525  ;;
7526esac
7527fi
7528FIND=$ac_cv_path_FIND
7529if test -n "$FIND"; then
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7531$as_echo "$FIND" >&6; }
7532else
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
7535fi
7536
7537
7538  test -n "$FIND" && break
7539done
7540
7541  else
7542    # The variable is set, but is it from the command line or the environment?
7543
7544    # Try to remove the string !FIND! from our list.
7545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7547      # If it failed, the variable was not from the command line. Ignore it,
7548      # but warn the user (except for BASH, which is always set by the calling BASH).
7549      if test "xFIND" != xBASH; then
7550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7551$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7552      fi
7553      # Try to locate tool using the code snippet
7554      for ac_prog in find
7555do
7556  # Extract the first word of "$ac_prog", so it can be a program name with args.
7557set dummy $ac_prog; ac_word=$2
7558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7559$as_echo_n "checking for $ac_word... " >&6; }
7560if ${ac_cv_path_FIND+:} false; then :
7561  $as_echo_n "(cached) " >&6
7562else
7563  case $FIND in
7564  [\\/]* | ?:[\\/]*)
7565  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7566  ;;
7567  *)
7568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7569for as_dir in $PATH
7570do
7571  IFS=$as_save_IFS
7572  test -z "$as_dir" && as_dir=.
7573    for ac_exec_ext in '' $ac_executable_extensions; do
7574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7575    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7577    break 2
7578  fi
7579done
7580  done
7581IFS=$as_save_IFS
7582
7583  ;;
7584esac
7585fi
7586FIND=$ac_cv_path_FIND
7587if test -n "$FIND"; then
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7589$as_echo "$FIND" >&6; }
7590else
7591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7592$as_echo "no" >&6; }
7593fi
7594
7595
7596  test -n "$FIND" && break
7597done
7598
7599    else
7600      # If it succeeded, then it was overridden by the user. We will use it
7601      # for the tool.
7602
7603      # First remove it from the list of overridden variables, so we can test
7604      # for unknown variables in the end.
7605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7606
7607      # Check if we try to supply an empty value
7608      if test "x$FIND" = x; then
7609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7610$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7612$as_echo_n "checking for FIND... " >&6; }
7613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7614$as_echo "disabled" >&6; }
7615      else
7616        # Check if the provided tool contains a complete path.
7617        tool_specified="$FIND"
7618        tool_basename="${tool_specified##*/}"
7619        if test "x$tool_basename" = "x$tool_specified"; then
7620          # A command without a complete path is provided, search $PATH.
7621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7622$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7623          # Extract the first word of "$tool_basename", so it can be a program name with args.
7624set dummy $tool_basename; ac_word=$2
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7626$as_echo_n "checking for $ac_word... " >&6; }
7627if ${ac_cv_path_FIND+:} false; then :
7628  $as_echo_n "(cached) " >&6
7629else
7630  case $FIND in
7631  [\\/]* | ?:[\\/]*)
7632  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7633  ;;
7634  *)
7635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7636for as_dir in $PATH
7637do
7638  IFS=$as_save_IFS
7639  test -z "$as_dir" && as_dir=.
7640    for ac_exec_ext in '' $ac_executable_extensions; do
7641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7642    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7644    break 2
7645  fi
7646done
7647  done
7648IFS=$as_save_IFS
7649
7650  ;;
7651esac
7652fi
7653FIND=$ac_cv_path_FIND
7654if test -n "$FIND"; then
7655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7656$as_echo "$FIND" >&6; }
7657else
7658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7659$as_echo "no" >&6; }
7660fi
7661
7662
7663          if test "x$FIND" = x; then
7664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7665          fi
7666        else
7667          # Otherwise we believe it is a complete path. Use it as it is.
7668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7669$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7671$as_echo_n "checking for FIND... " >&6; }
7672          if test ! -x "$tool_specified"; then
7673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7674$as_echo "not found" >&6; }
7675            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7676          fi
7677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7678$as_echo "$tool_specified" >&6; }
7679        fi
7680      fi
7681    fi
7682  fi
7683
7684
7685
7686  if test "x$FIND" = x; then
7687    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7688  fi
7689
7690
7691
7692
7693
7694  # Publish this variable in the help.
7695
7696
7697  if [ -z "${HEAD+x}" ]; then
7698    # The variable is not set by user, try to locate tool using the code snippet
7699    for ac_prog in head
7700do
7701  # Extract the first word of "$ac_prog", so it can be a program name with args.
7702set dummy $ac_prog; ac_word=$2
7703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7704$as_echo_n "checking for $ac_word... " >&6; }
7705if ${ac_cv_path_HEAD+:} false; then :
7706  $as_echo_n "(cached) " >&6
7707else
7708  case $HEAD in
7709  [\\/]* | ?:[\\/]*)
7710  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7711  ;;
7712  *)
7713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7714for as_dir in $PATH
7715do
7716  IFS=$as_save_IFS
7717  test -z "$as_dir" && as_dir=.
7718    for ac_exec_ext in '' $ac_executable_extensions; do
7719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7720    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7722    break 2
7723  fi
7724done
7725  done
7726IFS=$as_save_IFS
7727
7728  ;;
7729esac
7730fi
7731HEAD=$ac_cv_path_HEAD
7732if test -n "$HEAD"; then
7733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7734$as_echo "$HEAD" >&6; }
7735else
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737$as_echo "no" >&6; }
7738fi
7739
7740
7741  test -n "$HEAD" && break
7742done
7743
7744  else
7745    # The variable is set, but is it from the command line or the environment?
7746
7747    # Try to remove the string !HEAD! from our list.
7748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7750      # If it failed, the variable was not from the command line. Ignore it,
7751      # but warn the user (except for BASH, which is always set by the calling BASH).
7752      if test "xHEAD" != xBASH; then
7753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7754$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7755      fi
7756      # Try to locate tool using the code snippet
7757      for ac_prog in head
7758do
7759  # Extract the first word of "$ac_prog", so it can be a program name with args.
7760set dummy $ac_prog; ac_word=$2
7761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7762$as_echo_n "checking for $ac_word... " >&6; }
7763if ${ac_cv_path_HEAD+:} false; then :
7764  $as_echo_n "(cached) " >&6
7765else
7766  case $HEAD in
7767  [\\/]* | ?:[\\/]*)
7768  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7769  ;;
7770  *)
7771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7772for as_dir in $PATH
7773do
7774  IFS=$as_save_IFS
7775  test -z "$as_dir" && as_dir=.
7776    for ac_exec_ext in '' $ac_executable_extensions; do
7777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7778    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7780    break 2
7781  fi
7782done
7783  done
7784IFS=$as_save_IFS
7785
7786  ;;
7787esac
7788fi
7789HEAD=$ac_cv_path_HEAD
7790if test -n "$HEAD"; then
7791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7792$as_echo "$HEAD" >&6; }
7793else
7794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7795$as_echo "no" >&6; }
7796fi
7797
7798
7799  test -n "$HEAD" && break
7800done
7801
7802    else
7803      # If it succeeded, then it was overridden by the user. We will use it
7804      # for the tool.
7805
7806      # First remove it from the list of overridden variables, so we can test
7807      # for unknown variables in the end.
7808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7809
7810      # Check if we try to supply an empty value
7811      if test "x$HEAD" = x; then
7812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7813$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7815$as_echo_n "checking for HEAD... " >&6; }
7816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7817$as_echo "disabled" >&6; }
7818      else
7819        # Check if the provided tool contains a complete path.
7820        tool_specified="$HEAD"
7821        tool_basename="${tool_specified##*/}"
7822        if test "x$tool_basename" = "x$tool_specified"; then
7823          # A command without a complete path is provided, search $PATH.
7824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7825$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7826          # Extract the first word of "$tool_basename", so it can be a program name with args.
7827set dummy $tool_basename; ac_word=$2
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7829$as_echo_n "checking for $ac_word... " >&6; }
7830if ${ac_cv_path_HEAD+:} false; then :
7831  $as_echo_n "(cached) " >&6
7832else
7833  case $HEAD in
7834  [\\/]* | ?:[\\/]*)
7835  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7836  ;;
7837  *)
7838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7839for as_dir in $PATH
7840do
7841  IFS=$as_save_IFS
7842  test -z "$as_dir" && as_dir=.
7843    for ac_exec_ext in '' $ac_executable_extensions; do
7844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7845    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7847    break 2
7848  fi
7849done
7850  done
7851IFS=$as_save_IFS
7852
7853  ;;
7854esac
7855fi
7856HEAD=$ac_cv_path_HEAD
7857if test -n "$HEAD"; then
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7859$as_echo "$HEAD" >&6; }
7860else
7861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7862$as_echo "no" >&6; }
7863fi
7864
7865
7866          if test "x$HEAD" = x; then
7867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7868          fi
7869        else
7870          # Otherwise we believe it is a complete path. Use it as it is.
7871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7872$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7874$as_echo_n "checking for HEAD... " >&6; }
7875          if test ! -x "$tool_specified"; then
7876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7877$as_echo "not found" >&6; }
7878            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7879          fi
7880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7881$as_echo "$tool_specified" >&6; }
7882        fi
7883      fi
7884    fi
7885  fi
7886
7887
7888
7889  if test "x$HEAD" = x; then
7890    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7891  fi
7892
7893
7894
7895
7896
7897  # Publish this variable in the help.
7898
7899
7900  if [ -z "${LN+x}" ]; then
7901    # The variable is not set by user, try to locate tool using the code snippet
7902    for ac_prog in ln
7903do
7904  # Extract the first word of "$ac_prog", so it can be a program name with args.
7905set dummy $ac_prog; ac_word=$2
7906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7907$as_echo_n "checking for $ac_word... " >&6; }
7908if ${ac_cv_path_LN+:} false; then :
7909  $as_echo_n "(cached) " >&6
7910else
7911  case $LN in
7912  [\\/]* | ?:[\\/]*)
7913  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7914  ;;
7915  *)
7916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917for as_dir in $PATH
7918do
7919  IFS=$as_save_IFS
7920  test -z "$as_dir" && as_dir=.
7921    for ac_exec_ext in '' $ac_executable_extensions; do
7922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7923    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7925    break 2
7926  fi
7927done
7928  done
7929IFS=$as_save_IFS
7930
7931  ;;
7932esac
7933fi
7934LN=$ac_cv_path_LN
7935if test -n "$LN"; then
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7937$as_echo "$LN" >&6; }
7938else
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7940$as_echo "no" >&6; }
7941fi
7942
7943
7944  test -n "$LN" && break
7945done
7946
7947  else
7948    # The variable is set, but is it from the command line or the environment?
7949
7950    # Try to remove the string !LN! from our list.
7951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7953      # If it failed, the variable was not from the command line. Ignore it,
7954      # but warn the user (except for BASH, which is always set by the calling BASH).
7955      if test "xLN" != xBASH; then
7956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7957$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7958      fi
7959      # Try to locate tool using the code snippet
7960      for ac_prog in ln
7961do
7962  # Extract the first word of "$ac_prog", so it can be a program name with args.
7963set dummy $ac_prog; ac_word=$2
7964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7965$as_echo_n "checking for $ac_word... " >&6; }
7966if ${ac_cv_path_LN+:} false; then :
7967  $as_echo_n "(cached) " >&6
7968else
7969  case $LN in
7970  [\\/]* | ?:[\\/]*)
7971  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7972  ;;
7973  *)
7974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7975for as_dir in $PATH
7976do
7977  IFS=$as_save_IFS
7978  test -z "$as_dir" && as_dir=.
7979    for ac_exec_ext in '' $ac_executable_extensions; do
7980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7981    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7983    break 2
7984  fi
7985done
7986  done
7987IFS=$as_save_IFS
7988
7989  ;;
7990esac
7991fi
7992LN=$ac_cv_path_LN
7993if test -n "$LN"; then
7994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7995$as_echo "$LN" >&6; }
7996else
7997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7998$as_echo "no" >&6; }
7999fi
8000
8001
8002  test -n "$LN" && break
8003done
8004
8005    else
8006      # If it succeeded, then it was overridden by the user. We will use it
8007      # for the tool.
8008
8009      # First remove it from the list of overridden variables, so we can test
8010      # for unknown variables in the end.
8011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8012
8013      # Check if we try to supply an empty value
8014      if test "x$LN" = x; then
8015        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8016$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8018$as_echo_n "checking for LN... " >&6; }
8019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8020$as_echo "disabled" >&6; }
8021      else
8022        # Check if the provided tool contains a complete path.
8023        tool_specified="$LN"
8024        tool_basename="${tool_specified##*/}"
8025        if test "x$tool_basename" = "x$tool_specified"; then
8026          # A command without a complete path is provided, search $PATH.
8027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8028$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8029          # Extract the first word of "$tool_basename", so it can be a program name with args.
8030set dummy $tool_basename; ac_word=$2
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8032$as_echo_n "checking for $ac_word... " >&6; }
8033if ${ac_cv_path_LN+:} false; then :
8034  $as_echo_n "(cached) " >&6
8035else
8036  case $LN in
8037  [\\/]* | ?:[\\/]*)
8038  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8039  ;;
8040  *)
8041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8042for as_dir in $PATH
8043do
8044  IFS=$as_save_IFS
8045  test -z "$as_dir" && as_dir=.
8046    for ac_exec_ext in '' $ac_executable_extensions; do
8047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8048    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8050    break 2
8051  fi
8052done
8053  done
8054IFS=$as_save_IFS
8055
8056  ;;
8057esac
8058fi
8059LN=$ac_cv_path_LN
8060if test -n "$LN"; then
8061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8062$as_echo "$LN" >&6; }
8063else
8064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
8066fi
8067
8068
8069          if test "x$LN" = x; then
8070            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8071          fi
8072        else
8073          # Otherwise we believe it is a complete path. Use it as it is.
8074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8075$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8076          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8077$as_echo_n "checking for LN... " >&6; }
8078          if test ! -x "$tool_specified"; then
8079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8080$as_echo "not found" >&6; }
8081            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8082          fi
8083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8084$as_echo "$tool_specified" >&6; }
8085        fi
8086      fi
8087    fi
8088  fi
8089
8090
8091
8092  if test "x$LN" = x; then
8093    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8094  fi
8095
8096
8097
8098
8099
8100  # Publish this variable in the help.
8101
8102
8103  if [ -z "${LS+x}" ]; then
8104    # The variable is not set by user, try to locate tool using the code snippet
8105    for ac_prog in ls
8106do
8107  # Extract the first word of "$ac_prog", so it can be a program name with args.
8108set dummy $ac_prog; ac_word=$2
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8110$as_echo_n "checking for $ac_word... " >&6; }
8111if ${ac_cv_path_LS+:} false; then :
8112  $as_echo_n "(cached) " >&6
8113else
8114  case $LS in
8115  [\\/]* | ?:[\\/]*)
8116  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8117  ;;
8118  *)
8119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120for as_dir in $PATH
8121do
8122  IFS=$as_save_IFS
8123  test -z "$as_dir" && as_dir=.
8124    for ac_exec_ext in '' $ac_executable_extensions; do
8125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8126    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8128    break 2
8129  fi
8130done
8131  done
8132IFS=$as_save_IFS
8133
8134  ;;
8135esac
8136fi
8137LS=$ac_cv_path_LS
8138if test -n "$LS"; then
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8140$as_echo "$LS" >&6; }
8141else
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143$as_echo "no" >&6; }
8144fi
8145
8146
8147  test -n "$LS" && break
8148done
8149
8150  else
8151    # The variable is set, but is it from the command line or the environment?
8152
8153    # Try to remove the string !LS! from our list.
8154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8156      # If it failed, the variable was not from the command line. Ignore it,
8157      # but warn the user (except for BASH, which is always set by the calling BASH).
8158      if test "xLS" != xBASH; then
8159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8160$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8161      fi
8162      # Try to locate tool using the code snippet
8163      for ac_prog in ls
8164do
8165  # Extract the first word of "$ac_prog", so it can be a program name with args.
8166set dummy $ac_prog; ac_word=$2
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8168$as_echo_n "checking for $ac_word... " >&6; }
8169if ${ac_cv_path_LS+:} false; then :
8170  $as_echo_n "(cached) " >&6
8171else
8172  case $LS in
8173  [\\/]* | ?:[\\/]*)
8174  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8175  ;;
8176  *)
8177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8178for as_dir in $PATH
8179do
8180  IFS=$as_save_IFS
8181  test -z "$as_dir" && as_dir=.
8182    for ac_exec_ext in '' $ac_executable_extensions; do
8183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8184    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8186    break 2
8187  fi
8188done
8189  done
8190IFS=$as_save_IFS
8191
8192  ;;
8193esac
8194fi
8195LS=$ac_cv_path_LS
8196if test -n "$LS"; then
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8198$as_echo "$LS" >&6; }
8199else
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8201$as_echo "no" >&6; }
8202fi
8203
8204
8205  test -n "$LS" && break
8206done
8207
8208    else
8209      # If it succeeded, then it was overridden by the user. We will use it
8210      # for the tool.
8211
8212      # First remove it from the list of overridden variables, so we can test
8213      # for unknown variables in the end.
8214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8215
8216      # Check if we try to supply an empty value
8217      if test "x$LS" = x; then
8218        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8219$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8221$as_echo_n "checking for LS... " >&6; }
8222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8223$as_echo "disabled" >&6; }
8224      else
8225        # Check if the provided tool contains a complete path.
8226        tool_specified="$LS"
8227        tool_basename="${tool_specified##*/}"
8228        if test "x$tool_basename" = "x$tool_specified"; then
8229          # A command without a complete path is provided, search $PATH.
8230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8231$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8232          # Extract the first word of "$tool_basename", so it can be a program name with args.
8233set dummy $tool_basename; ac_word=$2
8234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8235$as_echo_n "checking for $ac_word... " >&6; }
8236if ${ac_cv_path_LS+:} false; then :
8237  $as_echo_n "(cached) " >&6
8238else
8239  case $LS in
8240  [\\/]* | ?:[\\/]*)
8241  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8242  ;;
8243  *)
8244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8245for as_dir in $PATH
8246do
8247  IFS=$as_save_IFS
8248  test -z "$as_dir" && as_dir=.
8249    for ac_exec_ext in '' $ac_executable_extensions; do
8250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8251    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8253    break 2
8254  fi
8255done
8256  done
8257IFS=$as_save_IFS
8258
8259  ;;
8260esac
8261fi
8262LS=$ac_cv_path_LS
8263if test -n "$LS"; then
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8265$as_echo "$LS" >&6; }
8266else
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268$as_echo "no" >&6; }
8269fi
8270
8271
8272          if test "x$LS" = x; then
8273            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8274          fi
8275        else
8276          # Otherwise we believe it is a complete path. Use it as it is.
8277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8278$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8279          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8280$as_echo_n "checking for LS... " >&6; }
8281          if test ! -x "$tool_specified"; then
8282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8283$as_echo "not found" >&6; }
8284            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8285          fi
8286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8287$as_echo "$tool_specified" >&6; }
8288        fi
8289      fi
8290    fi
8291  fi
8292
8293
8294
8295  if test "x$LS" = x; then
8296    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8297  fi
8298
8299
8300
8301
8302
8303  # Publish this variable in the help.
8304
8305
8306  if [ -z "${MKDIR+x}" ]; then
8307    # The variable is not set by user, try to locate tool using the code snippet
8308    for ac_prog in mkdir
8309do
8310  # Extract the first word of "$ac_prog", so it can be a program name with args.
8311set dummy $ac_prog; ac_word=$2
8312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8313$as_echo_n "checking for $ac_word... " >&6; }
8314if ${ac_cv_path_MKDIR+:} false; then :
8315  $as_echo_n "(cached) " >&6
8316else
8317  case $MKDIR in
8318  [\\/]* | ?:[\\/]*)
8319  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8320  ;;
8321  *)
8322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8323for as_dir in $PATH
8324do
8325  IFS=$as_save_IFS
8326  test -z "$as_dir" && as_dir=.
8327    for ac_exec_ext in '' $ac_executable_extensions; do
8328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8329    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8331    break 2
8332  fi
8333done
8334  done
8335IFS=$as_save_IFS
8336
8337  ;;
8338esac
8339fi
8340MKDIR=$ac_cv_path_MKDIR
8341if test -n "$MKDIR"; then
8342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8343$as_echo "$MKDIR" >&6; }
8344else
8345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8346$as_echo "no" >&6; }
8347fi
8348
8349
8350  test -n "$MKDIR" && break
8351done
8352
8353  else
8354    # The variable is set, but is it from the command line or the environment?
8355
8356    # Try to remove the string !MKDIR! from our list.
8357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8359      # If it failed, the variable was not from the command line. Ignore it,
8360      # but warn the user (except for BASH, which is always set by the calling BASH).
8361      if test "xMKDIR" != xBASH; then
8362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8363$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8364      fi
8365      # Try to locate tool using the code snippet
8366      for ac_prog in mkdir
8367do
8368  # Extract the first word of "$ac_prog", so it can be a program name with args.
8369set dummy $ac_prog; ac_word=$2
8370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8371$as_echo_n "checking for $ac_word... " >&6; }
8372if ${ac_cv_path_MKDIR+:} false; then :
8373  $as_echo_n "(cached) " >&6
8374else
8375  case $MKDIR in
8376  [\\/]* | ?:[\\/]*)
8377  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8378  ;;
8379  *)
8380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8381for as_dir in $PATH
8382do
8383  IFS=$as_save_IFS
8384  test -z "$as_dir" && as_dir=.
8385    for ac_exec_ext in '' $ac_executable_extensions; do
8386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8387    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8389    break 2
8390  fi
8391done
8392  done
8393IFS=$as_save_IFS
8394
8395  ;;
8396esac
8397fi
8398MKDIR=$ac_cv_path_MKDIR
8399if test -n "$MKDIR"; then
8400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8401$as_echo "$MKDIR" >&6; }
8402else
8403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8404$as_echo "no" >&6; }
8405fi
8406
8407
8408  test -n "$MKDIR" && break
8409done
8410
8411    else
8412      # If it succeeded, then it was overridden by the user. We will use it
8413      # for the tool.
8414
8415      # First remove it from the list of overridden variables, so we can test
8416      # for unknown variables in the end.
8417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8418
8419      # Check if we try to supply an empty value
8420      if test "x$MKDIR" = x; then
8421        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8422$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8423        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8424$as_echo_n "checking for MKDIR... " >&6; }
8425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8426$as_echo "disabled" >&6; }
8427      else
8428        # Check if the provided tool contains a complete path.
8429        tool_specified="$MKDIR"
8430        tool_basename="${tool_specified##*/}"
8431        if test "x$tool_basename" = "x$tool_specified"; then
8432          # A command without a complete path is provided, search $PATH.
8433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8434$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8435          # Extract the first word of "$tool_basename", so it can be a program name with args.
8436set dummy $tool_basename; ac_word=$2
8437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8438$as_echo_n "checking for $ac_word... " >&6; }
8439if ${ac_cv_path_MKDIR+:} false; then :
8440  $as_echo_n "(cached) " >&6
8441else
8442  case $MKDIR in
8443  [\\/]* | ?:[\\/]*)
8444  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8445  ;;
8446  *)
8447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8448for as_dir in $PATH
8449do
8450  IFS=$as_save_IFS
8451  test -z "$as_dir" && as_dir=.
8452    for ac_exec_ext in '' $ac_executable_extensions; do
8453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8454    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8456    break 2
8457  fi
8458done
8459  done
8460IFS=$as_save_IFS
8461
8462  ;;
8463esac
8464fi
8465MKDIR=$ac_cv_path_MKDIR
8466if test -n "$MKDIR"; then
8467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8468$as_echo "$MKDIR" >&6; }
8469else
8470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8471$as_echo "no" >&6; }
8472fi
8473
8474
8475          if test "x$MKDIR" = x; then
8476            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8477          fi
8478        else
8479          # Otherwise we believe it is a complete path. Use it as it is.
8480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8481$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8482          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8483$as_echo_n "checking for MKDIR... " >&6; }
8484          if test ! -x "$tool_specified"; then
8485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8486$as_echo "not found" >&6; }
8487            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8488          fi
8489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8490$as_echo "$tool_specified" >&6; }
8491        fi
8492      fi
8493    fi
8494  fi
8495
8496
8497
8498  if test "x$MKDIR" = x; then
8499    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8500  fi
8501
8502
8503
8504
8505
8506  # Publish this variable in the help.
8507
8508
8509  if [ -z "${MKTEMP+x}" ]; then
8510    # The variable is not set by user, try to locate tool using the code snippet
8511    for ac_prog in mktemp
8512do
8513  # Extract the first word of "$ac_prog", so it can be a program name with args.
8514set dummy $ac_prog; ac_word=$2
8515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8516$as_echo_n "checking for $ac_word... " >&6; }
8517if ${ac_cv_path_MKTEMP+:} false; then :
8518  $as_echo_n "(cached) " >&6
8519else
8520  case $MKTEMP in
8521  [\\/]* | ?:[\\/]*)
8522  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8523  ;;
8524  *)
8525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8526for as_dir in $PATH
8527do
8528  IFS=$as_save_IFS
8529  test -z "$as_dir" && as_dir=.
8530    for ac_exec_ext in '' $ac_executable_extensions; do
8531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8532    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8534    break 2
8535  fi
8536done
8537  done
8538IFS=$as_save_IFS
8539
8540  ;;
8541esac
8542fi
8543MKTEMP=$ac_cv_path_MKTEMP
8544if test -n "$MKTEMP"; then
8545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8546$as_echo "$MKTEMP" >&6; }
8547else
8548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8549$as_echo "no" >&6; }
8550fi
8551
8552
8553  test -n "$MKTEMP" && break
8554done
8555
8556  else
8557    # The variable is set, but is it from the command line or the environment?
8558
8559    # Try to remove the string !MKTEMP! from our list.
8560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8562      # If it failed, the variable was not from the command line. Ignore it,
8563      # but warn the user (except for BASH, which is always set by the calling BASH).
8564      if test "xMKTEMP" != xBASH; then
8565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8566$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8567      fi
8568      # Try to locate tool using the code snippet
8569      for ac_prog in mktemp
8570do
8571  # Extract the first word of "$ac_prog", so it can be a program name with args.
8572set dummy $ac_prog; ac_word=$2
8573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8574$as_echo_n "checking for $ac_word... " >&6; }
8575if ${ac_cv_path_MKTEMP+:} false; then :
8576  $as_echo_n "(cached) " >&6
8577else
8578  case $MKTEMP in
8579  [\\/]* | ?:[\\/]*)
8580  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8581  ;;
8582  *)
8583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8584for as_dir in $PATH
8585do
8586  IFS=$as_save_IFS
8587  test -z "$as_dir" && as_dir=.
8588    for ac_exec_ext in '' $ac_executable_extensions; do
8589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8590    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8592    break 2
8593  fi
8594done
8595  done
8596IFS=$as_save_IFS
8597
8598  ;;
8599esac
8600fi
8601MKTEMP=$ac_cv_path_MKTEMP
8602if test -n "$MKTEMP"; then
8603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8604$as_echo "$MKTEMP" >&6; }
8605else
8606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8607$as_echo "no" >&6; }
8608fi
8609
8610
8611  test -n "$MKTEMP" && break
8612done
8613
8614    else
8615      # If it succeeded, then it was overridden by the user. We will use it
8616      # for the tool.
8617
8618      # First remove it from the list of overridden variables, so we can test
8619      # for unknown variables in the end.
8620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8621
8622      # Check if we try to supply an empty value
8623      if test "x$MKTEMP" = x; then
8624        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8625$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8627$as_echo_n "checking for MKTEMP... " >&6; }
8628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8629$as_echo "disabled" >&6; }
8630      else
8631        # Check if the provided tool contains a complete path.
8632        tool_specified="$MKTEMP"
8633        tool_basename="${tool_specified##*/}"
8634        if test "x$tool_basename" = "x$tool_specified"; then
8635          # A command without a complete path is provided, search $PATH.
8636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8637$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8638          # Extract the first word of "$tool_basename", so it can be a program name with args.
8639set dummy $tool_basename; ac_word=$2
8640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8641$as_echo_n "checking for $ac_word... " >&6; }
8642if ${ac_cv_path_MKTEMP+:} false; then :
8643  $as_echo_n "(cached) " >&6
8644else
8645  case $MKTEMP in
8646  [\\/]* | ?:[\\/]*)
8647  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8648  ;;
8649  *)
8650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8651for as_dir in $PATH
8652do
8653  IFS=$as_save_IFS
8654  test -z "$as_dir" && as_dir=.
8655    for ac_exec_ext in '' $ac_executable_extensions; do
8656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8657    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8659    break 2
8660  fi
8661done
8662  done
8663IFS=$as_save_IFS
8664
8665  ;;
8666esac
8667fi
8668MKTEMP=$ac_cv_path_MKTEMP
8669if test -n "$MKTEMP"; then
8670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8671$as_echo "$MKTEMP" >&6; }
8672else
8673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8674$as_echo "no" >&6; }
8675fi
8676
8677
8678          if test "x$MKTEMP" = x; then
8679            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8680          fi
8681        else
8682          # Otherwise we believe it is a complete path. Use it as it is.
8683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8684$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8685          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8686$as_echo_n "checking for MKTEMP... " >&6; }
8687          if test ! -x "$tool_specified"; then
8688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8689$as_echo "not found" >&6; }
8690            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8691          fi
8692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8693$as_echo "$tool_specified" >&6; }
8694        fi
8695      fi
8696    fi
8697  fi
8698
8699
8700
8701  if test "x$MKTEMP" = x; then
8702    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8703  fi
8704
8705
8706
8707
8708
8709  # Publish this variable in the help.
8710
8711
8712  if [ -z "${MV+x}" ]; then
8713    # The variable is not set by user, try to locate tool using the code snippet
8714    for ac_prog in mv
8715do
8716  # Extract the first word of "$ac_prog", so it can be a program name with args.
8717set dummy $ac_prog; ac_word=$2
8718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8719$as_echo_n "checking for $ac_word... " >&6; }
8720if ${ac_cv_path_MV+:} false; then :
8721  $as_echo_n "(cached) " >&6
8722else
8723  case $MV in
8724  [\\/]* | ?:[\\/]*)
8725  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8726  ;;
8727  *)
8728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8729for as_dir in $PATH
8730do
8731  IFS=$as_save_IFS
8732  test -z "$as_dir" && as_dir=.
8733    for ac_exec_ext in '' $ac_executable_extensions; do
8734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8735    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8737    break 2
8738  fi
8739done
8740  done
8741IFS=$as_save_IFS
8742
8743  ;;
8744esac
8745fi
8746MV=$ac_cv_path_MV
8747if test -n "$MV"; then
8748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8749$as_echo "$MV" >&6; }
8750else
8751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8752$as_echo "no" >&6; }
8753fi
8754
8755
8756  test -n "$MV" && break
8757done
8758
8759  else
8760    # The variable is set, but is it from the command line or the environment?
8761
8762    # Try to remove the string !MV! from our list.
8763    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8764    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8765      # If it failed, the variable was not from the command line. Ignore it,
8766      # but warn the user (except for BASH, which is always set by the calling BASH).
8767      if test "xMV" != xBASH; then
8768        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8769$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8770      fi
8771      # Try to locate tool using the code snippet
8772      for ac_prog in mv
8773do
8774  # Extract the first word of "$ac_prog", so it can be a program name with args.
8775set dummy $ac_prog; ac_word=$2
8776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8777$as_echo_n "checking for $ac_word... " >&6; }
8778if ${ac_cv_path_MV+:} false; then :
8779  $as_echo_n "(cached) " >&6
8780else
8781  case $MV in
8782  [\\/]* | ?:[\\/]*)
8783  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8784  ;;
8785  *)
8786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8787for as_dir in $PATH
8788do
8789  IFS=$as_save_IFS
8790  test -z "$as_dir" && as_dir=.
8791    for ac_exec_ext in '' $ac_executable_extensions; do
8792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8793    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8795    break 2
8796  fi
8797done
8798  done
8799IFS=$as_save_IFS
8800
8801  ;;
8802esac
8803fi
8804MV=$ac_cv_path_MV
8805if test -n "$MV"; then
8806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8807$as_echo "$MV" >&6; }
8808else
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810$as_echo "no" >&6; }
8811fi
8812
8813
8814  test -n "$MV" && break
8815done
8816
8817    else
8818      # If it succeeded, then it was overridden by the user. We will use it
8819      # for the tool.
8820
8821      # First remove it from the list of overridden variables, so we can test
8822      # for unknown variables in the end.
8823      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8824
8825      # Check if we try to supply an empty value
8826      if test "x$MV" = x; then
8827        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8828$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8829        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8830$as_echo_n "checking for MV... " >&6; }
8831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8832$as_echo "disabled" >&6; }
8833      else
8834        # Check if the provided tool contains a complete path.
8835        tool_specified="$MV"
8836        tool_basename="${tool_specified##*/}"
8837        if test "x$tool_basename" = "x$tool_specified"; then
8838          # A command without a complete path is provided, search $PATH.
8839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8840$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8841          # Extract the first word of "$tool_basename", so it can be a program name with args.
8842set dummy $tool_basename; ac_word=$2
8843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8844$as_echo_n "checking for $ac_word... " >&6; }
8845if ${ac_cv_path_MV+:} false; then :
8846  $as_echo_n "(cached) " >&6
8847else
8848  case $MV in
8849  [\\/]* | ?:[\\/]*)
8850  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8851  ;;
8852  *)
8853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8854for as_dir in $PATH
8855do
8856  IFS=$as_save_IFS
8857  test -z "$as_dir" && as_dir=.
8858    for ac_exec_ext in '' $ac_executable_extensions; do
8859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8860    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8862    break 2
8863  fi
8864done
8865  done
8866IFS=$as_save_IFS
8867
8868  ;;
8869esac
8870fi
8871MV=$ac_cv_path_MV
8872if test -n "$MV"; then
8873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8874$as_echo "$MV" >&6; }
8875else
8876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8877$as_echo "no" >&6; }
8878fi
8879
8880
8881          if test "x$MV" = x; then
8882            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8883          fi
8884        else
8885          # Otherwise we believe it is a complete path. Use it as it is.
8886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8887$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8888          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8889$as_echo_n "checking for MV... " >&6; }
8890          if test ! -x "$tool_specified"; then
8891            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8892$as_echo "not found" >&6; }
8893            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8894          fi
8895          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8896$as_echo "$tool_specified" >&6; }
8897        fi
8898      fi
8899    fi
8900  fi
8901
8902
8903
8904  if test "x$MV" = x; then
8905    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8906  fi
8907
8908
8909
8910
8911
8912  # Publish this variable in the help.
8913
8914
8915  if [ -z "${NAWK+x}" ]; then
8916    # The variable is not set by user, try to locate tool using the code snippet
8917    for ac_prog in nawk gawk awk
8918do
8919  # Extract the first word of "$ac_prog", so it can be a program name with args.
8920set dummy $ac_prog; ac_word=$2
8921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8922$as_echo_n "checking for $ac_word... " >&6; }
8923if ${ac_cv_path_NAWK+:} false; then :
8924  $as_echo_n "(cached) " >&6
8925else
8926  case $NAWK in
8927  [\\/]* | ?:[\\/]*)
8928  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8929  ;;
8930  *)
8931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8932for as_dir in $PATH
8933do
8934  IFS=$as_save_IFS
8935  test -z "$as_dir" && as_dir=.
8936    for ac_exec_ext in '' $ac_executable_extensions; do
8937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8938    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8940    break 2
8941  fi
8942done
8943  done
8944IFS=$as_save_IFS
8945
8946  ;;
8947esac
8948fi
8949NAWK=$ac_cv_path_NAWK
8950if test -n "$NAWK"; then
8951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8952$as_echo "$NAWK" >&6; }
8953else
8954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955$as_echo "no" >&6; }
8956fi
8957
8958
8959  test -n "$NAWK" && break
8960done
8961
8962  else
8963    # The variable is set, but is it from the command line or the environment?
8964
8965    # Try to remove the string !NAWK! from our list.
8966    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8967    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8968      # If it failed, the variable was not from the command line. Ignore it,
8969      # but warn the user (except for BASH, which is always set by the calling BASH).
8970      if test "xNAWK" != xBASH; then
8971        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8972$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8973      fi
8974      # Try to locate tool using the code snippet
8975      for ac_prog in nawk gawk awk
8976do
8977  # Extract the first word of "$ac_prog", so it can be a program name with args.
8978set dummy $ac_prog; ac_word=$2
8979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8980$as_echo_n "checking for $ac_word... " >&6; }
8981if ${ac_cv_path_NAWK+:} false; then :
8982  $as_echo_n "(cached) " >&6
8983else
8984  case $NAWK in
8985  [\\/]* | ?:[\\/]*)
8986  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8987  ;;
8988  *)
8989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8990for as_dir in $PATH
8991do
8992  IFS=$as_save_IFS
8993  test -z "$as_dir" && as_dir=.
8994    for ac_exec_ext in '' $ac_executable_extensions; do
8995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8996    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8998    break 2
8999  fi
9000done
9001  done
9002IFS=$as_save_IFS
9003
9004  ;;
9005esac
9006fi
9007NAWK=$ac_cv_path_NAWK
9008if test -n "$NAWK"; then
9009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9010$as_echo "$NAWK" >&6; }
9011else
9012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9013$as_echo "no" >&6; }
9014fi
9015
9016
9017  test -n "$NAWK" && break
9018done
9019
9020    else
9021      # If it succeeded, then it was overridden by the user. We will use it
9022      # for the tool.
9023
9024      # First remove it from the list of overridden variables, so we can test
9025      # for unknown variables in the end.
9026      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9027
9028      # Check if we try to supply an empty value
9029      if test "x$NAWK" = x; then
9030        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9031$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9033$as_echo_n "checking for NAWK... " >&6; }
9034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9035$as_echo "disabled" >&6; }
9036      else
9037        # Check if the provided tool contains a complete path.
9038        tool_specified="$NAWK"
9039        tool_basename="${tool_specified##*/}"
9040        if test "x$tool_basename" = "x$tool_specified"; then
9041          # A command without a complete path is provided, search $PATH.
9042          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9043$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9044          # Extract the first word of "$tool_basename", so it can be a program name with args.
9045set dummy $tool_basename; ac_word=$2
9046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9047$as_echo_n "checking for $ac_word... " >&6; }
9048if ${ac_cv_path_NAWK+:} false; then :
9049  $as_echo_n "(cached) " >&6
9050else
9051  case $NAWK in
9052  [\\/]* | ?:[\\/]*)
9053  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9054  ;;
9055  *)
9056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9057for as_dir in $PATH
9058do
9059  IFS=$as_save_IFS
9060  test -z "$as_dir" && as_dir=.
9061    for ac_exec_ext in '' $ac_executable_extensions; do
9062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9063    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9065    break 2
9066  fi
9067done
9068  done
9069IFS=$as_save_IFS
9070
9071  ;;
9072esac
9073fi
9074NAWK=$ac_cv_path_NAWK
9075if test -n "$NAWK"; then
9076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9077$as_echo "$NAWK" >&6; }
9078else
9079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080$as_echo "no" >&6; }
9081fi
9082
9083
9084          if test "x$NAWK" = x; then
9085            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9086          fi
9087        else
9088          # Otherwise we believe it is a complete path. Use it as it is.
9089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9090$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9091          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9092$as_echo_n "checking for NAWK... " >&6; }
9093          if test ! -x "$tool_specified"; then
9094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9095$as_echo "not found" >&6; }
9096            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9097          fi
9098          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9099$as_echo "$tool_specified" >&6; }
9100        fi
9101      fi
9102    fi
9103  fi
9104
9105
9106
9107  if test "x$NAWK" = x; then
9108    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9109  fi
9110
9111
9112
9113
9114
9115  # Publish this variable in the help.
9116
9117
9118  if [ -z "${PRINTF+x}" ]; then
9119    # The variable is not set by user, try to locate tool using the code snippet
9120    for ac_prog in printf
9121do
9122  # Extract the first word of "$ac_prog", so it can be a program name with args.
9123set dummy $ac_prog; ac_word=$2
9124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9125$as_echo_n "checking for $ac_word... " >&6; }
9126if ${ac_cv_path_PRINTF+:} false; then :
9127  $as_echo_n "(cached) " >&6
9128else
9129  case $PRINTF in
9130  [\\/]* | ?:[\\/]*)
9131  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9132  ;;
9133  *)
9134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9135for as_dir in $PATH
9136do
9137  IFS=$as_save_IFS
9138  test -z "$as_dir" && as_dir=.
9139    for ac_exec_ext in '' $ac_executable_extensions; do
9140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9141    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9143    break 2
9144  fi
9145done
9146  done
9147IFS=$as_save_IFS
9148
9149  ;;
9150esac
9151fi
9152PRINTF=$ac_cv_path_PRINTF
9153if test -n "$PRINTF"; then
9154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9155$as_echo "$PRINTF" >&6; }
9156else
9157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158$as_echo "no" >&6; }
9159fi
9160
9161
9162  test -n "$PRINTF" && break
9163done
9164
9165  else
9166    # The variable is set, but is it from the command line or the environment?
9167
9168    # Try to remove the string !PRINTF! from our list.
9169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9171      # If it failed, the variable was not from the command line. Ignore it,
9172      # but warn the user (except for BASH, which is always set by the calling BASH).
9173      if test "xPRINTF" != xBASH; then
9174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9175$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9176      fi
9177      # Try to locate tool using the code snippet
9178      for ac_prog in printf
9179do
9180  # Extract the first word of "$ac_prog", so it can be a program name with args.
9181set dummy $ac_prog; ac_word=$2
9182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9183$as_echo_n "checking for $ac_word... " >&6; }
9184if ${ac_cv_path_PRINTF+:} false; then :
9185  $as_echo_n "(cached) " >&6
9186else
9187  case $PRINTF in
9188  [\\/]* | ?:[\\/]*)
9189  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9190  ;;
9191  *)
9192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9193for as_dir in $PATH
9194do
9195  IFS=$as_save_IFS
9196  test -z "$as_dir" && as_dir=.
9197    for ac_exec_ext in '' $ac_executable_extensions; do
9198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9199    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9201    break 2
9202  fi
9203done
9204  done
9205IFS=$as_save_IFS
9206
9207  ;;
9208esac
9209fi
9210PRINTF=$ac_cv_path_PRINTF
9211if test -n "$PRINTF"; then
9212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9213$as_echo "$PRINTF" >&6; }
9214else
9215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216$as_echo "no" >&6; }
9217fi
9218
9219
9220  test -n "$PRINTF" && break
9221done
9222
9223    else
9224      # If it succeeded, then it was overridden by the user. We will use it
9225      # for the tool.
9226
9227      # First remove it from the list of overridden variables, so we can test
9228      # for unknown variables in the end.
9229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9230
9231      # Check if we try to supply an empty value
9232      if test "x$PRINTF" = x; then
9233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9234$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9236$as_echo_n "checking for PRINTF... " >&6; }
9237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9238$as_echo "disabled" >&6; }
9239      else
9240        # Check if the provided tool contains a complete path.
9241        tool_specified="$PRINTF"
9242        tool_basename="${tool_specified##*/}"
9243        if test "x$tool_basename" = "x$tool_specified"; then
9244          # A command without a complete path is provided, search $PATH.
9245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9246$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9247          # Extract the first word of "$tool_basename", so it can be a program name with args.
9248set dummy $tool_basename; ac_word=$2
9249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9250$as_echo_n "checking for $ac_word... " >&6; }
9251if ${ac_cv_path_PRINTF+:} false; then :
9252  $as_echo_n "(cached) " >&6
9253else
9254  case $PRINTF in
9255  [\\/]* | ?:[\\/]*)
9256  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9257  ;;
9258  *)
9259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9260for as_dir in $PATH
9261do
9262  IFS=$as_save_IFS
9263  test -z "$as_dir" && as_dir=.
9264    for ac_exec_ext in '' $ac_executable_extensions; do
9265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9266    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9268    break 2
9269  fi
9270done
9271  done
9272IFS=$as_save_IFS
9273
9274  ;;
9275esac
9276fi
9277PRINTF=$ac_cv_path_PRINTF
9278if test -n "$PRINTF"; then
9279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9280$as_echo "$PRINTF" >&6; }
9281else
9282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9283$as_echo "no" >&6; }
9284fi
9285
9286
9287          if test "x$PRINTF" = x; then
9288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9289          fi
9290        else
9291          # Otherwise we believe it is a complete path. Use it as it is.
9292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9293$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9295$as_echo_n "checking for PRINTF... " >&6; }
9296          if test ! -x "$tool_specified"; then
9297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9298$as_echo "not found" >&6; }
9299            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9300          fi
9301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9302$as_echo "$tool_specified" >&6; }
9303        fi
9304      fi
9305    fi
9306  fi
9307
9308
9309
9310  if test "x$PRINTF" = x; then
9311    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9312  fi
9313
9314
9315
9316
9317
9318  # Publish this variable in the help.
9319
9320
9321  if [ -z "${RM+x}" ]; then
9322    # The variable is not set by user, try to locate tool using the code snippet
9323    for ac_prog in rm
9324do
9325  # Extract the first word of "$ac_prog", so it can be a program name with args.
9326set dummy $ac_prog; ac_word=$2
9327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9328$as_echo_n "checking for $ac_word... " >&6; }
9329if ${ac_cv_path_RM+:} false; then :
9330  $as_echo_n "(cached) " >&6
9331else
9332  case $RM in
9333  [\\/]* | ?:[\\/]*)
9334  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9335  ;;
9336  *)
9337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9338for as_dir in $PATH
9339do
9340  IFS=$as_save_IFS
9341  test -z "$as_dir" && as_dir=.
9342    for ac_exec_ext in '' $ac_executable_extensions; do
9343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9344    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9346    break 2
9347  fi
9348done
9349  done
9350IFS=$as_save_IFS
9351
9352  ;;
9353esac
9354fi
9355RM=$ac_cv_path_RM
9356if test -n "$RM"; then
9357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9358$as_echo "$RM" >&6; }
9359else
9360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9361$as_echo "no" >&6; }
9362fi
9363
9364
9365  test -n "$RM" && break
9366done
9367
9368  else
9369    # The variable is set, but is it from the command line or the environment?
9370
9371    # Try to remove the string !RM! from our list.
9372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9374      # If it failed, the variable was not from the command line. Ignore it,
9375      # but warn the user (except for BASH, which is always set by the calling BASH).
9376      if test "xRM" != xBASH; then
9377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9378$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9379      fi
9380      # Try to locate tool using the code snippet
9381      for ac_prog in rm
9382do
9383  # Extract the first word of "$ac_prog", so it can be a program name with args.
9384set dummy $ac_prog; ac_word=$2
9385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9386$as_echo_n "checking for $ac_word... " >&6; }
9387if ${ac_cv_path_RM+:} false; then :
9388  $as_echo_n "(cached) " >&6
9389else
9390  case $RM in
9391  [\\/]* | ?:[\\/]*)
9392  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9393  ;;
9394  *)
9395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9396for as_dir in $PATH
9397do
9398  IFS=$as_save_IFS
9399  test -z "$as_dir" && as_dir=.
9400    for ac_exec_ext in '' $ac_executable_extensions; do
9401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9402    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9404    break 2
9405  fi
9406done
9407  done
9408IFS=$as_save_IFS
9409
9410  ;;
9411esac
9412fi
9413RM=$ac_cv_path_RM
9414if test -n "$RM"; then
9415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9416$as_echo "$RM" >&6; }
9417else
9418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9419$as_echo "no" >&6; }
9420fi
9421
9422
9423  test -n "$RM" && break
9424done
9425
9426    else
9427      # If it succeeded, then it was overridden by the user. We will use it
9428      # for the tool.
9429
9430      # First remove it from the list of overridden variables, so we can test
9431      # for unknown variables in the end.
9432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9433
9434      # Check if we try to supply an empty value
9435      if test "x$RM" = x; then
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9437$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9439$as_echo_n "checking for RM... " >&6; }
9440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9441$as_echo "disabled" >&6; }
9442      else
9443        # Check if the provided tool contains a complete path.
9444        tool_specified="$RM"
9445        tool_basename="${tool_specified##*/}"
9446        if test "x$tool_basename" = "x$tool_specified"; then
9447          # A command without a complete path is provided, search $PATH.
9448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9449$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9450          # Extract the first word of "$tool_basename", so it can be a program name with args.
9451set dummy $tool_basename; ac_word=$2
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9453$as_echo_n "checking for $ac_word... " >&6; }
9454if ${ac_cv_path_RM+:} false; then :
9455  $as_echo_n "(cached) " >&6
9456else
9457  case $RM in
9458  [\\/]* | ?:[\\/]*)
9459  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9460  ;;
9461  *)
9462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463for as_dir in $PATH
9464do
9465  IFS=$as_save_IFS
9466  test -z "$as_dir" && as_dir=.
9467    for ac_exec_ext in '' $ac_executable_extensions; do
9468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9469    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9471    break 2
9472  fi
9473done
9474  done
9475IFS=$as_save_IFS
9476
9477  ;;
9478esac
9479fi
9480RM=$ac_cv_path_RM
9481if test -n "$RM"; then
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9483$as_echo "$RM" >&6; }
9484else
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486$as_echo "no" >&6; }
9487fi
9488
9489
9490          if test "x$RM" = x; then
9491            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9492          fi
9493        else
9494          # Otherwise we believe it is a complete path. Use it as it is.
9495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9496$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9497          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9498$as_echo_n "checking for RM... " >&6; }
9499          if test ! -x "$tool_specified"; then
9500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9501$as_echo "not found" >&6; }
9502            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9503          fi
9504          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9505$as_echo "$tool_specified" >&6; }
9506        fi
9507      fi
9508    fi
9509  fi
9510
9511
9512
9513  if test "x$RM" = x; then
9514    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9515  fi
9516
9517
9518
9519
9520
9521  # Publish this variable in the help.
9522
9523
9524  if [ -z "${RMDIR+x}" ]; then
9525    # The variable is not set by user, try to locate tool using the code snippet
9526    for ac_prog in rmdir
9527do
9528  # Extract the first word of "$ac_prog", so it can be a program name with args.
9529set dummy $ac_prog; ac_word=$2
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9531$as_echo_n "checking for $ac_word... " >&6; }
9532if ${ac_cv_path_RMDIR+:} false; then :
9533  $as_echo_n "(cached) " >&6
9534else
9535  case $RMDIR in
9536  [\\/]* | ?:[\\/]*)
9537  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9538  ;;
9539  *)
9540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9541for as_dir in $PATH
9542do
9543  IFS=$as_save_IFS
9544  test -z "$as_dir" && as_dir=.
9545    for ac_exec_ext in '' $ac_executable_extensions; do
9546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9547    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9549    break 2
9550  fi
9551done
9552  done
9553IFS=$as_save_IFS
9554
9555  ;;
9556esac
9557fi
9558RMDIR=$ac_cv_path_RMDIR
9559if test -n "$RMDIR"; then
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9561$as_echo "$RMDIR" >&6; }
9562else
9563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
9565fi
9566
9567
9568  test -n "$RMDIR" && break
9569done
9570
9571  else
9572    # The variable is set, but is it from the command line or the environment?
9573
9574    # Try to remove the string !RMDIR! from our list.
9575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9577      # If it failed, the variable was not from the command line. Ignore it,
9578      # but warn the user (except for BASH, which is always set by the calling BASH).
9579      if test "xRMDIR" != xBASH; then
9580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9581$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9582      fi
9583      # Try to locate tool using the code snippet
9584      for ac_prog in rmdir
9585do
9586  # Extract the first word of "$ac_prog", so it can be a program name with args.
9587set dummy $ac_prog; ac_word=$2
9588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9589$as_echo_n "checking for $ac_word... " >&6; }
9590if ${ac_cv_path_RMDIR+:} false; then :
9591  $as_echo_n "(cached) " >&6
9592else
9593  case $RMDIR in
9594  [\\/]* | ?:[\\/]*)
9595  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9596  ;;
9597  *)
9598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9599for as_dir in $PATH
9600do
9601  IFS=$as_save_IFS
9602  test -z "$as_dir" && as_dir=.
9603    for ac_exec_ext in '' $ac_executable_extensions; do
9604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9605    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9607    break 2
9608  fi
9609done
9610  done
9611IFS=$as_save_IFS
9612
9613  ;;
9614esac
9615fi
9616RMDIR=$ac_cv_path_RMDIR
9617if test -n "$RMDIR"; then
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9619$as_echo "$RMDIR" >&6; }
9620else
9621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9622$as_echo "no" >&6; }
9623fi
9624
9625
9626  test -n "$RMDIR" && break
9627done
9628
9629    else
9630      # If it succeeded, then it was overridden by the user. We will use it
9631      # for the tool.
9632
9633      # First remove it from the list of overridden variables, so we can test
9634      # for unknown variables in the end.
9635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9636
9637      # Check if we try to supply an empty value
9638      if test "x$RMDIR" = x; then
9639        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9640$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9642$as_echo_n "checking for RMDIR... " >&6; }
9643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9644$as_echo "disabled" >&6; }
9645      else
9646        # Check if the provided tool contains a complete path.
9647        tool_specified="$RMDIR"
9648        tool_basename="${tool_specified##*/}"
9649        if test "x$tool_basename" = "x$tool_specified"; then
9650          # A command without a complete path is provided, search $PATH.
9651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9652$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9653          # Extract the first word of "$tool_basename", so it can be a program name with args.
9654set dummy $tool_basename; ac_word=$2
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9656$as_echo_n "checking for $ac_word... " >&6; }
9657if ${ac_cv_path_RMDIR+:} false; then :
9658  $as_echo_n "(cached) " >&6
9659else
9660  case $RMDIR in
9661  [\\/]* | ?:[\\/]*)
9662  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9663  ;;
9664  *)
9665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9666for as_dir in $PATH
9667do
9668  IFS=$as_save_IFS
9669  test -z "$as_dir" && as_dir=.
9670    for ac_exec_ext in '' $ac_executable_extensions; do
9671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9672    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9674    break 2
9675  fi
9676done
9677  done
9678IFS=$as_save_IFS
9679
9680  ;;
9681esac
9682fi
9683RMDIR=$ac_cv_path_RMDIR
9684if test -n "$RMDIR"; then
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9686$as_echo "$RMDIR" >&6; }
9687else
9688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
9690fi
9691
9692
9693          if test "x$RMDIR" = x; then
9694            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9695          fi
9696        else
9697          # Otherwise we believe it is a complete path. Use it as it is.
9698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9699$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9700          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9701$as_echo_n "checking for RMDIR... " >&6; }
9702          if test ! -x "$tool_specified"; then
9703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9704$as_echo "not found" >&6; }
9705            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9706          fi
9707          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9708$as_echo "$tool_specified" >&6; }
9709        fi
9710      fi
9711    fi
9712  fi
9713
9714
9715
9716  if test "x$RMDIR" = x; then
9717    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9718  fi
9719
9720
9721
9722
9723
9724  # Publish this variable in the help.
9725
9726
9727  if [ -z "${SH+x}" ]; then
9728    # The variable is not set by user, try to locate tool using the code snippet
9729    for ac_prog in sh
9730do
9731  # Extract the first word of "$ac_prog", so it can be a program name with args.
9732set dummy $ac_prog; ac_word=$2
9733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9734$as_echo_n "checking for $ac_word... " >&6; }
9735if ${ac_cv_path_SH+:} false; then :
9736  $as_echo_n "(cached) " >&6
9737else
9738  case $SH in
9739  [\\/]* | ?:[\\/]*)
9740  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9741  ;;
9742  *)
9743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9744for as_dir in $PATH
9745do
9746  IFS=$as_save_IFS
9747  test -z "$as_dir" && as_dir=.
9748    for ac_exec_ext in '' $ac_executable_extensions; do
9749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9750    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9752    break 2
9753  fi
9754done
9755  done
9756IFS=$as_save_IFS
9757
9758  ;;
9759esac
9760fi
9761SH=$ac_cv_path_SH
9762if test -n "$SH"; then
9763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9764$as_echo "$SH" >&6; }
9765else
9766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9767$as_echo "no" >&6; }
9768fi
9769
9770
9771  test -n "$SH" && break
9772done
9773
9774  else
9775    # The variable is set, but is it from the command line or the environment?
9776
9777    # Try to remove the string !SH! from our list.
9778    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9779    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9780      # If it failed, the variable was not from the command line. Ignore it,
9781      # but warn the user (except for BASH, which is always set by the calling BASH).
9782      if test "xSH" != xBASH; then
9783        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9784$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9785      fi
9786      # Try to locate tool using the code snippet
9787      for ac_prog in sh
9788do
9789  # Extract the first word of "$ac_prog", so it can be a program name with args.
9790set dummy $ac_prog; ac_word=$2
9791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9792$as_echo_n "checking for $ac_word... " >&6; }
9793if ${ac_cv_path_SH+:} false; then :
9794  $as_echo_n "(cached) " >&6
9795else
9796  case $SH in
9797  [\\/]* | ?:[\\/]*)
9798  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9799  ;;
9800  *)
9801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9802for as_dir in $PATH
9803do
9804  IFS=$as_save_IFS
9805  test -z "$as_dir" && as_dir=.
9806    for ac_exec_ext in '' $ac_executable_extensions; do
9807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9808    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9810    break 2
9811  fi
9812done
9813  done
9814IFS=$as_save_IFS
9815
9816  ;;
9817esac
9818fi
9819SH=$ac_cv_path_SH
9820if test -n "$SH"; then
9821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9822$as_echo "$SH" >&6; }
9823else
9824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9825$as_echo "no" >&6; }
9826fi
9827
9828
9829  test -n "$SH" && break
9830done
9831
9832    else
9833      # If it succeeded, then it was overridden by the user. We will use it
9834      # for the tool.
9835
9836      # First remove it from the list of overridden variables, so we can test
9837      # for unknown variables in the end.
9838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9839
9840      # Check if we try to supply an empty value
9841      if test "x$SH" = x; then
9842        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9843$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9844        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9845$as_echo_n "checking for SH... " >&6; }
9846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9847$as_echo "disabled" >&6; }
9848      else
9849        # Check if the provided tool contains a complete path.
9850        tool_specified="$SH"
9851        tool_basename="${tool_specified##*/}"
9852        if test "x$tool_basename" = "x$tool_specified"; then
9853          # A command without a complete path is provided, search $PATH.
9854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9855$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9856          # Extract the first word of "$tool_basename", so it can be a program name with args.
9857set dummy $tool_basename; ac_word=$2
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9859$as_echo_n "checking for $ac_word... " >&6; }
9860if ${ac_cv_path_SH+:} false; then :
9861  $as_echo_n "(cached) " >&6
9862else
9863  case $SH in
9864  [\\/]* | ?:[\\/]*)
9865  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9866  ;;
9867  *)
9868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869for as_dir in $PATH
9870do
9871  IFS=$as_save_IFS
9872  test -z "$as_dir" && as_dir=.
9873    for ac_exec_ext in '' $ac_executable_extensions; do
9874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877    break 2
9878  fi
9879done
9880  done
9881IFS=$as_save_IFS
9882
9883  ;;
9884esac
9885fi
9886SH=$ac_cv_path_SH
9887if test -n "$SH"; then
9888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9889$as_echo "$SH" >&6; }
9890else
9891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9892$as_echo "no" >&6; }
9893fi
9894
9895
9896          if test "x$SH" = x; then
9897            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9898          fi
9899        else
9900          # Otherwise we believe it is a complete path. Use it as it is.
9901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9902$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9903          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9904$as_echo_n "checking for SH... " >&6; }
9905          if test ! -x "$tool_specified"; then
9906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9907$as_echo "not found" >&6; }
9908            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9909          fi
9910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9911$as_echo "$tool_specified" >&6; }
9912        fi
9913      fi
9914    fi
9915  fi
9916
9917
9918
9919  if test "x$SH" = x; then
9920    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9921  fi
9922
9923
9924
9925
9926
9927  # Publish this variable in the help.
9928
9929
9930  if [ -z "${SORT+x}" ]; then
9931    # The variable is not set by user, try to locate tool using the code snippet
9932    for ac_prog in sort
9933do
9934  # Extract the first word of "$ac_prog", so it can be a program name with args.
9935set dummy $ac_prog; ac_word=$2
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9937$as_echo_n "checking for $ac_word... " >&6; }
9938if ${ac_cv_path_SORT+:} false; then :
9939  $as_echo_n "(cached) " >&6
9940else
9941  case $SORT in
9942  [\\/]* | ?:[\\/]*)
9943  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9944  ;;
9945  *)
9946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9947for as_dir in $PATH
9948do
9949  IFS=$as_save_IFS
9950  test -z "$as_dir" && as_dir=.
9951    for ac_exec_ext in '' $ac_executable_extensions; do
9952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9953    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9955    break 2
9956  fi
9957done
9958  done
9959IFS=$as_save_IFS
9960
9961  ;;
9962esac
9963fi
9964SORT=$ac_cv_path_SORT
9965if test -n "$SORT"; then
9966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9967$as_echo "$SORT" >&6; }
9968else
9969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9970$as_echo "no" >&6; }
9971fi
9972
9973
9974  test -n "$SORT" && break
9975done
9976
9977  else
9978    # The variable is set, but is it from the command line or the environment?
9979
9980    # Try to remove the string !SORT! from our list.
9981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9983      # If it failed, the variable was not from the command line. Ignore it,
9984      # but warn the user (except for BASH, which is always set by the calling BASH).
9985      if test "xSORT" != xBASH; then
9986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9987$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9988      fi
9989      # Try to locate tool using the code snippet
9990      for ac_prog in sort
9991do
9992  # Extract the first word of "$ac_prog", so it can be a program name with args.
9993set dummy $ac_prog; ac_word=$2
9994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9995$as_echo_n "checking for $ac_word... " >&6; }
9996if ${ac_cv_path_SORT+:} false; then :
9997  $as_echo_n "(cached) " >&6
9998else
9999  case $SORT in
10000  [\\/]* | ?:[\\/]*)
10001  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10002  ;;
10003  *)
10004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10005for as_dir in $PATH
10006do
10007  IFS=$as_save_IFS
10008  test -z "$as_dir" && as_dir=.
10009    for ac_exec_ext in '' $ac_executable_extensions; do
10010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10011    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10013    break 2
10014  fi
10015done
10016  done
10017IFS=$as_save_IFS
10018
10019  ;;
10020esac
10021fi
10022SORT=$ac_cv_path_SORT
10023if test -n "$SORT"; then
10024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10025$as_echo "$SORT" >&6; }
10026else
10027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10028$as_echo "no" >&6; }
10029fi
10030
10031
10032  test -n "$SORT" && break
10033done
10034
10035    else
10036      # If it succeeded, then it was overridden by the user. We will use it
10037      # for the tool.
10038
10039      # First remove it from the list of overridden variables, so we can test
10040      # for unknown variables in the end.
10041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10042
10043      # Check if we try to supply an empty value
10044      if test "x$SORT" = x; then
10045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10046$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10048$as_echo_n "checking for SORT... " >&6; }
10049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10050$as_echo "disabled" >&6; }
10051      else
10052        # Check if the provided tool contains a complete path.
10053        tool_specified="$SORT"
10054        tool_basename="${tool_specified##*/}"
10055        if test "x$tool_basename" = "x$tool_specified"; then
10056          # A command without a complete path is provided, search $PATH.
10057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10058$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10059          # Extract the first word of "$tool_basename", so it can be a program name with args.
10060set dummy $tool_basename; ac_word=$2
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10062$as_echo_n "checking for $ac_word... " >&6; }
10063if ${ac_cv_path_SORT+:} false; then :
10064  $as_echo_n "(cached) " >&6
10065else
10066  case $SORT in
10067  [\\/]* | ?:[\\/]*)
10068  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10069  ;;
10070  *)
10071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10072for as_dir in $PATH
10073do
10074  IFS=$as_save_IFS
10075  test -z "$as_dir" && as_dir=.
10076    for ac_exec_ext in '' $ac_executable_extensions; do
10077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10078    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10080    break 2
10081  fi
10082done
10083  done
10084IFS=$as_save_IFS
10085
10086  ;;
10087esac
10088fi
10089SORT=$ac_cv_path_SORT
10090if test -n "$SORT"; then
10091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10092$as_echo "$SORT" >&6; }
10093else
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
10096fi
10097
10098
10099          if test "x$SORT" = x; then
10100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10101          fi
10102        else
10103          # Otherwise we believe it is a complete path. Use it as it is.
10104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10105$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10107$as_echo_n "checking for SORT... " >&6; }
10108          if test ! -x "$tool_specified"; then
10109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10110$as_echo "not found" >&6; }
10111            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10112          fi
10113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10114$as_echo "$tool_specified" >&6; }
10115        fi
10116      fi
10117    fi
10118  fi
10119
10120
10121
10122  if test "x$SORT" = x; then
10123    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10124  fi
10125
10126
10127
10128
10129
10130  # Publish this variable in the help.
10131
10132
10133  if [ -z "${TAIL+x}" ]; then
10134    # The variable is not set by user, try to locate tool using the code snippet
10135    for ac_prog in tail
10136do
10137  # Extract the first word of "$ac_prog", so it can be a program name with args.
10138set dummy $ac_prog; ac_word=$2
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10140$as_echo_n "checking for $ac_word... " >&6; }
10141if ${ac_cv_path_TAIL+:} false; then :
10142  $as_echo_n "(cached) " >&6
10143else
10144  case $TAIL in
10145  [\\/]* | ?:[\\/]*)
10146  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10147  ;;
10148  *)
10149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10150for as_dir in $PATH
10151do
10152  IFS=$as_save_IFS
10153  test -z "$as_dir" && as_dir=.
10154    for ac_exec_ext in '' $ac_executable_extensions; do
10155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10156    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10158    break 2
10159  fi
10160done
10161  done
10162IFS=$as_save_IFS
10163
10164  ;;
10165esac
10166fi
10167TAIL=$ac_cv_path_TAIL
10168if test -n "$TAIL"; then
10169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10170$as_echo "$TAIL" >&6; }
10171else
10172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10173$as_echo "no" >&6; }
10174fi
10175
10176
10177  test -n "$TAIL" && break
10178done
10179
10180  else
10181    # The variable is set, but is it from the command line or the environment?
10182
10183    # Try to remove the string !TAIL! from our list.
10184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10186      # If it failed, the variable was not from the command line. Ignore it,
10187      # but warn the user (except for BASH, which is always set by the calling BASH).
10188      if test "xTAIL" != xBASH; then
10189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10190$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10191      fi
10192      # Try to locate tool using the code snippet
10193      for ac_prog in tail
10194do
10195  # Extract the first word of "$ac_prog", so it can be a program name with args.
10196set dummy $ac_prog; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if ${ac_cv_path_TAIL+:} false; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $TAIL in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10214    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225TAIL=$ac_cv_path_TAIL
10226if test -n "$TAIL"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10228$as_echo "$TAIL" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235  test -n "$TAIL" && break
10236done
10237
10238    else
10239      # If it succeeded, then it was overridden by the user. We will use it
10240      # for the tool.
10241
10242      # First remove it from the list of overridden variables, so we can test
10243      # for unknown variables in the end.
10244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10245
10246      # Check if we try to supply an empty value
10247      if test "x$TAIL" = x; then
10248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10249$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10251$as_echo_n "checking for TAIL... " >&6; }
10252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10253$as_echo "disabled" >&6; }
10254      else
10255        # Check if the provided tool contains a complete path.
10256        tool_specified="$TAIL"
10257        tool_basename="${tool_specified##*/}"
10258        if test "x$tool_basename" = "x$tool_specified"; then
10259          # A command without a complete path is provided, search $PATH.
10260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10261$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10262          # Extract the first word of "$tool_basename", so it can be a program name with args.
10263set dummy $tool_basename; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if ${ac_cv_path_TAIL+:} false; then :
10267  $as_echo_n "(cached) " >&6
10268else
10269  case $TAIL in
10270  [\\/]* | ?:[\\/]*)
10271  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10272  ;;
10273  *)
10274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277  IFS=$as_save_IFS
10278  test -z "$as_dir" && as_dir=.
10279    for ac_exec_ext in '' $ac_executable_extensions; do
10280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283    break 2
10284  fi
10285done
10286  done
10287IFS=$as_save_IFS
10288
10289  ;;
10290esac
10291fi
10292TAIL=$ac_cv_path_TAIL
10293if test -n "$TAIL"; then
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10295$as_echo "$TAIL" >&6; }
10296else
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
10299fi
10300
10301
10302          if test "x$TAIL" = x; then
10303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10304          fi
10305        else
10306          # Otherwise we believe it is a complete path. Use it as it is.
10307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10308$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10310$as_echo_n "checking for TAIL... " >&6; }
10311          if test ! -x "$tool_specified"; then
10312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10313$as_echo "not found" >&6; }
10314            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10315          fi
10316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10317$as_echo "$tool_specified" >&6; }
10318        fi
10319      fi
10320    fi
10321  fi
10322
10323
10324
10325  if test "x$TAIL" = x; then
10326    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10327  fi
10328
10329
10330
10331
10332
10333  # Publish this variable in the help.
10334
10335
10336  if [ -z "${TAR+x}" ]; then
10337    # The variable is not set by user, try to locate tool using the code snippet
10338    for ac_prog in tar
10339do
10340  # Extract the first word of "$ac_prog", so it can be a program name with args.
10341set dummy $ac_prog; ac_word=$2
10342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10343$as_echo_n "checking for $ac_word... " >&6; }
10344if ${ac_cv_path_TAR+:} false; then :
10345  $as_echo_n "(cached) " >&6
10346else
10347  case $TAR in
10348  [\\/]* | ?:[\\/]*)
10349  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10350  ;;
10351  *)
10352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10353for as_dir in $PATH
10354do
10355  IFS=$as_save_IFS
10356  test -z "$as_dir" && as_dir=.
10357    for ac_exec_ext in '' $ac_executable_extensions; do
10358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10359    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10361    break 2
10362  fi
10363done
10364  done
10365IFS=$as_save_IFS
10366
10367  ;;
10368esac
10369fi
10370TAR=$ac_cv_path_TAR
10371if test -n "$TAR"; then
10372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10373$as_echo "$TAR" >&6; }
10374else
10375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376$as_echo "no" >&6; }
10377fi
10378
10379
10380  test -n "$TAR" && break
10381done
10382
10383  else
10384    # The variable is set, but is it from the command line or the environment?
10385
10386    # Try to remove the string !TAR! from our list.
10387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10389      # If it failed, the variable was not from the command line. Ignore it,
10390      # but warn the user (except for BASH, which is always set by the calling BASH).
10391      if test "xTAR" != xBASH; then
10392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10393$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10394      fi
10395      # Try to locate tool using the code snippet
10396      for ac_prog in tar
10397do
10398  # Extract the first word of "$ac_prog", so it can be a program name with args.
10399set dummy $ac_prog; ac_word=$2
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10401$as_echo_n "checking for $ac_word... " >&6; }
10402if ${ac_cv_path_TAR+:} false; then :
10403  $as_echo_n "(cached) " >&6
10404else
10405  case $TAR in
10406  [\\/]* | ?:[\\/]*)
10407  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10408  ;;
10409  *)
10410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10411for as_dir in $PATH
10412do
10413  IFS=$as_save_IFS
10414  test -z "$as_dir" && as_dir=.
10415    for ac_exec_ext in '' $ac_executable_extensions; do
10416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10417    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10419    break 2
10420  fi
10421done
10422  done
10423IFS=$as_save_IFS
10424
10425  ;;
10426esac
10427fi
10428TAR=$ac_cv_path_TAR
10429if test -n "$TAR"; then
10430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10431$as_echo "$TAR" >&6; }
10432else
10433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10434$as_echo "no" >&6; }
10435fi
10436
10437
10438  test -n "$TAR" && break
10439done
10440
10441    else
10442      # If it succeeded, then it was overridden by the user. We will use it
10443      # for the tool.
10444
10445      # First remove it from the list of overridden variables, so we can test
10446      # for unknown variables in the end.
10447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10448
10449      # Check if we try to supply an empty value
10450      if test "x$TAR" = x; then
10451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10452$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10454$as_echo_n "checking for TAR... " >&6; }
10455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10456$as_echo "disabled" >&6; }
10457      else
10458        # Check if the provided tool contains a complete path.
10459        tool_specified="$TAR"
10460        tool_basename="${tool_specified##*/}"
10461        if test "x$tool_basename" = "x$tool_specified"; then
10462          # A command without a complete path is provided, search $PATH.
10463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10464$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10465          # Extract the first word of "$tool_basename", so it can be a program name with args.
10466set dummy $tool_basename; ac_word=$2
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10468$as_echo_n "checking for $ac_word... " >&6; }
10469if ${ac_cv_path_TAR+:} false; then :
10470  $as_echo_n "(cached) " >&6
10471else
10472  case $TAR in
10473  [\\/]* | ?:[\\/]*)
10474  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10475  ;;
10476  *)
10477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10478for as_dir in $PATH
10479do
10480  IFS=$as_save_IFS
10481  test -z "$as_dir" && as_dir=.
10482    for ac_exec_ext in '' $ac_executable_extensions; do
10483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10484    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10486    break 2
10487  fi
10488done
10489  done
10490IFS=$as_save_IFS
10491
10492  ;;
10493esac
10494fi
10495TAR=$ac_cv_path_TAR
10496if test -n "$TAR"; then
10497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10498$as_echo "$TAR" >&6; }
10499else
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10501$as_echo "no" >&6; }
10502fi
10503
10504
10505          if test "x$TAR" = x; then
10506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10507          fi
10508        else
10509          # Otherwise we believe it is a complete path. Use it as it is.
10510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10511$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10513$as_echo_n "checking for TAR... " >&6; }
10514          if test ! -x "$tool_specified"; then
10515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10516$as_echo "not found" >&6; }
10517            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10518          fi
10519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10520$as_echo "$tool_specified" >&6; }
10521        fi
10522      fi
10523    fi
10524  fi
10525
10526
10527
10528  if test "x$TAR" = x; then
10529    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10530  fi
10531
10532
10533
10534
10535
10536  # Publish this variable in the help.
10537
10538
10539  if [ -z "${TEE+x}" ]; then
10540    # The variable is not set by user, try to locate tool using the code snippet
10541    for ac_prog in tee
10542do
10543  # Extract the first word of "$ac_prog", so it can be a program name with args.
10544set dummy $ac_prog; ac_word=$2
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10546$as_echo_n "checking for $ac_word... " >&6; }
10547if ${ac_cv_path_TEE+:} false; then :
10548  $as_echo_n "(cached) " >&6
10549else
10550  case $TEE in
10551  [\\/]* | ?:[\\/]*)
10552  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10553  ;;
10554  *)
10555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556for as_dir in $PATH
10557do
10558  IFS=$as_save_IFS
10559  test -z "$as_dir" && as_dir=.
10560    for ac_exec_ext in '' $ac_executable_extensions; do
10561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10562    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564    break 2
10565  fi
10566done
10567  done
10568IFS=$as_save_IFS
10569
10570  ;;
10571esac
10572fi
10573TEE=$ac_cv_path_TEE
10574if test -n "$TEE"; then
10575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10576$as_echo "$TEE" >&6; }
10577else
10578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
10580fi
10581
10582
10583  test -n "$TEE" && break
10584done
10585
10586  else
10587    # The variable is set, but is it from the command line or the environment?
10588
10589    # Try to remove the string !TEE! from our list.
10590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10592      # If it failed, the variable was not from the command line. Ignore it,
10593      # but warn the user (except for BASH, which is always set by the calling BASH).
10594      if test "xTEE" != xBASH; then
10595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10596$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10597      fi
10598      # Try to locate tool using the code snippet
10599      for ac_prog in tee
10600do
10601  # Extract the first word of "$ac_prog", so it can be a program name with args.
10602set dummy $ac_prog; ac_word=$2
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10604$as_echo_n "checking for $ac_word... " >&6; }
10605if ${ac_cv_path_TEE+:} false; then :
10606  $as_echo_n "(cached) " >&6
10607else
10608  case $TEE in
10609  [\\/]* | ?:[\\/]*)
10610  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10611  ;;
10612  *)
10613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10614for as_dir in $PATH
10615do
10616  IFS=$as_save_IFS
10617  test -z "$as_dir" && as_dir=.
10618    for ac_exec_ext in '' $ac_executable_extensions; do
10619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10620    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10622    break 2
10623  fi
10624done
10625  done
10626IFS=$as_save_IFS
10627
10628  ;;
10629esac
10630fi
10631TEE=$ac_cv_path_TEE
10632if test -n "$TEE"; then
10633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10634$as_echo "$TEE" >&6; }
10635else
10636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637$as_echo "no" >&6; }
10638fi
10639
10640
10641  test -n "$TEE" && break
10642done
10643
10644    else
10645      # If it succeeded, then it was overridden by the user. We will use it
10646      # for the tool.
10647
10648      # First remove it from the list of overridden variables, so we can test
10649      # for unknown variables in the end.
10650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10651
10652      # Check if we try to supply an empty value
10653      if test "x$TEE" = x; then
10654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10655$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10657$as_echo_n "checking for TEE... " >&6; }
10658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10659$as_echo "disabled" >&6; }
10660      else
10661        # Check if the provided tool contains a complete path.
10662        tool_specified="$TEE"
10663        tool_basename="${tool_specified##*/}"
10664        if test "x$tool_basename" = "x$tool_specified"; then
10665          # A command without a complete path is provided, search $PATH.
10666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10667$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10668          # Extract the first word of "$tool_basename", so it can be a program name with args.
10669set dummy $tool_basename; ac_word=$2
10670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10671$as_echo_n "checking for $ac_word... " >&6; }
10672if ${ac_cv_path_TEE+:} false; then :
10673  $as_echo_n "(cached) " >&6
10674else
10675  case $TEE in
10676  [\\/]* | ?:[\\/]*)
10677  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10678  ;;
10679  *)
10680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10681for as_dir in $PATH
10682do
10683  IFS=$as_save_IFS
10684  test -z "$as_dir" && as_dir=.
10685    for ac_exec_ext in '' $ac_executable_extensions; do
10686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10687    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10689    break 2
10690  fi
10691done
10692  done
10693IFS=$as_save_IFS
10694
10695  ;;
10696esac
10697fi
10698TEE=$ac_cv_path_TEE
10699if test -n "$TEE"; then
10700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10701$as_echo "$TEE" >&6; }
10702else
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
10705fi
10706
10707
10708          if test "x$TEE" = x; then
10709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10710          fi
10711        else
10712          # Otherwise we believe it is a complete path. Use it as it is.
10713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10714$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10716$as_echo_n "checking for TEE... " >&6; }
10717          if test ! -x "$tool_specified"; then
10718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10719$as_echo "not found" >&6; }
10720            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10721          fi
10722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10723$as_echo "$tool_specified" >&6; }
10724        fi
10725      fi
10726    fi
10727  fi
10728
10729
10730
10731  if test "x$TEE" = x; then
10732    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10733  fi
10734
10735
10736
10737
10738
10739  # Publish this variable in the help.
10740
10741
10742  if [ -z "${TOUCH+x}" ]; then
10743    # The variable is not set by user, try to locate tool using the code snippet
10744    for ac_prog in touch
10745do
10746  # Extract the first word of "$ac_prog", so it can be a program name with args.
10747set dummy $ac_prog; ac_word=$2
10748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10749$as_echo_n "checking for $ac_word... " >&6; }
10750if ${ac_cv_path_TOUCH+:} false; then :
10751  $as_echo_n "(cached) " >&6
10752else
10753  case $TOUCH in
10754  [\\/]* | ?:[\\/]*)
10755  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10756  ;;
10757  *)
10758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10759for as_dir in $PATH
10760do
10761  IFS=$as_save_IFS
10762  test -z "$as_dir" && as_dir=.
10763    for ac_exec_ext in '' $ac_executable_extensions; do
10764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10765    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10767    break 2
10768  fi
10769done
10770  done
10771IFS=$as_save_IFS
10772
10773  ;;
10774esac
10775fi
10776TOUCH=$ac_cv_path_TOUCH
10777if test -n "$TOUCH"; then
10778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10779$as_echo "$TOUCH" >&6; }
10780else
10781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10782$as_echo "no" >&6; }
10783fi
10784
10785
10786  test -n "$TOUCH" && break
10787done
10788
10789  else
10790    # The variable is set, but is it from the command line or the environment?
10791
10792    # Try to remove the string !TOUCH! from our list.
10793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10795      # If it failed, the variable was not from the command line. Ignore it,
10796      # but warn the user (except for BASH, which is always set by the calling BASH).
10797      if test "xTOUCH" != xBASH; then
10798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10799$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10800      fi
10801      # Try to locate tool using the code snippet
10802      for ac_prog in touch
10803do
10804  # Extract the first word of "$ac_prog", so it can be a program name with args.
10805set dummy $ac_prog; ac_word=$2
10806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10807$as_echo_n "checking for $ac_word... " >&6; }
10808if ${ac_cv_path_TOUCH+:} false; then :
10809  $as_echo_n "(cached) " >&6
10810else
10811  case $TOUCH in
10812  [\\/]* | ?:[\\/]*)
10813  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10814  ;;
10815  *)
10816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10817for as_dir in $PATH
10818do
10819  IFS=$as_save_IFS
10820  test -z "$as_dir" && as_dir=.
10821    for ac_exec_ext in '' $ac_executable_extensions; do
10822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10823    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10825    break 2
10826  fi
10827done
10828  done
10829IFS=$as_save_IFS
10830
10831  ;;
10832esac
10833fi
10834TOUCH=$ac_cv_path_TOUCH
10835if test -n "$TOUCH"; then
10836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10837$as_echo "$TOUCH" >&6; }
10838else
10839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10840$as_echo "no" >&6; }
10841fi
10842
10843
10844  test -n "$TOUCH" && break
10845done
10846
10847    else
10848      # If it succeeded, then it was overridden by the user. We will use it
10849      # for the tool.
10850
10851      # First remove it from the list of overridden variables, so we can test
10852      # for unknown variables in the end.
10853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10854
10855      # Check if we try to supply an empty value
10856      if test "x$TOUCH" = x; then
10857        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10858$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10859        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10860$as_echo_n "checking for TOUCH... " >&6; }
10861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10862$as_echo "disabled" >&6; }
10863      else
10864        # Check if the provided tool contains a complete path.
10865        tool_specified="$TOUCH"
10866        tool_basename="${tool_specified##*/}"
10867        if test "x$tool_basename" = "x$tool_specified"; then
10868          # A command without a complete path is provided, search $PATH.
10869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10870$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10871          # Extract the first word of "$tool_basename", so it can be a program name with args.
10872set dummy $tool_basename; ac_word=$2
10873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10874$as_echo_n "checking for $ac_word... " >&6; }
10875if ${ac_cv_path_TOUCH+:} false; then :
10876  $as_echo_n "(cached) " >&6
10877else
10878  case $TOUCH in
10879  [\\/]* | ?:[\\/]*)
10880  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10881  ;;
10882  *)
10883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10884for as_dir in $PATH
10885do
10886  IFS=$as_save_IFS
10887  test -z "$as_dir" && as_dir=.
10888    for ac_exec_ext in '' $ac_executable_extensions; do
10889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10890    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10892    break 2
10893  fi
10894done
10895  done
10896IFS=$as_save_IFS
10897
10898  ;;
10899esac
10900fi
10901TOUCH=$ac_cv_path_TOUCH
10902if test -n "$TOUCH"; then
10903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10904$as_echo "$TOUCH" >&6; }
10905else
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
10908fi
10909
10910
10911          if test "x$TOUCH" = x; then
10912            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10913          fi
10914        else
10915          # Otherwise we believe it is a complete path. Use it as it is.
10916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10917$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10918          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10919$as_echo_n "checking for TOUCH... " >&6; }
10920          if test ! -x "$tool_specified"; then
10921            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10922$as_echo "not found" >&6; }
10923            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10924          fi
10925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10926$as_echo "$tool_specified" >&6; }
10927        fi
10928      fi
10929    fi
10930  fi
10931
10932
10933
10934  if test "x$TOUCH" = x; then
10935    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10936  fi
10937
10938
10939
10940
10941
10942  # Publish this variable in the help.
10943
10944
10945  if [ -z "${TR+x}" ]; then
10946    # The variable is not set by user, try to locate tool using the code snippet
10947    for ac_prog in tr
10948do
10949  # Extract the first word of "$ac_prog", so it can be a program name with args.
10950set dummy $ac_prog; ac_word=$2
10951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10952$as_echo_n "checking for $ac_word... " >&6; }
10953if ${ac_cv_path_TR+:} false; then :
10954  $as_echo_n "(cached) " >&6
10955else
10956  case $TR in
10957  [\\/]* | ?:[\\/]*)
10958  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10959  ;;
10960  *)
10961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10962for as_dir in $PATH
10963do
10964  IFS=$as_save_IFS
10965  test -z "$as_dir" && as_dir=.
10966    for ac_exec_ext in '' $ac_executable_extensions; do
10967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10968    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10970    break 2
10971  fi
10972done
10973  done
10974IFS=$as_save_IFS
10975
10976  ;;
10977esac
10978fi
10979TR=$ac_cv_path_TR
10980if test -n "$TR"; then
10981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10982$as_echo "$TR" >&6; }
10983else
10984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10985$as_echo "no" >&6; }
10986fi
10987
10988
10989  test -n "$TR" && break
10990done
10991
10992  else
10993    # The variable is set, but is it from the command line or the environment?
10994
10995    # Try to remove the string !TR! from our list.
10996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10998      # If it failed, the variable was not from the command line. Ignore it,
10999      # but warn the user (except for BASH, which is always set by the calling BASH).
11000      if test "xTR" != xBASH; then
11001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11002$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11003      fi
11004      # Try to locate tool using the code snippet
11005      for ac_prog in tr
11006do
11007  # Extract the first word of "$ac_prog", so it can be a program name with args.
11008set dummy $ac_prog; ac_word=$2
11009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11010$as_echo_n "checking for $ac_word... " >&6; }
11011if ${ac_cv_path_TR+:} false; then :
11012  $as_echo_n "(cached) " >&6
11013else
11014  case $TR in
11015  [\\/]* | ?:[\\/]*)
11016  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11017  ;;
11018  *)
11019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11020for as_dir in $PATH
11021do
11022  IFS=$as_save_IFS
11023  test -z "$as_dir" && as_dir=.
11024    for ac_exec_ext in '' $ac_executable_extensions; do
11025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11026    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11028    break 2
11029  fi
11030done
11031  done
11032IFS=$as_save_IFS
11033
11034  ;;
11035esac
11036fi
11037TR=$ac_cv_path_TR
11038if test -n "$TR"; then
11039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11040$as_echo "$TR" >&6; }
11041else
11042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11043$as_echo "no" >&6; }
11044fi
11045
11046
11047  test -n "$TR" && break
11048done
11049
11050    else
11051      # If it succeeded, then it was overridden by the user. We will use it
11052      # for the tool.
11053
11054      # First remove it from the list of overridden variables, so we can test
11055      # for unknown variables in the end.
11056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11057
11058      # Check if we try to supply an empty value
11059      if test "x$TR" = x; then
11060        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11061$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11063$as_echo_n "checking for TR... " >&6; }
11064        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11065$as_echo "disabled" >&6; }
11066      else
11067        # Check if the provided tool contains a complete path.
11068        tool_specified="$TR"
11069        tool_basename="${tool_specified##*/}"
11070        if test "x$tool_basename" = "x$tool_specified"; then
11071          # A command without a complete path is provided, search $PATH.
11072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11073$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11074          # Extract the first word of "$tool_basename", so it can be a program name with args.
11075set dummy $tool_basename; ac_word=$2
11076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11077$as_echo_n "checking for $ac_word... " >&6; }
11078if ${ac_cv_path_TR+:} false; then :
11079  $as_echo_n "(cached) " >&6
11080else
11081  case $TR in
11082  [\\/]* | ?:[\\/]*)
11083  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11084  ;;
11085  *)
11086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11087for as_dir in $PATH
11088do
11089  IFS=$as_save_IFS
11090  test -z "$as_dir" && as_dir=.
11091    for ac_exec_ext in '' $ac_executable_extensions; do
11092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11093    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11095    break 2
11096  fi
11097done
11098  done
11099IFS=$as_save_IFS
11100
11101  ;;
11102esac
11103fi
11104TR=$ac_cv_path_TR
11105if test -n "$TR"; then
11106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11107$as_echo "$TR" >&6; }
11108else
11109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11110$as_echo "no" >&6; }
11111fi
11112
11113
11114          if test "x$TR" = x; then
11115            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11116          fi
11117        else
11118          # Otherwise we believe it is a complete path. Use it as it is.
11119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11120$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11121          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11122$as_echo_n "checking for TR... " >&6; }
11123          if test ! -x "$tool_specified"; then
11124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11125$as_echo "not found" >&6; }
11126            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11127          fi
11128          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11129$as_echo "$tool_specified" >&6; }
11130        fi
11131      fi
11132    fi
11133  fi
11134
11135
11136
11137  if test "x$TR" = x; then
11138    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11139  fi
11140
11141
11142
11143
11144
11145  # Publish this variable in the help.
11146
11147
11148  if [ -z "${UNAME+x}" ]; then
11149    # The variable is not set by user, try to locate tool using the code snippet
11150    for ac_prog in uname
11151do
11152  # Extract the first word of "$ac_prog", so it can be a program name with args.
11153set dummy $ac_prog; ac_word=$2
11154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11155$as_echo_n "checking for $ac_word... " >&6; }
11156if ${ac_cv_path_UNAME+:} false; then :
11157  $as_echo_n "(cached) " >&6
11158else
11159  case $UNAME in
11160  [\\/]* | ?:[\\/]*)
11161  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11162  ;;
11163  *)
11164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11165for as_dir in $PATH
11166do
11167  IFS=$as_save_IFS
11168  test -z "$as_dir" && as_dir=.
11169    for ac_exec_ext in '' $ac_executable_extensions; do
11170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11171    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11173    break 2
11174  fi
11175done
11176  done
11177IFS=$as_save_IFS
11178
11179  ;;
11180esac
11181fi
11182UNAME=$ac_cv_path_UNAME
11183if test -n "$UNAME"; then
11184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11185$as_echo "$UNAME" >&6; }
11186else
11187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188$as_echo "no" >&6; }
11189fi
11190
11191
11192  test -n "$UNAME" && break
11193done
11194
11195  else
11196    # The variable is set, but is it from the command line or the environment?
11197
11198    # Try to remove the string !UNAME! from our list.
11199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11201      # If it failed, the variable was not from the command line. Ignore it,
11202      # but warn the user (except for BASH, which is always set by the calling BASH).
11203      if test "xUNAME" != xBASH; then
11204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11205$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11206      fi
11207      # Try to locate tool using the code snippet
11208      for ac_prog in uname
11209do
11210  # Extract the first word of "$ac_prog", so it can be a program name with args.
11211set dummy $ac_prog; ac_word=$2
11212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11213$as_echo_n "checking for $ac_word... " >&6; }
11214if ${ac_cv_path_UNAME+:} false; then :
11215  $as_echo_n "(cached) " >&6
11216else
11217  case $UNAME in
11218  [\\/]* | ?:[\\/]*)
11219  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11220  ;;
11221  *)
11222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11223for as_dir in $PATH
11224do
11225  IFS=$as_save_IFS
11226  test -z "$as_dir" && as_dir=.
11227    for ac_exec_ext in '' $ac_executable_extensions; do
11228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11229    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11231    break 2
11232  fi
11233done
11234  done
11235IFS=$as_save_IFS
11236
11237  ;;
11238esac
11239fi
11240UNAME=$ac_cv_path_UNAME
11241if test -n "$UNAME"; then
11242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11243$as_echo "$UNAME" >&6; }
11244else
11245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11246$as_echo "no" >&6; }
11247fi
11248
11249
11250  test -n "$UNAME" && break
11251done
11252
11253    else
11254      # If it succeeded, then it was overridden by the user. We will use it
11255      # for the tool.
11256
11257      # First remove it from the list of overridden variables, so we can test
11258      # for unknown variables in the end.
11259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11260
11261      # Check if we try to supply an empty value
11262      if test "x$UNAME" = x; then
11263        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11264$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11265        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11266$as_echo_n "checking for UNAME... " >&6; }
11267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11268$as_echo "disabled" >&6; }
11269      else
11270        # Check if the provided tool contains a complete path.
11271        tool_specified="$UNAME"
11272        tool_basename="${tool_specified##*/}"
11273        if test "x$tool_basename" = "x$tool_specified"; then
11274          # A command without a complete path is provided, search $PATH.
11275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11276$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11277          # Extract the first word of "$tool_basename", so it can be a program name with args.
11278set dummy $tool_basename; ac_word=$2
11279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11280$as_echo_n "checking for $ac_word... " >&6; }
11281if ${ac_cv_path_UNAME+:} false; then :
11282  $as_echo_n "(cached) " >&6
11283else
11284  case $UNAME in
11285  [\\/]* | ?:[\\/]*)
11286  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11287  ;;
11288  *)
11289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11290for as_dir in $PATH
11291do
11292  IFS=$as_save_IFS
11293  test -z "$as_dir" && as_dir=.
11294    for ac_exec_ext in '' $ac_executable_extensions; do
11295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11296    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11298    break 2
11299  fi
11300done
11301  done
11302IFS=$as_save_IFS
11303
11304  ;;
11305esac
11306fi
11307UNAME=$ac_cv_path_UNAME
11308if test -n "$UNAME"; then
11309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11310$as_echo "$UNAME" >&6; }
11311else
11312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
11314fi
11315
11316
11317          if test "x$UNAME" = x; then
11318            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11319          fi
11320        else
11321          # Otherwise we believe it is a complete path. Use it as it is.
11322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11323$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11324          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11325$as_echo_n "checking for UNAME... " >&6; }
11326          if test ! -x "$tool_specified"; then
11327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11328$as_echo "not found" >&6; }
11329            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11330          fi
11331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11332$as_echo "$tool_specified" >&6; }
11333        fi
11334      fi
11335    fi
11336  fi
11337
11338
11339
11340  if test "x$UNAME" = x; then
11341    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11342  fi
11343
11344
11345
11346
11347
11348  # Publish this variable in the help.
11349
11350
11351  if [ -z "${UNIQ+x}" ]; then
11352    # The variable is not set by user, try to locate tool using the code snippet
11353    for ac_prog in uniq
11354do
11355  # Extract the first word of "$ac_prog", so it can be a program name with args.
11356set dummy $ac_prog; ac_word=$2
11357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11358$as_echo_n "checking for $ac_word... " >&6; }
11359if ${ac_cv_path_UNIQ+:} false; then :
11360  $as_echo_n "(cached) " >&6
11361else
11362  case $UNIQ in
11363  [\\/]* | ?:[\\/]*)
11364  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11365  ;;
11366  *)
11367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11368for as_dir in $PATH
11369do
11370  IFS=$as_save_IFS
11371  test -z "$as_dir" && as_dir=.
11372    for ac_exec_ext in '' $ac_executable_extensions; do
11373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11374    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11376    break 2
11377  fi
11378done
11379  done
11380IFS=$as_save_IFS
11381
11382  ;;
11383esac
11384fi
11385UNIQ=$ac_cv_path_UNIQ
11386if test -n "$UNIQ"; then
11387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11388$as_echo "$UNIQ" >&6; }
11389else
11390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
11392fi
11393
11394
11395  test -n "$UNIQ" && break
11396done
11397
11398  else
11399    # The variable is set, but is it from the command line or the environment?
11400
11401    # Try to remove the string !UNIQ! from our list.
11402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11404      # If it failed, the variable was not from the command line. Ignore it,
11405      # but warn the user (except for BASH, which is always set by the calling BASH).
11406      if test "xUNIQ" != xBASH; then
11407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11408$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11409      fi
11410      # Try to locate tool using the code snippet
11411      for ac_prog in uniq
11412do
11413  # Extract the first word of "$ac_prog", so it can be a program name with args.
11414set dummy $ac_prog; ac_word=$2
11415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11416$as_echo_n "checking for $ac_word... " >&6; }
11417if ${ac_cv_path_UNIQ+:} false; then :
11418  $as_echo_n "(cached) " >&6
11419else
11420  case $UNIQ in
11421  [\\/]* | ?:[\\/]*)
11422  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11423  ;;
11424  *)
11425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11426for as_dir in $PATH
11427do
11428  IFS=$as_save_IFS
11429  test -z "$as_dir" && as_dir=.
11430    for ac_exec_ext in '' $ac_executable_extensions; do
11431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11432    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11434    break 2
11435  fi
11436done
11437  done
11438IFS=$as_save_IFS
11439
11440  ;;
11441esac
11442fi
11443UNIQ=$ac_cv_path_UNIQ
11444if test -n "$UNIQ"; then
11445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11446$as_echo "$UNIQ" >&6; }
11447else
11448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11449$as_echo "no" >&6; }
11450fi
11451
11452
11453  test -n "$UNIQ" && break
11454done
11455
11456    else
11457      # If it succeeded, then it was overridden by the user. We will use it
11458      # for the tool.
11459
11460      # First remove it from the list of overridden variables, so we can test
11461      # for unknown variables in the end.
11462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11463
11464      # Check if we try to supply an empty value
11465      if test "x$UNIQ" = x; then
11466        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11467$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11469$as_echo_n "checking for UNIQ... " >&6; }
11470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11471$as_echo "disabled" >&6; }
11472      else
11473        # Check if the provided tool contains a complete path.
11474        tool_specified="$UNIQ"
11475        tool_basename="${tool_specified##*/}"
11476        if test "x$tool_basename" = "x$tool_specified"; then
11477          # A command without a complete path is provided, search $PATH.
11478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11479$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11480          # Extract the first word of "$tool_basename", so it can be a program name with args.
11481set dummy $tool_basename; ac_word=$2
11482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11483$as_echo_n "checking for $ac_word... " >&6; }
11484if ${ac_cv_path_UNIQ+:} false; then :
11485  $as_echo_n "(cached) " >&6
11486else
11487  case $UNIQ in
11488  [\\/]* | ?:[\\/]*)
11489  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11490  ;;
11491  *)
11492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11493for as_dir in $PATH
11494do
11495  IFS=$as_save_IFS
11496  test -z "$as_dir" && as_dir=.
11497    for ac_exec_ext in '' $ac_executable_extensions; do
11498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11499    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11501    break 2
11502  fi
11503done
11504  done
11505IFS=$as_save_IFS
11506
11507  ;;
11508esac
11509fi
11510UNIQ=$ac_cv_path_UNIQ
11511if test -n "$UNIQ"; then
11512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11513$as_echo "$UNIQ" >&6; }
11514else
11515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11516$as_echo "no" >&6; }
11517fi
11518
11519
11520          if test "x$UNIQ" = x; then
11521            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11522          fi
11523        else
11524          # Otherwise we believe it is a complete path. Use it as it is.
11525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11526$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11527          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11528$as_echo_n "checking for UNIQ... " >&6; }
11529          if test ! -x "$tool_specified"; then
11530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11531$as_echo "not found" >&6; }
11532            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11533          fi
11534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11535$as_echo "$tool_specified" >&6; }
11536        fi
11537      fi
11538    fi
11539  fi
11540
11541
11542
11543  if test "x$UNIQ" = x; then
11544    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11545  fi
11546
11547
11548
11549
11550
11551  # Publish this variable in the help.
11552
11553
11554  if [ -z "${WC+x}" ]; then
11555    # The variable is not set by user, try to locate tool using the code snippet
11556    for ac_prog in wc
11557do
11558  # Extract the first word of "$ac_prog", so it can be a program name with args.
11559set dummy $ac_prog; ac_word=$2
11560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11561$as_echo_n "checking for $ac_word... " >&6; }
11562if ${ac_cv_path_WC+:} false; then :
11563  $as_echo_n "(cached) " >&6
11564else
11565  case $WC in
11566  [\\/]* | ?:[\\/]*)
11567  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11568  ;;
11569  *)
11570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11571for as_dir in $PATH
11572do
11573  IFS=$as_save_IFS
11574  test -z "$as_dir" && as_dir=.
11575    for ac_exec_ext in '' $ac_executable_extensions; do
11576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11577    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11579    break 2
11580  fi
11581done
11582  done
11583IFS=$as_save_IFS
11584
11585  ;;
11586esac
11587fi
11588WC=$ac_cv_path_WC
11589if test -n "$WC"; then
11590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11591$as_echo "$WC" >&6; }
11592else
11593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11594$as_echo "no" >&6; }
11595fi
11596
11597
11598  test -n "$WC" && break
11599done
11600
11601  else
11602    # The variable is set, but is it from the command line or the environment?
11603
11604    # Try to remove the string !WC! from our list.
11605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11607      # If it failed, the variable was not from the command line. Ignore it,
11608      # but warn the user (except for BASH, which is always set by the calling BASH).
11609      if test "xWC" != xBASH; then
11610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11611$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11612      fi
11613      # Try to locate tool using the code snippet
11614      for ac_prog in wc
11615do
11616  # Extract the first word of "$ac_prog", so it can be a program name with args.
11617set dummy $ac_prog; ac_word=$2
11618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11619$as_echo_n "checking for $ac_word... " >&6; }
11620if ${ac_cv_path_WC+:} false; then :
11621  $as_echo_n "(cached) " >&6
11622else
11623  case $WC in
11624  [\\/]* | ?:[\\/]*)
11625  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11626  ;;
11627  *)
11628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11629for as_dir in $PATH
11630do
11631  IFS=$as_save_IFS
11632  test -z "$as_dir" && as_dir=.
11633    for ac_exec_ext in '' $ac_executable_extensions; do
11634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11635    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11637    break 2
11638  fi
11639done
11640  done
11641IFS=$as_save_IFS
11642
11643  ;;
11644esac
11645fi
11646WC=$ac_cv_path_WC
11647if test -n "$WC"; then
11648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11649$as_echo "$WC" >&6; }
11650else
11651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11652$as_echo "no" >&6; }
11653fi
11654
11655
11656  test -n "$WC" && break
11657done
11658
11659    else
11660      # If it succeeded, then it was overridden by the user. We will use it
11661      # for the tool.
11662
11663      # First remove it from the list of overridden variables, so we can test
11664      # for unknown variables in the end.
11665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11666
11667      # Check if we try to supply an empty value
11668      if test "x$WC" = x; then
11669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11670$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11672$as_echo_n "checking for WC... " >&6; }
11673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11674$as_echo "disabled" >&6; }
11675      else
11676        # Check if the provided tool contains a complete path.
11677        tool_specified="$WC"
11678        tool_basename="${tool_specified##*/}"
11679        if test "x$tool_basename" = "x$tool_specified"; then
11680          # A command without a complete path is provided, search $PATH.
11681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11682$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11683          # Extract the first word of "$tool_basename", so it can be a program name with args.
11684set dummy $tool_basename; ac_word=$2
11685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11686$as_echo_n "checking for $ac_word... " >&6; }
11687if ${ac_cv_path_WC+:} false; then :
11688  $as_echo_n "(cached) " >&6
11689else
11690  case $WC in
11691  [\\/]* | ?:[\\/]*)
11692  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11693  ;;
11694  *)
11695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11696for as_dir in $PATH
11697do
11698  IFS=$as_save_IFS
11699  test -z "$as_dir" && as_dir=.
11700    for ac_exec_ext in '' $ac_executable_extensions; do
11701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11702    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11704    break 2
11705  fi
11706done
11707  done
11708IFS=$as_save_IFS
11709
11710  ;;
11711esac
11712fi
11713WC=$ac_cv_path_WC
11714if test -n "$WC"; then
11715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11716$as_echo "$WC" >&6; }
11717else
11718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11719$as_echo "no" >&6; }
11720fi
11721
11722
11723          if test "x$WC" = x; then
11724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11725          fi
11726        else
11727          # Otherwise we believe it is a complete path. Use it as it is.
11728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11729$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11731$as_echo_n "checking for WC... " >&6; }
11732          if test ! -x "$tool_specified"; then
11733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11734$as_echo "not found" >&6; }
11735            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11736          fi
11737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11738$as_echo "$tool_specified" >&6; }
11739        fi
11740      fi
11741    fi
11742  fi
11743
11744
11745
11746  if test "x$WC" = x; then
11747    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11748  fi
11749
11750
11751
11752
11753
11754  # Publish this variable in the help.
11755
11756
11757  if [ -z "${WHICH+x}" ]; then
11758    # The variable is not set by user, try to locate tool using the code snippet
11759    for ac_prog in which
11760do
11761  # Extract the first word of "$ac_prog", so it can be a program name with args.
11762set dummy $ac_prog; ac_word=$2
11763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11764$as_echo_n "checking for $ac_word... " >&6; }
11765if ${ac_cv_path_WHICH+:} false; then :
11766  $as_echo_n "(cached) " >&6
11767else
11768  case $WHICH in
11769  [\\/]* | ?:[\\/]*)
11770  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11771  ;;
11772  *)
11773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11774for as_dir in $PATH
11775do
11776  IFS=$as_save_IFS
11777  test -z "$as_dir" && as_dir=.
11778    for ac_exec_ext in '' $ac_executable_extensions; do
11779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11780    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11782    break 2
11783  fi
11784done
11785  done
11786IFS=$as_save_IFS
11787
11788  ;;
11789esac
11790fi
11791WHICH=$ac_cv_path_WHICH
11792if test -n "$WHICH"; then
11793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11794$as_echo "$WHICH" >&6; }
11795else
11796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11797$as_echo "no" >&6; }
11798fi
11799
11800
11801  test -n "$WHICH" && break
11802done
11803
11804  else
11805    # The variable is set, but is it from the command line or the environment?
11806
11807    # Try to remove the string !WHICH! from our list.
11808    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11809    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11810      # If it failed, the variable was not from the command line. Ignore it,
11811      # but warn the user (except for BASH, which is always set by the calling BASH).
11812      if test "xWHICH" != xBASH; then
11813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11814$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11815      fi
11816      # Try to locate tool using the code snippet
11817      for ac_prog in which
11818do
11819  # Extract the first word of "$ac_prog", so it can be a program name with args.
11820set dummy $ac_prog; ac_word=$2
11821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11822$as_echo_n "checking for $ac_word... " >&6; }
11823if ${ac_cv_path_WHICH+:} false; then :
11824  $as_echo_n "(cached) " >&6
11825else
11826  case $WHICH in
11827  [\\/]* | ?:[\\/]*)
11828  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11829  ;;
11830  *)
11831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11832for as_dir in $PATH
11833do
11834  IFS=$as_save_IFS
11835  test -z "$as_dir" && as_dir=.
11836    for ac_exec_ext in '' $ac_executable_extensions; do
11837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11838    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11840    break 2
11841  fi
11842done
11843  done
11844IFS=$as_save_IFS
11845
11846  ;;
11847esac
11848fi
11849WHICH=$ac_cv_path_WHICH
11850if test -n "$WHICH"; then
11851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11852$as_echo "$WHICH" >&6; }
11853else
11854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11855$as_echo "no" >&6; }
11856fi
11857
11858
11859  test -n "$WHICH" && break
11860done
11861
11862    else
11863      # If it succeeded, then it was overridden by the user. We will use it
11864      # for the tool.
11865
11866      # First remove it from the list of overridden variables, so we can test
11867      # for unknown variables in the end.
11868      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11869
11870      # Check if we try to supply an empty value
11871      if test "x$WHICH" = x; then
11872        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11873$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11874        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11875$as_echo_n "checking for WHICH... " >&6; }
11876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11877$as_echo "disabled" >&6; }
11878      else
11879        # Check if the provided tool contains a complete path.
11880        tool_specified="$WHICH"
11881        tool_basename="${tool_specified##*/}"
11882        if test "x$tool_basename" = "x$tool_specified"; then
11883          # A command without a complete path is provided, search $PATH.
11884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11885$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11886          # Extract the first word of "$tool_basename", so it can be a program name with args.
11887set dummy $tool_basename; ac_word=$2
11888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11889$as_echo_n "checking for $ac_word... " >&6; }
11890if ${ac_cv_path_WHICH+:} false; then :
11891  $as_echo_n "(cached) " >&6
11892else
11893  case $WHICH in
11894  [\\/]* | ?:[\\/]*)
11895  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11896  ;;
11897  *)
11898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11899for as_dir in $PATH
11900do
11901  IFS=$as_save_IFS
11902  test -z "$as_dir" && as_dir=.
11903    for ac_exec_ext in '' $ac_executable_extensions; do
11904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11905    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11907    break 2
11908  fi
11909done
11910  done
11911IFS=$as_save_IFS
11912
11913  ;;
11914esac
11915fi
11916WHICH=$ac_cv_path_WHICH
11917if test -n "$WHICH"; then
11918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11919$as_echo "$WHICH" >&6; }
11920else
11921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11922$as_echo "no" >&6; }
11923fi
11924
11925
11926          if test "x$WHICH" = x; then
11927            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11928          fi
11929        else
11930          # Otherwise we believe it is a complete path. Use it as it is.
11931          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11932$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11933          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11934$as_echo_n "checking for WHICH... " >&6; }
11935          if test ! -x "$tool_specified"; then
11936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11937$as_echo "not found" >&6; }
11938            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11939          fi
11940          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11941$as_echo "$tool_specified" >&6; }
11942        fi
11943      fi
11944    fi
11945  fi
11946
11947
11948
11949  if test "x$WHICH" = x; then
11950    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11951  fi
11952
11953
11954
11955
11956
11957  # Publish this variable in the help.
11958
11959
11960  if [ -z "${XARGS+x}" ]; then
11961    # The variable is not set by user, try to locate tool using the code snippet
11962    for ac_prog in xargs
11963do
11964  # Extract the first word of "$ac_prog", so it can be a program name with args.
11965set dummy $ac_prog; ac_word=$2
11966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11967$as_echo_n "checking for $ac_word... " >&6; }
11968if ${ac_cv_path_XARGS+:} false; then :
11969  $as_echo_n "(cached) " >&6
11970else
11971  case $XARGS in
11972  [\\/]* | ?:[\\/]*)
11973  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11974  ;;
11975  *)
11976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11977for as_dir in $PATH
11978do
11979  IFS=$as_save_IFS
11980  test -z "$as_dir" && as_dir=.
11981    for ac_exec_ext in '' $ac_executable_extensions; do
11982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11983    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11985    break 2
11986  fi
11987done
11988  done
11989IFS=$as_save_IFS
11990
11991  ;;
11992esac
11993fi
11994XARGS=$ac_cv_path_XARGS
11995if test -n "$XARGS"; then
11996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11997$as_echo "$XARGS" >&6; }
11998else
11999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12000$as_echo "no" >&6; }
12001fi
12002
12003
12004  test -n "$XARGS" && break
12005done
12006
12007  else
12008    # The variable is set, but is it from the command line or the environment?
12009
12010    # Try to remove the string !XARGS! from our list.
12011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12013      # If it failed, the variable was not from the command line. Ignore it,
12014      # but warn the user (except for BASH, which is always set by the calling BASH).
12015      if test "xXARGS" != xBASH; then
12016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12017$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12018      fi
12019      # Try to locate tool using the code snippet
12020      for ac_prog in xargs
12021do
12022  # Extract the first word of "$ac_prog", so it can be a program name with args.
12023set dummy $ac_prog; ac_word=$2
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025$as_echo_n "checking for $ac_word... " >&6; }
12026if ${ac_cv_path_XARGS+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  case $XARGS in
12030  [\\/]* | ?:[\\/]*)
12031  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12032  ;;
12033  *)
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043    break 2
12044  fi
12045done
12046  done
12047IFS=$as_save_IFS
12048
12049  ;;
12050esac
12051fi
12052XARGS=$ac_cv_path_XARGS
12053if test -n "$XARGS"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12055$as_echo "$XARGS" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062  test -n "$XARGS" && break
12063done
12064
12065    else
12066      # If it succeeded, then it was overridden by the user. We will use it
12067      # for the tool.
12068
12069      # First remove it from the list of overridden variables, so we can test
12070      # for unknown variables in the end.
12071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12072
12073      # Check if we try to supply an empty value
12074      if test "x$XARGS" = x; then
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12076$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12078$as_echo_n "checking for XARGS... " >&6; }
12079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12080$as_echo "disabled" >&6; }
12081      else
12082        # Check if the provided tool contains a complete path.
12083        tool_specified="$XARGS"
12084        tool_basename="${tool_specified##*/}"
12085        if test "x$tool_basename" = "x$tool_specified"; then
12086          # A command without a complete path is provided, search $PATH.
12087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12088$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12089          # Extract the first word of "$tool_basename", so it can be a program name with args.
12090set dummy $tool_basename; ac_word=$2
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12092$as_echo_n "checking for $ac_word... " >&6; }
12093if ${ac_cv_path_XARGS+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  case $XARGS in
12097  [\\/]* | ?:[\\/]*)
12098  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12099  ;;
12100  *)
12101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12102for as_dir in $PATH
12103do
12104  IFS=$as_save_IFS
12105  test -z "$as_dir" && as_dir=.
12106    for ac_exec_ext in '' $ac_executable_extensions; do
12107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12108    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12110    break 2
12111  fi
12112done
12113  done
12114IFS=$as_save_IFS
12115
12116  ;;
12117esac
12118fi
12119XARGS=$ac_cv_path_XARGS
12120if test -n "$XARGS"; then
12121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12122$as_echo "$XARGS" >&6; }
12123else
12124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
12126fi
12127
12128
12129          if test "x$XARGS" = x; then
12130            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12131          fi
12132        else
12133          # Otherwise we believe it is a complete path. Use it as it is.
12134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12135$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12137$as_echo_n "checking for XARGS... " >&6; }
12138          if test ! -x "$tool_specified"; then
12139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12140$as_echo "not found" >&6; }
12141            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12142          fi
12143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12144$as_echo "$tool_specified" >&6; }
12145        fi
12146      fi
12147    fi
12148  fi
12149
12150
12151
12152  if test "x$XARGS" = x; then
12153    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12154  fi
12155
12156
12157
12158  # Then required tools that require some special treatment.
12159
12160
12161  # Publish this variable in the help.
12162
12163
12164  if [ -z "${AWK+x}" ]; then
12165    # The variable is not set by user, try to locate tool using the code snippet
12166    for ac_prog in gawk mawk nawk awk
12167do
12168  # Extract the first word of "$ac_prog", so it can be a program name with args.
12169set dummy $ac_prog; ac_word=$2
12170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12171$as_echo_n "checking for $ac_word... " >&6; }
12172if ${ac_cv_prog_AWK+:} false; then :
12173  $as_echo_n "(cached) " >&6
12174else
12175  if test -n "$AWK"; then
12176  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12177else
12178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12179for as_dir in $PATH
12180do
12181  IFS=$as_save_IFS
12182  test -z "$as_dir" && as_dir=.
12183    for ac_exec_ext in '' $ac_executable_extensions; do
12184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12185    ac_cv_prog_AWK="$ac_prog"
12186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12187    break 2
12188  fi
12189done
12190  done
12191IFS=$as_save_IFS
12192
12193fi
12194fi
12195AWK=$ac_cv_prog_AWK
12196if test -n "$AWK"; then
12197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12198$as_echo "$AWK" >&6; }
12199else
12200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12201$as_echo "no" >&6; }
12202fi
12203
12204
12205  test -n "$AWK" && break
12206done
12207
12208  else
12209    # The variable is set, but is it from the command line or the environment?
12210
12211    # Try to remove the string !AWK! from our list.
12212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12214      # If it failed, the variable was not from the command line. Ignore it,
12215      # but warn the user (except for BASH, which is always set by the calling BASH).
12216      if test "xAWK" != xBASH; then
12217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12218$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12219      fi
12220      # Try to locate tool using the code snippet
12221      for ac_prog in gawk mawk nawk awk
12222do
12223  # Extract the first word of "$ac_prog", so it can be a program name with args.
12224set dummy $ac_prog; ac_word=$2
12225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12226$as_echo_n "checking for $ac_word... " >&6; }
12227if ${ac_cv_prog_AWK+:} false; then :
12228  $as_echo_n "(cached) " >&6
12229else
12230  if test -n "$AWK"; then
12231  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12232else
12233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12234for as_dir in $PATH
12235do
12236  IFS=$as_save_IFS
12237  test -z "$as_dir" && as_dir=.
12238    for ac_exec_ext in '' $ac_executable_extensions; do
12239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12240    ac_cv_prog_AWK="$ac_prog"
12241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12242    break 2
12243  fi
12244done
12245  done
12246IFS=$as_save_IFS
12247
12248fi
12249fi
12250AWK=$ac_cv_prog_AWK
12251if test -n "$AWK"; then
12252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12253$as_echo "$AWK" >&6; }
12254else
12255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12256$as_echo "no" >&6; }
12257fi
12258
12259
12260  test -n "$AWK" && break
12261done
12262
12263    else
12264      # If it succeeded, then it was overridden by the user. We will use it
12265      # for the tool.
12266
12267      # First remove it from the list of overridden variables, so we can test
12268      # for unknown variables in the end.
12269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12270
12271      # Check if we try to supply an empty value
12272      if test "x$AWK" = x; then
12273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12274$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12276$as_echo_n "checking for AWK... " >&6; }
12277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12278$as_echo "disabled" >&6; }
12279      else
12280        # Check if the provided tool contains a complete path.
12281        tool_specified="$AWK"
12282        tool_basename="${tool_specified##*/}"
12283        if test "x$tool_basename" = "x$tool_specified"; then
12284          # A command without a complete path is provided, search $PATH.
12285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12286$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12287          # Extract the first word of "$tool_basename", so it can be a program name with args.
12288set dummy $tool_basename; ac_word=$2
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12290$as_echo_n "checking for $ac_word... " >&6; }
12291if ${ac_cv_path_AWK+:} false; then :
12292  $as_echo_n "(cached) " >&6
12293else
12294  case $AWK in
12295  [\\/]* | ?:[\\/]*)
12296  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12297  ;;
12298  *)
12299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12300for as_dir in $PATH
12301do
12302  IFS=$as_save_IFS
12303  test -z "$as_dir" && as_dir=.
12304    for ac_exec_ext in '' $ac_executable_extensions; do
12305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12306    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12308    break 2
12309  fi
12310done
12311  done
12312IFS=$as_save_IFS
12313
12314  ;;
12315esac
12316fi
12317AWK=$ac_cv_path_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          if test "x$AWK" = x; then
12328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12329          fi
12330        else
12331          # Otherwise we believe it is a complete path. Use it as it is.
12332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12333$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12335$as_echo_n "checking for AWK... " >&6; }
12336          if test ! -x "$tool_specified"; then
12337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12338$as_echo "not found" >&6; }
12339            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12340          fi
12341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12342$as_echo "$tool_specified" >&6; }
12343        fi
12344      fi
12345    fi
12346  fi
12347
12348
12349  if test "x$AWK" = x; then
12350    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12351  fi
12352
12353
12354
12355
12356  # Publish this variable in the help.
12357
12358
12359  if [ -z "${GREP+x}" ]; then
12360    # The variable is not set by user, try to locate tool using the code snippet
12361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12362$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12363if ${ac_cv_path_GREP+:} false; then :
12364  $as_echo_n "(cached) " >&6
12365else
12366  if test -z "$GREP"; then
12367  ac_path_GREP_found=false
12368  # Loop through the user's path and test for each of PROGNAME-LIST
12369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12370for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12371do
12372  IFS=$as_save_IFS
12373  test -z "$as_dir" && as_dir=.
12374    for ac_prog in grep ggrep; do
12375    for ac_exec_ext in '' $ac_executable_extensions; do
12376      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12377      as_fn_executable_p "$ac_path_GREP" || continue
12378# Check for GNU ac_path_GREP and select it if it is found.
12379  # Check for GNU $ac_path_GREP
12380case `"$ac_path_GREP" --version 2>&1` in
12381*GNU*)
12382  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12383*)
12384  ac_count=0
12385  $as_echo_n 0123456789 >"conftest.in"
12386  while :
12387  do
12388    cat "conftest.in" "conftest.in" >"conftest.tmp"
12389    mv "conftest.tmp" "conftest.in"
12390    cp "conftest.in" "conftest.nl"
12391    $as_echo 'GREP' >> "conftest.nl"
12392    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12393    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12394    as_fn_arith $ac_count + 1 && ac_count=$as_val
12395    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12396      # Best one so far, save it but keep looking for a better one
12397      ac_cv_path_GREP="$ac_path_GREP"
12398      ac_path_GREP_max=$ac_count
12399    fi
12400    # 10*(2^10) chars as input seems more than enough
12401    test $ac_count -gt 10 && break
12402  done
12403  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12404esac
12405
12406      $ac_path_GREP_found && break 3
12407    done
12408  done
12409  done
12410IFS=$as_save_IFS
12411  if test -z "$ac_cv_path_GREP"; then
12412    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12413  fi
12414else
12415  ac_cv_path_GREP=$GREP
12416fi
12417
12418fi
12419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12420$as_echo "$ac_cv_path_GREP" >&6; }
12421 GREP="$ac_cv_path_GREP"
12422
12423
12424  else
12425    # The variable is set, but is it from the command line or the environment?
12426
12427    # Try to remove the string !GREP! from our list.
12428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12430      # If it failed, the variable was not from the command line. Ignore it,
12431      # but warn the user (except for BASH, which is always set by the calling BASH).
12432      if test "xGREP" != xBASH; then
12433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12434$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12435      fi
12436      # Try to locate tool using the code snippet
12437      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12438$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12439if ${ac_cv_path_GREP+:} false; then :
12440  $as_echo_n "(cached) " >&6
12441else
12442  if test -z "$GREP"; then
12443  ac_path_GREP_found=false
12444  # Loop through the user's path and test for each of PROGNAME-LIST
12445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12446for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12447do
12448  IFS=$as_save_IFS
12449  test -z "$as_dir" && as_dir=.
12450    for ac_prog in grep ggrep; do
12451    for ac_exec_ext in '' $ac_executable_extensions; do
12452      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12453      as_fn_executable_p "$ac_path_GREP" || continue
12454# Check for GNU ac_path_GREP and select it if it is found.
12455  # Check for GNU $ac_path_GREP
12456case `"$ac_path_GREP" --version 2>&1` in
12457*GNU*)
12458  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12459*)
12460  ac_count=0
12461  $as_echo_n 0123456789 >"conftest.in"
12462  while :
12463  do
12464    cat "conftest.in" "conftest.in" >"conftest.tmp"
12465    mv "conftest.tmp" "conftest.in"
12466    cp "conftest.in" "conftest.nl"
12467    $as_echo 'GREP' >> "conftest.nl"
12468    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12469    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12470    as_fn_arith $ac_count + 1 && ac_count=$as_val
12471    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12472      # Best one so far, save it but keep looking for a better one
12473      ac_cv_path_GREP="$ac_path_GREP"
12474      ac_path_GREP_max=$ac_count
12475    fi
12476    # 10*(2^10) chars as input seems more than enough
12477    test $ac_count -gt 10 && break
12478  done
12479  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12480esac
12481
12482      $ac_path_GREP_found && break 3
12483    done
12484  done
12485  done
12486IFS=$as_save_IFS
12487  if test -z "$ac_cv_path_GREP"; then
12488    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12489  fi
12490else
12491  ac_cv_path_GREP=$GREP
12492fi
12493
12494fi
12495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12496$as_echo "$ac_cv_path_GREP" >&6; }
12497 GREP="$ac_cv_path_GREP"
12498
12499
12500    else
12501      # If it succeeded, then it was overridden by the user. We will use it
12502      # for the tool.
12503
12504      # First remove it from the list of overridden variables, so we can test
12505      # for unknown variables in the end.
12506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12507
12508      # Check if we try to supply an empty value
12509      if test "x$GREP" = x; then
12510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12511$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12513$as_echo_n "checking for GREP... " >&6; }
12514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12515$as_echo "disabled" >&6; }
12516      else
12517        # Check if the provided tool contains a complete path.
12518        tool_specified="$GREP"
12519        tool_basename="${tool_specified##*/}"
12520        if test "x$tool_basename" = "x$tool_specified"; then
12521          # A command without a complete path is provided, search $PATH.
12522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12523$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12524          # Extract the first word of "$tool_basename", so it can be a program name with args.
12525set dummy $tool_basename; ac_word=$2
12526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12527$as_echo_n "checking for $ac_word... " >&6; }
12528if ${ac_cv_path_GREP+:} false; then :
12529  $as_echo_n "(cached) " >&6
12530else
12531  case $GREP in
12532  [\\/]* | ?:[\\/]*)
12533  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12534  ;;
12535  *)
12536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12537for as_dir in $PATH
12538do
12539  IFS=$as_save_IFS
12540  test -z "$as_dir" && as_dir=.
12541    for ac_exec_ext in '' $ac_executable_extensions; do
12542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12543    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12545    break 2
12546  fi
12547done
12548  done
12549IFS=$as_save_IFS
12550
12551  ;;
12552esac
12553fi
12554GREP=$ac_cv_path_GREP
12555if test -n "$GREP"; then
12556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12557$as_echo "$GREP" >&6; }
12558else
12559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12560$as_echo "no" >&6; }
12561fi
12562
12563
12564          if test "x$GREP" = x; then
12565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12566          fi
12567        else
12568          # Otherwise we believe it is a complete path. Use it as it is.
12569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12570$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12572$as_echo_n "checking for GREP... " >&6; }
12573          if test ! -x "$tool_specified"; then
12574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12575$as_echo "not found" >&6; }
12576            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12577          fi
12578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12579$as_echo "$tool_specified" >&6; }
12580        fi
12581      fi
12582    fi
12583  fi
12584
12585
12586  if test "x$GREP" = x; then
12587    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12588  fi
12589
12590
12591
12592
12593  # Publish this variable in the help.
12594
12595
12596  if [ -z "${EGREP+x}" ]; then
12597    # The variable is not set by user, try to locate tool using the code snippet
12598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12599$as_echo_n "checking for egrep... " >&6; }
12600if ${ac_cv_path_EGREP+:} false; then :
12601  $as_echo_n "(cached) " >&6
12602else
12603  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12604   then ac_cv_path_EGREP="$GREP -E"
12605   else
12606     if test -z "$EGREP"; then
12607  ac_path_EGREP_found=false
12608  # Loop through the user's path and test for each of PROGNAME-LIST
12609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12610for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12611do
12612  IFS=$as_save_IFS
12613  test -z "$as_dir" && as_dir=.
12614    for ac_prog in egrep; do
12615    for ac_exec_ext in '' $ac_executable_extensions; do
12616      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12617      as_fn_executable_p "$ac_path_EGREP" || continue
12618# Check for GNU ac_path_EGREP and select it if it is found.
12619  # Check for GNU $ac_path_EGREP
12620case `"$ac_path_EGREP" --version 2>&1` in
12621*GNU*)
12622  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12623*)
12624  ac_count=0
12625  $as_echo_n 0123456789 >"conftest.in"
12626  while :
12627  do
12628    cat "conftest.in" "conftest.in" >"conftest.tmp"
12629    mv "conftest.tmp" "conftest.in"
12630    cp "conftest.in" "conftest.nl"
12631    $as_echo 'EGREP' >> "conftest.nl"
12632    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12633    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12634    as_fn_arith $ac_count + 1 && ac_count=$as_val
12635    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12636      # Best one so far, save it but keep looking for a better one
12637      ac_cv_path_EGREP="$ac_path_EGREP"
12638      ac_path_EGREP_max=$ac_count
12639    fi
12640    # 10*(2^10) chars as input seems more than enough
12641    test $ac_count -gt 10 && break
12642  done
12643  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12644esac
12645
12646      $ac_path_EGREP_found && break 3
12647    done
12648  done
12649  done
12650IFS=$as_save_IFS
12651  if test -z "$ac_cv_path_EGREP"; then
12652    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12653  fi
12654else
12655  ac_cv_path_EGREP=$EGREP
12656fi
12657
12658   fi
12659fi
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12661$as_echo "$ac_cv_path_EGREP" >&6; }
12662 EGREP="$ac_cv_path_EGREP"
12663
12664
12665  else
12666    # The variable is set, but is it from the command line or the environment?
12667
12668    # Try to remove the string !EGREP! from our list.
12669    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12670    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12671      # If it failed, the variable was not from the command line. Ignore it,
12672      # but warn the user (except for BASH, which is always set by the calling BASH).
12673      if test "xEGREP" != xBASH; then
12674        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12675$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12676      fi
12677      # Try to locate tool using the code snippet
12678      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12679$as_echo_n "checking for egrep... " >&6; }
12680if ${ac_cv_path_EGREP+:} false; then :
12681  $as_echo_n "(cached) " >&6
12682else
12683  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12684   then ac_cv_path_EGREP="$GREP -E"
12685   else
12686     if test -z "$EGREP"; then
12687  ac_path_EGREP_found=false
12688  # Loop through the user's path and test for each of PROGNAME-LIST
12689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12690for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12691do
12692  IFS=$as_save_IFS
12693  test -z "$as_dir" && as_dir=.
12694    for ac_prog in egrep; do
12695    for ac_exec_ext in '' $ac_executable_extensions; do
12696      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12697      as_fn_executable_p "$ac_path_EGREP" || continue
12698# Check for GNU ac_path_EGREP and select it if it is found.
12699  # Check for GNU $ac_path_EGREP
12700case `"$ac_path_EGREP" --version 2>&1` in
12701*GNU*)
12702  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12703*)
12704  ac_count=0
12705  $as_echo_n 0123456789 >"conftest.in"
12706  while :
12707  do
12708    cat "conftest.in" "conftest.in" >"conftest.tmp"
12709    mv "conftest.tmp" "conftest.in"
12710    cp "conftest.in" "conftest.nl"
12711    $as_echo 'EGREP' >> "conftest.nl"
12712    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12713    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12714    as_fn_arith $ac_count + 1 && ac_count=$as_val
12715    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12716      # Best one so far, save it but keep looking for a better one
12717      ac_cv_path_EGREP="$ac_path_EGREP"
12718      ac_path_EGREP_max=$ac_count
12719    fi
12720    # 10*(2^10) chars as input seems more than enough
12721    test $ac_count -gt 10 && break
12722  done
12723  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12724esac
12725
12726      $ac_path_EGREP_found && break 3
12727    done
12728  done
12729  done
12730IFS=$as_save_IFS
12731  if test -z "$ac_cv_path_EGREP"; then
12732    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12733  fi
12734else
12735  ac_cv_path_EGREP=$EGREP
12736fi
12737
12738   fi
12739fi
12740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12741$as_echo "$ac_cv_path_EGREP" >&6; }
12742 EGREP="$ac_cv_path_EGREP"
12743
12744
12745    else
12746      # If it succeeded, then it was overridden by the user. We will use it
12747      # for the tool.
12748
12749      # First remove it from the list of overridden variables, so we can test
12750      # for unknown variables in the end.
12751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12752
12753      # Check if we try to supply an empty value
12754      if test "x$EGREP" = x; then
12755        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12756$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12757        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12758$as_echo_n "checking for EGREP... " >&6; }
12759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12760$as_echo "disabled" >&6; }
12761      else
12762        # Check if the provided tool contains a complete path.
12763        tool_specified="$EGREP"
12764        tool_basename="${tool_specified##*/}"
12765        if test "x$tool_basename" = "x$tool_specified"; then
12766          # A command without a complete path is provided, search $PATH.
12767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12768$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12769          # Extract the first word of "$tool_basename", so it can be a program name with args.
12770set dummy $tool_basename; ac_word=$2
12771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12772$as_echo_n "checking for $ac_word... " >&6; }
12773if ${ac_cv_path_EGREP+:} false; then :
12774  $as_echo_n "(cached) " >&6
12775else
12776  case $EGREP in
12777  [\\/]* | ?:[\\/]*)
12778  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12779  ;;
12780  *)
12781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12782for as_dir in $PATH
12783do
12784  IFS=$as_save_IFS
12785  test -z "$as_dir" && as_dir=.
12786    for ac_exec_ext in '' $ac_executable_extensions; do
12787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12788    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12790    break 2
12791  fi
12792done
12793  done
12794IFS=$as_save_IFS
12795
12796  ;;
12797esac
12798fi
12799EGREP=$ac_cv_path_EGREP
12800if test -n "$EGREP"; then
12801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12802$as_echo "$EGREP" >&6; }
12803else
12804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12805$as_echo "no" >&6; }
12806fi
12807
12808
12809          if test "x$EGREP" = x; then
12810            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12811          fi
12812        else
12813          # Otherwise we believe it is a complete path. Use it as it is.
12814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12815$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12816          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12817$as_echo_n "checking for EGREP... " >&6; }
12818          if test ! -x "$tool_specified"; then
12819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12820$as_echo "not found" >&6; }
12821            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12822          fi
12823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12824$as_echo "$tool_specified" >&6; }
12825        fi
12826      fi
12827    fi
12828  fi
12829
12830
12831  if test "x$EGREP" = x; then
12832    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12833  fi
12834
12835
12836
12837
12838  # Publish this variable in the help.
12839
12840
12841  if [ -z "${FGREP+x}" ]; then
12842    # The variable is not set by user, try to locate tool using the code snippet
12843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12844$as_echo_n "checking for fgrep... " >&6; }
12845if ${ac_cv_path_FGREP+:} false; then :
12846  $as_echo_n "(cached) " >&6
12847else
12848  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12849   then ac_cv_path_FGREP="$GREP -F"
12850   else
12851     if test -z "$FGREP"; then
12852  ac_path_FGREP_found=false
12853  # Loop through the user's path and test for each of PROGNAME-LIST
12854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12855for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12856do
12857  IFS=$as_save_IFS
12858  test -z "$as_dir" && as_dir=.
12859    for ac_prog in fgrep; do
12860    for ac_exec_ext in '' $ac_executable_extensions; do
12861      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12862      as_fn_executable_p "$ac_path_FGREP" || continue
12863# Check for GNU ac_path_FGREP and select it if it is found.
12864  # Check for GNU $ac_path_FGREP
12865case `"$ac_path_FGREP" --version 2>&1` in
12866*GNU*)
12867  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12868*)
12869  ac_count=0
12870  $as_echo_n 0123456789 >"conftest.in"
12871  while :
12872  do
12873    cat "conftest.in" "conftest.in" >"conftest.tmp"
12874    mv "conftest.tmp" "conftest.in"
12875    cp "conftest.in" "conftest.nl"
12876    $as_echo 'FGREP' >> "conftest.nl"
12877    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12878    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12879    as_fn_arith $ac_count + 1 && ac_count=$as_val
12880    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12881      # Best one so far, save it but keep looking for a better one
12882      ac_cv_path_FGREP="$ac_path_FGREP"
12883      ac_path_FGREP_max=$ac_count
12884    fi
12885    # 10*(2^10) chars as input seems more than enough
12886    test $ac_count -gt 10 && break
12887  done
12888  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12889esac
12890
12891      $ac_path_FGREP_found && break 3
12892    done
12893  done
12894  done
12895IFS=$as_save_IFS
12896  if test -z "$ac_cv_path_FGREP"; then
12897    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12898  fi
12899else
12900  ac_cv_path_FGREP=$FGREP
12901fi
12902
12903   fi
12904fi
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12906$as_echo "$ac_cv_path_FGREP" >&6; }
12907 FGREP="$ac_cv_path_FGREP"
12908
12909
12910  else
12911    # The variable is set, but is it from the command line or the environment?
12912
12913    # Try to remove the string !FGREP! from our list.
12914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12916      # If it failed, the variable was not from the command line. Ignore it,
12917      # but warn the user (except for BASH, which is always set by the calling BASH).
12918      if test "xFGREP" != xBASH; then
12919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12920$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12921      fi
12922      # Try to locate tool using the code snippet
12923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12924$as_echo_n "checking for fgrep... " >&6; }
12925if ${ac_cv_path_FGREP+:} false; then :
12926  $as_echo_n "(cached) " >&6
12927else
12928  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12929   then ac_cv_path_FGREP="$GREP -F"
12930   else
12931     if test -z "$FGREP"; then
12932  ac_path_FGREP_found=false
12933  # Loop through the user's path and test for each of PROGNAME-LIST
12934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12935for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12936do
12937  IFS=$as_save_IFS
12938  test -z "$as_dir" && as_dir=.
12939    for ac_prog in fgrep; do
12940    for ac_exec_ext in '' $ac_executable_extensions; do
12941      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12942      as_fn_executable_p "$ac_path_FGREP" || continue
12943# Check for GNU ac_path_FGREP and select it if it is found.
12944  # Check for GNU $ac_path_FGREP
12945case `"$ac_path_FGREP" --version 2>&1` in
12946*GNU*)
12947  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12948*)
12949  ac_count=0
12950  $as_echo_n 0123456789 >"conftest.in"
12951  while :
12952  do
12953    cat "conftest.in" "conftest.in" >"conftest.tmp"
12954    mv "conftest.tmp" "conftest.in"
12955    cp "conftest.in" "conftest.nl"
12956    $as_echo 'FGREP' >> "conftest.nl"
12957    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12958    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12959    as_fn_arith $ac_count + 1 && ac_count=$as_val
12960    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12961      # Best one so far, save it but keep looking for a better one
12962      ac_cv_path_FGREP="$ac_path_FGREP"
12963      ac_path_FGREP_max=$ac_count
12964    fi
12965    # 10*(2^10) chars as input seems more than enough
12966    test $ac_count -gt 10 && break
12967  done
12968  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12969esac
12970
12971      $ac_path_FGREP_found && break 3
12972    done
12973  done
12974  done
12975IFS=$as_save_IFS
12976  if test -z "$ac_cv_path_FGREP"; then
12977    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12978  fi
12979else
12980  ac_cv_path_FGREP=$FGREP
12981fi
12982
12983   fi
12984fi
12985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12986$as_echo "$ac_cv_path_FGREP" >&6; }
12987 FGREP="$ac_cv_path_FGREP"
12988
12989
12990    else
12991      # If it succeeded, then it was overridden by the user. We will use it
12992      # for the tool.
12993
12994      # First remove it from the list of overridden variables, so we can test
12995      # for unknown variables in the end.
12996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12997
12998      # Check if we try to supply an empty value
12999      if test "x$FGREP" = x; then
13000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13001$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13003$as_echo_n "checking for FGREP... " >&6; }
13004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13005$as_echo "disabled" >&6; }
13006      else
13007        # Check if the provided tool contains a complete path.
13008        tool_specified="$FGREP"
13009        tool_basename="${tool_specified##*/}"
13010        if test "x$tool_basename" = "x$tool_specified"; then
13011          # A command without a complete path is provided, search $PATH.
13012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13013$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13014          # Extract the first word of "$tool_basename", so it can be a program name with args.
13015set dummy $tool_basename; ac_word=$2
13016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13017$as_echo_n "checking for $ac_word... " >&6; }
13018if ${ac_cv_path_FGREP+:} false; then :
13019  $as_echo_n "(cached) " >&6
13020else
13021  case $FGREP in
13022  [\\/]* | ?:[\\/]*)
13023  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13024  ;;
13025  *)
13026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13027for as_dir in $PATH
13028do
13029  IFS=$as_save_IFS
13030  test -z "$as_dir" && as_dir=.
13031    for ac_exec_ext in '' $ac_executable_extensions; do
13032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13033    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13035    break 2
13036  fi
13037done
13038  done
13039IFS=$as_save_IFS
13040
13041  ;;
13042esac
13043fi
13044FGREP=$ac_cv_path_FGREP
13045if test -n "$FGREP"; then
13046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13047$as_echo "$FGREP" >&6; }
13048else
13049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13050$as_echo "no" >&6; }
13051fi
13052
13053
13054          if test "x$FGREP" = x; then
13055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13056          fi
13057        else
13058          # Otherwise we believe it is a complete path. Use it as it is.
13059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13060$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13062$as_echo_n "checking for FGREP... " >&6; }
13063          if test ! -x "$tool_specified"; then
13064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13065$as_echo "not found" >&6; }
13066            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13067          fi
13068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13069$as_echo "$tool_specified" >&6; }
13070        fi
13071      fi
13072    fi
13073  fi
13074
13075
13076  if test "x$FGREP" = x; then
13077    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13078  fi
13079
13080
13081
13082
13083  # Publish this variable in the help.
13084
13085
13086  if [ -z "${SED+x}" ]; then
13087    # The variable is not set by user, try to locate tool using the code snippet
13088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13089$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13090if ${ac_cv_path_SED+:} false; then :
13091  $as_echo_n "(cached) " >&6
13092else
13093            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13094     for ac_i in 1 2 3 4 5 6 7; do
13095       ac_script="$ac_script$as_nl$ac_script"
13096     done
13097     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13098     { ac_script=; unset ac_script;}
13099     if test -z "$SED"; then
13100  ac_path_SED_found=false
13101  # Loop through the user's path and test for each of PROGNAME-LIST
13102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13103for as_dir in $PATH
13104do
13105  IFS=$as_save_IFS
13106  test -z "$as_dir" && as_dir=.
13107    for ac_prog in sed gsed; do
13108    for ac_exec_ext in '' $ac_executable_extensions; do
13109      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13110      as_fn_executable_p "$ac_path_SED" || continue
13111# Check for GNU ac_path_SED and select it if it is found.
13112  # Check for GNU $ac_path_SED
13113case `"$ac_path_SED" --version 2>&1` in
13114*GNU*)
13115  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13116*)
13117  ac_count=0
13118  $as_echo_n 0123456789 >"conftest.in"
13119  while :
13120  do
13121    cat "conftest.in" "conftest.in" >"conftest.tmp"
13122    mv "conftest.tmp" "conftest.in"
13123    cp "conftest.in" "conftest.nl"
13124    $as_echo '' >> "conftest.nl"
13125    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13126    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13127    as_fn_arith $ac_count + 1 && ac_count=$as_val
13128    if test $ac_count -gt ${ac_path_SED_max-0}; then
13129      # Best one so far, save it but keep looking for a better one
13130      ac_cv_path_SED="$ac_path_SED"
13131      ac_path_SED_max=$ac_count
13132    fi
13133    # 10*(2^10) chars as input seems more than enough
13134    test $ac_count -gt 10 && break
13135  done
13136  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13137esac
13138
13139      $ac_path_SED_found && break 3
13140    done
13141  done
13142  done
13143IFS=$as_save_IFS
13144  if test -z "$ac_cv_path_SED"; then
13145    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13146  fi
13147else
13148  ac_cv_path_SED=$SED
13149fi
13150
13151fi
13152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13153$as_echo "$ac_cv_path_SED" >&6; }
13154 SED="$ac_cv_path_SED"
13155  rm -f conftest.sed
13156
13157  else
13158    # The variable is set, but is it from the command line or the environment?
13159
13160    # Try to remove the string !SED! from our list.
13161    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13162    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13163      # If it failed, the variable was not from the command line. Ignore it,
13164      # but warn the user (except for BASH, which is always set by the calling BASH).
13165      if test "xSED" != xBASH; then
13166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13167$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13168      fi
13169      # Try to locate tool using the code snippet
13170      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13171$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13172if ${ac_cv_path_SED+:} false; then :
13173  $as_echo_n "(cached) " >&6
13174else
13175            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13176     for ac_i in 1 2 3 4 5 6 7; do
13177       ac_script="$ac_script$as_nl$ac_script"
13178     done
13179     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13180     { ac_script=; unset ac_script;}
13181     if test -z "$SED"; then
13182  ac_path_SED_found=false
13183  # Loop through the user's path and test for each of PROGNAME-LIST
13184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13185for as_dir in $PATH
13186do
13187  IFS=$as_save_IFS
13188  test -z "$as_dir" && as_dir=.
13189    for ac_prog in sed gsed; do
13190    for ac_exec_ext in '' $ac_executable_extensions; do
13191      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13192      as_fn_executable_p "$ac_path_SED" || continue
13193# Check for GNU ac_path_SED and select it if it is found.
13194  # Check for GNU $ac_path_SED
13195case `"$ac_path_SED" --version 2>&1` in
13196*GNU*)
13197  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13198*)
13199  ac_count=0
13200  $as_echo_n 0123456789 >"conftest.in"
13201  while :
13202  do
13203    cat "conftest.in" "conftest.in" >"conftest.tmp"
13204    mv "conftest.tmp" "conftest.in"
13205    cp "conftest.in" "conftest.nl"
13206    $as_echo '' >> "conftest.nl"
13207    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13208    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13209    as_fn_arith $ac_count + 1 && ac_count=$as_val
13210    if test $ac_count -gt ${ac_path_SED_max-0}; then
13211      # Best one so far, save it but keep looking for a better one
13212      ac_cv_path_SED="$ac_path_SED"
13213      ac_path_SED_max=$ac_count
13214    fi
13215    # 10*(2^10) chars as input seems more than enough
13216    test $ac_count -gt 10 && break
13217  done
13218  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13219esac
13220
13221      $ac_path_SED_found && break 3
13222    done
13223  done
13224  done
13225IFS=$as_save_IFS
13226  if test -z "$ac_cv_path_SED"; then
13227    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13228  fi
13229else
13230  ac_cv_path_SED=$SED
13231fi
13232
13233fi
13234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13235$as_echo "$ac_cv_path_SED" >&6; }
13236 SED="$ac_cv_path_SED"
13237  rm -f conftest.sed
13238
13239    else
13240      # If it succeeded, then it was overridden by the user. We will use it
13241      # for the tool.
13242
13243      # First remove it from the list of overridden variables, so we can test
13244      # for unknown variables in the end.
13245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13246
13247      # Check if we try to supply an empty value
13248      if test "x$SED" = x; then
13249        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13250$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13252$as_echo_n "checking for SED... " >&6; }
13253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13254$as_echo "disabled" >&6; }
13255      else
13256        # Check if the provided tool contains a complete path.
13257        tool_specified="$SED"
13258        tool_basename="${tool_specified##*/}"
13259        if test "x$tool_basename" = "x$tool_specified"; then
13260          # A command without a complete path is provided, search $PATH.
13261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13262$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13263          # Extract the first word of "$tool_basename", so it can be a program name with args.
13264set dummy $tool_basename; ac_word=$2
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13266$as_echo_n "checking for $ac_word... " >&6; }
13267if ${ac_cv_path_SED+:} false; then :
13268  $as_echo_n "(cached) " >&6
13269else
13270  case $SED in
13271  [\\/]* | ?:[\\/]*)
13272  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13273  ;;
13274  *)
13275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13276for as_dir in $PATH
13277do
13278  IFS=$as_save_IFS
13279  test -z "$as_dir" && as_dir=.
13280    for ac_exec_ext in '' $ac_executable_extensions; do
13281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13282    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13284    break 2
13285  fi
13286done
13287  done
13288IFS=$as_save_IFS
13289
13290  ;;
13291esac
13292fi
13293SED=$ac_cv_path_SED
13294if test -n "$SED"; then
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13296$as_echo "$SED" >&6; }
13297else
13298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13299$as_echo "no" >&6; }
13300fi
13301
13302
13303          if test "x$SED" = x; then
13304            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13305          fi
13306        else
13307          # Otherwise we believe it is a complete path. Use it as it is.
13308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13309$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13310          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13311$as_echo_n "checking for SED... " >&6; }
13312          if test ! -x "$tool_specified"; then
13313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13314$as_echo "not found" >&6; }
13315            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13316          fi
13317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13318$as_echo "$tool_specified" >&6; }
13319        fi
13320      fi
13321    fi
13322  fi
13323
13324
13325  if test "x$SED" = x; then
13326    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13327  fi
13328
13329
13330
13331  # Always force rm.
13332  RM="$RM -f"
13333
13334  # pwd behaves differently on various platforms and some don't support the -L flag.
13335  # Always use the bash builtin pwd to get uniform behavior.
13336  THEPWDCMD=pwd
13337
13338  # These are not required on all platforms
13339
13340
13341  # Publish this variable in the help.
13342
13343
13344  if [ -z "${CYGPATH+x}" ]; then
13345    # The variable is not set by user, try to locate tool using the code snippet
13346    for ac_prog in cygpath
13347do
13348  # Extract the first word of "$ac_prog", so it can be a program name with args.
13349set dummy $ac_prog; ac_word=$2
13350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13351$as_echo_n "checking for $ac_word... " >&6; }
13352if ${ac_cv_path_CYGPATH+:} false; then :
13353  $as_echo_n "(cached) " >&6
13354else
13355  case $CYGPATH in
13356  [\\/]* | ?:[\\/]*)
13357  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13358  ;;
13359  *)
13360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13361for as_dir in $PATH
13362do
13363  IFS=$as_save_IFS
13364  test -z "$as_dir" && as_dir=.
13365    for ac_exec_ext in '' $ac_executable_extensions; do
13366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13367    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13369    break 2
13370  fi
13371done
13372  done
13373IFS=$as_save_IFS
13374
13375  ;;
13376esac
13377fi
13378CYGPATH=$ac_cv_path_CYGPATH
13379if test -n "$CYGPATH"; then
13380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13381$as_echo "$CYGPATH" >&6; }
13382else
13383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13384$as_echo "no" >&6; }
13385fi
13386
13387
13388  test -n "$CYGPATH" && break
13389done
13390
13391  else
13392    # The variable is set, but is it from the command line or the environment?
13393
13394    # Try to remove the string !CYGPATH! from our list.
13395    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13396    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13397      # If it failed, the variable was not from the command line. Ignore it,
13398      # but warn the user (except for BASH, which is always set by the calling BASH).
13399      if test "xCYGPATH" != xBASH; then
13400        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13401$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13402      fi
13403      # Try to locate tool using the code snippet
13404      for ac_prog in cygpath
13405do
13406  # Extract the first word of "$ac_prog", so it can be a program name with args.
13407set dummy $ac_prog; ac_word=$2
13408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13409$as_echo_n "checking for $ac_word... " >&6; }
13410if ${ac_cv_path_CYGPATH+:} false; then :
13411  $as_echo_n "(cached) " >&6
13412else
13413  case $CYGPATH in
13414  [\\/]* | ?:[\\/]*)
13415  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13416  ;;
13417  *)
13418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13419for as_dir in $PATH
13420do
13421  IFS=$as_save_IFS
13422  test -z "$as_dir" && as_dir=.
13423    for ac_exec_ext in '' $ac_executable_extensions; do
13424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13425    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13427    break 2
13428  fi
13429done
13430  done
13431IFS=$as_save_IFS
13432
13433  ;;
13434esac
13435fi
13436CYGPATH=$ac_cv_path_CYGPATH
13437if test -n "$CYGPATH"; then
13438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13439$as_echo "$CYGPATH" >&6; }
13440else
13441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13442$as_echo "no" >&6; }
13443fi
13444
13445
13446  test -n "$CYGPATH" && break
13447done
13448
13449    else
13450      # If it succeeded, then it was overridden by the user. We will use it
13451      # for the tool.
13452
13453      # First remove it from the list of overridden variables, so we can test
13454      # for unknown variables in the end.
13455      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13456
13457      # Check if we try to supply an empty value
13458      if test "x$CYGPATH" = x; then
13459        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13460$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13461        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13462$as_echo_n "checking for CYGPATH... " >&6; }
13463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13464$as_echo "disabled" >&6; }
13465      else
13466        # Check if the provided tool contains a complete path.
13467        tool_specified="$CYGPATH"
13468        tool_basename="${tool_specified##*/}"
13469        if test "x$tool_basename" = "x$tool_specified"; then
13470          # A command without a complete path is provided, search $PATH.
13471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13472$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13473          # Extract the first word of "$tool_basename", so it can be a program name with args.
13474set dummy $tool_basename; ac_word=$2
13475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13476$as_echo_n "checking for $ac_word... " >&6; }
13477if ${ac_cv_path_CYGPATH+:} false; then :
13478  $as_echo_n "(cached) " >&6
13479else
13480  case $CYGPATH in
13481  [\\/]* | ?:[\\/]*)
13482  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13483  ;;
13484  *)
13485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13486for as_dir in $PATH
13487do
13488  IFS=$as_save_IFS
13489  test -z "$as_dir" && as_dir=.
13490    for ac_exec_ext in '' $ac_executable_extensions; do
13491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13492    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13494    break 2
13495  fi
13496done
13497  done
13498IFS=$as_save_IFS
13499
13500  ;;
13501esac
13502fi
13503CYGPATH=$ac_cv_path_CYGPATH
13504if test -n "$CYGPATH"; then
13505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13506$as_echo "$CYGPATH" >&6; }
13507else
13508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13509$as_echo "no" >&6; }
13510fi
13511
13512
13513          if test "x$CYGPATH" = x; then
13514            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13515          fi
13516        else
13517          # Otherwise we believe it is a complete path. Use it as it is.
13518          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13519$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13520          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13521$as_echo_n "checking for CYGPATH... " >&6; }
13522          if test ! -x "$tool_specified"; then
13523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13524$as_echo "not found" >&6; }
13525            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13526          fi
13527          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13528$as_echo "$tool_specified" >&6; }
13529        fi
13530      fi
13531    fi
13532  fi
13533
13534
13535
13536
13537  # Publish this variable in the help.
13538
13539
13540  if [ -z "${READLINK+x}" ]; then
13541    # The variable is not set by user, try to locate tool using the code snippet
13542    for ac_prog in greadlink readlink
13543do
13544  # Extract the first word of "$ac_prog", so it can be a program name with args.
13545set dummy $ac_prog; ac_word=$2
13546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13547$as_echo_n "checking for $ac_word... " >&6; }
13548if ${ac_cv_path_READLINK+:} false; then :
13549  $as_echo_n "(cached) " >&6
13550else
13551  case $READLINK in
13552  [\\/]* | ?:[\\/]*)
13553  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13554  ;;
13555  *)
13556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13557for as_dir in $PATH
13558do
13559  IFS=$as_save_IFS
13560  test -z "$as_dir" && as_dir=.
13561    for ac_exec_ext in '' $ac_executable_extensions; do
13562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13563    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13565    break 2
13566  fi
13567done
13568  done
13569IFS=$as_save_IFS
13570
13571  ;;
13572esac
13573fi
13574READLINK=$ac_cv_path_READLINK
13575if test -n "$READLINK"; then
13576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13577$as_echo "$READLINK" >&6; }
13578else
13579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13580$as_echo "no" >&6; }
13581fi
13582
13583
13584  test -n "$READLINK" && break
13585done
13586
13587  else
13588    # The variable is set, but is it from the command line or the environment?
13589
13590    # Try to remove the string !READLINK! from our list.
13591    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13592    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13593      # If it failed, the variable was not from the command line. Ignore it,
13594      # but warn the user (except for BASH, which is always set by the calling BASH).
13595      if test "xREADLINK" != xBASH; then
13596        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13597$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13598      fi
13599      # Try to locate tool using the code snippet
13600      for ac_prog in greadlink readlink
13601do
13602  # Extract the first word of "$ac_prog", so it can be a program name with args.
13603set dummy $ac_prog; ac_word=$2
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13605$as_echo_n "checking for $ac_word... " >&6; }
13606if ${ac_cv_path_READLINK+:} false; then :
13607  $as_echo_n "(cached) " >&6
13608else
13609  case $READLINK in
13610  [\\/]* | ?:[\\/]*)
13611  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13612  ;;
13613  *)
13614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13615for as_dir in $PATH
13616do
13617  IFS=$as_save_IFS
13618  test -z "$as_dir" && as_dir=.
13619    for ac_exec_ext in '' $ac_executable_extensions; do
13620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13621    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13623    break 2
13624  fi
13625done
13626  done
13627IFS=$as_save_IFS
13628
13629  ;;
13630esac
13631fi
13632READLINK=$ac_cv_path_READLINK
13633if test -n "$READLINK"; then
13634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13635$as_echo "$READLINK" >&6; }
13636else
13637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13638$as_echo "no" >&6; }
13639fi
13640
13641
13642  test -n "$READLINK" && break
13643done
13644
13645    else
13646      # If it succeeded, then it was overridden by the user. We will use it
13647      # for the tool.
13648
13649      # First remove it from the list of overridden variables, so we can test
13650      # for unknown variables in the end.
13651      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13652
13653      # Check if we try to supply an empty value
13654      if test "x$READLINK" = x; then
13655        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13656$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13658$as_echo_n "checking for READLINK... " >&6; }
13659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13660$as_echo "disabled" >&6; }
13661      else
13662        # Check if the provided tool contains a complete path.
13663        tool_specified="$READLINK"
13664        tool_basename="${tool_specified##*/}"
13665        if test "x$tool_basename" = "x$tool_specified"; then
13666          # A command without a complete path is provided, search $PATH.
13667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13668$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13669          # Extract the first word of "$tool_basename", so it can be a program name with args.
13670set dummy $tool_basename; ac_word=$2
13671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13672$as_echo_n "checking for $ac_word... " >&6; }
13673if ${ac_cv_path_READLINK+:} false; then :
13674  $as_echo_n "(cached) " >&6
13675else
13676  case $READLINK in
13677  [\\/]* | ?:[\\/]*)
13678  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13679  ;;
13680  *)
13681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13682for as_dir in $PATH
13683do
13684  IFS=$as_save_IFS
13685  test -z "$as_dir" && as_dir=.
13686    for ac_exec_ext in '' $ac_executable_extensions; do
13687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13688    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13690    break 2
13691  fi
13692done
13693  done
13694IFS=$as_save_IFS
13695
13696  ;;
13697esac
13698fi
13699READLINK=$ac_cv_path_READLINK
13700if test -n "$READLINK"; then
13701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13702$as_echo "$READLINK" >&6; }
13703else
13704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13705$as_echo "no" >&6; }
13706fi
13707
13708
13709          if test "x$READLINK" = x; then
13710            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13711          fi
13712        else
13713          # Otherwise we believe it is a complete path. Use it as it is.
13714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13715$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13716          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13717$as_echo_n "checking for READLINK... " >&6; }
13718          if test ! -x "$tool_specified"; then
13719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13720$as_echo "not found" >&6; }
13721            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13722          fi
13723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13724$as_echo "$tool_specified" >&6; }
13725        fi
13726      fi
13727    fi
13728  fi
13729
13730
13731
13732
13733  # Publish this variable in the help.
13734
13735
13736  if [ -z "${DF+x}" ]; then
13737    # The variable is not set by user, try to locate tool using the code snippet
13738    for ac_prog in df
13739do
13740  # Extract the first word of "$ac_prog", so it can be a program name with args.
13741set dummy $ac_prog; ac_word=$2
13742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13743$as_echo_n "checking for $ac_word... " >&6; }
13744if ${ac_cv_path_DF+:} false; then :
13745  $as_echo_n "(cached) " >&6
13746else
13747  case $DF in
13748  [\\/]* | ?:[\\/]*)
13749  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13750  ;;
13751  *)
13752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13753for as_dir in $PATH
13754do
13755  IFS=$as_save_IFS
13756  test -z "$as_dir" && as_dir=.
13757    for ac_exec_ext in '' $ac_executable_extensions; do
13758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13759    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13761    break 2
13762  fi
13763done
13764  done
13765IFS=$as_save_IFS
13766
13767  ;;
13768esac
13769fi
13770DF=$ac_cv_path_DF
13771if test -n "$DF"; then
13772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13773$as_echo "$DF" >&6; }
13774else
13775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13776$as_echo "no" >&6; }
13777fi
13778
13779
13780  test -n "$DF" && break
13781done
13782
13783  else
13784    # The variable is set, but is it from the command line or the environment?
13785
13786    # Try to remove the string !DF! from our list.
13787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13789      # If it failed, the variable was not from the command line. Ignore it,
13790      # but warn the user (except for BASH, which is always set by the calling BASH).
13791      if test "xDF" != xBASH; then
13792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13793$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13794      fi
13795      # Try to locate tool using the code snippet
13796      for ac_prog in df
13797do
13798  # Extract the first word of "$ac_prog", so it can be a program name with args.
13799set dummy $ac_prog; ac_word=$2
13800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13801$as_echo_n "checking for $ac_word... " >&6; }
13802if ${ac_cv_path_DF+:} false; then :
13803  $as_echo_n "(cached) " >&6
13804else
13805  case $DF in
13806  [\\/]* | ?:[\\/]*)
13807  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13808  ;;
13809  *)
13810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13811for as_dir in $PATH
13812do
13813  IFS=$as_save_IFS
13814  test -z "$as_dir" && as_dir=.
13815    for ac_exec_ext in '' $ac_executable_extensions; do
13816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13817    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13819    break 2
13820  fi
13821done
13822  done
13823IFS=$as_save_IFS
13824
13825  ;;
13826esac
13827fi
13828DF=$ac_cv_path_DF
13829if test -n "$DF"; then
13830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13831$as_echo "$DF" >&6; }
13832else
13833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13834$as_echo "no" >&6; }
13835fi
13836
13837
13838  test -n "$DF" && break
13839done
13840
13841    else
13842      # If it succeeded, then it was overridden by the user. We will use it
13843      # for the tool.
13844
13845      # First remove it from the list of overridden variables, so we can test
13846      # for unknown variables in the end.
13847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13848
13849      # Check if we try to supply an empty value
13850      if test "x$DF" = x; then
13851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13852$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13854$as_echo_n "checking for DF... " >&6; }
13855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13856$as_echo "disabled" >&6; }
13857      else
13858        # Check if the provided tool contains a complete path.
13859        tool_specified="$DF"
13860        tool_basename="${tool_specified##*/}"
13861        if test "x$tool_basename" = "x$tool_specified"; then
13862          # A command without a complete path is provided, search $PATH.
13863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13864$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13865          # Extract the first word of "$tool_basename", so it can be a program name with args.
13866set dummy $tool_basename; ac_word=$2
13867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13868$as_echo_n "checking for $ac_word... " >&6; }
13869if ${ac_cv_path_DF+:} false; then :
13870  $as_echo_n "(cached) " >&6
13871else
13872  case $DF in
13873  [\\/]* | ?:[\\/]*)
13874  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13875  ;;
13876  *)
13877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13878for as_dir in $PATH
13879do
13880  IFS=$as_save_IFS
13881  test -z "$as_dir" && as_dir=.
13882    for ac_exec_ext in '' $ac_executable_extensions; do
13883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13884    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13886    break 2
13887  fi
13888done
13889  done
13890IFS=$as_save_IFS
13891
13892  ;;
13893esac
13894fi
13895DF=$ac_cv_path_DF
13896if test -n "$DF"; then
13897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13898$as_echo "$DF" >&6; }
13899else
13900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13901$as_echo "no" >&6; }
13902fi
13903
13904
13905          if test "x$DF" = x; then
13906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13907          fi
13908        else
13909          # Otherwise we believe it is a complete path. Use it as it is.
13910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13911$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13913$as_echo_n "checking for DF... " >&6; }
13914          if test ! -x "$tool_specified"; then
13915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13916$as_echo "not found" >&6; }
13917            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13918          fi
13919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13920$as_echo "$tool_specified" >&6; }
13921        fi
13922      fi
13923    fi
13924  fi
13925
13926
13927
13928
13929  # Publish this variable in the help.
13930
13931
13932  if [ -z "${CPIO+x}" ]; then
13933    # The variable is not set by user, try to locate tool using the code snippet
13934    for ac_prog in cpio bsdcpio
13935do
13936  # Extract the first word of "$ac_prog", so it can be a program name with args.
13937set dummy $ac_prog; ac_word=$2
13938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13939$as_echo_n "checking for $ac_word... " >&6; }
13940if ${ac_cv_path_CPIO+:} false; then :
13941  $as_echo_n "(cached) " >&6
13942else
13943  case $CPIO in
13944  [\\/]* | ?:[\\/]*)
13945  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13946  ;;
13947  *)
13948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13949for as_dir in $PATH
13950do
13951  IFS=$as_save_IFS
13952  test -z "$as_dir" && as_dir=.
13953    for ac_exec_ext in '' $ac_executable_extensions; do
13954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13955    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13957    break 2
13958  fi
13959done
13960  done
13961IFS=$as_save_IFS
13962
13963  ;;
13964esac
13965fi
13966CPIO=$ac_cv_path_CPIO
13967if test -n "$CPIO"; then
13968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13969$as_echo "$CPIO" >&6; }
13970else
13971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13972$as_echo "no" >&6; }
13973fi
13974
13975
13976  test -n "$CPIO" && break
13977done
13978
13979  else
13980    # The variable is set, but is it from the command line or the environment?
13981
13982    # Try to remove the string !CPIO! from our list.
13983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13985      # If it failed, the variable was not from the command line. Ignore it,
13986      # but warn the user (except for BASH, which is always set by the calling BASH).
13987      if test "xCPIO" != xBASH; then
13988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13989$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13990      fi
13991      # Try to locate tool using the code snippet
13992      for ac_prog in cpio bsdcpio
13993do
13994  # Extract the first word of "$ac_prog", so it can be a program name with args.
13995set dummy $ac_prog; 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_CPIO+:} false; then :
13999  $as_echo_n "(cached) " >&6
14000else
14001  case $CPIO in
14002  [\\/]* | ?:[\\/]*)
14003  ac_cv_path_CPIO="$CPIO" # 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_CPIO="$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
14024CPIO=$ac_cv_path_CPIO
14025if test -n "$CPIO"; then
14026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14027$as_echo "$CPIO" >&6; }
14028else
14029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14030$as_echo "no" >&6; }
14031fi
14032
14033
14034  test -n "$CPIO" && break
14035done
14036
14037    else
14038      # If it succeeded, then it was overridden by the user. We will use it
14039      # for the tool.
14040
14041      # First remove it from the list of overridden variables, so we can test
14042      # for unknown variables in the end.
14043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14044
14045      # Check if we try to supply an empty value
14046      if test "x$CPIO" = x; then
14047        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14048$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14050$as_echo_n "checking for CPIO... " >&6; }
14051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14052$as_echo "disabled" >&6; }
14053      else
14054        # Check if the provided tool contains a complete path.
14055        tool_specified="$CPIO"
14056        tool_basename="${tool_specified##*/}"
14057        if test "x$tool_basename" = "x$tool_specified"; then
14058          # A command without a complete path is provided, search $PATH.
14059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14060$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14061          # Extract the first word of "$tool_basename", so it can be a program name with args.
14062set dummy $tool_basename; ac_word=$2
14063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14064$as_echo_n "checking for $ac_word... " >&6; }
14065if ${ac_cv_path_CPIO+:} false; then :
14066  $as_echo_n "(cached) " >&6
14067else
14068  case $CPIO in
14069  [\\/]* | ?:[\\/]*)
14070  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14071  ;;
14072  *)
14073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14074for as_dir in $PATH
14075do
14076  IFS=$as_save_IFS
14077  test -z "$as_dir" && as_dir=.
14078    for ac_exec_ext in '' $ac_executable_extensions; do
14079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14080    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14082    break 2
14083  fi
14084done
14085  done
14086IFS=$as_save_IFS
14087
14088  ;;
14089esac
14090fi
14091CPIO=$ac_cv_path_CPIO
14092if test -n "$CPIO"; then
14093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14094$as_echo "$CPIO" >&6; }
14095else
14096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14097$as_echo "no" >&6; }
14098fi
14099
14100
14101          if test "x$CPIO" = x; then
14102            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14103          fi
14104        else
14105          # Otherwise we believe it is a complete path. Use it as it is.
14106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14107$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14108          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14109$as_echo_n "checking for CPIO... " >&6; }
14110          if test ! -x "$tool_specified"; then
14111            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14112$as_echo "not found" >&6; }
14113            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14114          fi
14115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14116$as_echo "$tool_specified" >&6; }
14117        fi
14118      fi
14119    fi
14120  fi
14121
14122
14123
14124
14125  # Publish this variable in the help.
14126
14127
14128  if [ -z "${NICE+x}" ]; then
14129    # The variable is not set by user, try to locate tool using the code snippet
14130    for ac_prog in nice
14131do
14132  # Extract the first word of "$ac_prog", so it can be a program name with args.
14133set dummy $ac_prog; ac_word=$2
14134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14135$as_echo_n "checking for $ac_word... " >&6; }
14136if ${ac_cv_path_NICE+:} false; then :
14137  $as_echo_n "(cached) " >&6
14138else
14139  case $NICE in
14140  [\\/]* | ?:[\\/]*)
14141  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14142  ;;
14143  *)
14144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14145for as_dir in $PATH
14146do
14147  IFS=$as_save_IFS
14148  test -z "$as_dir" && as_dir=.
14149    for ac_exec_ext in '' $ac_executable_extensions; do
14150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14151    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14153    break 2
14154  fi
14155done
14156  done
14157IFS=$as_save_IFS
14158
14159  ;;
14160esac
14161fi
14162NICE=$ac_cv_path_NICE
14163if test -n "$NICE"; then
14164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14165$as_echo "$NICE" >&6; }
14166else
14167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14168$as_echo "no" >&6; }
14169fi
14170
14171
14172  test -n "$NICE" && break
14173done
14174
14175  else
14176    # The variable is set, but is it from the command line or the environment?
14177
14178    # Try to remove the string !NICE! from our list.
14179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14181      # If it failed, the variable was not from the command line. Ignore it,
14182      # but warn the user (except for BASH, which is always set by the calling BASH).
14183      if test "xNICE" != xBASH; then
14184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14185$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14186      fi
14187      # Try to locate tool using the code snippet
14188      for ac_prog in nice
14189do
14190  # Extract the first word of "$ac_prog", so it can be a program name with args.
14191set dummy $ac_prog; ac_word=$2
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14193$as_echo_n "checking for $ac_word... " >&6; }
14194if ${ac_cv_path_NICE+:} false; then :
14195  $as_echo_n "(cached) " >&6
14196else
14197  case $NICE in
14198  [\\/]* | ?:[\\/]*)
14199  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14200  ;;
14201  *)
14202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14203for as_dir in $PATH
14204do
14205  IFS=$as_save_IFS
14206  test -z "$as_dir" && as_dir=.
14207    for ac_exec_ext in '' $ac_executable_extensions; do
14208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14209    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14211    break 2
14212  fi
14213done
14214  done
14215IFS=$as_save_IFS
14216
14217  ;;
14218esac
14219fi
14220NICE=$ac_cv_path_NICE
14221if test -n "$NICE"; then
14222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14223$as_echo "$NICE" >&6; }
14224else
14225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14226$as_echo "no" >&6; }
14227fi
14228
14229
14230  test -n "$NICE" && break
14231done
14232
14233    else
14234      # If it succeeded, then it was overridden by the user. We will use it
14235      # for the tool.
14236
14237      # First remove it from the list of overridden variables, so we can test
14238      # for unknown variables in the end.
14239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14240
14241      # Check if we try to supply an empty value
14242      if test "x$NICE" = x; then
14243        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14244$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14246$as_echo_n "checking for NICE... " >&6; }
14247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14248$as_echo "disabled" >&6; }
14249      else
14250        # Check if the provided tool contains a complete path.
14251        tool_specified="$NICE"
14252        tool_basename="${tool_specified##*/}"
14253        if test "x$tool_basename" = "x$tool_specified"; then
14254          # A command without a complete path is provided, search $PATH.
14255          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14256$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14257          # Extract the first word of "$tool_basename", so it can be a program name with args.
14258set dummy $tool_basename; ac_word=$2
14259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14260$as_echo_n "checking for $ac_word... " >&6; }
14261if ${ac_cv_path_NICE+:} false; then :
14262  $as_echo_n "(cached) " >&6
14263else
14264  case $NICE in
14265  [\\/]* | ?:[\\/]*)
14266  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14267  ;;
14268  *)
14269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14270for as_dir in $PATH
14271do
14272  IFS=$as_save_IFS
14273  test -z "$as_dir" && as_dir=.
14274    for ac_exec_ext in '' $ac_executable_extensions; do
14275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14276    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14278    break 2
14279  fi
14280done
14281  done
14282IFS=$as_save_IFS
14283
14284  ;;
14285esac
14286fi
14287NICE=$ac_cv_path_NICE
14288if test -n "$NICE"; then
14289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14290$as_echo "$NICE" >&6; }
14291else
14292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14293$as_echo "no" >&6; }
14294fi
14295
14296
14297          if test "x$NICE" = x; then
14298            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14299          fi
14300        else
14301          # Otherwise we believe it is a complete path. Use it as it is.
14302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14303$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14304          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14305$as_echo_n "checking for NICE... " >&6; }
14306          if test ! -x "$tool_specified"; then
14307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14308$as_echo "not found" >&6; }
14309            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14310          fi
14311          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14312$as_echo "$tool_specified" >&6; }
14313        fi
14314      fi
14315    fi
14316  fi
14317
14318
14319
14320
14321# Now we can determine OpenJDK build and target platforms. This is required to
14322# have early on.
14323# Make sure we can run config.sub.
14324$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14325  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14326
14327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14328$as_echo_n "checking build system type... " >&6; }
14329if ${ac_cv_build+:} false; then :
14330  $as_echo_n "(cached) " >&6
14331else
14332  ac_build_alias=$build_alias
14333test "x$ac_build_alias" = x &&
14334  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14335test "x$ac_build_alias" = x &&
14336  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14337ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14338  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14339
14340fi
14341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14342$as_echo "$ac_cv_build" >&6; }
14343case $ac_cv_build in
14344*-*-*) ;;
14345*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14346esac
14347build=$ac_cv_build
14348ac_save_IFS=$IFS; IFS='-'
14349set x $ac_cv_build
14350shift
14351build_cpu=$1
14352build_vendor=$2
14353shift; shift
14354# Remember, the first character of IFS is used to create $*,
14355# except with old shells:
14356build_os=$*
14357IFS=$ac_save_IFS
14358case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14359
14360
14361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14362$as_echo_n "checking host system type... " >&6; }
14363if ${ac_cv_host+:} false; then :
14364  $as_echo_n "(cached) " >&6
14365else
14366  if test "x$host_alias" = x; then
14367  ac_cv_host=$ac_cv_build
14368else
14369  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14370    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14371fi
14372
14373fi
14374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14375$as_echo "$ac_cv_host" >&6; }
14376case $ac_cv_host in
14377*-*-*) ;;
14378*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14379esac
14380host=$ac_cv_host
14381ac_save_IFS=$IFS; IFS='-'
14382set x $ac_cv_host
14383shift
14384host_cpu=$1
14385host_vendor=$2
14386shift; shift
14387# Remember, the first character of IFS is used to create $*,
14388# except with old shells:
14389host_os=$*
14390IFS=$ac_save_IFS
14391case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14392
14393
14394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14395$as_echo_n "checking target system type... " >&6; }
14396if ${ac_cv_target+:} false; then :
14397  $as_echo_n "(cached) " >&6
14398else
14399  if test "x$target_alias" = x; then
14400  ac_cv_target=$ac_cv_host
14401else
14402  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14403    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14404fi
14405
14406fi
14407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14408$as_echo "$ac_cv_target" >&6; }
14409case $ac_cv_target in
14410*-*-*) ;;
14411*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14412esac
14413target=$ac_cv_target
14414ac_save_IFS=$IFS; IFS='-'
14415set x $ac_cv_target
14416shift
14417target_cpu=$1
14418target_vendor=$2
14419shift; shift
14420# Remember, the first character of IFS is used to create $*,
14421# except with old shells:
14422target_os=$*
14423IFS=$ac_save_IFS
14424case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14425
14426
14427# The aliases save the names the user supplied, while $host etc.
14428# will get canonicalized.
14429test -n "$target_alias" &&
14430  test "$program_prefix$program_suffix$program_transform_name" = \
14431    NONENONEs,x,x, &&
14432  program_prefix=${target_alias}-
14433
14434  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14435  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14436  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14437  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14438  # to use the configure naming style.
14439
14440
14441
14442
14443
14444  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14445  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14446  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14447  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14448  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14449  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14450
14451
14452
14453  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14454
14455  case "$build_os" in
14456    *linux*)
14457      VAR_OS=linux
14458      VAR_OS_TYPE=unix
14459      ;;
14460    *solaris*)
14461      VAR_OS=solaris
14462      VAR_OS_TYPE=unix
14463      ;;
14464    *darwin*)
14465      VAR_OS=macosx
14466      VAR_OS_TYPE=unix
14467      ;;
14468    *bsd*)
14469      VAR_OS=bsd
14470      VAR_OS_TYPE=unix
14471      ;;
14472    *cygwin*)
14473      VAR_OS=windows
14474      VAR_OS_ENV=windows.cygwin
14475      ;;
14476    *mingw*)
14477      VAR_OS=windows
14478      VAR_OS_ENV=windows.msys
14479      ;;
14480    *aix*)
14481      VAR_OS=aix
14482      VAR_OS_TYPE=unix
14483      ;;
14484    *)
14485      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14486      ;;
14487  esac
14488
14489
14490  # First argument is the cpu name from the trip/quad
14491  case "$build_cpu" in
14492    x86_64)
14493      VAR_CPU=x86_64
14494      VAR_CPU_ARCH=x86
14495      VAR_CPU_BITS=64
14496      VAR_CPU_ENDIAN=little
14497      ;;
14498    i?86)
14499      VAR_CPU=x86
14500      VAR_CPU_ARCH=x86
14501      VAR_CPU_BITS=32
14502      VAR_CPU_ENDIAN=little
14503      ;;
14504    arm*)
14505      VAR_CPU=arm
14506      VAR_CPU_ARCH=arm
14507      VAR_CPU_BITS=32
14508      VAR_CPU_ENDIAN=little
14509      ;;
14510    aarch64)
14511      VAR_CPU=aarch64
14512      VAR_CPU_ARCH=aarch64
14513      VAR_CPU_BITS=64
14514      VAR_CPU_ENDIAN=little
14515      ;;
14516    powerpc)
14517      VAR_CPU=ppc
14518      VAR_CPU_ARCH=ppc
14519      VAR_CPU_BITS=32
14520      VAR_CPU_ENDIAN=big
14521      ;;
14522    powerpc64)
14523      VAR_CPU=ppc64
14524      VAR_CPU_ARCH=ppc
14525      VAR_CPU_BITS=64
14526      VAR_CPU_ENDIAN=big
14527      ;;
14528    powerpc64le)
14529      VAR_CPU=ppc64
14530      VAR_CPU_ARCH=ppc
14531      VAR_CPU_BITS=64
14532      VAR_CPU_ENDIAN=little
14533      ;;
14534    s390)
14535      VAR_CPU=s390
14536      VAR_CPU_ARCH=s390
14537      VAR_CPU_BITS=32
14538      VAR_CPU_ENDIAN=big
14539      ;;
14540    s390x)
14541      VAR_CPU=s390x
14542      VAR_CPU_ARCH=s390
14543      VAR_CPU_BITS=64
14544      VAR_CPU_ENDIAN=big
14545      ;;
14546    sparc)
14547      VAR_CPU=sparc
14548      VAR_CPU_ARCH=sparc
14549      VAR_CPU_BITS=32
14550      VAR_CPU_ENDIAN=big
14551      ;;
14552    sparcv9|sparc64)
14553      VAR_CPU=sparcv9
14554      VAR_CPU_ARCH=sparc
14555      VAR_CPU_BITS=64
14556      VAR_CPU_ENDIAN=big
14557      ;;
14558    *)
14559      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14560      ;;
14561  esac
14562
14563  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14564  OPENJDK_BUILD_OS="$VAR_OS"
14565  if test "x$VAR_OS_TYPE" != x; then
14566    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14567  else
14568    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14569  fi
14570  if test "x$VAR_OS_ENV" != x; then
14571    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14572  else
14573    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14574  fi
14575  OPENJDK_BUILD_CPU="$VAR_CPU"
14576  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14577  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14578  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14579
14580
14581
14582
14583
14584
14585
14586
14587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14588$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14590$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14591
14592  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14593
14594  case "$host_os" in
14595    *linux*)
14596      VAR_OS=linux
14597      VAR_OS_TYPE=unix
14598      ;;
14599    *solaris*)
14600      VAR_OS=solaris
14601      VAR_OS_TYPE=unix
14602      ;;
14603    *darwin*)
14604      VAR_OS=macosx
14605      VAR_OS_TYPE=unix
14606      ;;
14607    *bsd*)
14608      VAR_OS=bsd
14609      VAR_OS_TYPE=unix
14610      ;;
14611    *cygwin*)
14612      VAR_OS=windows
14613      VAR_OS_ENV=windows.cygwin
14614      ;;
14615    *mingw*)
14616      VAR_OS=windows
14617      VAR_OS_ENV=windows.msys
14618      ;;
14619    *aix*)
14620      VAR_OS=aix
14621      VAR_OS_TYPE=unix
14622      ;;
14623    *)
14624      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14625      ;;
14626  esac
14627
14628
14629  # First argument is the cpu name from the trip/quad
14630  case "$host_cpu" in
14631    x86_64)
14632      VAR_CPU=x86_64
14633      VAR_CPU_ARCH=x86
14634      VAR_CPU_BITS=64
14635      VAR_CPU_ENDIAN=little
14636      ;;
14637    i?86)
14638      VAR_CPU=x86
14639      VAR_CPU_ARCH=x86
14640      VAR_CPU_BITS=32
14641      VAR_CPU_ENDIAN=little
14642      ;;
14643    arm*)
14644      VAR_CPU=arm
14645      VAR_CPU_ARCH=arm
14646      VAR_CPU_BITS=32
14647      VAR_CPU_ENDIAN=little
14648      ;;
14649    aarch64)
14650      VAR_CPU=aarch64
14651      VAR_CPU_ARCH=aarch64
14652      VAR_CPU_BITS=64
14653      VAR_CPU_ENDIAN=little
14654      ;;
14655    powerpc)
14656      VAR_CPU=ppc
14657      VAR_CPU_ARCH=ppc
14658      VAR_CPU_BITS=32
14659      VAR_CPU_ENDIAN=big
14660      ;;
14661    powerpc64)
14662      VAR_CPU=ppc64
14663      VAR_CPU_ARCH=ppc
14664      VAR_CPU_BITS=64
14665      VAR_CPU_ENDIAN=big
14666      ;;
14667    powerpc64le)
14668      VAR_CPU=ppc64
14669      VAR_CPU_ARCH=ppc
14670      VAR_CPU_BITS=64
14671      VAR_CPU_ENDIAN=little
14672      ;;
14673    s390)
14674      VAR_CPU=s390
14675      VAR_CPU_ARCH=s390
14676      VAR_CPU_BITS=32
14677      VAR_CPU_ENDIAN=big
14678      ;;
14679    s390x)
14680      VAR_CPU=s390x
14681      VAR_CPU_ARCH=s390
14682      VAR_CPU_BITS=64
14683      VAR_CPU_ENDIAN=big
14684      ;;
14685    sparc)
14686      VAR_CPU=sparc
14687      VAR_CPU_ARCH=sparc
14688      VAR_CPU_BITS=32
14689      VAR_CPU_ENDIAN=big
14690      ;;
14691    sparcv9|sparc64)
14692      VAR_CPU=sparcv9
14693      VAR_CPU_ARCH=sparc
14694      VAR_CPU_BITS=64
14695      VAR_CPU_ENDIAN=big
14696      ;;
14697    *)
14698      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14699      ;;
14700  esac
14701
14702  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14703  OPENJDK_TARGET_OS="$VAR_OS"
14704  if test "x$VAR_OS_TYPE" != x; then
14705    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14706  else
14707    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14708  fi
14709  if test "x$VAR_OS_ENV" != x; then
14710    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14711  else
14712    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14713  fi
14714  OPENJDK_TARGET_CPU="$VAR_CPU"
14715  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14716  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14717  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14718
14719
14720
14721
14722
14723
14724
14725
14726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14727$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14729$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14730
14731
14732
14733# Check whether --with-target-bits was given.
14734if test "${with_target_bits+set}" = set; then :
14735  withval=$with_target_bits;
14736fi
14737
14738
14739  # We have three types of compiles:
14740  # native  == normal compilation, target system == build system
14741  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14742  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14743  #
14744  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14745    # We're doing a proper cross-compilation
14746    COMPILE_TYPE="cross"
14747  else
14748    COMPILE_TYPE="native"
14749  fi
14750
14751  if test "x$with_target_bits" != x; then
14752    if test "x$COMPILE_TYPE" = "xcross"; then
14753      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14754    fi
14755
14756    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14757      # A reduced build is requested
14758      COMPILE_TYPE="reduced"
14759      OPENJDK_TARGET_CPU_BITS=32
14760      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14761        OPENJDK_TARGET_CPU=x86
14762      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14763        OPENJDK_TARGET_CPU=sparc
14764      else
14765        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14766      fi
14767    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14768      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
14769    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14770      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14771$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14772    else
14773      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14774    fi
14775  fi
14776
14777
14778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14779$as_echo_n "checking compilation type... " >&6; }
14780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14781$as_echo "$COMPILE_TYPE" >&6; }
14782
14783
14784  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14785    REQUIRED_OS_NAME=SunOS
14786    REQUIRED_OS_VERSION=5.10
14787  fi
14788  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14789    REQUIRED_OS_NAME=Linux
14790    REQUIRED_OS_VERSION=2.6
14791  fi
14792  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14793    REQUIRED_OS_NAME=Windows
14794    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14795      REQUIRED_OS_VERSION=5.2
14796    else
14797      REQUIRED_OS_VERSION=5.1
14798    fi
14799  fi
14800  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14801    REQUIRED_OS_NAME=Darwin
14802    REQUIRED_OS_VERSION=11.2
14803  fi
14804
14805
14806
14807
14808
14809  # Also store the legacy naming of the cpu.
14810  # Ie i586 and amd64 instead of x86 and x86_64
14811  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14812  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14813    OPENJDK_TARGET_CPU_LEGACY="i586"
14814  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14815    # On all platforms except MacOSX replace x86_64 with amd64.
14816    OPENJDK_TARGET_CPU_LEGACY="amd64"
14817  fi
14818
14819
14820  # And the second legacy naming of the cpu.
14821  # Ie i386 and amd64 instead of x86 and x86_64.
14822  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14823  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14824    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14825  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14826    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14827  fi
14828
14829
14830  # This is the name of the cpu (but using i386 and amd64 instead of
14831  # x86 and x86_64, respectively), preceeded by a /, to be used when
14832  # locating libraries. On macosx, it's empty, though.
14833  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14834  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14835    OPENJDK_TARGET_CPU_LIBDIR=""
14836  fi
14837
14838
14839  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14840  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14841  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14842  OPENJDK_TARGET_CPU_ISADIR=""
14843  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14844    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14845      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14846    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14847      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14848    fi
14849  fi
14850
14851
14852  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14853  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14854  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14855    # On linux only, we replace x86 with i386.
14856    OPENJDK_TARGET_CPU_OSARCH="i386"
14857  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14858    # On all platforms except macosx, we replace x86_64 with amd64.
14859    OPENJDK_TARGET_CPU_OSARCH="amd64"
14860  fi
14861
14862
14863  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14864  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14865    OPENJDK_TARGET_CPU_JLI="i386"
14866  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14867    # On all platforms except macosx, we replace x86_64 with amd64.
14868    OPENJDK_TARGET_CPU_JLI="amd64"
14869  fi
14870  # Now setup the -D flags for building libjli.
14871  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14872  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14873    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14874      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14875    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14876      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14877    fi
14878  fi
14879
14880
14881  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14882      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14883  else
14884      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14885  fi
14886
14887
14888  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14889    A_LP64="LP64:="
14890    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14891    # unpack200.exe
14892    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14893      ADD_LP64="-D_LP64=1"
14894    fi
14895  fi
14896  LP64=$A_LP64
14897
14898
14899  if test "x$COMPILE_TYPE" = "xcross"; then
14900    # FIXME: ... or should this include reduced builds..?
14901    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14902  else
14903    DEFINE_CROSS_COMPILE_ARCH=""
14904  fi
14905
14906
14907  # ZERO_ARCHDEF is used to enable architecture-specific code
14908  case "${OPENJDK_TARGET_CPU}" in
14909    ppc)     ZERO_ARCHDEF=PPC32 ;;
14910    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14911    s390*)   ZERO_ARCHDEF=S390  ;;
14912    sparc*)  ZERO_ARCHDEF=SPARC ;;
14913    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14914    x86)     ZERO_ARCHDEF=IA32  ;;
14915    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14916  esac
14917
14918
14919
14920
14921# Continue setting up basic stuff. Most remaining code require fundamental tools.
14922
14923  # Save the current directory this script was started from
14924  CURDIR="$PWD"
14925
14926  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14927  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14928  # was not available at that time.
14929  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14930  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14931    ORIGINAL_PATH="$REWRITTEN_PATH"
14932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
14933$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
14934  fi
14935
14936  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14937    PATH_SEP=";"
14938
14939  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14940  if test $SRC_ROOT_LENGTH -gt 100; then
14941    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14942  fi
14943
14944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14946$as_echo_n "checking cygwin release... " >&6; }
14947    CYGWIN_VERSION=`$UNAME -r`
14948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14949$as_echo "$CYGWIN_VERSION" >&6; }
14950    WINDOWS_ENV_VENDOR='cygwin'
14951    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14952
14953    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14954    if test "x$CYGWIN_VERSION_OLD" != x; then
14955      { $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
14956$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;}
14957      as_fn_error $? "Cannot continue" "$LINENO" 5
14958    fi
14959    if test "x$CYGPATH" = x; then
14960      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14961    fi
14962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14963$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14964    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14965    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14966    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14967    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14969$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14970    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14971    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14972    if test "x$test_cygdrive_prefix" = x; then
14973      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14974    fi
14975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14977$as_echo_n "checking msys release... " >&6; }
14978    MSYS_VERSION=`$UNAME -r`
14979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14980$as_echo "$MSYS_VERSION" >&6; }
14981
14982    WINDOWS_ENV_VENDOR='msys'
14983    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14984
14985    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14986$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14987    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14988    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14989
14990  windows_path="$MSYS_ROOT_PATH"
14991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14992    unix_path=`$CYGPATH -u "$windows_path"`
14993    MSYS_ROOT_PATH="$unix_path"
14994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14996    MSYS_ROOT_PATH="$unix_path"
14997  fi
14998
14999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15000$as_echo "$MSYS_ROOT_PATH" >&6; }
15001    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15002  else
15003    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15004  fi
15005
15006  # Test if windows or unix (cygwin/msys) find is first in path.
15007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15008$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15009  FIND_BINARY_OUTPUT=`find --version 2>&1`
15010  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15012$as_echo "unix style" >&6; }
15013  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15015$as_echo "Windows" >&6; }
15016    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15017$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15018    { $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
15019$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15020    as_fn_error $? "Cannot continue" "$LINENO" 5
15021  else
15022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15023$as_echo "unknown" >&6; }
15024    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15025$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15026  fi
15027
15028  else
15029    PATH_SEP=":"
15030  fi
15031
15032
15033  # We get the top-level directory from the supporting wrappers.
15034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15035$as_echo_n "checking for top-level directory... " >&6; }
15036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15037$as_echo "$TOPDIR" >&6; }
15038
15039
15040  # Save the original version of TOPDIR for string comparisons
15041  ORIGINAL_TOPDIR="$TOPDIR"
15042
15043
15044  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15045
15046  # Only process if variable expands to non-empty
15047
15048  if test "x$CURDIR" != x; then
15049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15050
15051  # Input might be given as Windows format, start by converting to
15052  # unix format.
15053  path="$CURDIR"
15054  new_path=`$CYGPATH -u "$path"`
15055
15056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15059  # "foo.exe" is OK but "foo" is an error.
15060  #
15061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15062  # It is also a way to make sure we got the proper file name for the real test later on.
15063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15064  if test "x$test_shortpath" = x; then
15065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15066$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15067    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15068  fi
15069
15070  # Call helper function which possibly converts this using DOS-style short mode.
15071  # If so, the updated path is stored in $new_path.
15072
15073  input_path="$new_path"
15074  # Check if we need to convert this using DOS-style short mode. If the path
15075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15076  # take no chances and rewrite it.
15077  # Note: m4 eats our [], so we need to use [ and ] instead.
15078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15079  if test "x$has_forbidden_chars" != x; then
15080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15084      # Going to short mode and back again did indeed matter. Since short mode is
15085      # case insensitive, let's make it lowercase to improve readability.
15086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15087      # Now convert it back to Unix-style (cygpath)
15088      input_path=`$CYGPATH -u "$shortmode_path"`
15089      new_path="$input_path"
15090    fi
15091  fi
15092
15093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15094  if test "x$test_cygdrive_prefix" = x; then
15095    # As a simple fix, exclude /usr/bin since it's not a real path.
15096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15098      # a path prefixed by /cygdrive for fixpath to work.
15099      new_path="$CYGWIN_ROOT_PATH$input_path"
15100    fi
15101  fi
15102
15103
15104  if test "x$path" != "x$new_path"; then
15105    CURDIR="$new_path"
15106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15107$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15108  fi
15109
15110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15111
15112  path="$CURDIR"
15113  has_colon=`$ECHO $path | $GREP ^.:`
15114  new_path="$path"
15115  if test "x$has_colon" = x; then
15116    # Not in mixed or Windows style, start by that.
15117    new_path=`cmd //c echo $path`
15118  fi
15119
15120
15121  input_path="$new_path"
15122  # Check if we need to convert this using DOS-style short mode. If the path
15123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15124  # take no chances and rewrite it.
15125  # Note: m4 eats our [], so we need to use [ and ] instead.
15126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15127  if test "x$has_forbidden_chars" != x; then
15128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15130  fi
15131
15132
15133  windows_path="$new_path"
15134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15135    unix_path=`$CYGPATH -u "$windows_path"`
15136    new_path="$unix_path"
15137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15139    new_path="$unix_path"
15140  fi
15141
15142  if test "x$path" != "x$new_path"; then
15143    CURDIR="$new_path"
15144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15145$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15146  fi
15147
15148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15150
15151    else
15152      # We're on a unix platform. Hooray! :)
15153      path="$CURDIR"
15154      has_space=`$ECHO "$path" | $GREP " "`
15155      if test "x$has_space" != x; then
15156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15157$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15159      fi
15160
15161      # Use eval to expand a potential ~
15162      eval path="$path"
15163      if test ! -f "$path" && test ! -d "$path"; then
15164        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15165      fi
15166
15167      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15168    fi
15169  fi
15170
15171
15172  # Only process if variable expands to non-empty
15173
15174  if test "x$TOPDIR" != x; then
15175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15176
15177  # Input might be given as Windows format, start by converting to
15178  # unix format.
15179  path="$TOPDIR"
15180  new_path=`$CYGPATH -u "$path"`
15181
15182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15185  # "foo.exe" is OK but "foo" is an error.
15186  #
15187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15188  # It is also a way to make sure we got the proper file name for the real test later on.
15189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15190  if test "x$test_shortpath" = x; then
15191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15192$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15193    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15194  fi
15195
15196  # Call helper function which possibly converts this using DOS-style short mode.
15197  # If so, the updated path is stored in $new_path.
15198
15199  input_path="$new_path"
15200  # Check if we need to convert this using DOS-style short mode. If the path
15201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15202  # take no chances and rewrite it.
15203  # Note: m4 eats our [], so we need to use [ and ] instead.
15204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15205  if test "x$has_forbidden_chars" != x; then
15206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15210      # Going to short mode and back again did indeed matter. Since short mode is
15211      # case insensitive, let's make it lowercase to improve readability.
15212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15213      # Now convert it back to Unix-style (cygpath)
15214      input_path=`$CYGPATH -u "$shortmode_path"`
15215      new_path="$input_path"
15216    fi
15217  fi
15218
15219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15220  if test "x$test_cygdrive_prefix" = x; then
15221    # As a simple fix, exclude /usr/bin since it's not a real path.
15222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15224      # a path prefixed by /cygdrive for fixpath to work.
15225      new_path="$CYGWIN_ROOT_PATH$input_path"
15226    fi
15227  fi
15228
15229
15230  if test "x$path" != "x$new_path"; then
15231    TOPDIR="$new_path"
15232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15233$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15234  fi
15235
15236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15237
15238  path="$TOPDIR"
15239  has_colon=`$ECHO $path | $GREP ^.:`
15240  new_path="$path"
15241  if test "x$has_colon" = x; then
15242    # Not in mixed or Windows style, start by that.
15243    new_path=`cmd //c echo $path`
15244  fi
15245
15246
15247  input_path="$new_path"
15248  # Check if we need to convert this using DOS-style short mode. If the path
15249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15250  # take no chances and rewrite it.
15251  # Note: m4 eats our [], so we need to use [ and ] instead.
15252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15253  if test "x$has_forbidden_chars" != x; then
15254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15256  fi
15257
15258
15259  windows_path="$new_path"
15260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15261    unix_path=`$CYGPATH -u "$windows_path"`
15262    new_path="$unix_path"
15263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15265    new_path="$unix_path"
15266  fi
15267
15268  if test "x$path" != "x$new_path"; then
15269    TOPDIR="$new_path"
15270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15271$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15272  fi
15273
15274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15276
15277    else
15278      # We're on a unix platform. Hooray! :)
15279      path="$TOPDIR"
15280      has_space=`$ECHO "$path" | $GREP " "`
15281      if test "x$has_space" != x; then
15282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15283$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15285      fi
15286
15287      # Use eval to expand a potential ~
15288      eval path="$path"
15289      if test ! -f "$path" && test ! -d "$path"; then
15290        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15291      fi
15292
15293      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15294    fi
15295  fi
15296
15297  # SRC_ROOT is a traditional alias for TOPDIR.
15298  SRC_ROOT=$TOPDIR
15299
15300  # Calculate a canonical version of TOPDIR for string comparisons
15301  CANONICAL_TOPDIR=$TOPDIR
15302
15303  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15304    # Follow a chain of symbolic links. Use readlink
15305    # where it exists, else fall back to horribly
15306    # complicated shell code.
15307    if test "x$READLINK_TESTED" != yes; then
15308      # On MacOSX there is a readlink tool with a different
15309      # purpose than the GNU readlink tool. Check the found readlink.
15310      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15311      if test "x$ISGNU" = x; then
15312        # A readlink that we do not know how to use.
15313        # Are there other non-GNU readlinks out there?
15314        READLINK_TESTED=yes
15315        READLINK=
15316      fi
15317    fi
15318
15319    if test "x$READLINK" != x; then
15320      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15321    else
15322      # Save the current directory for restoring afterwards
15323      STARTDIR=$PWD
15324      COUNTER=0
15325      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15326      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15327      cd $sym_link_dir
15328      # Use -P flag to resolve symlinks in directories.
15329      cd `$THEPWDCMD -P`
15330      sym_link_dir=`$THEPWDCMD -P`
15331      # Resolve file symlinks
15332      while test $COUNTER -lt 20; do
15333        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15334        if test "x$ISLINK" == x; then
15335          # This is not a symbolic link! We are done!
15336          break
15337        fi
15338        # Again resolve directory symlinks since the target of the just found
15339        # link could be in a different directory
15340        cd `$DIRNAME $ISLINK`
15341        sym_link_dir=`$THEPWDCMD -P`
15342        sym_link_file=`$BASENAME $ISLINK`
15343        let COUNTER=COUNTER+1
15344      done
15345      cd $STARTDIR
15346      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15347    fi
15348  fi
15349
15350
15351
15352  # Locate the directory of this script.
15353  AUTOCONF_DIR=$TOPDIR/common/autoconf
15354
15355
15356# Check if it's a pure open build or if custom sources are to be used.
15357
15358  # Check whether --enable-openjdk-only was given.
15359if test "${enable_openjdk_only+set}" = set; then :
15360  enableval=$enable_openjdk_only;
15361else
15362  enable_openjdk_only="no"
15363fi
15364
15365
15366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15367$as_echo_n "checking for presence of closed sources... " >&6; }
15368  if test -d "$SRC_ROOT/jdk/src/closed"; then
15369    CLOSED_SOURCE_PRESENT=yes
15370  else
15371    CLOSED_SOURCE_PRESENT=no
15372  fi
15373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15374$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15375
15376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15377$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15378  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15380$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15381
15382  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15383    OPENJDK=true
15384    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15385      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15386$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15387    fi
15388  else
15389    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15390      OPENJDK=true
15391    else
15392      OPENJDK=false
15393    fi
15394  fi
15395
15396  if test "x$OPENJDK" = "xtrue"; then
15397    SET_OPENJDK="OPENJDK=true"
15398  fi
15399
15400
15401
15402  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15403  # the IncludeCustomExtension macro.
15404
15405
15406# Check whether --with-custom-make-dir was given.
15407if test "${with_custom_make_dir+set}" = set; then :
15408  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
15409$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15410fi
15411
15412
15413
15414
15415# These are needed to be able to create a configuration name (and thus the output directory)
15416
15417  ###############################################################################
15418  #
15419  # Check which variant of the JDK that we want to build.
15420  # Currently we have:
15421  #    normal:   standard edition
15422  # but the custom make system may add other variants
15423  #
15424  # Effectively the JDK variant gives a name to a specific set of
15425  # modules to compile into the JDK. In the future, these modules
15426  # might even be Jigsaw modules.
15427  #
15428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15429$as_echo_n "checking which variant of the JDK to build... " >&6; }
15430
15431# Check whether --with-jdk-variant was given.
15432if test "${with_jdk_variant+set}" = set; then :
15433  withval=$with_jdk_variant;
15434fi
15435
15436
15437  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15438    JDK_VARIANT="normal"
15439  else
15440    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15441  fi
15442
15443
15444
15445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15446$as_echo "$JDK_VARIANT" >&6; }
15447
15448
15449###############################################################################
15450#
15451# Check which interpreter of the JVM we want to build.
15452# Currently we have:
15453#    template: Template interpreter (the default)
15454#    cpp     : C++ interpreter
15455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15456$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15457
15458# Check whether --with-jvm-interpreter was given.
15459if test "${with_jvm_interpreter+set}" = set; then :
15460  withval=$with_jvm_interpreter;
15461fi
15462
15463
15464if test "x$with_jvm_interpreter" = x; then
15465     with_jvm_interpreter="template"
15466fi
15467
15468JVM_INTERPRETER="$with_jvm_interpreter"
15469
15470if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15471   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15472fi
15473
15474
15475
15476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15477$as_echo "$with_jvm_interpreter" >&6; }
15478
15479
15480
15481  ###############################################################################
15482  #
15483  # Check which variants of the JVM that we want to build.
15484  # Currently we have:
15485  #    server: normal interpreter and a tiered C1/C2 compiler
15486  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15487  #    minimal1: reduced form of client with optional VM services and features stripped out
15488  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15489  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15490  #    zero: no machine code interpreter, no compiler
15491  #    zeroshark: zero interpreter and shark/llvm compiler backend
15492#    core: interpreter only, no compiler (only works on some platforms)
15493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15494$as_echo_n "checking which variants of the JVM to build... " >&6; }
15495
15496# Check whether --with-jvm-variants was given.
15497if test "${with_jvm_variants+set}" = set; then :
15498  withval=$with_jvm_variants;
15499fi
15500
15501
15502  if test "x$with_jvm_variants" = x; then
15503    with_jvm_variants="server"
15504  fi
15505
15506  JVM_VARIANTS=",$with_jvm_variants,"
15507  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,//'`
15508
15509  if test "x$TEST_VARIANTS" != "x,"; then
15510     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15511  fi
15512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15513$as_echo "$with_jvm_variants" >&6; }
15514
15515  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15516  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15517  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15518  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15519  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15520  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15521  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15522
15523  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15524    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15525      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15526    fi
15527  fi
15528  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15529    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15530      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15531    fi
15532  fi
15533  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15534    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15535      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15536    fi
15537  fi
15538
15539  # Replace the commas with AND for use in the build directory name.
15540  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15541  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/'`
15542  if test "x$COUNT_VARIANTS" != "x,1"; then
15543    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15544  else
15545    BUILDING_MULTIPLE_JVM_VARIANTS=no
15546  fi
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557  INCLUDE_SA=true
15558  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15559    INCLUDE_SA=false
15560  fi
15561  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15562    INCLUDE_SA=false
15563  fi
15564  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15565    INCLUDE_SA=false
15566  fi
15567  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15568    INCLUDE_SA=false
15569  fi
15570
15571
15572  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15573    MACOSX_UNIVERSAL="true"
15574  fi
15575
15576
15577
15578
15579  ###############################################################################
15580  #
15581  # Set the debug level
15582  #    release: no debug information, all optimizations, no asserts.
15583  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15584  #    fastdebug: debug information (-g), all optimizations, all asserts
15585  #    slowdebug: debug information (-g), no optimizations, all asserts
15586  #
15587  DEBUG_LEVEL="release"
15588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15589$as_echo_n "checking which debug level to use... " >&6; }
15590  # Check whether --enable-debug was given.
15591if test "${enable_debug+set}" = set; then :
15592  enableval=$enable_debug;
15593        ENABLE_DEBUG="${enableval}"
15594        DEBUG_LEVEL="fastdebug"
15595
15596else
15597  ENABLE_DEBUG="no"
15598fi
15599
15600
15601
15602# Check whether --with-debug-level was given.
15603if test "${with_debug_level+set}" = set; then :
15604  withval=$with_debug_level;
15605        DEBUG_LEVEL="${withval}"
15606        if test "x$ENABLE_DEBUG" = xyes; then
15607          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15608        fi
15609
15610fi
15611
15612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15613$as_echo "$DEBUG_LEVEL" >&6; }
15614
15615  if test "x$DEBUG_LEVEL" != xrelease && \
15616      test "x$DEBUG_LEVEL" != xoptimized && \
15617      test "x$DEBUG_LEVEL" != xfastdebug && \
15618      test "x$DEBUG_LEVEL" != xslowdebug; then
15619    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15620  fi
15621
15622
15623  ###############################################################################
15624  #
15625  # Setup legacy vars/targets and new vars to deal with different debug levels.
15626  #
15627
15628  case $DEBUG_LEVEL in
15629    release )
15630      VARIANT="OPT"
15631      FASTDEBUG="false"
15632      DEBUG_CLASSFILES="false"
15633      BUILD_VARIANT_RELEASE=""
15634      HOTSPOT_DEBUG_LEVEL="product"
15635      HOTSPOT_EXPORT="product"
15636      ;;
15637    fastdebug )
15638      VARIANT="DBG"
15639      FASTDEBUG="true"
15640      DEBUG_CLASSFILES="true"
15641      BUILD_VARIANT_RELEASE="-fastdebug"
15642      HOTSPOT_DEBUG_LEVEL="fastdebug"
15643      HOTSPOT_EXPORT="fastdebug"
15644      ;;
15645    slowdebug )
15646      VARIANT="DBG"
15647      FASTDEBUG="false"
15648      DEBUG_CLASSFILES="true"
15649      BUILD_VARIANT_RELEASE="-debug"
15650      HOTSPOT_DEBUG_LEVEL="debug"
15651      HOTSPOT_EXPORT="debug"
15652      ;;
15653    optimized )
15654      VARIANT="OPT"
15655      FASTDEBUG="false"
15656      DEBUG_CLASSFILES="false"
15657      BUILD_VARIANT_RELEASE="-optimized"
15658      HOTSPOT_DEBUG_LEVEL="optimized"
15659      HOTSPOT_EXPORT="optimized"
15660      ;;
15661  esac
15662
15663  # The debug level 'optimized' is a little special because it is currently only
15664  # applicable to the HotSpot build where it means to build a completely
15665  # optimized version of the VM without any debugging code (like for the
15666  # 'release' debug level which is called 'product' in the HotSpot build) but
15667  # with the exception that it can contain additional code which is otherwise
15668  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15669  # test new and/or experimental features which are not intended for customer
15670  # shipment. Because these new features need to be tested and benchmarked in
15671  # real world scenarios, we want to build the containing JDK at the 'release'
15672  # debug level.
15673  if test "x$DEBUG_LEVEL" = xoptimized; then
15674    DEBUG_LEVEL="release"
15675  fi
15676
15677  #####
15678  # Generate the legacy makefile targets for hotspot.
15679  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15680  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15681  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15682  # But until then ...
15683  HOTSPOT_TARGET=""
15684
15685  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15686    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15687  fi
15688
15689  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15690    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15691  fi
15692
15693  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15694    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15695  fi
15696
15697  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15698    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15699  fi
15700
15701  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15702    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15703  fi
15704
15705  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15706    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15707  fi
15708
15709  if test "x$JVM_VARIANT_CORE" = xtrue; then
15710    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15711  fi
15712
15713  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15714
15715  # On Macosx universal binaries are produced, but they only contain
15716  # 64 bit intel. This invalidates control of which jvms are built
15717  # from configure, but only server is valid anyway. Fix this
15718  # when hotspot makefiles are rewritten.
15719  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15720    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15721  fi
15722
15723  #####
15724
15725
15726
15727
15728
15729
15730
15731
15732# With basic setup done, call the custom early hook.
15733
15734
15735# Check if we have devkits, extra paths or sysroot set.
15736
15737
15738# Check whether --with-devkit was given.
15739if test "${with_devkit+set}" = set; then :
15740  withval=$with_devkit;
15741
15742  # Only process if variable expands to non-empty
15743
15744  if test "x$with_devkit" != x; then
15745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15746
15747  # Input might be given as Windows format, start by converting to
15748  # unix format.
15749  path="$with_devkit"
15750  new_path=`$CYGPATH -u "$path"`
15751
15752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15755  # "foo.exe" is OK but "foo" is an error.
15756  #
15757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15758  # It is also a way to make sure we got the proper file name for the real test later on.
15759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15760  if test "x$test_shortpath" = x; then
15761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15762$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15763    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15764  fi
15765
15766  # Call helper function which possibly converts this using DOS-style short mode.
15767  # If so, the updated path is stored in $new_path.
15768
15769  input_path="$new_path"
15770  # Check if we need to convert this using DOS-style short mode. If the path
15771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15772  # take no chances and rewrite it.
15773  # Note: m4 eats our [], so we need to use [ and ] instead.
15774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15775  if test "x$has_forbidden_chars" != x; then
15776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15780      # Going to short mode and back again did indeed matter. Since short mode is
15781      # case insensitive, let's make it lowercase to improve readability.
15782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15783      # Now convert it back to Unix-style (cygpath)
15784      input_path=`$CYGPATH -u "$shortmode_path"`
15785      new_path="$input_path"
15786    fi
15787  fi
15788
15789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15790  if test "x$test_cygdrive_prefix" = x; then
15791    # As a simple fix, exclude /usr/bin since it's not a real path.
15792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15794      # a path prefixed by /cygdrive for fixpath to work.
15795      new_path="$CYGWIN_ROOT_PATH$input_path"
15796    fi
15797  fi
15798
15799
15800  if test "x$path" != "x$new_path"; then
15801    with_devkit="$new_path"
15802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15803$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15804  fi
15805
15806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15807
15808  path="$with_devkit"
15809  has_colon=`$ECHO $path | $GREP ^.:`
15810  new_path="$path"
15811  if test "x$has_colon" = x; then
15812    # Not in mixed or Windows style, start by that.
15813    new_path=`cmd //c echo $path`
15814  fi
15815
15816
15817  input_path="$new_path"
15818  # Check if we need to convert this using DOS-style short mode. If the path
15819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15820  # take no chances and rewrite it.
15821  # Note: m4 eats our [], so we need to use [ and ] instead.
15822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15823  if test "x$has_forbidden_chars" != x; then
15824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15826  fi
15827
15828
15829  windows_path="$new_path"
15830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15831    unix_path=`$CYGPATH -u "$windows_path"`
15832    new_path="$unix_path"
15833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15835    new_path="$unix_path"
15836  fi
15837
15838  if test "x$path" != "x$new_path"; then
15839    with_devkit="$new_path"
15840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15841$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15842  fi
15843
15844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15846
15847    else
15848      # We're on a unix platform. Hooray! :)
15849      path="$with_devkit"
15850      has_space=`$ECHO "$path" | $GREP " "`
15851      if test "x$has_space" != x; then
15852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15853$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15854        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15855      fi
15856
15857      # Use eval to expand a potential ~
15858      eval path="$path"
15859      if test ! -f "$path" && test ! -d "$path"; then
15860        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15861      fi
15862
15863      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15864    fi
15865  fi
15866
15867        DEVKIT_ROOT="$with_devkit"
15868        # Check for a meta data info file in the root of the devkit
15869        if test -f "$DEVKIT_ROOT/devkit.info"; then
15870          . $DEVKIT_ROOT/devkit.info
15871          # This potentially sets the following:
15872          # A descriptive name of the devkit
15873
15874  if test "x$DEVKIT_NAME" = x; then
15875    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15876  fi
15877
15878          # Corresponds to --with-extra-path
15879
15880  if test "x$DEVKIT_EXTRA_PATH" = x; then
15881    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15882  fi
15883
15884          # Corresponds to --with-toolchain-path
15885
15886  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15887    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15888  fi
15889
15890          # Corresponds to --with-sysroot
15891
15892  if test "x$DEVKIT_SYSROOT" = x; then
15893    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15894  fi
15895
15896
15897          # Identifies the Visual Studio version in the devkit
15898
15899  if test "x$DEVKIT_VS_VERSION" = x; then
15900    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15901  fi
15902
15903          # The Visual Studio include environment variable
15904
15905  if test "x$DEVKIT_VS_INCLUDE" = x; then
15906    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15907  fi
15908
15909          # The Visual Studio lib environment variable
15910
15911  if test "x$DEVKIT_VS_LIB" = x; then
15912    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15913  fi
15914
15915          # Corresponds to --with-msvcr-dll
15916
15917  if test "x$DEVKIT_MSVCR_DLL" = x; then
15918    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15919  fi
15920
15921          # Corresponds to --with-msvcp-dll
15922
15923  if test "x$DEVKIT_MSVCP_DLL" = x; then
15924    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15925  fi
15926
15927        fi
15928
15929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15930$as_echo_n "checking for devkit... " >&6; }
15931        if test "x$DEVKIT_NAME" != x; then
15932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15933$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15934        else
15935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15936$as_echo "$DEVKIT_ROOT" >&6; }
15937        fi
15938
15939
15940  if test "x$DEVKIT_EXTRA_PATH" != x; then
15941    if test "x$EXTRA_PATH" = x; then
15942      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15943    else
15944      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15945    fi
15946  fi
15947
15948
15949        # Fallback default of just /bin if DEVKIT_PATH is not defined
15950        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15951          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15952        fi
15953
15954  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15955    if test "x$TOOLCHAIN_PATH" = x; then
15956      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15957    else
15958      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15959    fi
15960  fi
15961
15962
15963        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15964        # places for backwards compatiblity.
15965        if test "x$DEVKIT_SYSROOT" != x; then
15966          SYSROOT="$DEVKIT_SYSROOT"
15967        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15968          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15969        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15970          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15971        fi
15972
15973
15974fi
15975
15976
15977  # You can force the sysroot if the sysroot encoded into the compiler tools
15978  # is not correct.
15979
15980# Check whether --with-sys-root was given.
15981if test "${with_sys_root+set}" = set; then :
15982  withval=$with_sys_root; SYSROOT=$with_sys_root
15983
15984fi
15985
15986
15987
15988# Check whether --with-sysroot was given.
15989if test "${with_sysroot+set}" = set; then :
15990  withval=$with_sysroot; SYSROOT=$with_sysroot
15991
15992fi
15993
15994
15995
15996# Check whether --with-tools-dir was given.
15997if test "${with_tools_dir+set}" = set; then :
15998  withval=$with_tools_dir;
15999  if test "x$with_tools_dir" != x; then
16000    if test "x$TOOLCHAIN_PATH" = x; then
16001      TOOLCHAIN_PATH="$with_tools_dir"
16002    else
16003      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16004    fi
16005  fi
16006
16007
16008fi
16009
16010
16011
16012# Check whether --with-toolchain-path was given.
16013if test "${with_toolchain_path+set}" = set; then :
16014  withval=$with_toolchain_path;
16015  if test "x$with_toolchain_path" != x; then
16016    if test "x$TOOLCHAIN_PATH" = x; then
16017      TOOLCHAIN_PATH="$with_toolchain_path"
16018    else
16019      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16020    fi
16021  fi
16022
16023
16024fi
16025
16026
16027
16028# Check whether --with-extra-path was given.
16029if test "${with_extra_path+set}" = set; then :
16030  withval=$with_extra_path;
16031  if test "x$with_extra_path" != x; then
16032    if test "x$EXTRA_PATH" = x; then
16033      EXTRA_PATH="$with_extra_path"
16034    else
16035      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16036    fi
16037  fi
16038
16039
16040fi
16041
16042
16043  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16044    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16045    # If not, detect if Xcode is installed by running xcodebuild -version
16046    # if no Xcode installed, xcodebuild exits with 1
16047    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16048    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16049      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16050      # fall back on the stub binary in /usr/bin/xcodebuild
16051      # Extract the first word of "xcodebuild", so it can be a program name with args.
16052set dummy xcodebuild; ac_word=$2
16053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16054$as_echo_n "checking for $ac_word... " >&6; }
16055if ${ac_cv_path_XCODEBUILD+:} false; then :
16056  $as_echo_n "(cached) " >&6
16057else
16058  case $XCODEBUILD in
16059  [\\/]* | ?:[\\/]*)
16060  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16061  ;;
16062  *)
16063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16064for as_dir in $TOOLCHAIN_PATH
16065do
16066  IFS=$as_save_IFS
16067  test -z "$as_dir" && as_dir=.
16068    for ac_exec_ext in '' $ac_executable_extensions; do
16069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16070    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16072    break 2
16073  fi
16074done
16075  done
16076IFS=$as_save_IFS
16077
16078  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16079  ;;
16080esac
16081fi
16082XCODEBUILD=$ac_cv_path_XCODEBUILD
16083if test -n "$XCODEBUILD"; then
16084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16085$as_echo "$XCODEBUILD" >&6; }
16086else
16087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16088$as_echo "no" >&6; }
16089fi
16090
16091
16092    else
16093      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16094      # when only the command line tools are installed there are no SDKs, so headers
16095      # are copied into the system frameworks
16096      XCODEBUILD=
16097
16098    fi
16099
16100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16101$as_echo_n "checking for sdk name... " >&6; }
16102
16103# Check whether --with-sdk-name was given.
16104if test "${with_sdk_name+set}" = set; then :
16105  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16106
16107fi
16108
16109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16110$as_echo "$SDKNAME" >&6; }
16111
16112    # if toolchain path is specified then don't rely on system headers, they may not compile
16113    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16114    test -z "$TOOLCHAIN_PATH" && \
16115      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16116
16117    if test -z "$SYSROOT"; then
16118      if test -n "$XCODEBUILD"; then
16119        # if we don't have system headers, use default SDK name (last resort)
16120        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16121          SDKNAME=${SDKNAME:-macosx}
16122        fi
16123
16124        if test -n "$SDKNAME"; then
16125          # Call xcodebuild to determine SYSROOT
16126          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16127        fi
16128      else
16129        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16130          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
16131        fi
16132      fi
16133    else
16134      # warn user if --with-sdk-name was also set
16135      if test -n "$with_sdk_name"; then
16136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16137$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16138      fi
16139    fi
16140
16141    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16142      # If no system framework headers, then SYSROOT must be set, or we won't build
16143      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
16144    fi
16145
16146    # Perform a basic sanity test
16147    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16148      if test -z "$SYSROOT"; then
16149        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
16150      else
16151        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16152      fi
16153    fi
16154
16155    # set SDKROOT too, Xcode tools will pick it up
16156    SDKROOT=$SYSROOT
16157
16158  fi
16159
16160  # Prepend the extra path to the global path
16161
16162  if test "x$EXTRA_PATH" != x; then
16163    if test "x$PATH" = x; then
16164      PATH="$EXTRA_PATH"
16165    else
16166      PATH="$EXTRA_PATH:$PATH"
16167    fi
16168  fi
16169
16170
16171  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16172    # Add extra search paths on solaris for utilities like ar and as etc...
16173    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16174  fi
16175
16176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16177$as_echo_n "checking for sysroot... " >&6; }
16178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16179$as_echo "$SYSROOT" >&6; }
16180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16181$as_echo_n "checking for toolchain path... " >&6; }
16182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16183$as_echo "$TOOLCHAIN_PATH" >&6; }
16184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16185$as_echo_n "checking for extra path... " >&6; }
16186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16187$as_echo "$EXTRA_PATH" >&6; }
16188
16189
16190# To properly create a configuration name, we need to have the OpenJDK target
16191# and options (variants and debug level) parsed.
16192
16193
16194
16195# Check whether --with-conf-name was given.
16196if test "${with_conf_name+set}" = set; then :
16197  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16198fi
16199
16200
16201  # Test from where we are running configure, in or outside of src root.
16202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16203$as_echo_n "checking where to store configuration... " >&6; }
16204  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16205      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16206      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16207    # We are running configure from the src root.
16208    # Create a default ./build/target-variant-debuglevel output root.
16209    if test "x${CONF_NAME}" = x; then
16210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16211$as_echo "in default location" >&6; }
16212      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16213    else
16214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16215$as_echo "in build directory with custom name" >&6; }
16216    fi
16217    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16218    $MKDIR -p "$OUTPUT_ROOT"
16219    if test ! -d "$OUTPUT_ROOT"; then
16220      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16221    fi
16222  else
16223    # We are running configure from outside of the src dir.
16224    # Then use the current directory as output dir!
16225    # If configuration is situated in normal build directory, just use the build
16226    # directory name as configuration name, otherwise use the complete path.
16227    if test "x${CONF_NAME}" = x; then
16228      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16229    fi
16230    OUTPUT_ROOT="$CURDIR"
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16232$as_echo "in current directory" >&6; }
16233
16234    # WARNING: This might be a bad thing to do. You need to be sure you want to
16235    # have a configuration in this directory. Do some sanity checks!
16236
16237    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16238      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16239      # other files
16240      files_present=`$LS $OUTPUT_ROOT`
16241      # Configure has already touched config.log and confdefs.h in the current dir when this check
16242      # is performed.
16243      filtered_files=`$ECHO "$files_present" \
16244          | $SED -e 's/config.log//g' \
16245              -e 's/configure.log//g' \
16246              -e 's/confdefs.h//g' \
16247              -e 's/ //g' \
16248          | $TR -d '\n'`
16249      if test "x$filtered_files" != x; then
16250        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16251$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16252        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16253$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16254        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16255$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16256        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16257$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16258        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16259$as_echo "$as_me: seriously mess up just about everything." >&6;}
16260        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16261$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16262        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16263$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16264        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16265      fi
16266    fi
16267  fi
16268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16269$as_echo_n "checking what configuration name to use... " >&6; }
16270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16271$as_echo "$CONF_NAME" >&6; }
16272
16273
16274  # Only process if variable expands to non-empty
16275
16276  if test "x$OUTPUT_ROOT" != x; then
16277    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16278
16279  # Input might be given as Windows format, start by converting to
16280  # unix format.
16281  path="$OUTPUT_ROOT"
16282  new_path=`$CYGPATH -u "$path"`
16283
16284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16287  # "foo.exe" is OK but "foo" is an error.
16288  #
16289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16290  # It is also a way to make sure we got the proper file name for the real test later on.
16291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16292  if test "x$test_shortpath" = x; then
16293    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16294$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16295    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16296  fi
16297
16298  # Call helper function which possibly converts this using DOS-style short mode.
16299  # If so, the updated path is stored in $new_path.
16300
16301  input_path="$new_path"
16302  # Check if we need to convert this using DOS-style short mode. If the path
16303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16304  # take no chances and rewrite it.
16305  # Note: m4 eats our [], so we need to use [ and ] instead.
16306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16307  if test "x$has_forbidden_chars" != x; then
16308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16312      # Going to short mode and back again did indeed matter. Since short mode is
16313      # case insensitive, let's make it lowercase to improve readability.
16314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16315      # Now convert it back to Unix-style (cygpath)
16316      input_path=`$CYGPATH -u "$shortmode_path"`
16317      new_path="$input_path"
16318    fi
16319  fi
16320
16321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16322  if test "x$test_cygdrive_prefix" = x; then
16323    # As a simple fix, exclude /usr/bin since it's not a real path.
16324    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16326      # a path prefixed by /cygdrive for fixpath to work.
16327      new_path="$CYGWIN_ROOT_PATH$input_path"
16328    fi
16329  fi
16330
16331
16332  if test "x$path" != "x$new_path"; then
16333    OUTPUT_ROOT="$new_path"
16334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16335$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16336  fi
16337
16338    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16339
16340  path="$OUTPUT_ROOT"
16341  has_colon=`$ECHO $path | $GREP ^.:`
16342  new_path="$path"
16343  if test "x$has_colon" = x; then
16344    # Not in mixed or Windows style, start by that.
16345    new_path=`cmd //c echo $path`
16346  fi
16347
16348
16349  input_path="$new_path"
16350  # Check if we need to convert this using DOS-style short mode. If the path
16351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16352  # take no chances and rewrite it.
16353  # Note: m4 eats our [], so we need to use [ and ] instead.
16354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16355  if test "x$has_forbidden_chars" != x; then
16356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16358  fi
16359
16360
16361  windows_path="$new_path"
16362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16363    unix_path=`$CYGPATH -u "$windows_path"`
16364    new_path="$unix_path"
16365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16367    new_path="$unix_path"
16368  fi
16369
16370  if test "x$path" != "x$new_path"; then
16371    OUTPUT_ROOT="$new_path"
16372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16373$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16374  fi
16375
16376  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16377  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16378
16379    else
16380      # We're on a unix platform. Hooray! :)
16381      path="$OUTPUT_ROOT"
16382      has_space=`$ECHO "$path" | $GREP " "`
16383      if test "x$has_space" != x; then
16384        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16385$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16386        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16387      fi
16388
16389      # Use eval to expand a potential ~
16390      eval path="$path"
16391      if test ! -f "$path" && test ! -d "$path"; then
16392        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16393      fi
16394
16395      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16396    fi
16397  fi
16398
16399
16400  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16401  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16402
16403  SPEC=$OUTPUT_ROOT/spec.gmk
16404
16405  CONF_NAME=$CONF_NAME
16406
16407  OUTPUT_ROOT=$OUTPUT_ROOT
16408
16409
16410
16411  # The spec.gmk file contains all variables for the make system.
16412  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16413
16414  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16415  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16416
16417  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16418  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16419
16420  # The compare.sh is used to compare the build output to other builds.
16421  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16422
16423  # The generated Makefile knows where the spec.gmk is and where the source is.
16424  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16425  # which will look for generated configurations
16426  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16427
16428
16429
16430# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16431
16432  for ac_prog in apt-get yum port pkgutil pkgadd
16433do
16434  # Extract the first word of "$ac_prog", so it can be a program name with args.
16435set dummy $ac_prog; ac_word=$2
16436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16437$as_echo_n "checking for $ac_word... " >&6; }
16438if ${ac_cv_prog_PKGHANDLER+:} false; then :
16439  $as_echo_n "(cached) " >&6
16440else
16441  if test -n "$PKGHANDLER"; then
16442  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16443else
16444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16445for as_dir in $PATH
16446do
16447  IFS=$as_save_IFS
16448  test -z "$as_dir" && as_dir=.
16449    for ac_exec_ext in '' $ac_executable_extensions; do
16450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16451    ac_cv_prog_PKGHANDLER="$ac_prog"
16452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16453    break 2
16454  fi
16455done
16456  done
16457IFS=$as_save_IFS
16458
16459fi
16460fi
16461PKGHANDLER=$ac_cv_prog_PKGHANDLER
16462if test -n "$PKGHANDLER"; then
16463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16464$as_echo "$PKGHANDLER" >&6; }
16465else
16466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16467$as_echo "no" >&6; }
16468fi
16469
16470
16471  test -n "$PKGHANDLER" && break
16472done
16473
16474
16475
16476# Setup tools that requires more complex handling, or that is not needed by the configure script.
16477
16478
16479  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
16480  if test "x$MAKE" != x; then
16481    # User has supplied a make, test it.
16482    if test ! -f "$MAKE"; then
16483      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
16484    fi
16485
16486  MAKE_CANDIDATE=""$MAKE""
16487  DESCRIPTION="user supplied MAKE=$MAKE"
16488
16489  # On Cygwin, we require a newer version of make than on other platforms
16490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16491    MAKE_VERSION_EXPR="-e 4\."
16492    MAKE_REQUIRED_VERSION="4.0"
16493   else
16494    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16495    MAKE_REQUIRED_VERSION="3.81"
16496  fi
16497
16498  if test "x$MAKE_CANDIDATE" != x; then
16499    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16500$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16501    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16502    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16503    if test "x$IS_GNU_MAKE" = x; then
16504      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16505$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16506    else
16507      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16508      if test "x$IS_MODERN_MAKE" = x; then
16509        { $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
16510$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;}
16511      else
16512        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16513          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16514            MAKE_EXPECTED_ENV='cygwin'
16515          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16516            MAKE_EXPECTED_ENV='msys'
16517          else
16518            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16519          fi
16520          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16521          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16522        else
16523          # Not relevant for non-Windows
16524          IS_MAKE_CORRECT_ENV=true
16525        fi
16526        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16527          { $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
16528$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;}
16529        else
16530          FOUND_MAKE=$MAKE_CANDIDATE
16531
16532  # Only process if variable expands to non-empty
16533
16534  if test "x$FOUND_MAKE" != x; then
16535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16536
16537  # First separate the path from the arguments. This will split at the first
16538  # space.
16539  complete="$FOUND_MAKE"
16540  path="${complete%% *}"
16541  tmp="$complete EOL"
16542  arguments="${tmp#* }"
16543
16544  # Input might be given as Windows format, start by converting to
16545  # unix format.
16546  new_path=`$CYGPATH -u "$path"`
16547
16548  # Now try to locate executable using which
16549  new_path=`$WHICH "$new_path" 2> /dev/null`
16550  # bat and cmd files are not always considered executable in cygwin causing which
16551  # to not find them
16552  if test "x$new_path" = x \
16553      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16554      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16555    new_path=`$CYGPATH -u "$path"`
16556  fi
16557  if test "x$new_path" = x; then
16558    # Oops. Which didn't find the executable.
16559    # The splitting of arguments from the executable at a space might have been incorrect,
16560    # since paths with space are more likely in Windows. Give it another try with the whole
16561    # argument.
16562    path="$complete"
16563    arguments="EOL"
16564    new_path=`$CYGPATH -u "$path"`
16565    new_path=`$WHICH "$new_path" 2> /dev/null`
16566    # bat and cmd files are not always considered executable in cygwin causing which
16567    # to not find them
16568    if test "x$new_path" = x \
16569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16571      new_path=`$CYGPATH -u "$path"`
16572    fi
16573    if test "x$new_path" = x; then
16574      # It's still not found. Now this is an unrecoverable error.
16575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16576$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16577      has_space=`$ECHO "$complete" | $GREP " "`
16578      if test "x$has_space" != x; then
16579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16581      fi
16582      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16583    fi
16584  fi
16585
16586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16589  # "foo.exe" is OK but "foo" is an error.
16590  #
16591  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16592  # It is also a way to make sure we got the proper file name for the real test later on.
16593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16594  if test "x$test_shortpath" = x; then
16595    # Short path failed, file does not exist as specified.
16596    # Try adding .exe or .cmd
16597    if test -f "${new_path}.exe"; then
16598      input_to_shortpath="${new_path}.exe"
16599    elif test -f "${new_path}.cmd"; then
16600      input_to_shortpath="${new_path}.cmd"
16601    else
16602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16603$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16606      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16607    fi
16608  else
16609    input_to_shortpath="$new_path"
16610  fi
16611
16612  # Call helper function which possibly converts this using DOS-style short mode.
16613  # If so, the updated path is stored in $new_path.
16614  new_path="$input_to_shortpath"
16615
16616  input_path="$input_to_shortpath"
16617  # Check if we need to convert this using DOS-style short mode. If the path
16618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16619  # take no chances and rewrite it.
16620  # Note: m4 eats our [], so we need to use [ and ] instead.
16621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16622  if test "x$has_forbidden_chars" != x; then
16623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16627      # Going to short mode and back again did indeed matter. Since short mode is
16628      # case insensitive, let's make it lowercase to improve readability.
16629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16630      # Now convert it back to Unix-style (cygpath)
16631      input_path=`$CYGPATH -u "$shortmode_path"`
16632      new_path="$input_path"
16633    fi
16634  fi
16635
16636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16637  if test "x$test_cygdrive_prefix" = x; then
16638    # As a simple fix, exclude /usr/bin since it's not a real path.
16639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16641      # a path prefixed by /cygdrive for fixpath to work.
16642      new_path="$CYGWIN_ROOT_PATH$input_path"
16643    fi
16644  fi
16645
16646  # remove trailing .exe if any
16647  new_path="${new_path/%.exe/}"
16648
16649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16650
16651  # First separate the path from the arguments. This will split at the first
16652  # space.
16653  complete="$FOUND_MAKE"
16654  path="${complete%% *}"
16655  tmp="$complete EOL"
16656  arguments="${tmp#* }"
16657
16658  # Input might be given as Windows format, start by converting to
16659  # unix format.
16660  new_path="$path"
16661
16662  windows_path="$new_path"
16663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16664    unix_path=`$CYGPATH -u "$windows_path"`
16665    new_path="$unix_path"
16666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16668    new_path="$unix_path"
16669  fi
16670
16671
16672  # Now try to locate executable using which
16673  new_path=`$WHICH "$new_path" 2> /dev/null`
16674
16675  if test "x$new_path" = x; then
16676    # Oops. Which didn't find the executable.
16677    # The splitting of arguments from the executable at a space might have been incorrect,
16678    # since paths with space are more likely in Windows. Give it another try with the whole
16679    # argument.
16680    path="$complete"
16681    arguments="EOL"
16682    new_path="$path"
16683
16684  windows_path="$new_path"
16685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16686    unix_path=`$CYGPATH -u "$windows_path"`
16687    new_path="$unix_path"
16688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16690    new_path="$unix_path"
16691  fi
16692
16693
16694    new_path=`$WHICH "$new_path" 2> /dev/null`
16695    # bat and cmd files are not always considered executable in MSYS causing which
16696    # to not find them
16697    if test "x$new_path" = x \
16698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16700      new_path="$path"
16701
16702  windows_path="$new_path"
16703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16704    unix_path=`$CYGPATH -u "$windows_path"`
16705    new_path="$unix_path"
16706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16708    new_path="$unix_path"
16709  fi
16710
16711    fi
16712
16713    if test "x$new_path" = x; then
16714      # It's still not found. Now this is an unrecoverable error.
16715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16716$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16717      has_space=`$ECHO "$complete" | $GREP " "`
16718      if test "x$has_space" != x; then
16719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16721      fi
16722      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16723    fi
16724  fi
16725
16726  # Now new_path has a complete unix path to the binary
16727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16728    # Keep paths in /bin as-is, but remove trailing .exe if any
16729    new_path="${new_path/%.exe/}"
16730    # Do not save /bin paths to all_fixpath_prefixes!
16731  else
16732    # Not in mixed or Windows style, start by that.
16733    new_path=`cmd //c echo $new_path`
16734
16735  input_path="$new_path"
16736  # Check if we need to convert this using DOS-style short mode. If the path
16737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16738  # take no chances and rewrite it.
16739  # Note: m4 eats our [], so we need to use [ and ] instead.
16740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16741  if test "x$has_forbidden_chars" != x; then
16742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16744  fi
16745
16746    # Output is in $new_path
16747
16748  windows_path="$new_path"
16749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16750    unix_path=`$CYGPATH -u "$windows_path"`
16751    new_path="$unix_path"
16752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16754    new_path="$unix_path"
16755  fi
16756
16757    # remove trailing .exe if any
16758    new_path="${new_path/%.exe/}"
16759
16760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16762  fi
16763
16764    else
16765      # We're on a unix platform. Hooray! :)
16766      # First separate the path from the arguments. This will split at the first
16767      # space.
16768      complete="$FOUND_MAKE"
16769      path="${complete%% *}"
16770      tmp="$complete EOL"
16771      arguments="${tmp#* }"
16772
16773      # Cannot rely on the command "which" here since it doesn't always work.
16774      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16775      if test -z "$is_absolute_path"; then
16776        # Path to executable is not absolute. Find it.
16777        IFS_save="$IFS"
16778        IFS=:
16779        for p in $PATH; do
16780          if test -f "$p/$path" && test -x "$p/$path"; then
16781            new_path="$p/$path"
16782            break
16783          fi
16784        done
16785        IFS="$IFS_save"
16786      else
16787        # This is an absolute path, we can use it without further modifications.
16788        new_path="$path"
16789      fi
16790
16791      if test "x$new_path" = x; then
16792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16793$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16794        has_space=`$ECHO "$complete" | $GREP " "`
16795        if test "x$has_space" != x; then
16796          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16798        fi
16799        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16800      fi
16801    fi
16802
16803    # Now join together the path and the arguments once again
16804    if test "x$arguments" != xEOL; then
16805      new_complete="$new_path ${arguments% *}"
16806    else
16807      new_complete="$new_path"
16808    fi
16809
16810    if test "x$complete" != "x$new_complete"; then
16811      FOUND_MAKE="$new_complete"
16812      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16813$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16814    fi
16815  fi
16816
16817        fi
16818      fi
16819    fi
16820  fi
16821
16822    if test "x$FOUND_MAKE" = x; then
16823      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
16824    fi
16825  else
16826    # Try our hardest to locate a correct version of GNU make
16827    for ac_prog in gmake
16828do
16829  # Extract the first word of "$ac_prog", so it can be a program name with args.
16830set dummy $ac_prog; ac_word=$2
16831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16832$as_echo_n "checking for $ac_word... " >&6; }
16833if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16834  $as_echo_n "(cached) " >&6
16835else
16836  case $CHECK_GMAKE in
16837  [\\/]* | ?:[\\/]*)
16838  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16839  ;;
16840  *)
16841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16842for as_dir in $PATH
16843do
16844  IFS=$as_save_IFS
16845  test -z "$as_dir" && as_dir=.
16846    for ac_exec_ext in '' $ac_executable_extensions; do
16847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16848    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16850    break 2
16851  fi
16852done
16853  done
16854IFS=$as_save_IFS
16855
16856  ;;
16857esac
16858fi
16859CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16860if test -n "$CHECK_GMAKE"; then
16861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16862$as_echo "$CHECK_GMAKE" >&6; }
16863else
16864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16865$as_echo "no" >&6; }
16866fi
16867
16868
16869  test -n "$CHECK_GMAKE" && break
16870done
16871
16872
16873  MAKE_CANDIDATE=""$CHECK_GMAKE""
16874  DESCRIPTION="gmake in PATH"
16875
16876  # On Cygwin, we require a newer version of make than on other platforms
16877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16878    MAKE_VERSION_EXPR="-e 4\."
16879    MAKE_REQUIRED_VERSION="4.0"
16880   else
16881    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16882    MAKE_REQUIRED_VERSION="3.81"
16883  fi
16884
16885  if test "x$MAKE_CANDIDATE" != x; then
16886    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16887$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16888    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16889    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16890    if test "x$IS_GNU_MAKE" = x; then
16891      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16892$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16893    else
16894      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16895      if test "x$IS_MODERN_MAKE" = x; then
16896        { $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
16897$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;}
16898      else
16899        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16900          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16901            MAKE_EXPECTED_ENV='cygwin'
16902          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16903            MAKE_EXPECTED_ENV='msys'
16904          else
16905            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16906          fi
16907          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16908          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16909        else
16910          # Not relevant for non-Windows
16911          IS_MAKE_CORRECT_ENV=true
16912        fi
16913        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16914          { $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
16915$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;}
16916        else
16917          FOUND_MAKE=$MAKE_CANDIDATE
16918
16919  # Only process if variable expands to non-empty
16920
16921  if test "x$FOUND_MAKE" != x; then
16922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16923
16924  # First separate the path from the arguments. This will split at the first
16925  # space.
16926  complete="$FOUND_MAKE"
16927  path="${complete%% *}"
16928  tmp="$complete EOL"
16929  arguments="${tmp#* }"
16930
16931  # Input might be given as Windows format, start by converting to
16932  # unix format.
16933  new_path=`$CYGPATH -u "$path"`
16934
16935  # Now try to locate executable using which
16936  new_path=`$WHICH "$new_path" 2> /dev/null`
16937  # bat and cmd files are not always considered executable in cygwin causing which
16938  # to not find them
16939  if test "x$new_path" = x \
16940      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16941      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16942    new_path=`$CYGPATH -u "$path"`
16943  fi
16944  if test "x$new_path" = x; then
16945    # Oops. Which didn't find the executable.
16946    # The splitting of arguments from the executable at a space might have been incorrect,
16947    # since paths with space are more likely in Windows. Give it another try with the whole
16948    # argument.
16949    path="$complete"
16950    arguments="EOL"
16951    new_path=`$CYGPATH -u "$path"`
16952    new_path=`$WHICH "$new_path" 2> /dev/null`
16953    # bat and cmd files are not always considered executable in cygwin causing which
16954    # to not find them
16955    if test "x$new_path" = x \
16956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16958      new_path=`$CYGPATH -u "$path"`
16959    fi
16960    if test "x$new_path" = x; then
16961      # It's still not found. Now this is an unrecoverable error.
16962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16964      has_space=`$ECHO "$complete" | $GREP " "`
16965      if test "x$has_space" != x; then
16966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16968      fi
16969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16970    fi
16971  fi
16972
16973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16976  # "foo.exe" is OK but "foo" is an error.
16977  #
16978  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16979  # It is also a way to make sure we got the proper file name for the real test later on.
16980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16981  if test "x$test_shortpath" = x; then
16982    # Short path failed, file does not exist as specified.
16983    # Try adding .exe or .cmd
16984    if test -f "${new_path}.exe"; then
16985      input_to_shortpath="${new_path}.exe"
16986    elif test -f "${new_path}.cmd"; then
16987      input_to_shortpath="${new_path}.cmd"
16988    else
16989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16990$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16991      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16992$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16993      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16994    fi
16995  else
16996    input_to_shortpath="$new_path"
16997  fi
16998
16999  # Call helper function which possibly converts this using DOS-style short mode.
17000  # If so, the updated path is stored in $new_path.
17001  new_path="$input_to_shortpath"
17002
17003  input_path="$input_to_shortpath"
17004  # Check if we need to convert this using DOS-style short mode. If the path
17005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17006  # take no chances and rewrite it.
17007  # Note: m4 eats our [], so we need to use [ and ] instead.
17008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17009  if test "x$has_forbidden_chars" != x; then
17010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17014      # Going to short mode and back again did indeed matter. Since short mode is
17015      # case insensitive, let's make it lowercase to improve readability.
17016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17017      # Now convert it back to Unix-style (cygpath)
17018      input_path=`$CYGPATH -u "$shortmode_path"`
17019      new_path="$input_path"
17020    fi
17021  fi
17022
17023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17024  if test "x$test_cygdrive_prefix" = x; then
17025    # As a simple fix, exclude /usr/bin since it's not a real path.
17026    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17028      # a path prefixed by /cygdrive for fixpath to work.
17029      new_path="$CYGWIN_ROOT_PATH$input_path"
17030    fi
17031  fi
17032
17033  # remove trailing .exe if any
17034  new_path="${new_path/%.exe/}"
17035
17036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17037
17038  # First separate the path from the arguments. This will split at the first
17039  # space.
17040  complete="$FOUND_MAKE"
17041  path="${complete%% *}"
17042  tmp="$complete EOL"
17043  arguments="${tmp#* }"
17044
17045  # Input might be given as Windows format, start by converting to
17046  # unix format.
17047  new_path="$path"
17048
17049  windows_path="$new_path"
17050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17051    unix_path=`$CYGPATH -u "$windows_path"`
17052    new_path="$unix_path"
17053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17055    new_path="$unix_path"
17056  fi
17057
17058
17059  # Now try to locate executable using which
17060  new_path=`$WHICH "$new_path" 2> /dev/null`
17061
17062  if test "x$new_path" = x; then
17063    # Oops. Which didn't find the executable.
17064    # The splitting of arguments from the executable at a space might have been incorrect,
17065    # since paths with space are more likely in Windows. Give it another try with the whole
17066    # argument.
17067    path="$complete"
17068    arguments="EOL"
17069    new_path="$path"
17070
17071  windows_path="$new_path"
17072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17073    unix_path=`$CYGPATH -u "$windows_path"`
17074    new_path="$unix_path"
17075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17077    new_path="$unix_path"
17078  fi
17079
17080
17081    new_path=`$WHICH "$new_path" 2> /dev/null`
17082    # bat and cmd files are not always considered executable in MSYS causing which
17083    # to not find them
17084    if test "x$new_path" = x \
17085        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17086        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17087      new_path="$path"
17088
17089  windows_path="$new_path"
17090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17091    unix_path=`$CYGPATH -u "$windows_path"`
17092    new_path="$unix_path"
17093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17095    new_path="$unix_path"
17096  fi
17097
17098    fi
17099
17100    if test "x$new_path" = x; then
17101      # It's still not found. Now this is an unrecoverable error.
17102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17103$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17104      has_space=`$ECHO "$complete" | $GREP " "`
17105      if test "x$has_space" != x; then
17106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17108      fi
17109      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17110    fi
17111  fi
17112
17113  # Now new_path has a complete unix path to the binary
17114  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17115    # Keep paths in /bin as-is, but remove trailing .exe if any
17116    new_path="${new_path/%.exe/}"
17117    # Do not save /bin paths to all_fixpath_prefixes!
17118  else
17119    # Not in mixed or Windows style, start by that.
17120    new_path=`cmd //c echo $new_path`
17121
17122  input_path="$new_path"
17123  # Check if we need to convert this using DOS-style short mode. If the path
17124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17125  # take no chances and rewrite it.
17126  # Note: m4 eats our [], so we need to use [ and ] instead.
17127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17128  if test "x$has_forbidden_chars" != x; then
17129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17131  fi
17132
17133    # Output is in $new_path
17134
17135  windows_path="$new_path"
17136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17137    unix_path=`$CYGPATH -u "$windows_path"`
17138    new_path="$unix_path"
17139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17141    new_path="$unix_path"
17142  fi
17143
17144    # remove trailing .exe if any
17145    new_path="${new_path/%.exe/}"
17146
17147    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17148    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17149  fi
17150
17151    else
17152      # We're on a unix platform. Hooray! :)
17153      # First separate the path from the arguments. This will split at the first
17154      # space.
17155      complete="$FOUND_MAKE"
17156      path="${complete%% *}"
17157      tmp="$complete EOL"
17158      arguments="${tmp#* }"
17159
17160      # Cannot rely on the command "which" here since it doesn't always work.
17161      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17162      if test -z "$is_absolute_path"; then
17163        # Path to executable is not absolute. Find it.
17164        IFS_save="$IFS"
17165        IFS=:
17166        for p in $PATH; do
17167          if test -f "$p/$path" && test -x "$p/$path"; then
17168            new_path="$p/$path"
17169            break
17170          fi
17171        done
17172        IFS="$IFS_save"
17173      else
17174        # This is an absolute path, we can use it without further modifications.
17175        new_path="$path"
17176      fi
17177
17178      if test "x$new_path" = x; then
17179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17181        has_space=`$ECHO "$complete" | $GREP " "`
17182        if test "x$has_space" != x; then
17183          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17185        fi
17186        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17187      fi
17188    fi
17189
17190    # Now join together the path and the arguments once again
17191    if test "x$arguments" != xEOL; then
17192      new_complete="$new_path ${arguments% *}"
17193    else
17194      new_complete="$new_path"
17195    fi
17196
17197    if test "x$complete" != "x$new_complete"; then
17198      FOUND_MAKE="$new_complete"
17199      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17200$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17201    fi
17202  fi
17203
17204        fi
17205      fi
17206    fi
17207  fi
17208
17209
17210    if test "x$FOUND_MAKE" = x; then
17211      for ac_prog in make
17212do
17213  # Extract the first word of "$ac_prog", so it can be a program name with args.
17214set dummy $ac_prog; ac_word=$2
17215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17216$as_echo_n "checking for $ac_word... " >&6; }
17217if ${ac_cv_path_CHECK_MAKE+:} false; then :
17218  $as_echo_n "(cached) " >&6
17219else
17220  case $CHECK_MAKE in
17221  [\\/]* | ?:[\\/]*)
17222  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17223  ;;
17224  *)
17225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17226for as_dir in $PATH
17227do
17228  IFS=$as_save_IFS
17229  test -z "$as_dir" && as_dir=.
17230    for ac_exec_ext in '' $ac_executable_extensions; do
17231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17232    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17234    break 2
17235  fi
17236done
17237  done
17238IFS=$as_save_IFS
17239
17240  ;;
17241esac
17242fi
17243CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17244if test -n "$CHECK_MAKE"; then
17245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17246$as_echo "$CHECK_MAKE" >&6; }
17247else
17248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17249$as_echo "no" >&6; }
17250fi
17251
17252
17253  test -n "$CHECK_MAKE" && break
17254done
17255
17256
17257  MAKE_CANDIDATE=""$CHECK_MAKE""
17258  DESCRIPTION="make in PATH"
17259
17260  # On Cygwin, we require a newer version of make than on other platforms
17261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17262    MAKE_VERSION_EXPR="-e 4\."
17263    MAKE_REQUIRED_VERSION="4.0"
17264   else
17265    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17266    MAKE_REQUIRED_VERSION="3.81"
17267  fi
17268
17269  if test "x$MAKE_CANDIDATE" != x; then
17270    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17271$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17272    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17273    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17274    if test "x$IS_GNU_MAKE" = x; then
17275      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17276$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17277    else
17278      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17279      if test "x$IS_MODERN_MAKE" = x; then
17280        { $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
17281$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;}
17282      else
17283        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17284          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17285            MAKE_EXPECTED_ENV='cygwin'
17286          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17287            MAKE_EXPECTED_ENV='msys'
17288          else
17289            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17290          fi
17291          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17292          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17293        else
17294          # Not relevant for non-Windows
17295          IS_MAKE_CORRECT_ENV=true
17296        fi
17297        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17298          { $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
17299$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;}
17300        else
17301          FOUND_MAKE=$MAKE_CANDIDATE
17302
17303  # Only process if variable expands to non-empty
17304
17305  if test "x$FOUND_MAKE" != x; then
17306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17307
17308  # First separate the path from the arguments. This will split at the first
17309  # space.
17310  complete="$FOUND_MAKE"
17311  path="${complete%% *}"
17312  tmp="$complete EOL"
17313  arguments="${tmp#* }"
17314
17315  # Input might be given as Windows format, start by converting to
17316  # unix format.
17317  new_path=`$CYGPATH -u "$path"`
17318
17319  # Now try to locate executable using which
17320  new_path=`$WHICH "$new_path" 2> /dev/null`
17321  # bat and cmd files are not always considered executable in cygwin causing which
17322  # to not find them
17323  if test "x$new_path" = x \
17324      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17325      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17326    new_path=`$CYGPATH -u "$path"`
17327  fi
17328  if test "x$new_path" = x; then
17329    # Oops. Which didn't find the executable.
17330    # The splitting of arguments from the executable at a space might have been incorrect,
17331    # since paths with space are more likely in Windows. Give it another try with the whole
17332    # argument.
17333    path="$complete"
17334    arguments="EOL"
17335    new_path=`$CYGPATH -u "$path"`
17336    new_path=`$WHICH "$new_path" 2> /dev/null`
17337    # bat and cmd files are not always considered executable in cygwin causing which
17338    # to not find them
17339    if test "x$new_path" = x \
17340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17342      new_path=`$CYGPATH -u "$path"`
17343    fi
17344    if test "x$new_path" = x; then
17345      # It's still not found. Now this is an unrecoverable error.
17346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17347$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17348      has_space=`$ECHO "$complete" | $GREP " "`
17349      if test "x$has_space" != x; then
17350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17352      fi
17353      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17354    fi
17355  fi
17356
17357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17360  # "foo.exe" is OK but "foo" is an error.
17361  #
17362  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17363  # It is also a way to make sure we got the proper file name for the real test later on.
17364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17365  if test "x$test_shortpath" = x; then
17366    # Short path failed, file does not exist as specified.
17367    # Try adding .exe or .cmd
17368    if test -f "${new_path}.exe"; then
17369      input_to_shortpath="${new_path}.exe"
17370    elif test -f "${new_path}.cmd"; then
17371      input_to_shortpath="${new_path}.cmd"
17372    else
17373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17374$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17375      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17376$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17377      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17378    fi
17379  else
17380    input_to_shortpath="$new_path"
17381  fi
17382
17383  # Call helper function which possibly converts this using DOS-style short mode.
17384  # If so, the updated path is stored in $new_path.
17385  new_path="$input_to_shortpath"
17386
17387  input_path="$input_to_shortpath"
17388  # Check if we need to convert this using DOS-style short mode. If the path
17389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17390  # take no chances and rewrite it.
17391  # Note: m4 eats our [], so we need to use [ and ] instead.
17392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17393  if test "x$has_forbidden_chars" != x; then
17394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17398      # Going to short mode and back again did indeed matter. Since short mode is
17399      # case insensitive, let's make it lowercase to improve readability.
17400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17401      # Now convert it back to Unix-style (cygpath)
17402      input_path=`$CYGPATH -u "$shortmode_path"`
17403      new_path="$input_path"
17404    fi
17405  fi
17406
17407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17408  if test "x$test_cygdrive_prefix" = x; then
17409    # As a simple fix, exclude /usr/bin since it's not a real path.
17410    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17412      # a path prefixed by /cygdrive for fixpath to work.
17413      new_path="$CYGWIN_ROOT_PATH$input_path"
17414    fi
17415  fi
17416
17417  # remove trailing .exe if any
17418  new_path="${new_path/%.exe/}"
17419
17420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17421
17422  # First separate the path from the arguments. This will split at the first
17423  # space.
17424  complete="$FOUND_MAKE"
17425  path="${complete%% *}"
17426  tmp="$complete EOL"
17427  arguments="${tmp#* }"
17428
17429  # Input might be given as Windows format, start by converting to
17430  # unix format.
17431  new_path="$path"
17432
17433  windows_path="$new_path"
17434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17435    unix_path=`$CYGPATH -u "$windows_path"`
17436    new_path="$unix_path"
17437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17439    new_path="$unix_path"
17440  fi
17441
17442
17443  # Now try to locate executable using which
17444  new_path=`$WHICH "$new_path" 2> /dev/null`
17445
17446  if test "x$new_path" = x; then
17447    # Oops. Which didn't find the executable.
17448    # The splitting of arguments from the executable at a space might have been incorrect,
17449    # since paths with space are more likely in Windows. Give it another try with the whole
17450    # argument.
17451    path="$complete"
17452    arguments="EOL"
17453    new_path="$path"
17454
17455  windows_path="$new_path"
17456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17457    unix_path=`$CYGPATH -u "$windows_path"`
17458    new_path="$unix_path"
17459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17461    new_path="$unix_path"
17462  fi
17463
17464
17465    new_path=`$WHICH "$new_path" 2> /dev/null`
17466    # bat and cmd files are not always considered executable in MSYS causing which
17467    # to not find them
17468    if test "x$new_path" = x \
17469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17471      new_path="$path"
17472
17473  windows_path="$new_path"
17474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17475    unix_path=`$CYGPATH -u "$windows_path"`
17476    new_path="$unix_path"
17477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17479    new_path="$unix_path"
17480  fi
17481
17482    fi
17483
17484    if test "x$new_path" = x; then
17485      # It's still not found. Now this is an unrecoverable error.
17486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17488      has_space=`$ECHO "$complete" | $GREP " "`
17489      if test "x$has_space" != x; then
17490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17492      fi
17493      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17494    fi
17495  fi
17496
17497  # Now new_path has a complete unix path to the binary
17498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17499    # Keep paths in /bin as-is, but remove trailing .exe if any
17500    new_path="${new_path/%.exe/}"
17501    # Do not save /bin paths to all_fixpath_prefixes!
17502  else
17503    # Not in mixed or Windows style, start by that.
17504    new_path=`cmd //c echo $new_path`
17505
17506  input_path="$new_path"
17507  # Check if we need to convert this using DOS-style short mode. If the path
17508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17509  # take no chances and rewrite it.
17510  # Note: m4 eats our [], so we need to use [ and ] instead.
17511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17512  if test "x$has_forbidden_chars" != x; then
17513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17515  fi
17516
17517    # Output is in $new_path
17518
17519  windows_path="$new_path"
17520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17521    unix_path=`$CYGPATH -u "$windows_path"`
17522    new_path="$unix_path"
17523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17525    new_path="$unix_path"
17526  fi
17527
17528    # remove trailing .exe if any
17529    new_path="${new_path/%.exe/}"
17530
17531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17533  fi
17534
17535    else
17536      # We're on a unix platform. Hooray! :)
17537      # First separate the path from the arguments. This will split at the first
17538      # space.
17539      complete="$FOUND_MAKE"
17540      path="${complete%% *}"
17541      tmp="$complete EOL"
17542      arguments="${tmp#* }"
17543
17544      # Cannot rely on the command "which" here since it doesn't always work.
17545      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17546      if test -z "$is_absolute_path"; then
17547        # Path to executable is not absolute. Find it.
17548        IFS_save="$IFS"
17549        IFS=:
17550        for p in $PATH; do
17551          if test -f "$p/$path" && test -x "$p/$path"; then
17552            new_path="$p/$path"
17553            break
17554          fi
17555        done
17556        IFS="$IFS_save"
17557      else
17558        # This is an absolute path, we can use it without further modifications.
17559        new_path="$path"
17560      fi
17561
17562      if test "x$new_path" = x; then
17563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17564$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17565        has_space=`$ECHO "$complete" | $GREP " "`
17566        if test "x$has_space" != x; then
17567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17569        fi
17570        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17571      fi
17572    fi
17573
17574    # Now join together the path and the arguments once again
17575    if test "x$arguments" != xEOL; then
17576      new_complete="$new_path ${arguments% *}"
17577    else
17578      new_complete="$new_path"
17579    fi
17580
17581    if test "x$complete" != "x$new_complete"; then
17582      FOUND_MAKE="$new_complete"
17583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17584$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17585    fi
17586  fi
17587
17588        fi
17589      fi
17590    fi
17591  fi
17592
17593    fi
17594
17595    if test "x$FOUND_MAKE" = x; then
17596      if test "x$TOOLCHAIN_PATH" != x; then
17597        # We have a toolchain path, check that as well before giving up.
17598        OLD_PATH=$PATH
17599        PATH=$TOOLCHAIN_PATH:$PATH
17600        for ac_prog in gmake
17601do
17602  # Extract the first word of "$ac_prog", so it can be a program name with args.
17603set dummy $ac_prog; ac_word=$2
17604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17605$as_echo_n "checking for $ac_word... " >&6; }
17606if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17607  $as_echo_n "(cached) " >&6
17608else
17609  case $CHECK_TOOLSDIR_GMAKE in
17610  [\\/]* | ?:[\\/]*)
17611  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17612  ;;
17613  *)
17614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17615for as_dir in $PATH
17616do
17617  IFS=$as_save_IFS
17618  test -z "$as_dir" && as_dir=.
17619    for ac_exec_ext in '' $ac_executable_extensions; do
17620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17621    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17623    break 2
17624  fi
17625done
17626  done
17627IFS=$as_save_IFS
17628
17629  ;;
17630esac
17631fi
17632CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17633if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17635$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17636else
17637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17638$as_echo "no" >&6; }
17639fi
17640
17641
17642  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17643done
17644
17645
17646  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17647  DESCRIPTION="gmake in tools-dir"
17648
17649  # On Cygwin, we require a newer version of make than on other platforms
17650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17651    MAKE_VERSION_EXPR="-e 4\."
17652    MAKE_REQUIRED_VERSION="4.0"
17653   else
17654    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17655    MAKE_REQUIRED_VERSION="3.81"
17656  fi
17657
17658  if test "x$MAKE_CANDIDATE" != x; then
17659    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17660$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17661    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17662    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17663    if test "x$IS_GNU_MAKE" = x; then
17664      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17665$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17666    else
17667      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17668      if test "x$IS_MODERN_MAKE" = x; then
17669        { $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
17670$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;}
17671      else
17672        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17673          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17674            MAKE_EXPECTED_ENV='cygwin'
17675          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17676            MAKE_EXPECTED_ENV='msys'
17677          else
17678            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17679          fi
17680          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17681          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17682        else
17683          # Not relevant for non-Windows
17684          IS_MAKE_CORRECT_ENV=true
17685        fi
17686        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17687          { $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
17688$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;}
17689        else
17690          FOUND_MAKE=$MAKE_CANDIDATE
17691
17692  # Only process if variable expands to non-empty
17693
17694  if test "x$FOUND_MAKE" != x; then
17695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17696
17697  # First separate the path from the arguments. This will split at the first
17698  # space.
17699  complete="$FOUND_MAKE"
17700  path="${complete%% *}"
17701  tmp="$complete EOL"
17702  arguments="${tmp#* }"
17703
17704  # Input might be given as Windows format, start by converting to
17705  # unix format.
17706  new_path=`$CYGPATH -u "$path"`
17707
17708  # Now try to locate executable using which
17709  new_path=`$WHICH "$new_path" 2> /dev/null`
17710  # bat and cmd files are not always considered executable in cygwin causing which
17711  # to not find them
17712  if test "x$new_path" = x \
17713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17715    new_path=`$CYGPATH -u "$path"`
17716  fi
17717  if test "x$new_path" = x; then
17718    # Oops. Which didn't find the executable.
17719    # The splitting of arguments from the executable at a space might have been incorrect,
17720    # since paths with space are more likely in Windows. Give it another try with the whole
17721    # argument.
17722    path="$complete"
17723    arguments="EOL"
17724    new_path=`$CYGPATH -u "$path"`
17725    new_path=`$WHICH "$new_path" 2> /dev/null`
17726    # bat and cmd files are not always considered executable in cygwin causing which
17727    # to not find them
17728    if test "x$new_path" = x \
17729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17731      new_path=`$CYGPATH -u "$path"`
17732    fi
17733    if test "x$new_path" = x; then
17734      # It's still not found. Now this is an unrecoverable error.
17735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17736$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17737      has_space=`$ECHO "$complete" | $GREP " "`
17738      if test "x$has_space" != x; then
17739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17741      fi
17742      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17743    fi
17744  fi
17745
17746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17749  # "foo.exe" is OK but "foo" is an error.
17750  #
17751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17752  # It is also a way to make sure we got the proper file name for the real test later on.
17753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17754  if test "x$test_shortpath" = x; then
17755    # Short path failed, file does not exist as specified.
17756    # Try adding .exe or .cmd
17757    if test -f "${new_path}.exe"; then
17758      input_to_shortpath="${new_path}.exe"
17759    elif test -f "${new_path}.cmd"; then
17760      input_to_shortpath="${new_path}.cmd"
17761    else
17762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17766      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17767    fi
17768  else
17769    input_to_shortpath="$new_path"
17770  fi
17771
17772  # Call helper function which possibly converts this using DOS-style short mode.
17773  # If so, the updated path is stored in $new_path.
17774  new_path="$input_to_shortpath"
17775
17776  input_path="$input_to_shortpath"
17777  # Check if we need to convert this using DOS-style short mode. If the path
17778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17779  # take no chances and rewrite it.
17780  # Note: m4 eats our [], so we need to use [ and ] instead.
17781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17782  if test "x$has_forbidden_chars" != x; then
17783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17787      # Going to short mode and back again did indeed matter. Since short mode is
17788      # case insensitive, let's make it lowercase to improve readability.
17789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17790      # Now convert it back to Unix-style (cygpath)
17791      input_path=`$CYGPATH -u "$shortmode_path"`
17792      new_path="$input_path"
17793    fi
17794  fi
17795
17796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17797  if test "x$test_cygdrive_prefix" = x; then
17798    # As a simple fix, exclude /usr/bin since it's not a real path.
17799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17801      # a path prefixed by /cygdrive for fixpath to work.
17802      new_path="$CYGWIN_ROOT_PATH$input_path"
17803    fi
17804  fi
17805
17806  # remove trailing .exe if any
17807  new_path="${new_path/%.exe/}"
17808
17809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17810
17811  # First separate the path from the arguments. This will split at the first
17812  # space.
17813  complete="$FOUND_MAKE"
17814  path="${complete%% *}"
17815  tmp="$complete EOL"
17816  arguments="${tmp#* }"
17817
17818  # Input might be given as Windows format, start by converting to
17819  # unix format.
17820  new_path="$path"
17821
17822  windows_path="$new_path"
17823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17824    unix_path=`$CYGPATH -u "$windows_path"`
17825    new_path="$unix_path"
17826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17828    new_path="$unix_path"
17829  fi
17830
17831
17832  # Now try to locate executable using which
17833  new_path=`$WHICH "$new_path" 2> /dev/null`
17834
17835  if test "x$new_path" = x; then
17836    # Oops. Which didn't find the executable.
17837    # The splitting of arguments from the executable at a space might have been incorrect,
17838    # since paths with space are more likely in Windows. Give it another try with the whole
17839    # argument.
17840    path="$complete"
17841    arguments="EOL"
17842    new_path="$path"
17843
17844  windows_path="$new_path"
17845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17846    unix_path=`$CYGPATH -u "$windows_path"`
17847    new_path="$unix_path"
17848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17850    new_path="$unix_path"
17851  fi
17852
17853
17854    new_path=`$WHICH "$new_path" 2> /dev/null`
17855    # bat and cmd files are not always considered executable in MSYS causing which
17856    # to not find them
17857    if test "x$new_path" = x \
17858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17860      new_path="$path"
17861
17862  windows_path="$new_path"
17863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17864    unix_path=`$CYGPATH -u "$windows_path"`
17865    new_path="$unix_path"
17866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17868    new_path="$unix_path"
17869  fi
17870
17871    fi
17872
17873    if test "x$new_path" = x; then
17874      # It's still not found. Now this is an unrecoverable error.
17875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17876$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17877      has_space=`$ECHO "$complete" | $GREP " "`
17878      if test "x$has_space" != x; then
17879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17881      fi
17882      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17883    fi
17884  fi
17885
17886  # Now new_path has a complete unix path to the binary
17887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17888    # Keep paths in /bin as-is, but remove trailing .exe if any
17889    new_path="${new_path/%.exe/}"
17890    # Do not save /bin paths to all_fixpath_prefixes!
17891  else
17892    # Not in mixed or Windows style, start by that.
17893    new_path=`cmd //c echo $new_path`
17894
17895  input_path="$new_path"
17896  # Check if we need to convert this using DOS-style short mode. If the path
17897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17898  # take no chances and rewrite it.
17899  # Note: m4 eats our [], so we need to use [ and ] instead.
17900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17901  if test "x$has_forbidden_chars" != x; then
17902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17904  fi
17905
17906    # Output is in $new_path
17907
17908  windows_path="$new_path"
17909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17910    unix_path=`$CYGPATH -u "$windows_path"`
17911    new_path="$unix_path"
17912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17914    new_path="$unix_path"
17915  fi
17916
17917    # remove trailing .exe if any
17918    new_path="${new_path/%.exe/}"
17919
17920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17922  fi
17923
17924    else
17925      # We're on a unix platform. Hooray! :)
17926      # First separate the path from the arguments. This will split at the first
17927      # space.
17928      complete="$FOUND_MAKE"
17929      path="${complete%% *}"
17930      tmp="$complete EOL"
17931      arguments="${tmp#* }"
17932
17933      # Cannot rely on the command "which" here since it doesn't always work.
17934      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17935      if test -z "$is_absolute_path"; then
17936        # Path to executable is not absolute. Find it.
17937        IFS_save="$IFS"
17938        IFS=:
17939        for p in $PATH; do
17940          if test -f "$p/$path" && test -x "$p/$path"; then
17941            new_path="$p/$path"
17942            break
17943          fi
17944        done
17945        IFS="$IFS_save"
17946      else
17947        # This is an absolute path, we can use it without further modifications.
17948        new_path="$path"
17949      fi
17950
17951      if test "x$new_path" = x; then
17952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17953$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17954        has_space=`$ECHO "$complete" | $GREP " "`
17955        if test "x$has_space" != x; then
17956          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17957$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17958        fi
17959        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17960      fi
17961    fi
17962
17963    # Now join together the path and the arguments once again
17964    if test "x$arguments" != xEOL; then
17965      new_complete="$new_path ${arguments% *}"
17966    else
17967      new_complete="$new_path"
17968    fi
17969
17970    if test "x$complete" != "x$new_complete"; then
17971      FOUND_MAKE="$new_complete"
17972      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17973$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17974    fi
17975  fi
17976
17977        fi
17978      fi
17979    fi
17980  fi
17981
17982        if test "x$FOUND_MAKE" = x; then
17983          for ac_prog in make
17984do
17985  # Extract the first word of "$ac_prog", so it can be a program name with args.
17986set dummy $ac_prog; ac_word=$2
17987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17988$as_echo_n "checking for $ac_word... " >&6; }
17989if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17990  $as_echo_n "(cached) " >&6
17991else
17992  case $CHECK_TOOLSDIR_MAKE in
17993  [\\/]* | ?:[\\/]*)
17994  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17995  ;;
17996  *)
17997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17998for as_dir in $PATH
17999do
18000  IFS=$as_save_IFS
18001  test -z "$as_dir" && as_dir=.
18002    for ac_exec_ext in '' $ac_executable_extensions; do
18003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18004    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18006    break 2
18007  fi
18008done
18009  done
18010IFS=$as_save_IFS
18011
18012  ;;
18013esac
18014fi
18015CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18016if test -n "$CHECK_TOOLSDIR_MAKE"; then
18017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18018$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18019else
18020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18021$as_echo "no" >&6; }
18022fi
18023
18024
18025  test -n "$CHECK_TOOLSDIR_MAKE" && break
18026done
18027
18028
18029  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18030  DESCRIPTION="make in tools-dir"
18031
18032  # On Cygwin, we require a newer version of make than on other platforms
18033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18034    MAKE_VERSION_EXPR="-e 4\."
18035    MAKE_REQUIRED_VERSION="4.0"
18036   else
18037    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18038    MAKE_REQUIRED_VERSION="3.81"
18039  fi
18040
18041  if test "x$MAKE_CANDIDATE" != x; then
18042    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18043$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18044    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18045    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18046    if test "x$IS_GNU_MAKE" = x; then
18047      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18048$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18049    else
18050      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18051      if test "x$IS_MODERN_MAKE" = x; then
18052        { $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
18053$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;}
18054      else
18055        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18056          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18057            MAKE_EXPECTED_ENV='cygwin'
18058          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18059            MAKE_EXPECTED_ENV='msys'
18060          else
18061            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18062          fi
18063          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18064          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18065        else
18066          # Not relevant for non-Windows
18067          IS_MAKE_CORRECT_ENV=true
18068        fi
18069        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18070          { $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
18071$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;}
18072        else
18073          FOUND_MAKE=$MAKE_CANDIDATE
18074
18075  # Only process if variable expands to non-empty
18076
18077  if test "x$FOUND_MAKE" != x; then
18078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18079
18080  # First separate the path from the arguments. This will split at the first
18081  # space.
18082  complete="$FOUND_MAKE"
18083  path="${complete%% *}"
18084  tmp="$complete EOL"
18085  arguments="${tmp#* }"
18086
18087  # Input might be given as Windows format, start by converting to
18088  # unix format.
18089  new_path=`$CYGPATH -u "$path"`
18090
18091  # Now try to locate executable using which
18092  new_path=`$WHICH "$new_path" 2> /dev/null`
18093  # bat and cmd files are not always considered executable in cygwin causing which
18094  # to not find them
18095  if test "x$new_path" = x \
18096      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18097      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18098    new_path=`$CYGPATH -u "$path"`
18099  fi
18100  if test "x$new_path" = x; then
18101    # Oops. Which didn't find the executable.
18102    # The splitting of arguments from the executable at a space might have been incorrect,
18103    # since paths with space are more likely in Windows. Give it another try with the whole
18104    # argument.
18105    path="$complete"
18106    arguments="EOL"
18107    new_path=`$CYGPATH -u "$path"`
18108    new_path=`$WHICH "$new_path" 2> /dev/null`
18109    # bat and cmd files are not always considered executable in cygwin causing which
18110    # to not find them
18111    if test "x$new_path" = x \
18112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18114      new_path=`$CYGPATH -u "$path"`
18115    fi
18116    if test "x$new_path" = x; then
18117      # It's still not found. Now this is an unrecoverable error.
18118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18119$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18120      has_space=`$ECHO "$complete" | $GREP " "`
18121      if test "x$has_space" != x; then
18122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18124      fi
18125      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18126    fi
18127  fi
18128
18129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18132  # "foo.exe" is OK but "foo" is an error.
18133  #
18134  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18135  # It is also a way to make sure we got the proper file name for the real test later on.
18136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18137  if test "x$test_shortpath" = x; then
18138    # Short path failed, file does not exist as specified.
18139    # Try adding .exe or .cmd
18140    if test -f "${new_path}.exe"; then
18141      input_to_shortpath="${new_path}.exe"
18142    elif test -f "${new_path}.cmd"; then
18143      input_to_shortpath="${new_path}.cmd"
18144    else
18145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18146$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18147      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18148$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18149      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18150    fi
18151  else
18152    input_to_shortpath="$new_path"
18153  fi
18154
18155  # Call helper function which possibly converts this using DOS-style short mode.
18156  # If so, the updated path is stored in $new_path.
18157  new_path="$input_to_shortpath"
18158
18159  input_path="$input_to_shortpath"
18160  # Check if we need to convert this using DOS-style short mode. If the path
18161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18162  # take no chances and rewrite it.
18163  # Note: m4 eats our [], so we need to use [ and ] instead.
18164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18165  if test "x$has_forbidden_chars" != x; then
18166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18170      # Going to short mode and back again did indeed matter. Since short mode is
18171      # case insensitive, let's make it lowercase to improve readability.
18172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18173      # Now convert it back to Unix-style (cygpath)
18174      input_path=`$CYGPATH -u "$shortmode_path"`
18175      new_path="$input_path"
18176    fi
18177  fi
18178
18179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18180  if test "x$test_cygdrive_prefix" = x; then
18181    # As a simple fix, exclude /usr/bin since it's not a real path.
18182    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18184      # a path prefixed by /cygdrive for fixpath to work.
18185      new_path="$CYGWIN_ROOT_PATH$input_path"
18186    fi
18187  fi
18188
18189  # remove trailing .exe if any
18190  new_path="${new_path/%.exe/}"
18191
18192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18193
18194  # First separate the path from the arguments. This will split at the first
18195  # space.
18196  complete="$FOUND_MAKE"
18197  path="${complete%% *}"
18198  tmp="$complete EOL"
18199  arguments="${tmp#* }"
18200
18201  # Input might be given as Windows format, start by converting to
18202  # unix format.
18203  new_path="$path"
18204
18205  windows_path="$new_path"
18206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18207    unix_path=`$CYGPATH -u "$windows_path"`
18208    new_path="$unix_path"
18209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18211    new_path="$unix_path"
18212  fi
18213
18214
18215  # Now try to locate executable using which
18216  new_path=`$WHICH "$new_path" 2> /dev/null`
18217
18218  if test "x$new_path" = x; then
18219    # Oops. Which didn't find the executable.
18220    # The splitting of arguments from the executable at a space might have been incorrect,
18221    # since paths with space are more likely in Windows. Give it another try with the whole
18222    # argument.
18223    path="$complete"
18224    arguments="EOL"
18225    new_path="$path"
18226
18227  windows_path="$new_path"
18228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18229    unix_path=`$CYGPATH -u "$windows_path"`
18230    new_path="$unix_path"
18231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18233    new_path="$unix_path"
18234  fi
18235
18236
18237    new_path=`$WHICH "$new_path" 2> /dev/null`
18238    # bat and cmd files are not always considered executable in MSYS causing which
18239    # to not find them
18240    if test "x$new_path" = x \
18241        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18242        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18243      new_path="$path"
18244
18245  windows_path="$new_path"
18246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18247    unix_path=`$CYGPATH -u "$windows_path"`
18248    new_path="$unix_path"
18249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18251    new_path="$unix_path"
18252  fi
18253
18254    fi
18255
18256    if test "x$new_path" = x; then
18257      # It's still not found. Now this is an unrecoverable error.
18258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18259$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18260      has_space=`$ECHO "$complete" | $GREP " "`
18261      if test "x$has_space" != x; then
18262        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18263$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18264      fi
18265      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18266    fi
18267  fi
18268
18269  # Now new_path has a complete unix path to the binary
18270  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18271    # Keep paths in /bin as-is, but remove trailing .exe if any
18272    new_path="${new_path/%.exe/}"
18273    # Do not save /bin paths to all_fixpath_prefixes!
18274  else
18275    # Not in mixed or Windows style, start by that.
18276    new_path=`cmd //c echo $new_path`
18277
18278  input_path="$new_path"
18279  # Check if we need to convert this using DOS-style short mode. If the path
18280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18281  # take no chances and rewrite it.
18282  # Note: m4 eats our [], so we need to use [ and ] instead.
18283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18284  if test "x$has_forbidden_chars" != x; then
18285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18287  fi
18288
18289    # Output is in $new_path
18290
18291  windows_path="$new_path"
18292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18293    unix_path=`$CYGPATH -u "$windows_path"`
18294    new_path="$unix_path"
18295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18297    new_path="$unix_path"
18298  fi
18299
18300    # remove trailing .exe if any
18301    new_path="${new_path/%.exe/}"
18302
18303    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18304    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18305  fi
18306
18307    else
18308      # We're on a unix platform. Hooray! :)
18309      # First separate the path from the arguments. This will split at the first
18310      # space.
18311      complete="$FOUND_MAKE"
18312      path="${complete%% *}"
18313      tmp="$complete EOL"
18314      arguments="${tmp#* }"
18315
18316      # Cannot rely on the command "which" here since it doesn't always work.
18317      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18318      if test -z "$is_absolute_path"; then
18319        # Path to executable is not absolute. Find it.
18320        IFS_save="$IFS"
18321        IFS=:
18322        for p in $PATH; do
18323          if test -f "$p/$path" && test -x "$p/$path"; then
18324            new_path="$p/$path"
18325            break
18326          fi
18327        done
18328        IFS="$IFS_save"
18329      else
18330        # This is an absolute path, we can use it without further modifications.
18331        new_path="$path"
18332      fi
18333
18334      if test "x$new_path" = x; then
18335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18336$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18337        has_space=`$ECHO "$complete" | $GREP " "`
18338        if test "x$has_space" != x; then
18339          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18340$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18341        fi
18342        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18343      fi
18344    fi
18345
18346    # Now join together the path and the arguments once again
18347    if test "x$arguments" != xEOL; then
18348      new_complete="$new_path ${arguments% *}"
18349    else
18350      new_complete="$new_path"
18351    fi
18352
18353    if test "x$complete" != "x$new_complete"; then
18354      FOUND_MAKE="$new_complete"
18355      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18356$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18357    fi
18358  fi
18359
18360        fi
18361      fi
18362    fi
18363  fi
18364
18365        fi
18366        PATH=$OLD_PATH
18367      fi
18368    fi
18369
18370    if test "x$FOUND_MAKE" = x; then
18371      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
18372    fi
18373  fi
18374
18375  MAKE=$FOUND_MAKE
18376
18377  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
18378$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
18379
18380
18381  # Check if make supports the output sync option and if so, setup using it.
18382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
18383$as_echo_n "checking if make --output-sync is supported... " >&6; }
18384  if $MAKE --version -O > /dev/null 2>&1; then
18385    OUTPUT_SYNC_SUPPORTED=true
18386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18387$as_echo "yes" >&6; }
18388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
18389$as_echo_n "checking for output-sync value... " >&6; }
18390
18391# Check whether --with-output-sync was given.
18392if test "${with_output_sync+set}" = set; then :
18393  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
18394fi
18395
18396    if test "x$OUTPUT_SYNC" = "x"; then
18397      OUTPUT_SYNC=none
18398    fi
18399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
18400$as_echo "$OUTPUT_SYNC" >&6; }
18401    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
18402      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
18403    fi
18404  else
18405    OUTPUT_SYNC_SUPPORTED=false
18406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18407$as_echo "no" >&6; }
18408  fi
18409
18410
18411
18412
18413
18414
18415  # Test if find supports -delete
18416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
18417$as_echo_n "checking if find supports -delete... " >&6; }
18418  FIND_DELETE="-delete"
18419
18420  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
18421
18422  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
18423
18424  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
18425  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
18426    # No, it does not.
18427    rm $DELETEDIR/TestIfFindSupportsDelete
18428    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
18429      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
18430      FIND_DELETE="-print | xargs rm"
18431    else
18432      FIND_DELETE="-exec rm \{\} \+"
18433    fi
18434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18435$as_echo "no" >&6; }
18436  else
18437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18438$as_echo "yes" >&6; }
18439  fi
18440  rmdir $DELETEDIR
18441
18442
18443
18444  # These tools might not be installed by default,
18445  # need hint on how to install them.
18446
18447
18448
18449  # Publish this variable in the help.
18450
18451
18452  if [ -z "${UNZIP+x}" ]; then
18453    # The variable is not set by user, try to locate tool using the code snippet
18454    for ac_prog in unzip
18455do
18456  # Extract the first word of "$ac_prog", so it can be a program name with args.
18457set dummy $ac_prog; ac_word=$2
18458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18459$as_echo_n "checking for $ac_word... " >&6; }
18460if ${ac_cv_path_UNZIP+:} false; then :
18461  $as_echo_n "(cached) " >&6
18462else
18463  case $UNZIP in
18464  [\\/]* | ?:[\\/]*)
18465  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18466  ;;
18467  *)
18468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18469for as_dir in $PATH
18470do
18471  IFS=$as_save_IFS
18472  test -z "$as_dir" && as_dir=.
18473    for ac_exec_ext in '' $ac_executable_extensions; do
18474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18475    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18477    break 2
18478  fi
18479done
18480  done
18481IFS=$as_save_IFS
18482
18483  ;;
18484esac
18485fi
18486UNZIP=$ac_cv_path_UNZIP
18487if test -n "$UNZIP"; then
18488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18489$as_echo "$UNZIP" >&6; }
18490else
18491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18492$as_echo "no" >&6; }
18493fi
18494
18495
18496  test -n "$UNZIP" && break
18497done
18498
18499  else
18500    # The variable is set, but is it from the command line or the environment?
18501
18502    # Try to remove the string !UNZIP! from our list.
18503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
18504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18505      # If it failed, the variable was not from the command line. Ignore it,
18506      # but warn the user (except for BASH, which is always set by the calling BASH).
18507      if test "xUNZIP" != xBASH; then
18508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
18509$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
18510      fi
18511      # Try to locate tool using the code snippet
18512      for ac_prog in unzip
18513do
18514  # Extract the first word of "$ac_prog", so it can be a program name with args.
18515set dummy $ac_prog; ac_word=$2
18516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18517$as_echo_n "checking for $ac_word... " >&6; }
18518if ${ac_cv_path_UNZIP+:} false; then :
18519  $as_echo_n "(cached) " >&6
18520else
18521  case $UNZIP in
18522  [\\/]* | ?:[\\/]*)
18523  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18524  ;;
18525  *)
18526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18527for as_dir in $PATH
18528do
18529  IFS=$as_save_IFS
18530  test -z "$as_dir" && as_dir=.
18531    for ac_exec_ext in '' $ac_executable_extensions; do
18532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18533    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18535    break 2
18536  fi
18537done
18538  done
18539IFS=$as_save_IFS
18540
18541  ;;
18542esac
18543fi
18544UNZIP=$ac_cv_path_UNZIP
18545if test -n "$UNZIP"; then
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18547$as_echo "$UNZIP" >&6; }
18548else
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18550$as_echo "no" >&6; }
18551fi
18552
18553
18554  test -n "$UNZIP" && break
18555done
18556
18557    else
18558      # If it succeeded, then it was overridden by the user. We will use it
18559      # for the tool.
18560
18561      # First remove it from the list of overridden variables, so we can test
18562      # for unknown variables in the end.
18563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18564
18565      # Check if we try to supply an empty value
18566      if test "x$UNZIP" = x; then
18567        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
18568$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
18569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
18570$as_echo_n "checking for UNZIP... " >&6; }
18571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18572$as_echo "disabled" >&6; }
18573      else
18574        # Check if the provided tool contains a complete path.
18575        tool_specified="$UNZIP"
18576        tool_basename="${tool_specified##*/}"
18577        if test "x$tool_basename" = "x$tool_specified"; then
18578          # A command without a complete path is provided, search $PATH.
18579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
18580$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
18581          # Extract the first word of "$tool_basename", so it can be a program name with args.
18582set dummy $tool_basename; ac_word=$2
18583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18584$as_echo_n "checking for $ac_word... " >&6; }
18585if ${ac_cv_path_UNZIP+:} false; then :
18586  $as_echo_n "(cached) " >&6
18587else
18588  case $UNZIP in
18589  [\\/]* | ?:[\\/]*)
18590  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18591  ;;
18592  *)
18593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18594for as_dir in $PATH
18595do
18596  IFS=$as_save_IFS
18597  test -z "$as_dir" && as_dir=.
18598    for ac_exec_ext in '' $ac_executable_extensions; do
18599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18600    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18602    break 2
18603  fi
18604done
18605  done
18606IFS=$as_save_IFS
18607
18608  ;;
18609esac
18610fi
18611UNZIP=$ac_cv_path_UNZIP
18612if test -n "$UNZIP"; then
18613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18614$as_echo "$UNZIP" >&6; }
18615else
18616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18617$as_echo "no" >&6; }
18618fi
18619
18620
18621          if test "x$UNZIP" = x; then
18622            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18623          fi
18624        else
18625          # Otherwise we believe it is a complete path. Use it as it is.
18626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
18627$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
18628          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
18629$as_echo_n "checking for UNZIP... " >&6; }
18630          if test ! -x "$tool_specified"; then
18631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18632$as_echo "not found" >&6; }
18633            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
18634          fi
18635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18636$as_echo "$tool_specified" >&6; }
18637        fi
18638      fi
18639    fi
18640  fi
18641
18642
18643
18644  if test "x$UNZIP" = x; then
18645    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
18646  fi
18647
18648
18649
18650
18651
18652  # Publish this variable in the help.
18653
18654
18655  if [ -z "${ZIP+x}" ]; then
18656    # The variable is not set by user, try to locate tool using the code snippet
18657    for ac_prog in zip
18658do
18659  # Extract the first word of "$ac_prog", so it can be a program name with args.
18660set dummy $ac_prog; ac_word=$2
18661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18662$as_echo_n "checking for $ac_word... " >&6; }
18663if ${ac_cv_path_ZIP+:} false; then :
18664  $as_echo_n "(cached) " >&6
18665else
18666  case $ZIP in
18667  [\\/]* | ?:[\\/]*)
18668  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18669  ;;
18670  *)
18671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18672for as_dir in $PATH
18673do
18674  IFS=$as_save_IFS
18675  test -z "$as_dir" && as_dir=.
18676    for ac_exec_ext in '' $ac_executable_extensions; do
18677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18678    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18680    break 2
18681  fi
18682done
18683  done
18684IFS=$as_save_IFS
18685
18686  ;;
18687esac
18688fi
18689ZIP=$ac_cv_path_ZIP
18690if test -n "$ZIP"; then
18691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18692$as_echo "$ZIP" >&6; }
18693else
18694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18695$as_echo "no" >&6; }
18696fi
18697
18698
18699  test -n "$ZIP" && break
18700done
18701
18702  else
18703    # The variable is set, but is it from the command line or the environment?
18704
18705    # Try to remove the string !ZIP! from our list.
18706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
18707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18708      # If it failed, the variable was not from the command line. Ignore it,
18709      # but warn the user (except for BASH, which is always set by the calling BASH).
18710      if test "xZIP" != xBASH; then
18711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
18712$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
18713      fi
18714      # Try to locate tool using the code snippet
18715      for ac_prog in zip
18716do
18717  # Extract the first word of "$ac_prog", so it can be a program name with args.
18718set dummy $ac_prog; ac_word=$2
18719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18720$as_echo_n "checking for $ac_word... " >&6; }
18721if ${ac_cv_path_ZIP+:} false; then :
18722  $as_echo_n "(cached) " >&6
18723else
18724  case $ZIP in
18725  [\\/]* | ?:[\\/]*)
18726  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18727  ;;
18728  *)
18729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18730for as_dir in $PATH
18731do
18732  IFS=$as_save_IFS
18733  test -z "$as_dir" && as_dir=.
18734    for ac_exec_ext in '' $ac_executable_extensions; do
18735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18736    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18738    break 2
18739  fi
18740done
18741  done
18742IFS=$as_save_IFS
18743
18744  ;;
18745esac
18746fi
18747ZIP=$ac_cv_path_ZIP
18748if test -n "$ZIP"; then
18749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18750$as_echo "$ZIP" >&6; }
18751else
18752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18753$as_echo "no" >&6; }
18754fi
18755
18756
18757  test -n "$ZIP" && break
18758done
18759
18760    else
18761      # If it succeeded, then it was overridden by the user. We will use it
18762      # for the tool.
18763
18764      # First remove it from the list of overridden variables, so we can test
18765      # for unknown variables in the end.
18766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18767
18768      # Check if we try to supply an empty value
18769      if test "x$ZIP" = x; then
18770        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
18771$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
18772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
18773$as_echo_n "checking for ZIP... " >&6; }
18774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18775$as_echo "disabled" >&6; }
18776      else
18777        # Check if the provided tool contains a complete path.
18778        tool_specified="$ZIP"
18779        tool_basename="${tool_specified##*/}"
18780        if test "x$tool_basename" = "x$tool_specified"; then
18781          # A command without a complete path is provided, search $PATH.
18782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
18783$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
18784          # Extract the first word of "$tool_basename", so it can be a program name with args.
18785set dummy $tool_basename; ac_word=$2
18786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18787$as_echo_n "checking for $ac_word... " >&6; }
18788if ${ac_cv_path_ZIP+:} false; then :
18789  $as_echo_n "(cached) " >&6
18790else
18791  case $ZIP in
18792  [\\/]* | ?:[\\/]*)
18793  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18794  ;;
18795  *)
18796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18797for as_dir in $PATH
18798do
18799  IFS=$as_save_IFS
18800  test -z "$as_dir" && as_dir=.
18801    for ac_exec_ext in '' $ac_executable_extensions; do
18802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18803    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18805    break 2
18806  fi
18807done
18808  done
18809IFS=$as_save_IFS
18810
18811  ;;
18812esac
18813fi
18814ZIP=$ac_cv_path_ZIP
18815if test -n "$ZIP"; then
18816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18817$as_echo "$ZIP" >&6; }
18818else
18819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18820$as_echo "no" >&6; }
18821fi
18822
18823
18824          if test "x$ZIP" = x; then
18825            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18826          fi
18827        else
18828          # Otherwise we believe it is a complete path. Use it as it is.
18829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
18830$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
18831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
18832$as_echo_n "checking for ZIP... " >&6; }
18833          if test ! -x "$tool_specified"; then
18834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18835$as_echo "not found" >&6; }
18836            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
18837          fi
18838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18839$as_echo "$tool_specified" >&6; }
18840        fi
18841      fi
18842    fi
18843  fi
18844
18845
18846
18847  if test "x$ZIP" = x; then
18848    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
18849  fi
18850
18851
18852
18853  # Non-required basic tools
18854
18855
18856
18857  # Publish this variable in the help.
18858
18859
18860  if [ -z "${LDD+x}" ]; then
18861    # The variable is not set by user, try to locate tool using the code snippet
18862    for ac_prog in ldd
18863do
18864  # Extract the first word of "$ac_prog", so it can be a program name with args.
18865set dummy $ac_prog; ac_word=$2
18866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18867$as_echo_n "checking for $ac_word... " >&6; }
18868if ${ac_cv_path_LDD+:} false; then :
18869  $as_echo_n "(cached) " >&6
18870else
18871  case $LDD in
18872  [\\/]* | ?:[\\/]*)
18873  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18874  ;;
18875  *)
18876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18877for as_dir in $PATH
18878do
18879  IFS=$as_save_IFS
18880  test -z "$as_dir" && as_dir=.
18881    for ac_exec_ext in '' $ac_executable_extensions; do
18882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18883    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18885    break 2
18886  fi
18887done
18888  done
18889IFS=$as_save_IFS
18890
18891  ;;
18892esac
18893fi
18894LDD=$ac_cv_path_LDD
18895if test -n "$LDD"; then
18896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18897$as_echo "$LDD" >&6; }
18898else
18899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18900$as_echo "no" >&6; }
18901fi
18902
18903
18904  test -n "$LDD" && break
18905done
18906
18907  else
18908    # The variable is set, but is it from the command line or the environment?
18909
18910    # Try to remove the string !LDD! from our list.
18911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
18912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18913      # If it failed, the variable was not from the command line. Ignore it,
18914      # but warn the user (except for BASH, which is always set by the calling BASH).
18915      if test "xLDD" != xBASH; then
18916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
18917$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
18918      fi
18919      # Try to locate tool using the code snippet
18920      for ac_prog in ldd
18921do
18922  # Extract the first word of "$ac_prog", so it can be a program name with args.
18923set dummy $ac_prog; ac_word=$2
18924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18925$as_echo_n "checking for $ac_word... " >&6; }
18926if ${ac_cv_path_LDD+:} false; then :
18927  $as_echo_n "(cached) " >&6
18928else
18929  case $LDD in
18930  [\\/]* | ?:[\\/]*)
18931  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18932  ;;
18933  *)
18934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18935for as_dir in $PATH
18936do
18937  IFS=$as_save_IFS
18938  test -z "$as_dir" && as_dir=.
18939    for ac_exec_ext in '' $ac_executable_extensions; do
18940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18941    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18943    break 2
18944  fi
18945done
18946  done
18947IFS=$as_save_IFS
18948
18949  ;;
18950esac
18951fi
18952LDD=$ac_cv_path_LDD
18953if test -n "$LDD"; then
18954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18955$as_echo "$LDD" >&6; }
18956else
18957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18958$as_echo "no" >&6; }
18959fi
18960
18961
18962  test -n "$LDD" && break
18963done
18964
18965    else
18966      # If it succeeded, then it was overridden by the user. We will use it
18967      # for the tool.
18968
18969      # First remove it from the list of overridden variables, so we can test
18970      # for unknown variables in the end.
18971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18972
18973      # Check if we try to supply an empty value
18974      if test "x$LDD" = x; then
18975        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
18976$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
18977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18978$as_echo_n "checking for LDD... " >&6; }
18979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18980$as_echo "disabled" >&6; }
18981      else
18982        # Check if the provided tool contains a complete path.
18983        tool_specified="$LDD"
18984        tool_basename="${tool_specified##*/}"
18985        if test "x$tool_basename" = "x$tool_specified"; then
18986          # A command without a complete path is provided, search $PATH.
18987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18988$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18989          # Extract the first word of "$tool_basename", so it can be a program name with args.
18990set dummy $tool_basename; ac_word=$2
18991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18992$as_echo_n "checking for $ac_word... " >&6; }
18993if ${ac_cv_path_LDD+:} false; then :
18994  $as_echo_n "(cached) " >&6
18995else
18996  case $LDD in
18997  [\\/]* | ?:[\\/]*)
18998  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18999  ;;
19000  *)
19001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19002for as_dir in $PATH
19003do
19004  IFS=$as_save_IFS
19005  test -z "$as_dir" && as_dir=.
19006    for ac_exec_ext in '' $ac_executable_extensions; do
19007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19008    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
19009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19010    break 2
19011  fi
19012done
19013  done
19014IFS=$as_save_IFS
19015
19016  ;;
19017esac
19018fi
19019LDD=$ac_cv_path_LDD
19020if test -n "$LDD"; then
19021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
19022$as_echo "$LDD" >&6; }
19023else
19024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19025$as_echo "no" >&6; }
19026fi
19027
19028
19029          if test "x$LDD" = x; then
19030            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19031          fi
19032        else
19033          # Otherwise we believe it is a complete path. Use it as it is.
19034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
19035$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
19036          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
19037$as_echo_n "checking for LDD... " >&6; }
19038          if test ! -x "$tool_specified"; then
19039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19040$as_echo "not found" >&6; }
19041            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
19042          fi
19043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19044$as_echo "$tool_specified" >&6; }
19045        fi
19046      fi
19047    fi
19048  fi
19049
19050
19051  if test "x$LDD" = "x"; then
19052    # List shared lib dependencies is used for
19053    # debug output and checking for forbidden dependencies.
19054    # We can build without it.
19055    LDD="true"
19056  fi
19057
19058
19059  # Publish this variable in the help.
19060
19061
19062  if [ -z "${OTOOL+x}" ]; then
19063    # The variable is not set by user, try to locate tool using the code snippet
19064    for ac_prog in otool
19065do
19066  # Extract the first word of "$ac_prog", so it can be a program name with args.
19067set dummy $ac_prog; ac_word=$2
19068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19069$as_echo_n "checking for $ac_word... " >&6; }
19070if ${ac_cv_path_OTOOL+:} false; then :
19071  $as_echo_n "(cached) " >&6
19072else
19073  case $OTOOL in
19074  [\\/]* | ?:[\\/]*)
19075  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
19076  ;;
19077  *)
19078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19079for as_dir in $PATH
19080do
19081  IFS=$as_save_IFS
19082  test -z "$as_dir" && as_dir=.
19083    for ac_exec_ext in '' $ac_executable_extensions; do
19084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19085    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
19086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19087    break 2
19088  fi
19089done
19090  done
19091IFS=$as_save_IFS
19092
19093  ;;
19094esac
19095fi
19096OTOOL=$ac_cv_path_OTOOL
19097if test -n "$OTOOL"; then
19098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
19099$as_echo "$OTOOL" >&6; }
19100else
19101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19102$as_echo "no" >&6; }
19103fi
19104
19105
19106  test -n "$OTOOL" && break
19107done
19108
19109  else
19110    # The variable is set, but is it from the command line or the environment?
19111
19112    # Try to remove the string !OTOOL! from our list.
19113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
19114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19115      # If it failed, the variable was not from the command line. Ignore it,
19116      # but warn the user (except for BASH, which is always set by the calling BASH).
19117      if test "xOTOOL" != xBASH; then
19118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
19119$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
19120      fi
19121      # Try to locate tool using the code snippet
19122      for ac_prog in otool
19123do
19124  # Extract the first word of "$ac_prog", so it can be a program name with args.
19125set dummy $ac_prog; ac_word=$2
19126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19127$as_echo_n "checking for $ac_word... " >&6; }
19128if ${ac_cv_path_OTOOL+:} false; then :
19129  $as_echo_n "(cached) " >&6
19130else
19131  case $OTOOL in
19132  [\\/]* | ?:[\\/]*)
19133  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
19134  ;;
19135  *)
19136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19137for as_dir in $PATH
19138do
19139  IFS=$as_save_IFS
19140  test -z "$as_dir" && as_dir=.
19141    for ac_exec_ext in '' $ac_executable_extensions; do
19142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19143    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
19144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19145    break 2
19146  fi
19147done
19148  done
19149IFS=$as_save_IFS
19150
19151  ;;
19152esac
19153fi
19154OTOOL=$ac_cv_path_OTOOL
19155if test -n "$OTOOL"; then
19156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
19157$as_echo "$OTOOL" >&6; }
19158else
19159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19160$as_echo "no" >&6; }
19161fi
19162
19163
19164  test -n "$OTOOL" && break
19165done
19166
19167    else
19168      # If it succeeded, then it was overridden by the user. We will use it
19169      # for the tool.
19170
19171      # First remove it from the list of overridden variables, so we can test
19172      # for unknown variables in the end.
19173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19174
19175      # Check if we try to supply an empty value
19176      if test "x$OTOOL" = x; then
19177        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
19178$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
19179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
19180$as_echo_n "checking for OTOOL... " >&6; }
19181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19182$as_echo "disabled" >&6; }
19183      else
19184        # Check if the provided tool contains a complete path.
19185        tool_specified="$OTOOL"
19186        tool_basename="${tool_specified##*/}"
19187        if test "x$tool_basename" = "x$tool_specified"; then
19188          # A command without a complete path is provided, search $PATH.
19189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
19190$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
19191          # Extract the first word of "$tool_basename", so it can be a program name with args.
19192set dummy $tool_basename; ac_word=$2
19193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19194$as_echo_n "checking for $ac_word... " >&6; }
19195if ${ac_cv_path_OTOOL+:} false; then :
19196  $as_echo_n "(cached) " >&6
19197else
19198  case $OTOOL in
19199  [\\/]* | ?:[\\/]*)
19200  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
19201  ;;
19202  *)
19203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19204for as_dir in $PATH
19205do
19206  IFS=$as_save_IFS
19207  test -z "$as_dir" && as_dir=.
19208    for ac_exec_ext in '' $ac_executable_extensions; do
19209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19210    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
19211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19212    break 2
19213  fi
19214done
19215  done
19216IFS=$as_save_IFS
19217
19218  ;;
19219esac
19220fi
19221OTOOL=$ac_cv_path_OTOOL
19222if test -n "$OTOOL"; then
19223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
19224$as_echo "$OTOOL" >&6; }
19225else
19226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19227$as_echo "no" >&6; }
19228fi
19229
19230
19231          if test "x$OTOOL" = x; then
19232            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19233          fi
19234        else
19235          # Otherwise we believe it is a complete path. Use it as it is.
19236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
19237$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
19238          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
19239$as_echo_n "checking for OTOOL... " >&6; }
19240          if test ! -x "$tool_specified"; then
19241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19242$as_echo "not found" >&6; }
19243            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
19244          fi
19245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19246$as_echo "$tool_specified" >&6; }
19247        fi
19248      fi
19249    fi
19250  fi
19251
19252
19253  if test "x$OTOOL" = "x"; then
19254    OTOOL="true"
19255  fi
19256
19257
19258  # Publish this variable in the help.
19259
19260
19261  if [ -z "${READELF+x}" ]; then
19262    # The variable is not set by user, try to locate tool using the code snippet
19263    for ac_prog in greadelf readelf
19264do
19265  # Extract the first word of "$ac_prog", so it can be a program name with args.
19266set dummy $ac_prog; ac_word=$2
19267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19268$as_echo_n "checking for $ac_word... " >&6; }
19269if ${ac_cv_path_READELF+:} false; then :
19270  $as_echo_n "(cached) " >&6
19271else
19272  case $READELF in
19273  [\\/]* | ?:[\\/]*)
19274  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19275  ;;
19276  *)
19277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19278for as_dir in $PATH
19279do
19280  IFS=$as_save_IFS
19281  test -z "$as_dir" && as_dir=.
19282    for ac_exec_ext in '' $ac_executable_extensions; do
19283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19284    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19286    break 2
19287  fi
19288done
19289  done
19290IFS=$as_save_IFS
19291
19292  ;;
19293esac
19294fi
19295READELF=$ac_cv_path_READELF
19296if test -n "$READELF"; then
19297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19298$as_echo "$READELF" >&6; }
19299else
19300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19301$as_echo "no" >&6; }
19302fi
19303
19304
19305  test -n "$READELF" && break
19306done
19307
19308  else
19309    # The variable is set, but is it from the command line or the environment?
19310
19311    # Try to remove the string !READELF! from our list.
19312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
19313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19314      # If it failed, the variable was not from the command line. Ignore it,
19315      # but warn the user (except for BASH, which is always set by the calling BASH).
19316      if test "xREADELF" != xBASH; then
19317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
19318$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
19319      fi
19320      # Try to locate tool using the code snippet
19321      for ac_prog in greadelf readelf
19322do
19323  # Extract the first word of "$ac_prog", so it can be a program name with args.
19324set dummy $ac_prog; ac_word=$2
19325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19326$as_echo_n "checking for $ac_word... " >&6; }
19327if ${ac_cv_path_READELF+:} false; then :
19328  $as_echo_n "(cached) " >&6
19329else
19330  case $READELF in
19331  [\\/]* | ?:[\\/]*)
19332  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19333  ;;
19334  *)
19335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19336for as_dir in $PATH
19337do
19338  IFS=$as_save_IFS
19339  test -z "$as_dir" && as_dir=.
19340    for ac_exec_ext in '' $ac_executable_extensions; do
19341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19342    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19344    break 2
19345  fi
19346done
19347  done
19348IFS=$as_save_IFS
19349
19350  ;;
19351esac
19352fi
19353READELF=$ac_cv_path_READELF
19354if test -n "$READELF"; then
19355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19356$as_echo "$READELF" >&6; }
19357else
19358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19359$as_echo "no" >&6; }
19360fi
19361
19362
19363  test -n "$READELF" && break
19364done
19365
19366    else
19367      # If it succeeded, then it was overridden by the user. We will use it
19368      # for the tool.
19369
19370      # First remove it from the list of overridden variables, so we can test
19371      # for unknown variables in the end.
19372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19373
19374      # Check if we try to supply an empty value
19375      if test "x$READELF" = x; then
19376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
19377$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
19378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
19379$as_echo_n "checking for READELF... " >&6; }
19380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19381$as_echo "disabled" >&6; }
19382      else
19383        # Check if the provided tool contains a complete path.
19384        tool_specified="$READELF"
19385        tool_basename="${tool_specified##*/}"
19386        if test "x$tool_basename" = "x$tool_specified"; then
19387          # A command without a complete path is provided, search $PATH.
19388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
19389$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
19390          # Extract the first word of "$tool_basename", so it can be a program name with args.
19391set dummy $tool_basename; ac_word=$2
19392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19393$as_echo_n "checking for $ac_word... " >&6; }
19394if ${ac_cv_path_READELF+:} false; then :
19395  $as_echo_n "(cached) " >&6
19396else
19397  case $READELF in
19398  [\\/]* | ?:[\\/]*)
19399  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19400  ;;
19401  *)
19402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19403for as_dir in $PATH
19404do
19405  IFS=$as_save_IFS
19406  test -z "$as_dir" && as_dir=.
19407    for ac_exec_ext in '' $ac_executable_extensions; do
19408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19409    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19411    break 2
19412  fi
19413done
19414  done
19415IFS=$as_save_IFS
19416
19417  ;;
19418esac
19419fi
19420READELF=$ac_cv_path_READELF
19421if test -n "$READELF"; then
19422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19423$as_echo "$READELF" >&6; }
19424else
19425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19426$as_echo "no" >&6; }
19427fi
19428
19429
19430          if test "x$READELF" = x; then
19431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19432          fi
19433        else
19434          # Otherwise we believe it is a complete path. Use it as it is.
19435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
19436$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
19437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
19438$as_echo_n "checking for READELF... " >&6; }
19439          if test ! -x "$tool_specified"; then
19440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19441$as_echo "not found" >&6; }
19442            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
19443          fi
19444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19445$as_echo "$tool_specified" >&6; }
19446        fi
19447      fi
19448    fi
19449  fi
19450
19451
19452
19453
19454  # Publish this variable in the help.
19455
19456
19457  if [ -z "${HG+x}" ]; then
19458    # The variable is not set by user, try to locate tool using the code snippet
19459    for ac_prog in hg
19460do
19461  # Extract the first word of "$ac_prog", so it can be a program name with args.
19462set dummy $ac_prog; ac_word=$2
19463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19464$as_echo_n "checking for $ac_word... " >&6; }
19465if ${ac_cv_path_HG+:} false; then :
19466  $as_echo_n "(cached) " >&6
19467else
19468  case $HG in
19469  [\\/]* | ?:[\\/]*)
19470  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19471  ;;
19472  *)
19473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19474for as_dir in $PATH
19475do
19476  IFS=$as_save_IFS
19477  test -z "$as_dir" && as_dir=.
19478    for ac_exec_ext in '' $ac_executable_extensions; do
19479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19480    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19482    break 2
19483  fi
19484done
19485  done
19486IFS=$as_save_IFS
19487
19488  ;;
19489esac
19490fi
19491HG=$ac_cv_path_HG
19492if test -n "$HG"; then
19493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19494$as_echo "$HG" >&6; }
19495else
19496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19497$as_echo "no" >&6; }
19498fi
19499
19500
19501  test -n "$HG" && break
19502done
19503
19504  else
19505    # The variable is set, but is it from the command line or the environment?
19506
19507    # Try to remove the string !HG! from our list.
19508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
19509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19510      # If it failed, the variable was not from the command line. Ignore it,
19511      # but warn the user (except for BASH, which is always set by the calling BASH).
19512      if test "xHG" != xBASH; then
19513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
19514$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
19515      fi
19516      # Try to locate tool using the code snippet
19517      for ac_prog in hg
19518do
19519  # Extract the first word of "$ac_prog", so it can be a program name with args.
19520set dummy $ac_prog; ac_word=$2
19521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19522$as_echo_n "checking for $ac_word... " >&6; }
19523if ${ac_cv_path_HG+:} false; then :
19524  $as_echo_n "(cached) " >&6
19525else
19526  case $HG in
19527  [\\/]* | ?:[\\/]*)
19528  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19529  ;;
19530  *)
19531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19532for as_dir in $PATH
19533do
19534  IFS=$as_save_IFS
19535  test -z "$as_dir" && as_dir=.
19536    for ac_exec_ext in '' $ac_executable_extensions; do
19537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19538    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19540    break 2
19541  fi
19542done
19543  done
19544IFS=$as_save_IFS
19545
19546  ;;
19547esac
19548fi
19549HG=$ac_cv_path_HG
19550if test -n "$HG"; then
19551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19552$as_echo "$HG" >&6; }
19553else
19554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19555$as_echo "no" >&6; }
19556fi
19557
19558
19559  test -n "$HG" && break
19560done
19561
19562    else
19563      # If it succeeded, then it was overridden by the user. We will use it
19564      # for the tool.
19565
19566      # First remove it from the list of overridden variables, so we can test
19567      # for unknown variables in the end.
19568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19569
19570      # Check if we try to supply an empty value
19571      if test "x$HG" = x; then
19572        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
19573$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
19574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
19575$as_echo_n "checking for HG... " >&6; }
19576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19577$as_echo "disabled" >&6; }
19578      else
19579        # Check if the provided tool contains a complete path.
19580        tool_specified="$HG"
19581        tool_basename="${tool_specified##*/}"
19582        if test "x$tool_basename" = "x$tool_specified"; then
19583          # A command without a complete path is provided, search $PATH.
19584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
19585$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
19586          # Extract the first word of "$tool_basename", so it can be a program name with args.
19587set dummy $tool_basename; ac_word=$2
19588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19589$as_echo_n "checking for $ac_word... " >&6; }
19590if ${ac_cv_path_HG+:} false; then :
19591  $as_echo_n "(cached) " >&6
19592else
19593  case $HG in
19594  [\\/]* | ?:[\\/]*)
19595  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19596  ;;
19597  *)
19598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19599for as_dir in $PATH
19600do
19601  IFS=$as_save_IFS
19602  test -z "$as_dir" && as_dir=.
19603    for ac_exec_ext in '' $ac_executable_extensions; do
19604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19605    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19607    break 2
19608  fi
19609done
19610  done
19611IFS=$as_save_IFS
19612
19613  ;;
19614esac
19615fi
19616HG=$ac_cv_path_HG
19617if test -n "$HG"; then
19618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19619$as_echo "$HG" >&6; }
19620else
19621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19622$as_echo "no" >&6; }
19623fi
19624
19625
19626          if test "x$HG" = x; then
19627            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19628          fi
19629        else
19630          # Otherwise we believe it is a complete path. Use it as it is.
19631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
19632$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
19633          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
19634$as_echo_n "checking for HG... " >&6; }
19635          if test ! -x "$tool_specified"; then
19636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19637$as_echo "not found" >&6; }
19638            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
19639          fi
19640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19641$as_echo "$tool_specified" >&6; }
19642        fi
19643      fi
19644    fi
19645  fi
19646
19647
19648
19649
19650  # Publish this variable in the help.
19651
19652
19653  if [ -z "${STAT+x}" ]; then
19654    # The variable is not set by user, try to locate tool using the code snippet
19655    for ac_prog in stat
19656do
19657  # Extract the first word of "$ac_prog", so it can be a program name with args.
19658set dummy $ac_prog; ac_word=$2
19659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19660$as_echo_n "checking for $ac_word... " >&6; }
19661if ${ac_cv_path_STAT+:} false; then :
19662  $as_echo_n "(cached) " >&6
19663else
19664  case $STAT in
19665  [\\/]* | ?:[\\/]*)
19666  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19667  ;;
19668  *)
19669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19670for as_dir in $PATH
19671do
19672  IFS=$as_save_IFS
19673  test -z "$as_dir" && as_dir=.
19674    for ac_exec_ext in '' $ac_executable_extensions; do
19675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19676    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19678    break 2
19679  fi
19680done
19681  done
19682IFS=$as_save_IFS
19683
19684  ;;
19685esac
19686fi
19687STAT=$ac_cv_path_STAT
19688if test -n "$STAT"; then
19689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19690$as_echo "$STAT" >&6; }
19691else
19692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19693$as_echo "no" >&6; }
19694fi
19695
19696
19697  test -n "$STAT" && break
19698done
19699
19700  else
19701    # The variable is set, but is it from the command line or the environment?
19702
19703    # Try to remove the string !STAT! from our list.
19704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
19705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19706      # If it failed, the variable was not from the command line. Ignore it,
19707      # but warn the user (except for BASH, which is always set by the calling BASH).
19708      if test "xSTAT" != xBASH; then
19709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
19710$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
19711      fi
19712      # Try to locate tool using the code snippet
19713      for ac_prog in stat
19714do
19715  # Extract the first word of "$ac_prog", so it can be a program name with args.
19716set dummy $ac_prog; ac_word=$2
19717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19718$as_echo_n "checking for $ac_word... " >&6; }
19719if ${ac_cv_path_STAT+:} false; then :
19720  $as_echo_n "(cached) " >&6
19721else
19722  case $STAT in
19723  [\\/]* | ?:[\\/]*)
19724  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19725  ;;
19726  *)
19727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19728for as_dir in $PATH
19729do
19730  IFS=$as_save_IFS
19731  test -z "$as_dir" && as_dir=.
19732    for ac_exec_ext in '' $ac_executable_extensions; do
19733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19734    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19736    break 2
19737  fi
19738done
19739  done
19740IFS=$as_save_IFS
19741
19742  ;;
19743esac
19744fi
19745STAT=$ac_cv_path_STAT
19746if test -n "$STAT"; then
19747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19748$as_echo "$STAT" >&6; }
19749else
19750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19751$as_echo "no" >&6; }
19752fi
19753
19754
19755  test -n "$STAT" && break
19756done
19757
19758    else
19759      # If it succeeded, then it was overridden by the user. We will use it
19760      # for the tool.
19761
19762      # First remove it from the list of overridden variables, so we can test
19763      # for unknown variables in the end.
19764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19765
19766      # Check if we try to supply an empty value
19767      if test "x$STAT" = x; then
19768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
19769$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
19770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
19771$as_echo_n "checking for STAT... " >&6; }
19772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19773$as_echo "disabled" >&6; }
19774      else
19775        # Check if the provided tool contains a complete path.
19776        tool_specified="$STAT"
19777        tool_basename="${tool_specified##*/}"
19778        if test "x$tool_basename" = "x$tool_specified"; then
19779          # A command without a complete path is provided, search $PATH.
19780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
19781$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
19782          # Extract the first word of "$tool_basename", so it can be a program name with args.
19783set dummy $tool_basename; ac_word=$2
19784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19785$as_echo_n "checking for $ac_word... " >&6; }
19786if ${ac_cv_path_STAT+:} false; then :
19787  $as_echo_n "(cached) " >&6
19788else
19789  case $STAT in
19790  [\\/]* | ?:[\\/]*)
19791  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19792  ;;
19793  *)
19794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19795for as_dir in $PATH
19796do
19797  IFS=$as_save_IFS
19798  test -z "$as_dir" && as_dir=.
19799    for ac_exec_ext in '' $ac_executable_extensions; do
19800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19801    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19803    break 2
19804  fi
19805done
19806  done
19807IFS=$as_save_IFS
19808
19809  ;;
19810esac
19811fi
19812STAT=$ac_cv_path_STAT
19813if test -n "$STAT"; then
19814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19815$as_echo "$STAT" >&6; }
19816else
19817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19818$as_echo "no" >&6; }
19819fi
19820
19821
19822          if test "x$STAT" = x; then
19823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19824          fi
19825        else
19826          # Otherwise we believe it is a complete path. Use it as it is.
19827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
19828$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
19829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
19830$as_echo_n "checking for STAT... " >&6; }
19831          if test ! -x "$tool_specified"; then
19832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19833$as_echo "not found" >&6; }
19834            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
19835          fi
19836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19837$as_echo "$tool_specified" >&6; }
19838        fi
19839      fi
19840    fi
19841  fi
19842
19843
19844
19845
19846  # Publish this variable in the help.
19847
19848
19849  if [ -z "${TIME+x}" ]; then
19850    # The variable is not set by user, try to locate tool using the code snippet
19851    for ac_prog in time
19852do
19853  # Extract the first word of "$ac_prog", so it can be a program name with args.
19854set dummy $ac_prog; ac_word=$2
19855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19856$as_echo_n "checking for $ac_word... " >&6; }
19857if ${ac_cv_path_TIME+:} false; then :
19858  $as_echo_n "(cached) " >&6
19859else
19860  case $TIME in
19861  [\\/]* | ?:[\\/]*)
19862  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19863  ;;
19864  *)
19865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19866for as_dir in $PATH
19867do
19868  IFS=$as_save_IFS
19869  test -z "$as_dir" && as_dir=.
19870    for ac_exec_ext in '' $ac_executable_extensions; do
19871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19872    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19874    break 2
19875  fi
19876done
19877  done
19878IFS=$as_save_IFS
19879
19880  ;;
19881esac
19882fi
19883TIME=$ac_cv_path_TIME
19884if test -n "$TIME"; then
19885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19886$as_echo "$TIME" >&6; }
19887else
19888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19889$as_echo "no" >&6; }
19890fi
19891
19892
19893  test -n "$TIME" && break
19894done
19895
19896  else
19897    # The variable is set, but is it from the command line or the environment?
19898
19899    # Try to remove the string !TIME! from our list.
19900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
19901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19902      # If it failed, the variable was not from the command line. Ignore it,
19903      # but warn the user (except for BASH, which is always set by the calling BASH).
19904      if test "xTIME" != xBASH; then
19905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
19906$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
19907      fi
19908      # Try to locate tool using the code snippet
19909      for ac_prog in time
19910do
19911  # Extract the first word of "$ac_prog", so it can be a program name with args.
19912set dummy $ac_prog; ac_word=$2
19913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19914$as_echo_n "checking for $ac_word... " >&6; }
19915if ${ac_cv_path_TIME+:} false; then :
19916  $as_echo_n "(cached) " >&6
19917else
19918  case $TIME in
19919  [\\/]* | ?:[\\/]*)
19920  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19921  ;;
19922  *)
19923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19924for as_dir in $PATH
19925do
19926  IFS=$as_save_IFS
19927  test -z "$as_dir" && as_dir=.
19928    for ac_exec_ext in '' $ac_executable_extensions; do
19929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19930    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19932    break 2
19933  fi
19934done
19935  done
19936IFS=$as_save_IFS
19937
19938  ;;
19939esac
19940fi
19941TIME=$ac_cv_path_TIME
19942if test -n "$TIME"; then
19943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19944$as_echo "$TIME" >&6; }
19945else
19946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19947$as_echo "no" >&6; }
19948fi
19949
19950
19951  test -n "$TIME" && break
19952done
19953
19954    else
19955      # If it succeeded, then it was overridden by the user. We will use it
19956      # for the tool.
19957
19958      # First remove it from the list of overridden variables, so we can test
19959      # for unknown variables in the end.
19960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19961
19962      # Check if we try to supply an empty value
19963      if test "x$TIME" = x; then
19964        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
19965$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
19966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19967$as_echo_n "checking for TIME... " >&6; }
19968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19969$as_echo "disabled" >&6; }
19970      else
19971        # Check if the provided tool contains a complete path.
19972        tool_specified="$TIME"
19973        tool_basename="${tool_specified##*/}"
19974        if test "x$tool_basename" = "x$tool_specified"; then
19975          # A command without a complete path is provided, search $PATH.
19976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
19977$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
19978          # Extract the first word of "$tool_basename", so it can be a program name with args.
19979set dummy $tool_basename; ac_word=$2
19980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19981$as_echo_n "checking for $ac_word... " >&6; }
19982if ${ac_cv_path_TIME+:} false; then :
19983  $as_echo_n "(cached) " >&6
19984else
19985  case $TIME in
19986  [\\/]* | ?:[\\/]*)
19987  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19988  ;;
19989  *)
19990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19991for as_dir in $PATH
19992do
19993  IFS=$as_save_IFS
19994  test -z "$as_dir" && as_dir=.
19995    for ac_exec_ext in '' $ac_executable_extensions; do
19996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19997    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19999    break 2
20000  fi
20001done
20002  done
20003IFS=$as_save_IFS
20004
20005  ;;
20006esac
20007fi
20008TIME=$ac_cv_path_TIME
20009if test -n "$TIME"; then
20010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
20011$as_echo "$TIME" >&6; }
20012else
20013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20014$as_echo "no" >&6; }
20015fi
20016
20017
20018          if test "x$TIME" = x; then
20019            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20020          fi
20021        else
20022          # Otherwise we believe it is a complete path. Use it as it is.
20023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
20024$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
20025          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
20026$as_echo_n "checking for TIME... " >&6; }
20027          if test ! -x "$tool_specified"; then
20028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20029$as_echo "not found" >&6; }
20030            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
20031          fi
20032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20033$as_echo "$tool_specified" >&6; }
20034        fi
20035      fi
20036    fi
20037  fi
20038
20039
20040
20041
20042  # Publish this variable in the help.
20043
20044
20045  if [ -z "${PATCH+x}" ]; then
20046    # The variable is not set by user, try to locate tool using the code snippet
20047    for ac_prog in gpatch patch
20048do
20049  # Extract the first word of "$ac_prog", so it can be a program name with args.
20050set dummy $ac_prog; ac_word=$2
20051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20052$as_echo_n "checking for $ac_word... " >&6; }
20053if ${ac_cv_path_PATCH+:} false; then :
20054  $as_echo_n "(cached) " >&6
20055else
20056  case $PATCH in
20057  [\\/]* | ?:[\\/]*)
20058  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
20059  ;;
20060  *)
20061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20062for as_dir in $PATH
20063do
20064  IFS=$as_save_IFS
20065  test -z "$as_dir" && as_dir=.
20066    for ac_exec_ext in '' $ac_executable_extensions; do
20067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20068    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
20069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20070    break 2
20071  fi
20072done
20073  done
20074IFS=$as_save_IFS
20075
20076  ;;
20077esac
20078fi
20079PATCH=$ac_cv_path_PATCH
20080if test -n "$PATCH"; then
20081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
20082$as_echo "$PATCH" >&6; }
20083else
20084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20085$as_echo "no" >&6; }
20086fi
20087
20088
20089  test -n "$PATCH" && break
20090done
20091
20092  else
20093    # The variable is set, but is it from the command line or the environment?
20094
20095    # Try to remove the string !PATCH! from our list.
20096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
20097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20098      # If it failed, the variable was not from the command line. Ignore it,
20099      # but warn the user (except for BASH, which is always set by the calling BASH).
20100      if test "xPATCH" != xBASH; then
20101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
20102$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
20103      fi
20104      # Try to locate tool using the code snippet
20105      for ac_prog in gpatch patch
20106do
20107  # Extract the first word of "$ac_prog", so it can be a program name with args.
20108set dummy $ac_prog; ac_word=$2
20109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20110$as_echo_n "checking for $ac_word... " >&6; }
20111if ${ac_cv_path_PATCH+:} false; then :
20112  $as_echo_n "(cached) " >&6
20113else
20114  case $PATCH in
20115  [\\/]* | ?:[\\/]*)
20116  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
20117  ;;
20118  *)
20119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20120for as_dir in $PATH
20121do
20122  IFS=$as_save_IFS
20123  test -z "$as_dir" && as_dir=.
20124    for ac_exec_ext in '' $ac_executable_extensions; do
20125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20126    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
20127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20128    break 2
20129  fi
20130done
20131  done
20132IFS=$as_save_IFS
20133
20134  ;;
20135esac
20136fi
20137PATCH=$ac_cv_path_PATCH
20138if test -n "$PATCH"; then
20139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
20140$as_echo "$PATCH" >&6; }
20141else
20142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20143$as_echo "no" >&6; }
20144fi
20145
20146
20147  test -n "$PATCH" && break
20148done
20149
20150    else
20151      # If it succeeded, then it was overridden by the user. We will use it
20152      # for the tool.
20153
20154      # First remove it from the list of overridden variables, so we can test
20155      # for unknown variables in the end.
20156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20157
20158      # Check if we try to supply an empty value
20159      if test "x$PATCH" = x; then
20160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
20161$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
20162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
20163$as_echo_n "checking for PATCH... " >&6; }
20164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20165$as_echo "disabled" >&6; }
20166      else
20167        # Check if the provided tool contains a complete path.
20168        tool_specified="$PATCH"
20169        tool_basename="${tool_specified##*/}"
20170        if test "x$tool_basename" = "x$tool_specified"; then
20171          # A command without a complete path is provided, search $PATH.
20172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
20173$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
20174          # Extract the first word of "$tool_basename", so it can be a program name with args.
20175set dummy $tool_basename; ac_word=$2
20176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20177$as_echo_n "checking for $ac_word... " >&6; }
20178if ${ac_cv_path_PATCH+:} false; then :
20179  $as_echo_n "(cached) " >&6
20180else
20181  case $PATCH in
20182  [\\/]* | ?:[\\/]*)
20183  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
20184  ;;
20185  *)
20186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20187for as_dir in $PATH
20188do
20189  IFS=$as_save_IFS
20190  test -z "$as_dir" && as_dir=.
20191    for ac_exec_ext in '' $ac_executable_extensions; do
20192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20193    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
20194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20195    break 2
20196  fi
20197done
20198  done
20199IFS=$as_save_IFS
20200
20201  ;;
20202esac
20203fi
20204PATCH=$ac_cv_path_PATCH
20205if test -n "$PATCH"; then
20206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
20207$as_echo "$PATCH" >&6; }
20208else
20209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20210$as_echo "no" >&6; }
20211fi
20212
20213
20214          if test "x$PATCH" = x; then
20215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20216          fi
20217        else
20218          # Otherwise we believe it is a complete path. Use it as it is.
20219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
20220$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
20221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
20222$as_echo_n "checking for PATCH... " >&6; }
20223          if test ! -x "$tool_specified"; then
20224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20225$as_echo "not found" >&6; }
20226            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
20227          fi
20228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20229$as_echo "$tool_specified" >&6; }
20230        fi
20231      fi
20232    fi
20233  fi
20234
20235
20236  # Check if it's GNU time
20237  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
20238  if test "x$IS_GNU_TIME" != x; then
20239    IS_GNU_TIME=yes
20240  else
20241    IS_GNU_TIME=no
20242  fi
20243
20244
20245  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
20246
20247
20248
20249  # Publish this variable in the help.
20250
20251
20252  if [ -z "${DSYMUTIL+x}" ]; then
20253    # The variable is not set by user, try to locate tool using the code snippet
20254    for ac_prog in dsymutil
20255do
20256  # Extract the first word of "$ac_prog", so it can be a program name with args.
20257set dummy $ac_prog; ac_word=$2
20258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20259$as_echo_n "checking for $ac_word... " >&6; }
20260if ${ac_cv_path_DSYMUTIL+:} false; then :
20261  $as_echo_n "(cached) " >&6
20262else
20263  case $DSYMUTIL in
20264  [\\/]* | ?:[\\/]*)
20265  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20266  ;;
20267  *)
20268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20269for as_dir in $PATH
20270do
20271  IFS=$as_save_IFS
20272  test -z "$as_dir" && as_dir=.
20273    for ac_exec_ext in '' $ac_executable_extensions; do
20274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20275    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20277    break 2
20278  fi
20279done
20280  done
20281IFS=$as_save_IFS
20282
20283  ;;
20284esac
20285fi
20286DSYMUTIL=$ac_cv_path_DSYMUTIL
20287if test -n "$DSYMUTIL"; then
20288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20289$as_echo "$DSYMUTIL" >&6; }
20290else
20291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20292$as_echo "no" >&6; }
20293fi
20294
20295
20296  test -n "$DSYMUTIL" && break
20297done
20298
20299  else
20300    # The variable is set, but is it from the command line or the environment?
20301
20302    # Try to remove the string !DSYMUTIL! from our list.
20303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
20304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20305      # If it failed, the variable was not from the command line. Ignore it,
20306      # but warn the user (except for BASH, which is always set by the calling BASH).
20307      if test "xDSYMUTIL" != xBASH; then
20308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
20309$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
20310      fi
20311      # Try to locate tool using the code snippet
20312      for ac_prog in dsymutil
20313do
20314  # Extract the first word of "$ac_prog", so it can be a program name with args.
20315set dummy $ac_prog; ac_word=$2
20316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20317$as_echo_n "checking for $ac_word... " >&6; }
20318if ${ac_cv_path_DSYMUTIL+:} false; then :
20319  $as_echo_n "(cached) " >&6
20320else
20321  case $DSYMUTIL in
20322  [\\/]* | ?:[\\/]*)
20323  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20324  ;;
20325  *)
20326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20327for as_dir in $PATH
20328do
20329  IFS=$as_save_IFS
20330  test -z "$as_dir" && as_dir=.
20331    for ac_exec_ext in '' $ac_executable_extensions; do
20332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20333    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20335    break 2
20336  fi
20337done
20338  done
20339IFS=$as_save_IFS
20340
20341  ;;
20342esac
20343fi
20344DSYMUTIL=$ac_cv_path_DSYMUTIL
20345if test -n "$DSYMUTIL"; then
20346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20347$as_echo "$DSYMUTIL" >&6; }
20348else
20349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20350$as_echo "no" >&6; }
20351fi
20352
20353
20354  test -n "$DSYMUTIL" && break
20355done
20356
20357    else
20358      # If it succeeded, then it was overridden by the user. We will use it
20359      # for the tool.
20360
20361      # First remove it from the list of overridden variables, so we can test
20362      # for unknown variables in the end.
20363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20364
20365      # Check if we try to supply an empty value
20366      if test "x$DSYMUTIL" = x; then
20367        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
20368$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
20369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
20370$as_echo_n "checking for DSYMUTIL... " >&6; }
20371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20372$as_echo "disabled" >&6; }
20373      else
20374        # Check if the provided tool contains a complete path.
20375        tool_specified="$DSYMUTIL"
20376        tool_basename="${tool_specified##*/}"
20377        if test "x$tool_basename" = "x$tool_specified"; then
20378          # A command without a complete path is provided, search $PATH.
20379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
20380$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
20381          # Extract the first word of "$tool_basename", so it can be a program name with args.
20382set dummy $tool_basename; ac_word=$2
20383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20384$as_echo_n "checking for $ac_word... " >&6; }
20385if ${ac_cv_path_DSYMUTIL+:} false; then :
20386  $as_echo_n "(cached) " >&6
20387else
20388  case $DSYMUTIL in
20389  [\\/]* | ?:[\\/]*)
20390  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20391  ;;
20392  *)
20393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20394for as_dir in $PATH
20395do
20396  IFS=$as_save_IFS
20397  test -z "$as_dir" && as_dir=.
20398    for ac_exec_ext in '' $ac_executable_extensions; do
20399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20400    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20402    break 2
20403  fi
20404done
20405  done
20406IFS=$as_save_IFS
20407
20408  ;;
20409esac
20410fi
20411DSYMUTIL=$ac_cv_path_DSYMUTIL
20412if test -n "$DSYMUTIL"; then
20413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20414$as_echo "$DSYMUTIL" >&6; }
20415else
20416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20417$as_echo "no" >&6; }
20418fi
20419
20420
20421          if test "x$DSYMUTIL" = x; then
20422            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20423          fi
20424        else
20425          # Otherwise we believe it is a complete path. Use it as it is.
20426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
20427$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
20428          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
20429$as_echo_n "checking for DSYMUTIL... " >&6; }
20430          if test ! -x "$tool_specified"; then
20431            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20432$as_echo "not found" >&6; }
20433            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
20434          fi
20435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20436$as_echo "$tool_specified" >&6; }
20437        fi
20438      fi
20439    fi
20440  fi
20441
20442
20443
20444  if test "x$DSYMUTIL" = x; then
20445    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
20446  fi
20447
20448
20449
20450
20451
20452  # Publish this variable in the help.
20453
20454
20455  if [ -z "${XATTR+x}" ]; then
20456    # The variable is not set by user, try to locate tool using the code snippet
20457    for ac_prog in xattr
20458do
20459  # Extract the first word of "$ac_prog", so it can be a program name with args.
20460set dummy $ac_prog; ac_word=$2
20461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20462$as_echo_n "checking for $ac_word... " >&6; }
20463if ${ac_cv_path_XATTR+:} false; then :
20464  $as_echo_n "(cached) " >&6
20465else
20466  case $XATTR in
20467  [\\/]* | ?:[\\/]*)
20468  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20469  ;;
20470  *)
20471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20472for as_dir in $PATH
20473do
20474  IFS=$as_save_IFS
20475  test -z "$as_dir" && as_dir=.
20476    for ac_exec_ext in '' $ac_executable_extensions; do
20477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20478    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20480    break 2
20481  fi
20482done
20483  done
20484IFS=$as_save_IFS
20485
20486  ;;
20487esac
20488fi
20489XATTR=$ac_cv_path_XATTR
20490if test -n "$XATTR"; then
20491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20492$as_echo "$XATTR" >&6; }
20493else
20494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20495$as_echo "no" >&6; }
20496fi
20497
20498
20499  test -n "$XATTR" && break
20500done
20501
20502  else
20503    # The variable is set, but is it from the command line or the environment?
20504
20505    # Try to remove the string !XATTR! from our list.
20506    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
20507    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20508      # If it failed, the variable was not from the command line. Ignore it,
20509      # but warn the user (except for BASH, which is always set by the calling BASH).
20510      if test "xXATTR" != xBASH; then
20511        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
20512$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
20513      fi
20514      # Try to locate tool using the code snippet
20515      for ac_prog in xattr
20516do
20517  # Extract the first word of "$ac_prog", so it can be a program name with args.
20518set dummy $ac_prog; ac_word=$2
20519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20520$as_echo_n "checking for $ac_word... " >&6; }
20521if ${ac_cv_path_XATTR+:} false; then :
20522  $as_echo_n "(cached) " >&6
20523else
20524  case $XATTR in
20525  [\\/]* | ?:[\\/]*)
20526  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20527  ;;
20528  *)
20529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20530for as_dir in $PATH
20531do
20532  IFS=$as_save_IFS
20533  test -z "$as_dir" && as_dir=.
20534    for ac_exec_ext in '' $ac_executable_extensions; do
20535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20536    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20538    break 2
20539  fi
20540done
20541  done
20542IFS=$as_save_IFS
20543
20544  ;;
20545esac
20546fi
20547XATTR=$ac_cv_path_XATTR
20548if test -n "$XATTR"; then
20549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20550$as_echo "$XATTR" >&6; }
20551else
20552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20553$as_echo "no" >&6; }
20554fi
20555
20556
20557  test -n "$XATTR" && break
20558done
20559
20560    else
20561      # If it succeeded, then it was overridden by the user. We will use it
20562      # for the tool.
20563
20564      # First remove it from the list of overridden variables, so we can test
20565      # for unknown variables in the end.
20566      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20567
20568      # Check if we try to supply an empty value
20569      if test "x$XATTR" = x; then
20570        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
20571$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
20572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
20573$as_echo_n "checking for XATTR... " >&6; }
20574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20575$as_echo "disabled" >&6; }
20576      else
20577        # Check if the provided tool contains a complete path.
20578        tool_specified="$XATTR"
20579        tool_basename="${tool_specified##*/}"
20580        if test "x$tool_basename" = "x$tool_specified"; then
20581          # A command without a complete path is provided, search $PATH.
20582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
20583$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
20584          # Extract the first word of "$tool_basename", so it can be a program name with args.
20585set dummy $tool_basename; ac_word=$2
20586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20587$as_echo_n "checking for $ac_word... " >&6; }
20588if ${ac_cv_path_XATTR+:} false; then :
20589  $as_echo_n "(cached) " >&6
20590else
20591  case $XATTR in
20592  [\\/]* | ?:[\\/]*)
20593  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20594  ;;
20595  *)
20596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20597for as_dir in $PATH
20598do
20599  IFS=$as_save_IFS
20600  test -z "$as_dir" && as_dir=.
20601    for ac_exec_ext in '' $ac_executable_extensions; do
20602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20603    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20605    break 2
20606  fi
20607done
20608  done
20609IFS=$as_save_IFS
20610
20611  ;;
20612esac
20613fi
20614XATTR=$ac_cv_path_XATTR
20615if test -n "$XATTR"; then
20616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20617$as_echo "$XATTR" >&6; }
20618else
20619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20620$as_echo "no" >&6; }
20621fi
20622
20623
20624          if test "x$XATTR" = x; then
20625            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20626          fi
20627        else
20628          # Otherwise we believe it is a complete path. Use it as it is.
20629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
20630$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
20631          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
20632$as_echo_n "checking for XATTR... " >&6; }
20633          if test ! -x "$tool_specified"; then
20634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20635$as_echo "not found" >&6; }
20636            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
20637          fi
20638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20639$as_echo "$tool_specified" >&6; }
20640        fi
20641      fi
20642    fi
20643  fi
20644
20645
20646
20647  if test "x$XATTR" = x; then
20648    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
20649  fi
20650
20651
20652
20653
20654  # Publish this variable in the help.
20655
20656
20657  if [ -z "${CODESIGN+x}" ]; then
20658    # The variable is not set by user, try to locate tool using the code snippet
20659    for ac_prog in codesign
20660do
20661  # Extract the first word of "$ac_prog", so it can be a program name with args.
20662set dummy $ac_prog; ac_word=$2
20663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20664$as_echo_n "checking for $ac_word... " >&6; }
20665if ${ac_cv_path_CODESIGN+:} false; then :
20666  $as_echo_n "(cached) " >&6
20667else
20668  case $CODESIGN in
20669  [\\/]* | ?:[\\/]*)
20670  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20671  ;;
20672  *)
20673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20674for as_dir in $PATH
20675do
20676  IFS=$as_save_IFS
20677  test -z "$as_dir" && as_dir=.
20678    for ac_exec_ext in '' $ac_executable_extensions; do
20679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20680    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20682    break 2
20683  fi
20684done
20685  done
20686IFS=$as_save_IFS
20687
20688  ;;
20689esac
20690fi
20691CODESIGN=$ac_cv_path_CODESIGN
20692if test -n "$CODESIGN"; then
20693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20694$as_echo "$CODESIGN" >&6; }
20695else
20696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20697$as_echo "no" >&6; }
20698fi
20699
20700
20701  test -n "$CODESIGN" && break
20702done
20703
20704  else
20705    # The variable is set, but is it from the command line or the environment?
20706
20707    # Try to remove the string !CODESIGN! from our list.
20708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
20709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20710      # If it failed, the variable was not from the command line. Ignore it,
20711      # but warn the user (except for BASH, which is always set by the calling BASH).
20712      if test "xCODESIGN" != xBASH; then
20713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
20714$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
20715      fi
20716      # Try to locate tool using the code snippet
20717      for ac_prog in codesign
20718do
20719  # Extract the first word of "$ac_prog", so it can be a program name with args.
20720set dummy $ac_prog; ac_word=$2
20721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20722$as_echo_n "checking for $ac_word... " >&6; }
20723if ${ac_cv_path_CODESIGN+:} false; then :
20724  $as_echo_n "(cached) " >&6
20725else
20726  case $CODESIGN in
20727  [\\/]* | ?:[\\/]*)
20728  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20729  ;;
20730  *)
20731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20732for as_dir in $PATH
20733do
20734  IFS=$as_save_IFS
20735  test -z "$as_dir" && as_dir=.
20736    for ac_exec_ext in '' $ac_executable_extensions; do
20737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20738    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20740    break 2
20741  fi
20742done
20743  done
20744IFS=$as_save_IFS
20745
20746  ;;
20747esac
20748fi
20749CODESIGN=$ac_cv_path_CODESIGN
20750if test -n "$CODESIGN"; then
20751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20752$as_echo "$CODESIGN" >&6; }
20753else
20754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20755$as_echo "no" >&6; }
20756fi
20757
20758
20759  test -n "$CODESIGN" && break
20760done
20761
20762    else
20763      # If it succeeded, then it was overridden by the user. We will use it
20764      # for the tool.
20765
20766      # First remove it from the list of overridden variables, so we can test
20767      # for unknown variables in the end.
20768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20769
20770      # Check if we try to supply an empty value
20771      if test "x$CODESIGN" = x; then
20772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
20773$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
20774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
20775$as_echo_n "checking for CODESIGN... " >&6; }
20776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20777$as_echo "disabled" >&6; }
20778      else
20779        # Check if the provided tool contains a complete path.
20780        tool_specified="$CODESIGN"
20781        tool_basename="${tool_specified##*/}"
20782        if test "x$tool_basename" = "x$tool_specified"; then
20783          # A command without a complete path is provided, search $PATH.
20784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
20785$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
20786          # Extract the first word of "$tool_basename", so it can be a program name with args.
20787set dummy $tool_basename; ac_word=$2
20788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20789$as_echo_n "checking for $ac_word... " >&6; }
20790if ${ac_cv_path_CODESIGN+:} false; then :
20791  $as_echo_n "(cached) " >&6
20792else
20793  case $CODESIGN in
20794  [\\/]* | ?:[\\/]*)
20795  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20796  ;;
20797  *)
20798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20799for as_dir in $PATH
20800do
20801  IFS=$as_save_IFS
20802  test -z "$as_dir" && as_dir=.
20803    for ac_exec_ext in '' $ac_executable_extensions; do
20804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20805    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20807    break 2
20808  fi
20809done
20810  done
20811IFS=$as_save_IFS
20812
20813  ;;
20814esac
20815fi
20816CODESIGN=$ac_cv_path_CODESIGN
20817if test -n "$CODESIGN"; then
20818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20819$as_echo "$CODESIGN" >&6; }
20820else
20821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20822$as_echo "no" >&6; }
20823fi
20824
20825
20826          if test "x$CODESIGN" = x; then
20827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20828          fi
20829        else
20830          # Otherwise we believe it is a complete path. Use it as it is.
20831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
20832$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
20833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
20834$as_echo_n "checking for CODESIGN... " >&6; }
20835          if test ! -x "$tool_specified"; then
20836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20837$as_echo "not found" >&6; }
20838            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
20839          fi
20840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20841$as_echo "$tool_specified" >&6; }
20842        fi
20843      fi
20844    fi
20845  fi
20846
20847
20848    if test "x$CODESIGN" != "x"; then
20849      # Verify that the openjdk_codesign certificate is present
20850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
20851$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
20852      rm -f codesign-testfile
20853      touch codesign-testfile
20854      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
20855      rm -f codesign-testfile
20856      if test "x$CODESIGN" = x; then
20857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20858$as_echo "no" >&6; }
20859      else
20860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20861$as_echo "yes" >&6; }
20862      fi
20863    fi
20864
20865
20866
20867  # Publish this variable in the help.
20868
20869
20870  if [ -z "${SETFILE+x}" ]; then
20871    # The variable is not set by user, try to locate tool using the code snippet
20872    for ac_prog in SetFile
20873do
20874  # Extract the first word of "$ac_prog", so it can be a program name with args.
20875set dummy $ac_prog; ac_word=$2
20876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20877$as_echo_n "checking for $ac_word... " >&6; }
20878if ${ac_cv_path_SETFILE+:} false; then :
20879  $as_echo_n "(cached) " >&6
20880else
20881  case $SETFILE in
20882  [\\/]* | ?:[\\/]*)
20883  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20884  ;;
20885  *)
20886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20887for as_dir in $PATH
20888do
20889  IFS=$as_save_IFS
20890  test -z "$as_dir" && as_dir=.
20891    for ac_exec_ext in '' $ac_executable_extensions; do
20892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20893    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20895    break 2
20896  fi
20897done
20898  done
20899IFS=$as_save_IFS
20900
20901  ;;
20902esac
20903fi
20904SETFILE=$ac_cv_path_SETFILE
20905if test -n "$SETFILE"; then
20906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20907$as_echo "$SETFILE" >&6; }
20908else
20909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20910$as_echo "no" >&6; }
20911fi
20912
20913
20914  test -n "$SETFILE" && break
20915done
20916
20917  else
20918    # The variable is set, but is it from the command line or the environment?
20919
20920    # Try to remove the string !SETFILE! from our list.
20921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
20922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20923      # If it failed, the variable was not from the command line. Ignore it,
20924      # but warn the user (except for BASH, which is always set by the calling BASH).
20925      if test "xSETFILE" != xBASH; then
20926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
20927$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
20928      fi
20929      # Try to locate tool using the code snippet
20930      for ac_prog in SetFile
20931do
20932  # Extract the first word of "$ac_prog", so it can be a program name with args.
20933set dummy $ac_prog; ac_word=$2
20934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20935$as_echo_n "checking for $ac_word... " >&6; }
20936if ${ac_cv_path_SETFILE+:} false; then :
20937  $as_echo_n "(cached) " >&6
20938else
20939  case $SETFILE in
20940  [\\/]* | ?:[\\/]*)
20941  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20942  ;;
20943  *)
20944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20945for as_dir in $PATH
20946do
20947  IFS=$as_save_IFS
20948  test -z "$as_dir" && as_dir=.
20949    for ac_exec_ext in '' $ac_executable_extensions; do
20950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20951    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20953    break 2
20954  fi
20955done
20956  done
20957IFS=$as_save_IFS
20958
20959  ;;
20960esac
20961fi
20962SETFILE=$ac_cv_path_SETFILE
20963if test -n "$SETFILE"; then
20964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20965$as_echo "$SETFILE" >&6; }
20966else
20967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20968$as_echo "no" >&6; }
20969fi
20970
20971
20972  test -n "$SETFILE" && break
20973done
20974
20975    else
20976      # If it succeeded, then it was overridden by the user. We will use it
20977      # for the tool.
20978
20979      # First remove it from the list of overridden variables, so we can test
20980      # for unknown variables in the end.
20981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20982
20983      # Check if we try to supply an empty value
20984      if test "x$SETFILE" = x; then
20985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
20986$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
20987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
20988$as_echo_n "checking for SETFILE... " >&6; }
20989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20990$as_echo "disabled" >&6; }
20991      else
20992        # Check if the provided tool contains a complete path.
20993        tool_specified="$SETFILE"
20994        tool_basename="${tool_specified##*/}"
20995        if test "x$tool_basename" = "x$tool_specified"; then
20996          # A command without a complete path is provided, search $PATH.
20997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
20998$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
20999          # Extract the first word of "$tool_basename", so it can be a program name with args.
21000set dummy $tool_basename; ac_word=$2
21001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21002$as_echo_n "checking for $ac_word... " >&6; }
21003if ${ac_cv_path_SETFILE+:} false; then :
21004  $as_echo_n "(cached) " >&6
21005else
21006  case $SETFILE in
21007  [\\/]* | ?:[\\/]*)
21008  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
21009  ;;
21010  *)
21011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21012for as_dir in $PATH
21013do
21014  IFS=$as_save_IFS
21015  test -z "$as_dir" && as_dir=.
21016    for ac_exec_ext in '' $ac_executable_extensions; do
21017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21018    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
21019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21020    break 2
21021  fi
21022done
21023  done
21024IFS=$as_save_IFS
21025
21026  ;;
21027esac
21028fi
21029SETFILE=$ac_cv_path_SETFILE
21030if test -n "$SETFILE"; then
21031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
21032$as_echo "$SETFILE" >&6; }
21033else
21034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21035$as_echo "no" >&6; }
21036fi
21037
21038
21039          if test "x$SETFILE" = x; then
21040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21041          fi
21042        else
21043          # Otherwise we believe it is a complete path. Use it as it is.
21044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
21045$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
21046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
21047$as_echo_n "checking for SETFILE... " >&6; }
21048          if test ! -x "$tool_specified"; then
21049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21050$as_echo "not found" >&6; }
21051            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
21052          fi
21053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21054$as_echo "$tool_specified" >&6; }
21055        fi
21056      fi
21057    fi
21058  fi
21059
21060
21061
21062  if test "x$SETFILE" = x; then
21063    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
21064  fi
21065
21066
21067  fi
21068
21069
21070  # Test if bash supports pipefail.
21071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
21072$as_echo_n "checking if bash supports pipefail... " >&6; }
21073  if ${BASH} -c 'set -o pipefail'; then
21074    BASH_ARGS="$BASH_ARGS -o pipefail"
21075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21076$as_echo "yes" >&6; }
21077  else
21078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21079$as_echo "no" >&6; }
21080  fi
21081
21082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
21083$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
21084  if ${BASH} -e -c 'true'; then
21085    BASH_ARGS="$BASH_ARGS -e"
21086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21087$as_echo "yes" >&6; }
21088  else
21089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21090$as_echo "no" >&6; }
21091  fi
21092
21093
21094
21095
21096# Check if pkg-config is available.
21097
21098
21099if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
21100	if test -n "$ac_tool_prefix"; then
21101  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
21102set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
21103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21104$as_echo_n "checking for $ac_word... " >&6; }
21105if ${ac_cv_path_PKG_CONFIG+:} false; then :
21106  $as_echo_n "(cached) " >&6
21107else
21108  case $PKG_CONFIG in
21109  [\\/]* | ?:[\\/]*)
21110  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
21111  ;;
21112  *)
21113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21114for as_dir in $PATH
21115do
21116  IFS=$as_save_IFS
21117  test -z "$as_dir" && as_dir=.
21118    for ac_exec_ext in '' $ac_executable_extensions; do
21119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21120    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
21121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21122    break 2
21123  fi
21124done
21125  done
21126IFS=$as_save_IFS
21127
21128  ;;
21129esac
21130fi
21131PKG_CONFIG=$ac_cv_path_PKG_CONFIG
21132if test -n "$PKG_CONFIG"; then
21133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
21134$as_echo "$PKG_CONFIG" >&6; }
21135else
21136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21137$as_echo "no" >&6; }
21138fi
21139
21140
21141fi
21142if test -z "$ac_cv_path_PKG_CONFIG"; then
21143  ac_pt_PKG_CONFIG=$PKG_CONFIG
21144  # Extract the first word of "pkg-config", so it can be a program name with args.
21145set dummy pkg-config; ac_word=$2
21146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21147$as_echo_n "checking for $ac_word... " >&6; }
21148if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
21149  $as_echo_n "(cached) " >&6
21150else
21151  case $ac_pt_PKG_CONFIG in
21152  [\\/]* | ?:[\\/]*)
21153  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
21154  ;;
21155  *)
21156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21157for as_dir in $PATH
21158do
21159  IFS=$as_save_IFS
21160  test -z "$as_dir" && as_dir=.
21161    for ac_exec_ext in '' $ac_executable_extensions; do
21162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21163    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
21164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21165    break 2
21166  fi
21167done
21168  done
21169IFS=$as_save_IFS
21170
21171  ;;
21172esac
21173fi
21174ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
21175if test -n "$ac_pt_PKG_CONFIG"; then
21176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
21177$as_echo "$ac_pt_PKG_CONFIG" >&6; }
21178else
21179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21180$as_echo "no" >&6; }
21181fi
21182
21183  if test "x$ac_pt_PKG_CONFIG" = x; then
21184    PKG_CONFIG=""
21185  else
21186    case $cross_compiling:$ac_tool_warned in
21187yes:)
21188{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21189$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21190ac_tool_warned=yes ;;
21191esac
21192    PKG_CONFIG=$ac_pt_PKG_CONFIG
21193  fi
21194else
21195  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
21196fi
21197
21198fi
21199if test -n "$PKG_CONFIG"; then
21200	_pkg_min_version=0.9.0
21201	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
21202$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
21203	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
21204		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21205$as_echo "yes" >&6; }
21206	else
21207		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21208$as_echo "no" >&6; }
21209		PKG_CONFIG=""
21210	fi
21211
21212fi
21213
21214# After basic tools have been setup, we can check build os specific details.
21215
21216  ###############################################################################
21217
21218  # Note that this is the build platform OS version!
21219
21220  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
21221  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
21222  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
21223  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
21224
21225
21226
21227
21228
21229###############################################################################
21230#
21231# Determine OpenJDK variants, options and version numbers.
21232#
21233###############################################################################
21234
21235# We need build & target for this.
21236
21237
21238  ###############################################################################
21239  #
21240  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
21241  # We always build headless support.
21242  #
21243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
21244$as_echo_n "checking headful support... " >&6; }
21245  # Check whether --enable-headful was given.
21246if test "${enable_headful+set}" = set; then :
21247  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
21248else
21249  SUPPORT_HEADFUL=yes
21250fi
21251
21252
21253  SUPPORT_HEADLESS=yes
21254  BUILD_HEADLESS="BUILD_HEADLESS:=true"
21255
21256  if test "x$SUPPORT_HEADFUL" = xyes; then
21257    # We are building both headful and headless.
21258    headful_msg="include support for both headful and headless"
21259  fi
21260
21261  if test "x$SUPPORT_HEADFUL" = xno; then
21262    # Thus we are building headless only.
21263    BUILD_HEADLESS="BUILD_HEADLESS:=true"
21264    headful_msg="headless only"
21265  fi
21266
21267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
21268$as_echo "$headful_msg" >&6; }
21269
21270
21271
21272
21273
21274  # Control wether Hotspot runs Queens test after build.
21275  # Check whether --enable-hotspot-test-in-build was given.
21276if test "${enable_hotspot_test_in_build+set}" = set; then :
21277  enableval=$enable_hotspot_test_in_build;
21278else
21279  enable_hotspot_test_in_build=no
21280fi
21281
21282  if test "x$enable_hotspot_test_in_build" = "xyes"; then
21283    TEST_IN_BUILD=true
21284  else
21285    TEST_IN_BUILD=false
21286  fi
21287
21288
21289  ###############################################################################
21290  #
21291  # Choose cacerts source file
21292  #
21293
21294# Check whether --with-cacerts-file was given.
21295if test "${with_cacerts_file+set}" = set; then :
21296  withval=$with_cacerts_file;
21297fi
21298
21299  if test "x$with_cacerts_file" != x; then
21300    CACERTS_FILE=$with_cacerts_file
21301  fi
21302
21303
21304  ###############################################################################
21305  #
21306  # Enable or disable unlimited crypto
21307  #
21308  # Check whether --enable-unlimited-crypto was given.
21309if test "${enable_unlimited_crypto+set}" = set; then :
21310  enableval=$enable_unlimited_crypto;
21311else
21312  enable_unlimited_crypto=no
21313fi
21314
21315  if test "x$enable_unlimited_crypto" = "xyes"; then
21316    UNLIMITED_CRYPTO=true
21317  else
21318    UNLIMITED_CRYPTO=false
21319  fi
21320
21321
21322  ###############################################################################
21323  #
21324  # Enable or disable the elliptic curve crypto implementation
21325  #
21326
21327
21328  ###############################################################################
21329  #
21330  # Compress jars
21331  #
21332  COMPRESS_JARS=false
21333
21334
21335
21336
21337  # Source the version numbers
21338  . $AUTOCONF_DIR/version-numbers
21339
21340  # Get the settings from parameters
21341
21342# Check whether --with-milestone was given.
21343if test "${with_milestone+set}" = set; then :
21344  withval=$with_milestone;
21345fi
21346
21347  if test "x$with_milestone" = xyes; then
21348    as_fn_error $? "Milestone must have a value" "$LINENO" 5
21349  elif test "x$with_milestone" != x; then
21350    MILESTONE="$with_milestone"
21351  fi
21352  if test "x$MILESTONE" = x; then
21353    MILESTONE=internal
21354  fi
21355
21356
21357# Check whether --with-update-version was given.
21358if test "${with_update_version+set}" = set; then :
21359  withval=$with_update_version;
21360fi
21361
21362  if test "x$with_update_version" = xyes; then
21363    as_fn_error $? "Update version must have a value" "$LINENO" 5
21364  elif test "x$with_update_version" != x; then
21365    JDK_UPDATE_VERSION="$with_update_version"
21366    # On macosx 10.7, it's not possible to set --with-update-version=0X due
21367    # to a bug in expr (which reduces it to just X). To work around this, we
21368    # always add a 0 to one digit update versions.
21369    if test "${#JDK_UPDATE_VERSION}" = "1"; then
21370      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
21371    fi
21372  fi
21373
21374
21375# Check whether --with-user-release-suffix was given.
21376if test "${with_user_release_suffix+set}" = set; then :
21377  withval=$with_user_release_suffix;
21378fi
21379
21380  if test "x$with_user_release_suffix" = xyes; then
21381    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
21382  elif test "x$with_user_release_suffix" != x; then
21383    USER_RELEASE_SUFFIX="$with_user_release_suffix"
21384  fi
21385
21386
21387# Check whether --with-build-number was given.
21388if test "${with_build_number+set}" = set; then :
21389  withval=$with_build_number;
21390fi
21391
21392  if test "x$with_build_number" = xyes; then
21393    as_fn_error $? "Build number must have a value" "$LINENO" 5
21394  elif test "x$with_build_number" != x; then
21395    JDK_BUILD_NUMBER="$with_build_number"
21396  fi
21397  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
21398  if test "x$JDK_BUILD_NUMBER" = x; then
21399    JDK_BUILD_NUMBER=b00
21400    if test "x$USER_RELEASE_SUFFIX" = x; then
21401      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
21402      # Avoid [:alnum:] since it depends on the locale.
21403      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
21404      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21405    fi
21406  fi
21407
21408  # Now set the JDK version, milestone, build number etc.
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425# Check whether --with-copyright-year was given.
21426if test "${with_copyright_year+set}" = set; then :
21427  withval=$with_copyright_year;
21428fi
21429
21430  if test "x$with_copyright_year" = xyes; then
21431    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
21432  elif test "x$with_copyright_year" != x; then
21433    COPYRIGHT_YEAR="$with_copyright_year"
21434  else
21435    COPYRIGHT_YEAR=`date +'%Y'`
21436  fi
21437
21438
21439  if test "x$JDK_UPDATE_VERSION" != x; then
21440    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
21441  else
21442    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
21443  fi
21444
21445
21446  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
21447
21448
21449
21450###############################################################################
21451#
21452# Setup BootJDK, used to bootstrap the build.
21453#
21454###############################################################################
21455
21456
21457  BOOT_JDK_FOUND=no
21458
21459# Check whether --with-boot-jdk was given.
21460if test "${with_boot_jdk+set}" = set; then :
21461  withval=$with_boot_jdk;
21462fi
21463
21464
21465  # We look for the Boot JDK through various means, going from more certain to
21466  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
21467  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
21468  # must check if this is indeed valid; otherwise we'll continue looking.
21469
21470  # Test: Is bootjdk explicitely set by command line arguments?
21471
21472  if test "x$BOOT_JDK_FOUND" = xno; then
21473    # Now execute the test
21474
21475  if test "x$with_boot_jdk" != x; then
21476    BOOT_JDK=$with_boot_jdk
21477    BOOT_JDK_FOUND=maybe
21478    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
21479$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
21480  fi
21481
21482
21483    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21484    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21485      # Do we have a bin/java?
21486      if test ! -x "$BOOT_JDK/bin/java"; then
21487        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21489        BOOT_JDK_FOUND=no
21490      else
21491        # Do we have a bin/javac?
21492        if test ! -x "$BOOT_JDK/bin/javac"; then
21493          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21495          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21496$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21497          BOOT_JDK_FOUND=no
21498        else
21499          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21500          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21501
21502          # Extra M4 quote needed to protect [] in grep expression.
21503          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21504          if test "x$FOUND_CORRECT_VERSION" = x; then
21505            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21507            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21508$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21509            BOOT_JDK_FOUND=no
21510          else
21511            # We're done! :-)
21512            BOOT_JDK_FOUND=yes
21513
21514  # Only process if variable expands to non-empty
21515
21516  if test "x$BOOT_JDK" != x; then
21517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21518
21519  # Input might be given as Windows format, start by converting to
21520  # unix format.
21521  path="$BOOT_JDK"
21522  new_path=`$CYGPATH -u "$path"`
21523
21524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21527  # "foo.exe" is OK but "foo" is an error.
21528  #
21529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21530  # It is also a way to make sure we got the proper file name for the real test later on.
21531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21532  if test "x$test_shortpath" = x; then
21533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21535    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21536  fi
21537
21538  # Call helper function which possibly converts this using DOS-style short mode.
21539  # If so, the updated path is stored in $new_path.
21540
21541  input_path="$new_path"
21542  # Check if we need to convert this using DOS-style short mode. If the path
21543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21544  # take no chances and rewrite it.
21545  # Note: m4 eats our [], so we need to use [ and ] instead.
21546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21547  if test "x$has_forbidden_chars" != x; then
21548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21552      # Going to short mode and back again did indeed matter. Since short mode is
21553      # case insensitive, let's make it lowercase to improve readability.
21554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21555      # Now convert it back to Unix-style (cygpath)
21556      input_path=`$CYGPATH -u "$shortmode_path"`
21557      new_path="$input_path"
21558    fi
21559  fi
21560
21561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21562  if test "x$test_cygdrive_prefix" = x; then
21563    # As a simple fix, exclude /usr/bin since it's not a real path.
21564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21566      # a path prefixed by /cygdrive for fixpath to work.
21567      new_path="$CYGWIN_ROOT_PATH$input_path"
21568    fi
21569  fi
21570
21571
21572  if test "x$path" != "x$new_path"; then
21573    BOOT_JDK="$new_path"
21574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21575$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21576  fi
21577
21578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21579
21580  path="$BOOT_JDK"
21581  has_colon=`$ECHO $path | $GREP ^.:`
21582  new_path="$path"
21583  if test "x$has_colon" = x; then
21584    # Not in mixed or Windows style, start by that.
21585    new_path=`cmd //c echo $path`
21586  fi
21587
21588
21589  input_path="$new_path"
21590  # Check if we need to convert this using DOS-style short mode. If the path
21591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21592  # take no chances and rewrite it.
21593  # Note: m4 eats our [], so we need to use [ and ] instead.
21594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21595  if test "x$has_forbidden_chars" != x; then
21596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21598  fi
21599
21600
21601  windows_path="$new_path"
21602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21603    unix_path=`$CYGPATH -u "$windows_path"`
21604    new_path="$unix_path"
21605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21607    new_path="$unix_path"
21608  fi
21609
21610  if test "x$path" != "x$new_path"; then
21611    BOOT_JDK="$new_path"
21612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21613$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21614  fi
21615
21616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21618
21619    else
21620      # We're on a unix platform. Hooray! :)
21621      path="$BOOT_JDK"
21622      has_space=`$ECHO "$path" | $GREP " "`
21623      if test "x$has_space" != x; then
21624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21626        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21627      fi
21628
21629      # Use eval to expand a potential ~
21630      eval path="$path"
21631      if test ! -f "$path" && test ! -d "$path"; then
21632        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21633      fi
21634
21635      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21636    fi
21637  fi
21638
21639            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21640$as_echo_n "checking for Boot JDK... " >&6; }
21641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21642$as_echo "$BOOT_JDK" >&6; }
21643            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21644$as_echo_n "checking Boot JDK version... " >&6; }
21645            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21647$as_echo "$BOOT_JDK_VERSION" >&6; }
21648          fi # end check jdk version
21649        fi # end check javac
21650      fi # end check java
21651    fi # end check boot jdk found
21652  fi
21653
21654  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
21655    # Having specified an argument which is incorrect will produce an instant failure;
21656    # we should not go on looking
21657    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
21658  fi
21659
21660  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21661
21662  if test "x$BOOT_JDK_FOUND" = xno; then
21663    # Now execute the test
21664
21665  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21666    # First check at user selected default
21667
21668  if test "x$BOOT_JDK_FOUND" = xno; then
21669    # Now execute the test
21670
21671  if test -x /usr/libexec/java_home; then
21672    BOOT_JDK=`/usr/libexec/java_home `
21673    BOOT_JDK_FOUND=maybe
21674    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21675$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21676  fi
21677
21678
21679    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21680    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21681      # Do we have a bin/java?
21682      if test ! -x "$BOOT_JDK/bin/java"; then
21683        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21685        BOOT_JDK_FOUND=no
21686      else
21687        # Do we have a bin/javac?
21688        if test ! -x "$BOOT_JDK/bin/javac"; then
21689          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21691          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21692$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21693          BOOT_JDK_FOUND=no
21694        else
21695          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21696          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21697
21698          # Extra M4 quote needed to protect [] in grep expression.
21699          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21700          if test "x$FOUND_CORRECT_VERSION" = x; then
21701            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21703            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21704$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21705            BOOT_JDK_FOUND=no
21706          else
21707            # We're done! :-)
21708            BOOT_JDK_FOUND=yes
21709
21710  # Only process if variable expands to non-empty
21711
21712  if test "x$BOOT_JDK" != x; then
21713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21714
21715  # Input might be given as Windows format, start by converting to
21716  # unix format.
21717  path="$BOOT_JDK"
21718  new_path=`$CYGPATH -u "$path"`
21719
21720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21723  # "foo.exe" is OK but "foo" is an error.
21724  #
21725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21726  # It is also a way to make sure we got the proper file name for the real test later on.
21727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21728  if test "x$test_shortpath" = x; then
21729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21731    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21732  fi
21733
21734  # Call helper function which possibly converts this using DOS-style short mode.
21735  # If so, the updated path is stored in $new_path.
21736
21737  input_path="$new_path"
21738  # Check if we need to convert this using DOS-style short mode. If the path
21739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21740  # take no chances and rewrite it.
21741  # Note: m4 eats our [], so we need to use [ and ] instead.
21742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21743  if test "x$has_forbidden_chars" != x; then
21744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21748      # Going to short mode and back again did indeed matter. Since short mode is
21749      # case insensitive, let's make it lowercase to improve readability.
21750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21751      # Now convert it back to Unix-style (cygpath)
21752      input_path=`$CYGPATH -u "$shortmode_path"`
21753      new_path="$input_path"
21754    fi
21755  fi
21756
21757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21758  if test "x$test_cygdrive_prefix" = x; then
21759    # As a simple fix, exclude /usr/bin since it's not a real path.
21760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21762      # a path prefixed by /cygdrive for fixpath to work.
21763      new_path="$CYGWIN_ROOT_PATH$input_path"
21764    fi
21765  fi
21766
21767
21768  if test "x$path" != "x$new_path"; then
21769    BOOT_JDK="$new_path"
21770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21772  fi
21773
21774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21775
21776  path="$BOOT_JDK"
21777  has_colon=`$ECHO $path | $GREP ^.:`
21778  new_path="$path"
21779  if test "x$has_colon" = x; then
21780    # Not in mixed or Windows style, start by that.
21781    new_path=`cmd //c echo $path`
21782  fi
21783
21784
21785  input_path="$new_path"
21786  # Check if we need to convert this using DOS-style short mode. If the path
21787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21788  # take no chances and rewrite it.
21789  # Note: m4 eats our [], so we need to use [ and ] instead.
21790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21791  if test "x$has_forbidden_chars" != x; then
21792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21794  fi
21795
21796
21797  windows_path="$new_path"
21798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21799    unix_path=`$CYGPATH -u "$windows_path"`
21800    new_path="$unix_path"
21801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21803    new_path="$unix_path"
21804  fi
21805
21806  if test "x$path" != "x$new_path"; then
21807    BOOT_JDK="$new_path"
21808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21810  fi
21811
21812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21814
21815    else
21816      # We're on a unix platform. Hooray! :)
21817      path="$BOOT_JDK"
21818      has_space=`$ECHO "$path" | $GREP " "`
21819      if test "x$has_space" != x; then
21820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21822        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21823      fi
21824
21825      # Use eval to expand a potential ~
21826      eval path="$path"
21827      if test ! -f "$path" && test ! -d "$path"; then
21828        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21829      fi
21830
21831      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21832    fi
21833  fi
21834
21835            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21836$as_echo_n "checking for Boot JDK... " >&6; }
21837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21838$as_echo "$BOOT_JDK" >&6; }
21839            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21840$as_echo_n "checking Boot JDK version... " >&6; }
21841            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21843$as_echo "$BOOT_JDK_VERSION" >&6; }
21844          fi # end check jdk version
21845        fi # end check javac
21846      fi # end check java
21847    fi # end check boot jdk found
21848  fi
21849
21850    # If that did not work out (e.g. too old), try explicit versions instead
21851
21852  if test "x$BOOT_JDK_FOUND" = xno; then
21853    # Now execute the test
21854
21855  if test -x /usr/libexec/java_home; then
21856    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21857    BOOT_JDK_FOUND=maybe
21858    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21859$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21860  fi
21861
21862
21863    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21864    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21865      # Do we have a bin/java?
21866      if test ! -x "$BOOT_JDK/bin/java"; then
21867        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21869        BOOT_JDK_FOUND=no
21870      else
21871        # Do we have a bin/javac?
21872        if test ! -x "$BOOT_JDK/bin/javac"; then
21873          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21875          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21876$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21877          BOOT_JDK_FOUND=no
21878        else
21879          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21880          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21881
21882          # Extra M4 quote needed to protect [] in grep expression.
21883          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21884          if test "x$FOUND_CORRECT_VERSION" = x; then
21885            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21887            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21888$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21889            BOOT_JDK_FOUND=no
21890          else
21891            # We're done! :-)
21892            BOOT_JDK_FOUND=yes
21893
21894  # Only process if variable expands to non-empty
21895
21896  if test "x$BOOT_JDK" != x; then
21897    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21898
21899  # Input might be given as Windows format, start by converting to
21900  # unix format.
21901  path="$BOOT_JDK"
21902  new_path=`$CYGPATH -u "$path"`
21903
21904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21907  # "foo.exe" is OK but "foo" is an error.
21908  #
21909  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21910  # It is also a way to make sure we got the proper file name for the real test later on.
21911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21912  if test "x$test_shortpath" = x; then
21913    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21914$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21915    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21916  fi
21917
21918  # Call helper function which possibly converts this using DOS-style short mode.
21919  # If so, the updated path is stored in $new_path.
21920
21921  input_path="$new_path"
21922  # Check if we need to convert this using DOS-style short mode. If the path
21923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21924  # take no chances and rewrite it.
21925  # Note: m4 eats our [], so we need to use [ and ] instead.
21926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21927  if test "x$has_forbidden_chars" != x; then
21928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21932      # Going to short mode and back again did indeed matter. Since short mode is
21933      # case insensitive, let's make it lowercase to improve readability.
21934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21935      # Now convert it back to Unix-style (cygpath)
21936      input_path=`$CYGPATH -u "$shortmode_path"`
21937      new_path="$input_path"
21938    fi
21939  fi
21940
21941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21942  if test "x$test_cygdrive_prefix" = x; then
21943    # As a simple fix, exclude /usr/bin since it's not a real path.
21944    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21946      # a path prefixed by /cygdrive for fixpath to work.
21947      new_path="$CYGWIN_ROOT_PATH$input_path"
21948    fi
21949  fi
21950
21951
21952  if test "x$path" != "x$new_path"; then
21953    BOOT_JDK="$new_path"
21954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21955$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21956  fi
21957
21958    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21959
21960  path="$BOOT_JDK"
21961  has_colon=`$ECHO $path | $GREP ^.:`
21962  new_path="$path"
21963  if test "x$has_colon" = x; then
21964    # Not in mixed or Windows style, start by that.
21965    new_path=`cmd //c echo $path`
21966  fi
21967
21968
21969  input_path="$new_path"
21970  # Check if we need to convert this using DOS-style short mode. If the path
21971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21972  # take no chances and rewrite it.
21973  # Note: m4 eats our [], so we need to use [ and ] instead.
21974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21975  if test "x$has_forbidden_chars" != x; then
21976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21978  fi
21979
21980
21981  windows_path="$new_path"
21982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21983    unix_path=`$CYGPATH -u "$windows_path"`
21984    new_path="$unix_path"
21985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21987    new_path="$unix_path"
21988  fi
21989
21990  if test "x$path" != "x$new_path"; then
21991    BOOT_JDK="$new_path"
21992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21993$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21994  fi
21995
21996  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21997  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21998
21999    else
22000      # We're on a unix platform. Hooray! :)
22001      path="$BOOT_JDK"
22002      has_space=`$ECHO "$path" | $GREP " "`
22003      if test "x$has_space" != x; then
22004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22005$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22006        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22007      fi
22008
22009      # Use eval to expand a potential ~
22010      eval path="$path"
22011      if test ! -f "$path" && test ! -d "$path"; then
22012        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22013      fi
22014
22015      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22016    fi
22017  fi
22018
22019            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22020$as_echo_n "checking for Boot JDK... " >&6; }
22021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22022$as_echo "$BOOT_JDK" >&6; }
22023            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22024$as_echo_n "checking Boot JDK version... " >&6; }
22025            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22027$as_echo "$BOOT_JDK_VERSION" >&6; }
22028          fi # end check jdk version
22029        fi # end check javac
22030      fi # end check java
22031    fi # end check boot jdk found
22032  fi
22033
22034
22035  if test "x$BOOT_JDK_FOUND" = xno; then
22036    # Now execute the test
22037
22038  if test -x /usr/libexec/java_home; then
22039    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
22040    BOOT_JDK_FOUND=maybe
22041    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
22042$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
22043  fi
22044
22045
22046    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22047    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22048      # Do we have a bin/java?
22049      if test ! -x "$BOOT_JDK/bin/java"; then
22050        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22052        BOOT_JDK_FOUND=no
22053      else
22054        # Do we have a bin/javac?
22055        if test ! -x "$BOOT_JDK/bin/javac"; then
22056          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22058          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22059$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22060          BOOT_JDK_FOUND=no
22061        else
22062          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22063          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22064
22065          # Extra M4 quote needed to protect [] in grep expression.
22066          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22067          if test "x$FOUND_CORRECT_VERSION" = x; then
22068            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22070            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22071$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22072            BOOT_JDK_FOUND=no
22073          else
22074            # We're done! :-)
22075            BOOT_JDK_FOUND=yes
22076
22077  # Only process if variable expands to non-empty
22078
22079  if test "x$BOOT_JDK" != x; then
22080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22081
22082  # Input might be given as Windows format, start by converting to
22083  # unix format.
22084  path="$BOOT_JDK"
22085  new_path=`$CYGPATH -u "$path"`
22086
22087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22090  # "foo.exe" is OK but "foo" is an error.
22091  #
22092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22093  # It is also a way to make sure we got the proper file name for the real test later on.
22094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22095  if test "x$test_shortpath" = x; then
22096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22098    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22099  fi
22100
22101  # Call helper function which possibly converts this using DOS-style short mode.
22102  # If so, the updated path is stored in $new_path.
22103
22104  input_path="$new_path"
22105  # Check if we need to convert this using DOS-style short mode. If the path
22106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22107  # take no chances and rewrite it.
22108  # Note: m4 eats our [], so we need to use [ and ] instead.
22109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22110  if test "x$has_forbidden_chars" != x; then
22111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22115      # Going to short mode and back again did indeed matter. Since short mode is
22116      # case insensitive, let's make it lowercase to improve readability.
22117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22118      # Now convert it back to Unix-style (cygpath)
22119      input_path=`$CYGPATH -u "$shortmode_path"`
22120      new_path="$input_path"
22121    fi
22122  fi
22123
22124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22125  if test "x$test_cygdrive_prefix" = x; then
22126    # As a simple fix, exclude /usr/bin since it's not a real path.
22127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22129      # a path prefixed by /cygdrive for fixpath to work.
22130      new_path="$CYGWIN_ROOT_PATH$input_path"
22131    fi
22132  fi
22133
22134
22135  if test "x$path" != "x$new_path"; then
22136    BOOT_JDK="$new_path"
22137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22138$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22139  fi
22140
22141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22142
22143  path="$BOOT_JDK"
22144  has_colon=`$ECHO $path | $GREP ^.:`
22145  new_path="$path"
22146  if test "x$has_colon" = x; then
22147    # Not in mixed or Windows style, start by that.
22148    new_path=`cmd //c echo $path`
22149  fi
22150
22151
22152  input_path="$new_path"
22153  # Check if we need to convert this using DOS-style short mode. If the path
22154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22155  # take no chances and rewrite it.
22156  # Note: m4 eats our [], so we need to use [ and ] instead.
22157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22158  if test "x$has_forbidden_chars" != x; then
22159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22161  fi
22162
22163
22164  windows_path="$new_path"
22165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22166    unix_path=`$CYGPATH -u "$windows_path"`
22167    new_path="$unix_path"
22168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22170    new_path="$unix_path"
22171  fi
22172
22173  if test "x$path" != "x$new_path"; then
22174    BOOT_JDK="$new_path"
22175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22177  fi
22178
22179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22181
22182    else
22183      # We're on a unix platform. Hooray! :)
22184      path="$BOOT_JDK"
22185      has_space=`$ECHO "$path" | $GREP " "`
22186      if test "x$has_space" != x; then
22187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22189        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22190      fi
22191
22192      # Use eval to expand a potential ~
22193      eval path="$path"
22194      if test ! -f "$path" && test ! -d "$path"; then
22195        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22196      fi
22197
22198      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22199    fi
22200  fi
22201
22202            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22203$as_echo_n "checking for Boot JDK... " >&6; }
22204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22205$as_echo "$BOOT_JDK" >&6; }
22206            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22207$as_echo_n "checking Boot JDK version... " >&6; }
22208            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22210$as_echo "$BOOT_JDK_VERSION" >&6; }
22211          fi # end check jdk version
22212        fi # end check javac
22213      fi # end check java
22214    fi # end check boot jdk found
22215  fi
22216
22217
22218  if test "x$BOOT_JDK_FOUND" = xno; then
22219    # Now execute the test
22220
22221  if test -x /usr/libexec/java_home; then
22222    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
22223    BOOT_JDK_FOUND=maybe
22224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
22225$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
22226  fi
22227
22228
22229    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22230    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22231      # Do we have a bin/java?
22232      if test ! -x "$BOOT_JDK/bin/java"; then
22233        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22235        BOOT_JDK_FOUND=no
22236      else
22237        # Do we have a bin/javac?
22238        if test ! -x "$BOOT_JDK/bin/javac"; then
22239          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22241          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22242$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22243          BOOT_JDK_FOUND=no
22244        else
22245          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22246          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22247
22248          # Extra M4 quote needed to protect [] in grep expression.
22249          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22250          if test "x$FOUND_CORRECT_VERSION" = x; then
22251            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22253            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22254$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22255            BOOT_JDK_FOUND=no
22256          else
22257            # We're done! :-)
22258            BOOT_JDK_FOUND=yes
22259
22260  # Only process if variable expands to non-empty
22261
22262  if test "x$BOOT_JDK" != x; then
22263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22264
22265  # Input might be given as Windows format, start by converting to
22266  # unix format.
22267  path="$BOOT_JDK"
22268  new_path=`$CYGPATH -u "$path"`
22269
22270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22273  # "foo.exe" is OK but "foo" is an error.
22274  #
22275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22276  # It is also a way to make sure we got the proper file name for the real test later on.
22277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22278  if test "x$test_shortpath" = x; then
22279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22280$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22281    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22282  fi
22283
22284  # Call helper function which possibly converts this using DOS-style short mode.
22285  # If so, the updated path is stored in $new_path.
22286
22287  input_path="$new_path"
22288  # Check if we need to convert this using DOS-style short mode. If the path
22289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22290  # take no chances and rewrite it.
22291  # Note: m4 eats our [], so we need to use [ and ] instead.
22292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22293  if test "x$has_forbidden_chars" != x; then
22294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22298      # Going to short mode and back again did indeed matter. Since short mode is
22299      # case insensitive, let's make it lowercase to improve readability.
22300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22301      # Now convert it back to Unix-style (cygpath)
22302      input_path=`$CYGPATH -u "$shortmode_path"`
22303      new_path="$input_path"
22304    fi
22305  fi
22306
22307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22308  if test "x$test_cygdrive_prefix" = x; then
22309    # As a simple fix, exclude /usr/bin since it's not a real path.
22310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22312      # a path prefixed by /cygdrive for fixpath to work.
22313      new_path="$CYGWIN_ROOT_PATH$input_path"
22314    fi
22315  fi
22316
22317
22318  if test "x$path" != "x$new_path"; then
22319    BOOT_JDK="$new_path"
22320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22322  fi
22323
22324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22325
22326  path="$BOOT_JDK"
22327  has_colon=`$ECHO $path | $GREP ^.:`
22328  new_path="$path"
22329  if test "x$has_colon" = x; then
22330    # Not in mixed or Windows style, start by that.
22331    new_path=`cmd //c echo $path`
22332  fi
22333
22334
22335  input_path="$new_path"
22336  # Check if we need to convert this using DOS-style short mode. If the path
22337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22338  # take no chances and rewrite it.
22339  # Note: m4 eats our [], so we need to use [ and ] instead.
22340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22341  if test "x$has_forbidden_chars" != x; then
22342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22344  fi
22345
22346
22347  windows_path="$new_path"
22348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22349    unix_path=`$CYGPATH -u "$windows_path"`
22350    new_path="$unix_path"
22351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22353    new_path="$unix_path"
22354  fi
22355
22356  if test "x$path" != "x$new_path"; then
22357    BOOT_JDK="$new_path"
22358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22360  fi
22361
22362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22364
22365    else
22366      # We're on a unix platform. Hooray! :)
22367      path="$BOOT_JDK"
22368      has_space=`$ECHO "$path" | $GREP " "`
22369      if test "x$has_space" != x; then
22370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22373      fi
22374
22375      # Use eval to expand a potential ~
22376      eval path="$path"
22377      if test ! -f "$path" && test ! -d "$path"; then
22378        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22379      fi
22380
22381      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22382    fi
22383  fi
22384
22385            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22386$as_echo_n "checking for Boot JDK... " >&6; }
22387            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22388$as_echo "$BOOT_JDK" >&6; }
22389            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22390$as_echo_n "checking Boot JDK version... " >&6; }
22391            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22393$as_echo "$BOOT_JDK_VERSION" >&6; }
22394          fi # end check jdk version
22395        fi # end check javac
22396      fi # end check java
22397    fi # end check boot jdk found
22398  fi
22399
22400  fi
22401
22402
22403    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22404    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22405      # Do we have a bin/java?
22406      if test ! -x "$BOOT_JDK/bin/java"; then
22407        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22409        BOOT_JDK_FOUND=no
22410      else
22411        # Do we have a bin/javac?
22412        if test ! -x "$BOOT_JDK/bin/javac"; then
22413          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22415          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22416$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22417          BOOT_JDK_FOUND=no
22418        else
22419          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22420          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22421
22422          # Extra M4 quote needed to protect [] in grep expression.
22423          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22424          if test "x$FOUND_CORRECT_VERSION" = x; then
22425            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22427            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22428$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22429            BOOT_JDK_FOUND=no
22430          else
22431            # We're done! :-)
22432            BOOT_JDK_FOUND=yes
22433
22434  # Only process if variable expands to non-empty
22435
22436  if test "x$BOOT_JDK" != x; then
22437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22438
22439  # Input might be given as Windows format, start by converting to
22440  # unix format.
22441  path="$BOOT_JDK"
22442  new_path=`$CYGPATH -u "$path"`
22443
22444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22447  # "foo.exe" is OK but "foo" is an error.
22448  #
22449  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22450  # It is also a way to make sure we got the proper file name for the real test later on.
22451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22452  if test "x$test_shortpath" = x; then
22453    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22455    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22456  fi
22457
22458  # Call helper function which possibly converts this using DOS-style short mode.
22459  # If so, the updated path is stored in $new_path.
22460
22461  input_path="$new_path"
22462  # Check if we need to convert this using DOS-style short mode. If the path
22463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22464  # take no chances and rewrite it.
22465  # Note: m4 eats our [], so we need to use [ and ] instead.
22466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22467  if test "x$has_forbidden_chars" != x; then
22468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22472      # Going to short mode and back again did indeed matter. Since short mode is
22473      # case insensitive, let's make it lowercase to improve readability.
22474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22475      # Now convert it back to Unix-style (cygpath)
22476      input_path=`$CYGPATH -u "$shortmode_path"`
22477      new_path="$input_path"
22478    fi
22479  fi
22480
22481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22482  if test "x$test_cygdrive_prefix" = x; then
22483    # As a simple fix, exclude /usr/bin since it's not a real path.
22484    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22486      # a path prefixed by /cygdrive for fixpath to work.
22487      new_path="$CYGWIN_ROOT_PATH$input_path"
22488    fi
22489  fi
22490
22491
22492  if test "x$path" != "x$new_path"; then
22493    BOOT_JDK="$new_path"
22494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22495$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22496  fi
22497
22498    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22499
22500  path="$BOOT_JDK"
22501  has_colon=`$ECHO $path | $GREP ^.:`
22502  new_path="$path"
22503  if test "x$has_colon" = x; then
22504    # Not in mixed or Windows style, start by that.
22505    new_path=`cmd //c echo $path`
22506  fi
22507
22508
22509  input_path="$new_path"
22510  # Check if we need to convert this using DOS-style short mode. If the path
22511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22512  # take no chances and rewrite it.
22513  # Note: m4 eats our [], so we need to use [ and ] instead.
22514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22515  if test "x$has_forbidden_chars" != x; then
22516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22518  fi
22519
22520
22521  windows_path="$new_path"
22522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22523    unix_path=`$CYGPATH -u "$windows_path"`
22524    new_path="$unix_path"
22525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22527    new_path="$unix_path"
22528  fi
22529
22530  if test "x$path" != "x$new_path"; then
22531    BOOT_JDK="$new_path"
22532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22533$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22534  fi
22535
22536  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22537  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22538
22539    else
22540      # We're on a unix platform. Hooray! :)
22541      path="$BOOT_JDK"
22542      has_space=`$ECHO "$path" | $GREP " "`
22543      if test "x$has_space" != x; then
22544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22546        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22547      fi
22548
22549      # Use eval to expand a potential ~
22550      eval path="$path"
22551      if test ! -f "$path" && test ! -d "$path"; then
22552        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22553      fi
22554
22555      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22556    fi
22557  fi
22558
22559            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22560$as_echo_n "checking for Boot JDK... " >&6; }
22561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22562$as_echo "$BOOT_JDK" >&6; }
22563            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22564$as_echo_n "checking Boot JDK version... " >&6; }
22565            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22567$as_echo "$BOOT_JDK_VERSION" >&6; }
22568          fi # end check jdk version
22569        fi # end check javac
22570      fi # end check java
22571    fi # end check boot jdk found
22572  fi
22573
22574
22575  # Test: Is $JAVA_HOME set?
22576
22577  if test "x$BOOT_JDK_FOUND" = xno; then
22578    # Now execute the test
22579
22580  if test "x$JAVA_HOME" != x; then
22581    JAVA_HOME_PROCESSED="$JAVA_HOME"
22582
22583  # Only process if variable expands to non-empty
22584
22585  if test "x$JAVA_HOME_PROCESSED" != x; then
22586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22587
22588  # Input might be given as Windows format, start by converting to
22589  # unix format.
22590  path="$JAVA_HOME_PROCESSED"
22591  new_path=`$CYGPATH -u "$path"`
22592
22593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22596  # "foo.exe" is OK but "foo" is an error.
22597  #
22598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22599  # It is also a way to make sure we got the proper file name for the real test later on.
22600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22601  if test "x$test_shortpath" = x; then
22602    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22603$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22604    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22605  fi
22606
22607  # Call helper function which possibly converts this using DOS-style short mode.
22608  # If so, the updated path is stored in $new_path.
22609
22610  input_path="$new_path"
22611  # Check if we need to convert this using DOS-style short mode. If the path
22612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22613  # take no chances and rewrite it.
22614  # Note: m4 eats our [], so we need to use [ and ] instead.
22615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22616  if test "x$has_forbidden_chars" != x; then
22617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22621      # Going to short mode and back again did indeed matter. Since short mode is
22622      # case insensitive, let's make it lowercase to improve readability.
22623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22624      # Now convert it back to Unix-style (cygpath)
22625      input_path=`$CYGPATH -u "$shortmode_path"`
22626      new_path="$input_path"
22627    fi
22628  fi
22629
22630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22631  if test "x$test_cygdrive_prefix" = x; then
22632    # As a simple fix, exclude /usr/bin since it's not a real path.
22633    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22635      # a path prefixed by /cygdrive for fixpath to work.
22636      new_path="$CYGWIN_ROOT_PATH$input_path"
22637    fi
22638  fi
22639
22640
22641  if test "x$path" != "x$new_path"; then
22642    JAVA_HOME_PROCESSED="$new_path"
22643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22644$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22645  fi
22646
22647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22648
22649  path="$JAVA_HOME_PROCESSED"
22650  has_colon=`$ECHO $path | $GREP ^.:`
22651  new_path="$path"
22652  if test "x$has_colon" = x; then
22653    # Not in mixed or Windows style, start by that.
22654    new_path=`cmd //c echo $path`
22655  fi
22656
22657
22658  input_path="$new_path"
22659  # Check if we need to convert this using DOS-style short mode. If the path
22660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22661  # take no chances and rewrite it.
22662  # Note: m4 eats our [], so we need to use [ and ] instead.
22663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22664  if test "x$has_forbidden_chars" != x; then
22665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22667  fi
22668
22669
22670  windows_path="$new_path"
22671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22672    unix_path=`$CYGPATH -u "$windows_path"`
22673    new_path="$unix_path"
22674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22676    new_path="$unix_path"
22677  fi
22678
22679  if test "x$path" != "x$new_path"; then
22680    JAVA_HOME_PROCESSED="$new_path"
22681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22682$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22683  fi
22684
22685  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22686  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22687
22688    else
22689      # We're on a unix platform. Hooray! :)
22690      path="$JAVA_HOME_PROCESSED"
22691      has_space=`$ECHO "$path" | $GREP " "`
22692      if test "x$has_space" != x; then
22693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22694$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22695        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22696      fi
22697
22698      # Use eval to expand a potential ~
22699      eval path="$path"
22700      if test ! -f "$path" && test ! -d "$path"; then
22701        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22702      fi
22703
22704      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22705    fi
22706  fi
22707
22708    if test ! -d "$JAVA_HOME_PROCESSED"; then
22709      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22710$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22711    else
22712      # Aha, the user has set a JAVA_HOME
22713      # let us use that as the Boot JDK.
22714      BOOT_JDK="$JAVA_HOME_PROCESSED"
22715      BOOT_JDK_FOUND=maybe
22716      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22717$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22718    fi
22719  fi
22720
22721
22722    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22723    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22724      # Do we have a bin/java?
22725      if test ! -x "$BOOT_JDK/bin/java"; then
22726        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22728        BOOT_JDK_FOUND=no
22729      else
22730        # Do we have a bin/javac?
22731        if test ! -x "$BOOT_JDK/bin/javac"; then
22732          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22734          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22735$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22736          BOOT_JDK_FOUND=no
22737        else
22738          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22739          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22740
22741          # Extra M4 quote needed to protect [] in grep expression.
22742          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22743          if test "x$FOUND_CORRECT_VERSION" = x; then
22744            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22746            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22747$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22748            BOOT_JDK_FOUND=no
22749          else
22750            # We're done! :-)
22751            BOOT_JDK_FOUND=yes
22752
22753  # Only process if variable expands to non-empty
22754
22755  if test "x$BOOT_JDK" != x; then
22756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22757
22758  # Input might be given as Windows format, start by converting to
22759  # unix format.
22760  path="$BOOT_JDK"
22761  new_path=`$CYGPATH -u "$path"`
22762
22763  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22764  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22765  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22766  # "foo.exe" is OK but "foo" is an error.
22767  #
22768  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22769  # It is also a way to make sure we got the proper file name for the real test later on.
22770  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22771  if test "x$test_shortpath" = x; then
22772    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22773$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22774    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22775  fi
22776
22777  # Call helper function which possibly converts this using DOS-style short mode.
22778  # If so, the updated path is stored in $new_path.
22779
22780  input_path="$new_path"
22781  # Check if we need to convert this using DOS-style short mode. If the path
22782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22783  # take no chances and rewrite it.
22784  # Note: m4 eats our [], so we need to use [ and ] instead.
22785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22786  if test "x$has_forbidden_chars" != x; then
22787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22791      # Going to short mode and back again did indeed matter. Since short mode is
22792      # case insensitive, let's make it lowercase to improve readability.
22793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22794      # Now convert it back to Unix-style (cygpath)
22795      input_path=`$CYGPATH -u "$shortmode_path"`
22796      new_path="$input_path"
22797    fi
22798  fi
22799
22800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22801  if test "x$test_cygdrive_prefix" = x; then
22802    # As a simple fix, exclude /usr/bin since it's not a real path.
22803    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22805      # a path prefixed by /cygdrive for fixpath to work.
22806      new_path="$CYGWIN_ROOT_PATH$input_path"
22807    fi
22808  fi
22809
22810
22811  if test "x$path" != "x$new_path"; then
22812    BOOT_JDK="$new_path"
22813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22814$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22815  fi
22816
22817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22818
22819  path="$BOOT_JDK"
22820  has_colon=`$ECHO $path | $GREP ^.:`
22821  new_path="$path"
22822  if test "x$has_colon" = x; then
22823    # Not in mixed or Windows style, start by that.
22824    new_path=`cmd //c echo $path`
22825  fi
22826
22827
22828  input_path="$new_path"
22829  # Check if we need to convert this using DOS-style short mode. If the path
22830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22831  # take no chances and rewrite it.
22832  # Note: m4 eats our [], so we need to use [ and ] instead.
22833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22834  if test "x$has_forbidden_chars" != x; then
22835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22837  fi
22838
22839
22840  windows_path="$new_path"
22841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22842    unix_path=`$CYGPATH -u "$windows_path"`
22843    new_path="$unix_path"
22844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22846    new_path="$unix_path"
22847  fi
22848
22849  if test "x$path" != "x$new_path"; then
22850    BOOT_JDK="$new_path"
22851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22853  fi
22854
22855  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22856  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22857
22858    else
22859      # We're on a unix platform. Hooray! :)
22860      path="$BOOT_JDK"
22861      has_space=`$ECHO "$path" | $GREP " "`
22862      if test "x$has_space" != x; then
22863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22865        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22866      fi
22867
22868      # Use eval to expand a potential ~
22869      eval path="$path"
22870      if test ! -f "$path" && test ! -d "$path"; then
22871        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22872      fi
22873
22874      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22875    fi
22876  fi
22877
22878            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22879$as_echo_n "checking for Boot JDK... " >&6; }
22880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22881$as_echo "$BOOT_JDK" >&6; }
22882            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22883$as_echo_n "checking Boot JDK version... " >&6; }
22884            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22886$as_echo "$BOOT_JDK_VERSION" >&6; }
22887          fi # end check jdk version
22888        fi # end check javac
22889      fi # end check java
22890    fi # end check boot jdk found
22891  fi
22892
22893
22894  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22895
22896  if test "x$BOOT_JDK_FOUND" = xno; then
22897    # Now execute the test
22898
22899  # Extract the first word of "javac", so it can be a program name with args.
22900set dummy javac; ac_word=$2
22901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22902$as_echo_n "checking for $ac_word... " >&6; }
22903if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22904  $as_echo_n "(cached) " >&6
22905else
22906  case $JAVAC_CHECK in
22907  [\\/]* | ?:[\\/]*)
22908  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22909  ;;
22910  *)
22911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22912for as_dir in $PATH
22913do
22914  IFS=$as_save_IFS
22915  test -z "$as_dir" && as_dir=.
22916    for ac_exec_ext in '' $ac_executable_extensions; do
22917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22918    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22920    break 2
22921  fi
22922done
22923  done
22924IFS=$as_save_IFS
22925
22926  ;;
22927esac
22928fi
22929JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22930if test -n "$JAVAC_CHECK"; then
22931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22932$as_echo "$JAVAC_CHECK" >&6; }
22933else
22934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22935$as_echo "no" >&6; }
22936fi
22937
22938
22939  # Extract the first word of "java", so it can be a program name with args.
22940set dummy java; 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_JAVA_CHECK+:} false; then :
22944  $as_echo_n "(cached) " >&6
22945else
22946  case $JAVA_CHECK in
22947  [\\/]* | ?:[\\/]*)
22948  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # 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_JAVA_CHECK="$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
22969JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22970if test -n "$JAVA_CHECK"; then
22971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22972$as_echo "$JAVA_CHECK" >&6; }
22973else
22974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22975$as_echo "no" >&6; }
22976fi
22977
22978
22979  BINARY="$JAVAC_CHECK"
22980  if test "x$JAVAC_CHECK" = x; then
22981    BINARY="$JAVA_CHECK"
22982  fi
22983  if test "x$BINARY" != x; then
22984    # So there is a java(c) binary, it might be part of a JDK.
22985    # Lets find the JDK/JRE directory by following symbolic links.
22986    # Linux/GNU systems often have links from /usr/bin/java to
22987    # /etc/alternatives/java to the real JDK binary.
22988
22989  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22990    # Follow a chain of symbolic links. Use readlink
22991    # where it exists, else fall back to horribly
22992    # complicated shell code.
22993    if test "x$READLINK_TESTED" != yes; then
22994      # On MacOSX there is a readlink tool with a different
22995      # purpose than the GNU readlink tool. Check the found readlink.
22996      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22997      if test "x$ISGNU" = x; then
22998        # A readlink that we do not know how to use.
22999        # Are there other non-GNU readlinks out there?
23000        READLINK_TESTED=yes
23001        READLINK=
23002      fi
23003    fi
23004
23005    if test "x$READLINK" != x; then
23006      BINARY=`$READLINK -f $BINARY`
23007    else
23008      # Save the current directory for restoring afterwards
23009      STARTDIR=$PWD
23010      COUNTER=0
23011      sym_link_dir=`$DIRNAME $BINARY`
23012      sym_link_file=`$BASENAME $BINARY`
23013      cd $sym_link_dir
23014      # Use -P flag to resolve symlinks in directories.
23015      cd `$THEPWDCMD -P`
23016      sym_link_dir=`$THEPWDCMD -P`
23017      # Resolve file symlinks
23018      while test $COUNTER -lt 20; do
23019        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
23020        if test "x$ISLINK" == x; then
23021          # This is not a symbolic link! We are done!
23022          break
23023        fi
23024        # Again resolve directory symlinks since the target of the just found
23025        # link could be in a different directory
23026        cd `$DIRNAME $ISLINK`
23027        sym_link_dir=`$THEPWDCMD -P`
23028        sym_link_file=`$BASENAME $ISLINK`
23029        let COUNTER=COUNTER+1
23030      done
23031      cd $STARTDIR
23032      BINARY=$sym_link_dir/$sym_link_file
23033    fi
23034  fi
23035
23036    BOOT_JDK=`dirname "$BINARY"`
23037    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
23038    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
23039      # Looks like we found ourselves an JDK
23040      BOOT_JDK_FOUND=maybe
23041      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
23042$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
23043    fi
23044  fi
23045
23046
23047    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23048    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23049      # Do we have a bin/java?
23050      if test ! -x "$BOOT_JDK/bin/java"; then
23051        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23053        BOOT_JDK_FOUND=no
23054      else
23055        # Do we have a bin/javac?
23056        if test ! -x "$BOOT_JDK/bin/javac"; then
23057          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23059          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23060$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23061          BOOT_JDK_FOUND=no
23062        else
23063          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23064          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23065
23066          # Extra M4 quote needed to protect [] in grep expression.
23067          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23068          if test "x$FOUND_CORRECT_VERSION" = x; then
23069            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23071            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23072$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23073            BOOT_JDK_FOUND=no
23074          else
23075            # We're done! :-)
23076            BOOT_JDK_FOUND=yes
23077
23078  # Only process if variable expands to non-empty
23079
23080  if test "x$BOOT_JDK" != x; then
23081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23082
23083  # Input might be given as Windows format, start by converting to
23084  # unix format.
23085  path="$BOOT_JDK"
23086  new_path=`$CYGPATH -u "$path"`
23087
23088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23091  # "foo.exe" is OK but "foo" is an error.
23092  #
23093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23094  # It is also a way to make sure we got the proper file name for the real test later on.
23095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23096  if test "x$test_shortpath" = x; then
23097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23099    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23100  fi
23101
23102  # Call helper function which possibly converts this using DOS-style short mode.
23103  # If so, the updated path is stored in $new_path.
23104
23105  input_path="$new_path"
23106  # Check if we need to convert this using DOS-style short mode. If the path
23107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23108  # take no chances and rewrite it.
23109  # Note: m4 eats our [], so we need to use [ and ] instead.
23110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23111  if test "x$has_forbidden_chars" != x; then
23112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23116      # Going to short mode and back again did indeed matter. Since short mode is
23117      # case insensitive, let's make it lowercase to improve readability.
23118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23119      # Now convert it back to Unix-style (cygpath)
23120      input_path=`$CYGPATH -u "$shortmode_path"`
23121      new_path="$input_path"
23122    fi
23123  fi
23124
23125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23126  if test "x$test_cygdrive_prefix" = x; then
23127    # As a simple fix, exclude /usr/bin since it's not a real path.
23128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23130      # a path prefixed by /cygdrive for fixpath to work.
23131      new_path="$CYGWIN_ROOT_PATH$input_path"
23132    fi
23133  fi
23134
23135
23136  if test "x$path" != "x$new_path"; then
23137    BOOT_JDK="$new_path"
23138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23140  fi
23141
23142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23143
23144  path="$BOOT_JDK"
23145  has_colon=`$ECHO $path | $GREP ^.:`
23146  new_path="$path"
23147  if test "x$has_colon" = x; then
23148    # Not in mixed or Windows style, start by that.
23149    new_path=`cmd //c echo $path`
23150  fi
23151
23152
23153  input_path="$new_path"
23154  # Check if we need to convert this using DOS-style short mode. If the path
23155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23156  # take no chances and rewrite it.
23157  # Note: m4 eats our [], so we need to use [ and ] instead.
23158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23159  if test "x$has_forbidden_chars" != x; then
23160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23162  fi
23163
23164
23165  windows_path="$new_path"
23166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23167    unix_path=`$CYGPATH -u "$windows_path"`
23168    new_path="$unix_path"
23169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23171    new_path="$unix_path"
23172  fi
23173
23174  if test "x$path" != "x$new_path"; then
23175    BOOT_JDK="$new_path"
23176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23178  fi
23179
23180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23182
23183    else
23184      # We're on a unix platform. Hooray! :)
23185      path="$BOOT_JDK"
23186      has_space=`$ECHO "$path" | $GREP " "`
23187      if test "x$has_space" != x; then
23188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23190        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23191      fi
23192
23193      # Use eval to expand a potential ~
23194      eval path="$path"
23195      if test ! -f "$path" && test ! -d "$path"; then
23196        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23197      fi
23198
23199      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23200    fi
23201  fi
23202
23203            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23204$as_echo_n "checking for Boot JDK... " >&6; }
23205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23206$as_echo "$BOOT_JDK" >&6; }
23207            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23208$as_echo_n "checking Boot JDK version... " >&6; }
23209            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23211$as_echo "$BOOT_JDK_VERSION" >&6; }
23212          fi # end check jdk version
23213        fi # end check javac
23214      fi # end check java
23215    fi # end check boot jdk found
23216  fi
23217
23218
23219  # Test: Is there a JDK installed in default, well-known locations?
23220
23221  if test "x$BOOT_JDK_FOUND" = xno; then
23222    # Now execute the test
23223
23224  if test "x$OPENJDK_TARGET_OS" = xwindows; then
23225
23226  if test "x$BOOT_JDK_FOUND" = xno; then
23227    # Now execute the test
23228
23229  if test "x$ProgramW6432" != x; then
23230    VIRTUAL_DIR="$ProgramW6432/Java"
23231
23232  windows_path="$VIRTUAL_DIR"
23233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23234    unix_path=`$CYGPATH -u "$windows_path"`
23235    VIRTUAL_DIR="$unix_path"
23236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23238    VIRTUAL_DIR="$unix_path"
23239  fi
23240
23241
23242  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23243  BOOT_JDK_SUFFIX=""
23244  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23245  if test "x$ALL_JDKS_FOUND" != x; then
23246    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23247
23248  if test "x$BOOT_JDK_FOUND" = xno; then
23249    # Now execute the test
23250
23251        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23252        if test -d "$BOOT_JDK"; then
23253          BOOT_JDK_FOUND=maybe
23254          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23255$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23256        fi
23257
23258
23259    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23260    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23261      # Do we have a bin/java?
23262      if test ! -x "$BOOT_JDK/bin/java"; then
23263        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23265        BOOT_JDK_FOUND=no
23266      else
23267        # Do we have a bin/javac?
23268        if test ! -x "$BOOT_JDK/bin/javac"; then
23269          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23271          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23272$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23273          BOOT_JDK_FOUND=no
23274        else
23275          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23276          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23277
23278          # Extra M4 quote needed to protect [] in grep expression.
23279          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23280          if test "x$FOUND_CORRECT_VERSION" = x; then
23281            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23283            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23284$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23285            BOOT_JDK_FOUND=no
23286          else
23287            # We're done! :-)
23288            BOOT_JDK_FOUND=yes
23289
23290  # Only process if variable expands to non-empty
23291
23292  if test "x$BOOT_JDK" != x; then
23293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23294
23295  # Input might be given as Windows format, start by converting to
23296  # unix format.
23297  path="$BOOT_JDK"
23298  new_path=`$CYGPATH -u "$path"`
23299
23300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23303  # "foo.exe" is OK but "foo" is an error.
23304  #
23305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23306  # It is also a way to make sure we got the proper file name for the real test later on.
23307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23308  if test "x$test_shortpath" = x; then
23309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23311    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23312  fi
23313
23314  # Call helper function which possibly converts this using DOS-style short mode.
23315  # If so, the updated path is stored in $new_path.
23316
23317  input_path="$new_path"
23318  # Check if we need to convert this using DOS-style short mode. If the path
23319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23320  # take no chances and rewrite it.
23321  # Note: m4 eats our [], so we need to use [ and ] instead.
23322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23323  if test "x$has_forbidden_chars" != x; then
23324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23328      # Going to short mode and back again did indeed matter. Since short mode is
23329      # case insensitive, let's make it lowercase to improve readability.
23330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23331      # Now convert it back to Unix-style (cygpath)
23332      input_path=`$CYGPATH -u "$shortmode_path"`
23333      new_path="$input_path"
23334    fi
23335  fi
23336
23337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23338  if test "x$test_cygdrive_prefix" = x; then
23339    # As a simple fix, exclude /usr/bin since it's not a real path.
23340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23342      # a path prefixed by /cygdrive for fixpath to work.
23343      new_path="$CYGWIN_ROOT_PATH$input_path"
23344    fi
23345  fi
23346
23347
23348  if test "x$path" != "x$new_path"; then
23349    BOOT_JDK="$new_path"
23350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23352  fi
23353
23354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23355
23356  path="$BOOT_JDK"
23357  has_colon=`$ECHO $path | $GREP ^.:`
23358  new_path="$path"
23359  if test "x$has_colon" = x; then
23360    # Not in mixed or Windows style, start by that.
23361    new_path=`cmd //c echo $path`
23362  fi
23363
23364
23365  input_path="$new_path"
23366  # Check if we need to convert this using DOS-style short mode. If the path
23367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23368  # take no chances and rewrite it.
23369  # Note: m4 eats our [], so we need to use [ and ] instead.
23370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23371  if test "x$has_forbidden_chars" != x; then
23372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23374  fi
23375
23376
23377  windows_path="$new_path"
23378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23379    unix_path=`$CYGPATH -u "$windows_path"`
23380    new_path="$unix_path"
23381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23383    new_path="$unix_path"
23384  fi
23385
23386  if test "x$path" != "x$new_path"; then
23387    BOOT_JDK="$new_path"
23388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23390  fi
23391
23392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23394
23395    else
23396      # We're on a unix platform. Hooray! :)
23397      path="$BOOT_JDK"
23398      has_space=`$ECHO "$path" | $GREP " "`
23399      if test "x$has_space" != x; then
23400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23403      fi
23404
23405      # Use eval to expand a potential ~
23406      eval path="$path"
23407      if test ! -f "$path" && test ! -d "$path"; then
23408        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23409      fi
23410
23411      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23412    fi
23413  fi
23414
23415            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23416$as_echo_n "checking for Boot JDK... " >&6; }
23417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23418$as_echo "$BOOT_JDK" >&6; }
23419            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23420$as_echo_n "checking Boot JDK version... " >&6; }
23421            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23423$as_echo "$BOOT_JDK_VERSION" >&6; }
23424          fi # end check jdk version
23425        fi # end check javac
23426      fi # end check java
23427    fi # end check boot jdk found
23428  fi
23429
23430    done
23431  fi
23432
23433  fi
23434
23435
23436    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23437    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23438      # Do we have a bin/java?
23439      if test ! -x "$BOOT_JDK/bin/java"; then
23440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23442        BOOT_JDK_FOUND=no
23443      else
23444        # Do we have a bin/javac?
23445        if test ! -x "$BOOT_JDK/bin/javac"; then
23446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23448          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23449$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23450          BOOT_JDK_FOUND=no
23451        else
23452          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23453          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23454
23455          # Extra M4 quote needed to protect [] in grep expression.
23456          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23457          if test "x$FOUND_CORRECT_VERSION" = x; then
23458            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23460            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23461$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23462            BOOT_JDK_FOUND=no
23463          else
23464            # We're done! :-)
23465            BOOT_JDK_FOUND=yes
23466
23467  # Only process if variable expands to non-empty
23468
23469  if test "x$BOOT_JDK" != x; then
23470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23471
23472  # Input might be given as Windows format, start by converting to
23473  # unix format.
23474  path="$BOOT_JDK"
23475  new_path=`$CYGPATH -u "$path"`
23476
23477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23480  # "foo.exe" is OK but "foo" is an error.
23481  #
23482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23483  # It is also a way to make sure we got the proper file name for the real test later on.
23484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23485  if test "x$test_shortpath" = x; then
23486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23487$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23488    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23489  fi
23490
23491  # Call helper function which possibly converts this using DOS-style short mode.
23492  # If so, the updated path is stored in $new_path.
23493
23494  input_path="$new_path"
23495  # Check if we need to convert this using DOS-style short mode. If the path
23496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23497  # take no chances and rewrite it.
23498  # Note: m4 eats our [], so we need to use [ and ] instead.
23499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23500  if test "x$has_forbidden_chars" != x; then
23501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23505      # Going to short mode and back again did indeed matter. Since short mode is
23506      # case insensitive, let's make it lowercase to improve readability.
23507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23508      # Now convert it back to Unix-style (cygpath)
23509      input_path=`$CYGPATH -u "$shortmode_path"`
23510      new_path="$input_path"
23511    fi
23512  fi
23513
23514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23515  if test "x$test_cygdrive_prefix" = x; then
23516    # As a simple fix, exclude /usr/bin since it's not a real path.
23517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23519      # a path prefixed by /cygdrive for fixpath to work.
23520      new_path="$CYGWIN_ROOT_PATH$input_path"
23521    fi
23522  fi
23523
23524
23525  if test "x$path" != "x$new_path"; then
23526    BOOT_JDK="$new_path"
23527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23529  fi
23530
23531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23532
23533  path="$BOOT_JDK"
23534  has_colon=`$ECHO $path | $GREP ^.:`
23535  new_path="$path"
23536  if test "x$has_colon" = x; then
23537    # Not in mixed or Windows style, start by that.
23538    new_path=`cmd //c echo $path`
23539  fi
23540
23541
23542  input_path="$new_path"
23543  # Check if we need to convert this using DOS-style short mode. If the path
23544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23545  # take no chances and rewrite it.
23546  # Note: m4 eats our [], so we need to use [ and ] instead.
23547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23548  if test "x$has_forbidden_chars" != x; then
23549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23551  fi
23552
23553
23554  windows_path="$new_path"
23555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23556    unix_path=`$CYGPATH -u "$windows_path"`
23557    new_path="$unix_path"
23558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23560    new_path="$unix_path"
23561  fi
23562
23563  if test "x$path" != "x$new_path"; then
23564    BOOT_JDK="$new_path"
23565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23567  fi
23568
23569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23571
23572    else
23573      # We're on a unix platform. Hooray! :)
23574      path="$BOOT_JDK"
23575      has_space=`$ECHO "$path" | $GREP " "`
23576      if test "x$has_space" != x; then
23577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23580      fi
23581
23582      # Use eval to expand a potential ~
23583      eval path="$path"
23584      if test ! -f "$path" && test ! -d "$path"; then
23585        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23586      fi
23587
23588      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23589    fi
23590  fi
23591
23592            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23593$as_echo_n "checking for Boot JDK... " >&6; }
23594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23595$as_echo "$BOOT_JDK" >&6; }
23596            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23597$as_echo_n "checking Boot JDK version... " >&6; }
23598            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23600$as_echo "$BOOT_JDK_VERSION" >&6; }
23601          fi # end check jdk version
23602        fi # end check javac
23603      fi # end check java
23604    fi # end check boot jdk found
23605  fi
23606
23607
23608  if test "x$BOOT_JDK_FOUND" = xno; then
23609    # Now execute the test
23610
23611  if test "x$PROGRAMW6432" != x; then
23612    VIRTUAL_DIR="$PROGRAMW6432/Java"
23613
23614  windows_path="$VIRTUAL_DIR"
23615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23616    unix_path=`$CYGPATH -u "$windows_path"`
23617    VIRTUAL_DIR="$unix_path"
23618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23620    VIRTUAL_DIR="$unix_path"
23621  fi
23622
23623
23624  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23625  BOOT_JDK_SUFFIX=""
23626  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23627  if test "x$ALL_JDKS_FOUND" != x; then
23628    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23629
23630  if test "x$BOOT_JDK_FOUND" = xno; then
23631    # Now execute the test
23632
23633        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23634        if test -d "$BOOT_JDK"; then
23635          BOOT_JDK_FOUND=maybe
23636          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23637$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23638        fi
23639
23640
23641    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23642    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23643      # Do we have a bin/java?
23644      if test ! -x "$BOOT_JDK/bin/java"; then
23645        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23647        BOOT_JDK_FOUND=no
23648      else
23649        # Do we have a bin/javac?
23650        if test ! -x "$BOOT_JDK/bin/javac"; then
23651          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23653          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23654$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23655          BOOT_JDK_FOUND=no
23656        else
23657          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23658          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23659
23660          # Extra M4 quote needed to protect [] in grep expression.
23661          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23662          if test "x$FOUND_CORRECT_VERSION" = x; then
23663            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23665            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23666$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23667            BOOT_JDK_FOUND=no
23668          else
23669            # We're done! :-)
23670            BOOT_JDK_FOUND=yes
23671
23672  # Only process if variable expands to non-empty
23673
23674  if test "x$BOOT_JDK" != x; then
23675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23676
23677  # Input might be given as Windows format, start by converting to
23678  # unix format.
23679  path="$BOOT_JDK"
23680  new_path=`$CYGPATH -u "$path"`
23681
23682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23685  # "foo.exe" is OK but "foo" is an error.
23686  #
23687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23688  # It is also a way to make sure we got the proper file name for the real test later on.
23689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23690  if test "x$test_shortpath" = x; then
23691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23693    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23694  fi
23695
23696  # Call helper function which possibly converts this using DOS-style short mode.
23697  # If so, the updated path is stored in $new_path.
23698
23699  input_path="$new_path"
23700  # Check if we need to convert this using DOS-style short mode. If the path
23701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23702  # take no chances and rewrite it.
23703  # Note: m4 eats our [], so we need to use [ and ] instead.
23704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23705  if test "x$has_forbidden_chars" != x; then
23706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23710      # Going to short mode and back again did indeed matter. Since short mode is
23711      # case insensitive, let's make it lowercase to improve readability.
23712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23713      # Now convert it back to Unix-style (cygpath)
23714      input_path=`$CYGPATH -u "$shortmode_path"`
23715      new_path="$input_path"
23716    fi
23717  fi
23718
23719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23720  if test "x$test_cygdrive_prefix" = x; then
23721    # As a simple fix, exclude /usr/bin since it's not a real path.
23722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23724      # a path prefixed by /cygdrive for fixpath to work.
23725      new_path="$CYGWIN_ROOT_PATH$input_path"
23726    fi
23727  fi
23728
23729
23730  if test "x$path" != "x$new_path"; then
23731    BOOT_JDK="$new_path"
23732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23733$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23734  fi
23735
23736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23737
23738  path="$BOOT_JDK"
23739  has_colon=`$ECHO $path | $GREP ^.:`
23740  new_path="$path"
23741  if test "x$has_colon" = x; then
23742    # Not in mixed or Windows style, start by that.
23743    new_path=`cmd //c echo $path`
23744  fi
23745
23746
23747  input_path="$new_path"
23748  # Check if we need to convert this using DOS-style short mode. If the path
23749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23750  # take no chances and rewrite it.
23751  # Note: m4 eats our [], so we need to use [ and ] instead.
23752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23753  if test "x$has_forbidden_chars" != x; then
23754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23756  fi
23757
23758
23759  windows_path="$new_path"
23760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23761    unix_path=`$CYGPATH -u "$windows_path"`
23762    new_path="$unix_path"
23763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23765    new_path="$unix_path"
23766  fi
23767
23768  if test "x$path" != "x$new_path"; then
23769    BOOT_JDK="$new_path"
23770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23772  fi
23773
23774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23776
23777    else
23778      # We're on a unix platform. Hooray! :)
23779      path="$BOOT_JDK"
23780      has_space=`$ECHO "$path" | $GREP " "`
23781      if test "x$has_space" != x; then
23782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23785      fi
23786
23787      # Use eval to expand a potential ~
23788      eval path="$path"
23789      if test ! -f "$path" && test ! -d "$path"; then
23790        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23791      fi
23792
23793      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23794    fi
23795  fi
23796
23797            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23798$as_echo_n "checking for Boot JDK... " >&6; }
23799            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23800$as_echo "$BOOT_JDK" >&6; }
23801            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23802$as_echo_n "checking Boot JDK version... " >&6; }
23803            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23804            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23805$as_echo "$BOOT_JDK_VERSION" >&6; }
23806          fi # end check jdk version
23807        fi # end check javac
23808      fi # end check java
23809    fi # end check boot jdk found
23810  fi
23811
23812    done
23813  fi
23814
23815  fi
23816
23817
23818    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23819    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23820      # Do we have a bin/java?
23821      if test ! -x "$BOOT_JDK/bin/java"; then
23822        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23824        BOOT_JDK_FOUND=no
23825      else
23826        # Do we have a bin/javac?
23827        if test ! -x "$BOOT_JDK/bin/javac"; then
23828          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23830          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23831$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23832          BOOT_JDK_FOUND=no
23833        else
23834          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23835          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23836
23837          # Extra M4 quote needed to protect [] in grep expression.
23838          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23839          if test "x$FOUND_CORRECT_VERSION" = x; then
23840            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23842            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23843$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23844            BOOT_JDK_FOUND=no
23845          else
23846            # We're done! :-)
23847            BOOT_JDK_FOUND=yes
23848
23849  # Only process if variable expands to non-empty
23850
23851  if test "x$BOOT_JDK" != x; then
23852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23853
23854  # Input might be given as Windows format, start by converting to
23855  # unix format.
23856  path="$BOOT_JDK"
23857  new_path=`$CYGPATH -u "$path"`
23858
23859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23862  # "foo.exe" is OK but "foo" is an error.
23863  #
23864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23865  # It is also a way to make sure we got the proper file name for the real test later on.
23866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23867  if test "x$test_shortpath" = x; then
23868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23870    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23871  fi
23872
23873  # Call helper function which possibly converts this using DOS-style short mode.
23874  # If so, the updated path is stored in $new_path.
23875
23876  input_path="$new_path"
23877  # Check if we need to convert this using DOS-style short mode. If the path
23878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23879  # take no chances and rewrite it.
23880  # Note: m4 eats our [], so we need to use [ and ] instead.
23881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23882  if test "x$has_forbidden_chars" != x; then
23883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23887      # Going to short mode and back again did indeed matter. Since short mode is
23888      # case insensitive, let's make it lowercase to improve readability.
23889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23890      # Now convert it back to Unix-style (cygpath)
23891      input_path=`$CYGPATH -u "$shortmode_path"`
23892      new_path="$input_path"
23893    fi
23894  fi
23895
23896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23897  if test "x$test_cygdrive_prefix" = x; then
23898    # As a simple fix, exclude /usr/bin since it's not a real path.
23899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23901      # a path prefixed by /cygdrive for fixpath to work.
23902      new_path="$CYGWIN_ROOT_PATH$input_path"
23903    fi
23904  fi
23905
23906
23907  if test "x$path" != "x$new_path"; then
23908    BOOT_JDK="$new_path"
23909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23911  fi
23912
23913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23914
23915  path="$BOOT_JDK"
23916  has_colon=`$ECHO $path | $GREP ^.:`
23917  new_path="$path"
23918  if test "x$has_colon" = x; then
23919    # Not in mixed or Windows style, start by that.
23920    new_path=`cmd //c echo $path`
23921  fi
23922
23923
23924  input_path="$new_path"
23925  # Check if we need to convert this using DOS-style short mode. If the path
23926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23927  # take no chances and rewrite it.
23928  # Note: m4 eats our [], so we need to use [ and ] instead.
23929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23930  if test "x$has_forbidden_chars" != x; then
23931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23933  fi
23934
23935
23936  windows_path="$new_path"
23937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23938    unix_path=`$CYGPATH -u "$windows_path"`
23939    new_path="$unix_path"
23940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23942    new_path="$unix_path"
23943  fi
23944
23945  if test "x$path" != "x$new_path"; then
23946    BOOT_JDK="$new_path"
23947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23948$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23949  fi
23950
23951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23953
23954    else
23955      # We're on a unix platform. Hooray! :)
23956      path="$BOOT_JDK"
23957      has_space=`$ECHO "$path" | $GREP " "`
23958      if test "x$has_space" != x; then
23959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23960$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23962      fi
23963
23964      # Use eval to expand a potential ~
23965      eval path="$path"
23966      if test ! -f "$path" && test ! -d "$path"; then
23967        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23968      fi
23969
23970      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23971    fi
23972  fi
23973
23974            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23975$as_echo_n "checking for Boot JDK... " >&6; }
23976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23977$as_echo "$BOOT_JDK" >&6; }
23978            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23979$as_echo_n "checking Boot JDK version... " >&6; }
23980            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23982$as_echo "$BOOT_JDK_VERSION" >&6; }
23983          fi # end check jdk version
23984        fi # end check javac
23985      fi # end check java
23986    fi # end check boot jdk found
23987  fi
23988
23989
23990  if test "x$BOOT_JDK_FOUND" = xno; then
23991    # Now execute the test
23992
23993  if test "x$PROGRAMFILES" != x; then
23994    VIRTUAL_DIR="$PROGRAMFILES/Java"
23995
23996  windows_path="$VIRTUAL_DIR"
23997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23998    unix_path=`$CYGPATH -u "$windows_path"`
23999    VIRTUAL_DIR="$unix_path"
24000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24002    VIRTUAL_DIR="$unix_path"
24003  fi
24004
24005
24006  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24007  BOOT_JDK_SUFFIX=""
24008  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24009  if test "x$ALL_JDKS_FOUND" != x; then
24010    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24011
24012  if test "x$BOOT_JDK_FOUND" = xno; then
24013    # Now execute the test
24014
24015        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24016        if test -d "$BOOT_JDK"; then
24017          BOOT_JDK_FOUND=maybe
24018          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24019$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24020        fi
24021
24022
24023    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24024    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24025      # Do we have a bin/java?
24026      if test ! -x "$BOOT_JDK/bin/java"; then
24027        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24029        BOOT_JDK_FOUND=no
24030      else
24031        # Do we have a bin/javac?
24032        if test ! -x "$BOOT_JDK/bin/javac"; then
24033          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24035          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24036$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24037          BOOT_JDK_FOUND=no
24038        else
24039          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24040          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24041
24042          # Extra M4 quote needed to protect [] in grep expression.
24043          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24044          if test "x$FOUND_CORRECT_VERSION" = x; then
24045            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24047            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24048$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24049            BOOT_JDK_FOUND=no
24050          else
24051            # We're done! :-)
24052            BOOT_JDK_FOUND=yes
24053
24054  # Only process if variable expands to non-empty
24055
24056  if test "x$BOOT_JDK" != x; then
24057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24058
24059  # Input might be given as Windows format, start by converting to
24060  # unix format.
24061  path="$BOOT_JDK"
24062  new_path=`$CYGPATH -u "$path"`
24063
24064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24067  # "foo.exe" is OK but "foo" is an error.
24068  #
24069  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24070  # It is also a way to make sure we got the proper file name for the real test later on.
24071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24072  if test "x$test_shortpath" = x; then
24073    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24075    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24076  fi
24077
24078  # Call helper function which possibly converts this using DOS-style short mode.
24079  # If so, the updated path is stored in $new_path.
24080
24081  input_path="$new_path"
24082  # Check if we need to convert this using DOS-style short mode. If the path
24083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24084  # take no chances and rewrite it.
24085  # Note: m4 eats our [], so we need to use [ and ] instead.
24086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24087  if test "x$has_forbidden_chars" != x; then
24088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24092      # Going to short mode and back again did indeed matter. Since short mode is
24093      # case insensitive, let's make it lowercase to improve readability.
24094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24095      # Now convert it back to Unix-style (cygpath)
24096      input_path=`$CYGPATH -u "$shortmode_path"`
24097      new_path="$input_path"
24098    fi
24099  fi
24100
24101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24102  if test "x$test_cygdrive_prefix" = x; then
24103    # As a simple fix, exclude /usr/bin since it's not a real path.
24104    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24106      # a path prefixed by /cygdrive for fixpath to work.
24107      new_path="$CYGWIN_ROOT_PATH$input_path"
24108    fi
24109  fi
24110
24111
24112  if test "x$path" != "x$new_path"; then
24113    BOOT_JDK="$new_path"
24114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24116  fi
24117
24118    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24119
24120  path="$BOOT_JDK"
24121  has_colon=`$ECHO $path | $GREP ^.:`
24122  new_path="$path"
24123  if test "x$has_colon" = x; then
24124    # Not in mixed or Windows style, start by that.
24125    new_path=`cmd //c echo $path`
24126  fi
24127
24128
24129  input_path="$new_path"
24130  # Check if we need to convert this using DOS-style short mode. If the path
24131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24132  # take no chances and rewrite it.
24133  # Note: m4 eats our [], so we need to use [ and ] instead.
24134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24135  if test "x$has_forbidden_chars" != x; then
24136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24138  fi
24139
24140
24141  windows_path="$new_path"
24142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24143    unix_path=`$CYGPATH -u "$windows_path"`
24144    new_path="$unix_path"
24145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24147    new_path="$unix_path"
24148  fi
24149
24150  if test "x$path" != "x$new_path"; then
24151    BOOT_JDK="$new_path"
24152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24154  fi
24155
24156  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24157  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24158
24159    else
24160      # We're on a unix platform. Hooray! :)
24161      path="$BOOT_JDK"
24162      has_space=`$ECHO "$path" | $GREP " "`
24163      if test "x$has_space" != x; then
24164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24165$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24166        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24167      fi
24168
24169      # Use eval to expand a potential ~
24170      eval path="$path"
24171      if test ! -f "$path" && test ! -d "$path"; then
24172        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24173      fi
24174
24175      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24176    fi
24177  fi
24178
24179            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24180$as_echo_n "checking for Boot JDK... " >&6; }
24181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24182$as_echo "$BOOT_JDK" >&6; }
24183            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24184$as_echo_n "checking Boot JDK version... " >&6; }
24185            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24186            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24187$as_echo "$BOOT_JDK_VERSION" >&6; }
24188          fi # end check jdk version
24189        fi # end check javac
24190      fi # end check java
24191    fi # end check boot jdk found
24192  fi
24193
24194    done
24195  fi
24196
24197  fi
24198
24199
24200    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24201    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24202      # Do we have a bin/java?
24203      if test ! -x "$BOOT_JDK/bin/java"; then
24204        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24206        BOOT_JDK_FOUND=no
24207      else
24208        # Do we have a bin/javac?
24209        if test ! -x "$BOOT_JDK/bin/javac"; then
24210          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24212          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24213$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24214          BOOT_JDK_FOUND=no
24215        else
24216          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24217          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24218
24219          # Extra M4 quote needed to protect [] in grep expression.
24220          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24221          if test "x$FOUND_CORRECT_VERSION" = x; then
24222            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24224            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24225$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24226            BOOT_JDK_FOUND=no
24227          else
24228            # We're done! :-)
24229            BOOT_JDK_FOUND=yes
24230
24231  # Only process if variable expands to non-empty
24232
24233  if test "x$BOOT_JDK" != x; then
24234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24235
24236  # Input might be given as Windows format, start by converting to
24237  # unix format.
24238  path="$BOOT_JDK"
24239  new_path=`$CYGPATH -u "$path"`
24240
24241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24244  # "foo.exe" is OK but "foo" is an error.
24245  #
24246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24247  # It is also a way to make sure we got the proper file name for the real test later on.
24248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24249  if test "x$test_shortpath" = x; then
24250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24252    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24253  fi
24254
24255  # Call helper function which possibly converts this using DOS-style short mode.
24256  # If so, the updated path is stored in $new_path.
24257
24258  input_path="$new_path"
24259  # Check if we need to convert this using DOS-style short mode. If the path
24260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24261  # take no chances and rewrite it.
24262  # Note: m4 eats our [], so we need to use [ and ] instead.
24263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24264  if test "x$has_forbidden_chars" != x; then
24265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24269      # Going to short mode and back again did indeed matter. Since short mode is
24270      # case insensitive, let's make it lowercase to improve readability.
24271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24272      # Now convert it back to Unix-style (cygpath)
24273      input_path=`$CYGPATH -u "$shortmode_path"`
24274      new_path="$input_path"
24275    fi
24276  fi
24277
24278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24279  if test "x$test_cygdrive_prefix" = x; then
24280    # As a simple fix, exclude /usr/bin since it's not a real path.
24281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24283      # a path prefixed by /cygdrive for fixpath to work.
24284      new_path="$CYGWIN_ROOT_PATH$input_path"
24285    fi
24286  fi
24287
24288
24289  if test "x$path" != "x$new_path"; then
24290    BOOT_JDK="$new_path"
24291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24293  fi
24294
24295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24296
24297  path="$BOOT_JDK"
24298  has_colon=`$ECHO $path | $GREP ^.:`
24299  new_path="$path"
24300  if test "x$has_colon" = x; then
24301    # Not in mixed or Windows style, start by that.
24302    new_path=`cmd //c echo $path`
24303  fi
24304
24305
24306  input_path="$new_path"
24307  # Check if we need to convert this using DOS-style short mode. If the path
24308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24309  # take no chances and rewrite it.
24310  # Note: m4 eats our [], so we need to use [ and ] instead.
24311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24312  if test "x$has_forbidden_chars" != x; then
24313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24315  fi
24316
24317
24318  windows_path="$new_path"
24319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24320    unix_path=`$CYGPATH -u "$windows_path"`
24321    new_path="$unix_path"
24322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24324    new_path="$unix_path"
24325  fi
24326
24327  if test "x$path" != "x$new_path"; then
24328    BOOT_JDK="$new_path"
24329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24331  fi
24332
24333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24335
24336    else
24337      # We're on a unix platform. Hooray! :)
24338      path="$BOOT_JDK"
24339      has_space=`$ECHO "$path" | $GREP " "`
24340      if test "x$has_space" != x; then
24341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24342$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24344      fi
24345
24346      # Use eval to expand a potential ~
24347      eval path="$path"
24348      if test ! -f "$path" && test ! -d "$path"; then
24349        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24350      fi
24351
24352      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24353    fi
24354  fi
24355
24356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24357$as_echo_n "checking for Boot JDK... " >&6; }
24358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24359$as_echo "$BOOT_JDK" >&6; }
24360            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24361$as_echo_n "checking Boot JDK version... " >&6; }
24362            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24364$as_echo "$BOOT_JDK_VERSION" >&6; }
24365          fi # end check jdk version
24366        fi # end check javac
24367      fi # end check java
24368    fi # end check boot jdk found
24369  fi
24370
24371
24372  if test "x$BOOT_JDK_FOUND" = xno; then
24373    # Now execute the test
24374
24375  if test "x$ProgramFiles" != x; then
24376    VIRTUAL_DIR="$ProgramFiles/Java"
24377
24378  windows_path="$VIRTUAL_DIR"
24379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24380    unix_path=`$CYGPATH -u "$windows_path"`
24381    VIRTUAL_DIR="$unix_path"
24382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24384    VIRTUAL_DIR="$unix_path"
24385  fi
24386
24387
24388  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24389  BOOT_JDK_SUFFIX=""
24390  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24391  if test "x$ALL_JDKS_FOUND" != x; then
24392    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24393
24394  if test "x$BOOT_JDK_FOUND" = xno; then
24395    # Now execute the test
24396
24397        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24398        if test -d "$BOOT_JDK"; then
24399          BOOT_JDK_FOUND=maybe
24400          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24401$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24402        fi
24403
24404
24405    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24406    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24407      # Do we have a bin/java?
24408      if test ! -x "$BOOT_JDK/bin/java"; then
24409        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24411        BOOT_JDK_FOUND=no
24412      else
24413        # Do we have a bin/javac?
24414        if test ! -x "$BOOT_JDK/bin/javac"; then
24415          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24417          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24418$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24419          BOOT_JDK_FOUND=no
24420        else
24421          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24422          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24423
24424          # Extra M4 quote needed to protect [] in grep expression.
24425          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24426          if test "x$FOUND_CORRECT_VERSION" = x; then
24427            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24429            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24430$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24431            BOOT_JDK_FOUND=no
24432          else
24433            # We're done! :-)
24434            BOOT_JDK_FOUND=yes
24435
24436  # Only process if variable expands to non-empty
24437
24438  if test "x$BOOT_JDK" != x; then
24439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24440
24441  # Input might be given as Windows format, start by converting to
24442  # unix format.
24443  path="$BOOT_JDK"
24444  new_path=`$CYGPATH -u "$path"`
24445
24446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24449  # "foo.exe" is OK but "foo" is an error.
24450  #
24451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24452  # It is also a way to make sure we got the proper file name for the real test later on.
24453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24454  if test "x$test_shortpath" = x; then
24455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24457    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24458  fi
24459
24460  # Call helper function which possibly converts this using DOS-style short mode.
24461  # If so, the updated path is stored in $new_path.
24462
24463  input_path="$new_path"
24464  # Check if we need to convert this using DOS-style short mode. If the path
24465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24466  # take no chances and rewrite it.
24467  # Note: m4 eats our [], so we need to use [ and ] instead.
24468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24469  if test "x$has_forbidden_chars" != x; then
24470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24474      # Going to short mode and back again did indeed matter. Since short mode is
24475      # case insensitive, let's make it lowercase to improve readability.
24476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24477      # Now convert it back to Unix-style (cygpath)
24478      input_path=`$CYGPATH -u "$shortmode_path"`
24479      new_path="$input_path"
24480    fi
24481  fi
24482
24483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24484  if test "x$test_cygdrive_prefix" = x; then
24485    # As a simple fix, exclude /usr/bin since it's not a real path.
24486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24488      # a path prefixed by /cygdrive for fixpath to work.
24489      new_path="$CYGWIN_ROOT_PATH$input_path"
24490    fi
24491  fi
24492
24493
24494  if test "x$path" != "x$new_path"; then
24495    BOOT_JDK="$new_path"
24496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24498  fi
24499
24500    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24501
24502  path="$BOOT_JDK"
24503  has_colon=`$ECHO $path | $GREP ^.:`
24504  new_path="$path"
24505  if test "x$has_colon" = x; then
24506    # Not in mixed or Windows style, start by that.
24507    new_path=`cmd //c echo $path`
24508  fi
24509
24510
24511  input_path="$new_path"
24512  # Check if we need to convert this using DOS-style short mode. If the path
24513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24514  # take no chances and rewrite it.
24515  # Note: m4 eats our [], so we need to use [ and ] instead.
24516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24517  if test "x$has_forbidden_chars" != x; then
24518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24520  fi
24521
24522
24523  windows_path="$new_path"
24524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24525    unix_path=`$CYGPATH -u "$windows_path"`
24526    new_path="$unix_path"
24527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24529    new_path="$unix_path"
24530  fi
24531
24532  if test "x$path" != "x$new_path"; then
24533    BOOT_JDK="$new_path"
24534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24536  fi
24537
24538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24540
24541    else
24542      # We're on a unix platform. Hooray! :)
24543      path="$BOOT_JDK"
24544      has_space=`$ECHO "$path" | $GREP " "`
24545      if test "x$has_space" != x; then
24546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24548        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24549      fi
24550
24551      # Use eval to expand a potential ~
24552      eval path="$path"
24553      if test ! -f "$path" && test ! -d "$path"; then
24554        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24555      fi
24556
24557      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24558    fi
24559  fi
24560
24561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24562$as_echo_n "checking for Boot JDK... " >&6; }
24563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24564$as_echo "$BOOT_JDK" >&6; }
24565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24566$as_echo_n "checking Boot JDK version... " >&6; }
24567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24569$as_echo "$BOOT_JDK_VERSION" >&6; }
24570          fi # end check jdk version
24571        fi # end check javac
24572      fi # end check java
24573    fi # end check boot jdk found
24574  fi
24575
24576    done
24577  fi
24578
24579  fi
24580
24581
24582    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24583    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24584      # Do we have a bin/java?
24585      if test ! -x "$BOOT_JDK/bin/java"; then
24586        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24588        BOOT_JDK_FOUND=no
24589      else
24590        # Do we have a bin/javac?
24591        if test ! -x "$BOOT_JDK/bin/javac"; then
24592          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24594          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24595$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24596          BOOT_JDK_FOUND=no
24597        else
24598          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24599          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24600
24601          # Extra M4 quote needed to protect [] in grep expression.
24602          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24603          if test "x$FOUND_CORRECT_VERSION" = x; then
24604            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24606            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24607$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24608            BOOT_JDK_FOUND=no
24609          else
24610            # We're done! :-)
24611            BOOT_JDK_FOUND=yes
24612
24613  # Only process if variable expands to non-empty
24614
24615  if test "x$BOOT_JDK" != x; then
24616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24617
24618  # Input might be given as Windows format, start by converting to
24619  # unix format.
24620  path="$BOOT_JDK"
24621  new_path=`$CYGPATH -u "$path"`
24622
24623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24626  # "foo.exe" is OK but "foo" is an error.
24627  #
24628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24629  # It is also a way to make sure we got the proper file name for the real test later on.
24630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24631  if test "x$test_shortpath" = x; then
24632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24633$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24634    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24635  fi
24636
24637  # Call helper function which possibly converts this using DOS-style short mode.
24638  # If so, the updated path is stored in $new_path.
24639
24640  input_path="$new_path"
24641  # Check if we need to convert this using DOS-style short mode. If the path
24642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24643  # take no chances and rewrite it.
24644  # Note: m4 eats our [], so we need to use [ and ] instead.
24645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24646  if test "x$has_forbidden_chars" != x; then
24647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24651      # Going to short mode and back again did indeed matter. Since short mode is
24652      # case insensitive, let's make it lowercase to improve readability.
24653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24654      # Now convert it back to Unix-style (cygpath)
24655      input_path=`$CYGPATH -u "$shortmode_path"`
24656      new_path="$input_path"
24657    fi
24658  fi
24659
24660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24661  if test "x$test_cygdrive_prefix" = x; then
24662    # As a simple fix, exclude /usr/bin since it's not a real path.
24663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24665      # a path prefixed by /cygdrive for fixpath to work.
24666      new_path="$CYGWIN_ROOT_PATH$input_path"
24667    fi
24668  fi
24669
24670
24671  if test "x$path" != "x$new_path"; then
24672    BOOT_JDK="$new_path"
24673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24675  fi
24676
24677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24678
24679  path="$BOOT_JDK"
24680  has_colon=`$ECHO $path | $GREP ^.:`
24681  new_path="$path"
24682  if test "x$has_colon" = x; then
24683    # Not in mixed or Windows style, start by that.
24684    new_path=`cmd //c echo $path`
24685  fi
24686
24687
24688  input_path="$new_path"
24689  # Check if we need to convert this using DOS-style short mode. If the path
24690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24691  # take no chances and rewrite it.
24692  # Note: m4 eats our [], so we need to use [ and ] instead.
24693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24694  if test "x$has_forbidden_chars" != x; then
24695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24697  fi
24698
24699
24700  windows_path="$new_path"
24701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24702    unix_path=`$CYGPATH -u "$windows_path"`
24703    new_path="$unix_path"
24704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24706    new_path="$unix_path"
24707  fi
24708
24709  if test "x$path" != "x$new_path"; then
24710    BOOT_JDK="$new_path"
24711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24712$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24713  fi
24714
24715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24717
24718    else
24719      # We're on a unix platform. Hooray! :)
24720      path="$BOOT_JDK"
24721      has_space=`$ECHO "$path" | $GREP " "`
24722      if test "x$has_space" != x; then
24723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24724$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24725        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24726      fi
24727
24728      # Use eval to expand a potential ~
24729      eval path="$path"
24730      if test ! -f "$path" && test ! -d "$path"; then
24731        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24732      fi
24733
24734      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24735    fi
24736  fi
24737
24738            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24739$as_echo_n "checking for Boot JDK... " >&6; }
24740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24741$as_echo "$BOOT_JDK" >&6; }
24742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24743$as_echo_n "checking Boot JDK version... " >&6; }
24744            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24746$as_echo "$BOOT_JDK_VERSION" >&6; }
24747          fi # end check jdk version
24748        fi # end check javac
24749      fi # end check java
24750    fi # end check boot jdk found
24751  fi
24752
24753
24754  if test "x$BOOT_JDK_FOUND" = xno; then
24755    # Now execute the test
24756
24757  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24758  BOOT_JDK_SUFFIX=""
24759  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24760  if test "x$ALL_JDKS_FOUND" != x; then
24761    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24762
24763  if test "x$BOOT_JDK_FOUND" = xno; then
24764    # Now execute the test
24765
24766        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24767        if test -d "$BOOT_JDK"; then
24768          BOOT_JDK_FOUND=maybe
24769          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24770$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24771        fi
24772
24773
24774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24776      # Do we have a bin/java?
24777      if test ! -x "$BOOT_JDK/bin/java"; then
24778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24780        BOOT_JDK_FOUND=no
24781      else
24782        # Do we have a bin/javac?
24783        if test ! -x "$BOOT_JDK/bin/javac"; then
24784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24788          BOOT_JDK_FOUND=no
24789        else
24790          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24791          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24792
24793          # Extra M4 quote needed to protect [] in grep expression.
24794          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24795          if test "x$FOUND_CORRECT_VERSION" = x; then
24796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24798            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24799$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24800            BOOT_JDK_FOUND=no
24801          else
24802            # We're done! :-)
24803            BOOT_JDK_FOUND=yes
24804
24805  # Only process if variable expands to non-empty
24806
24807  if test "x$BOOT_JDK" != x; then
24808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24809
24810  # Input might be given as Windows format, start by converting to
24811  # unix format.
24812  path="$BOOT_JDK"
24813  new_path=`$CYGPATH -u "$path"`
24814
24815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24818  # "foo.exe" is OK but "foo" is an error.
24819  #
24820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24821  # It is also a way to make sure we got the proper file name for the real test later on.
24822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24823  if test "x$test_shortpath" = x; then
24824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24826    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24827  fi
24828
24829  # Call helper function which possibly converts this using DOS-style short mode.
24830  # If so, the updated path is stored in $new_path.
24831
24832  input_path="$new_path"
24833  # Check if we need to convert this using DOS-style short mode. If the path
24834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24835  # take no chances and rewrite it.
24836  # Note: m4 eats our [], so we need to use [ and ] instead.
24837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24838  if test "x$has_forbidden_chars" != x; then
24839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24843      # Going to short mode and back again did indeed matter. Since short mode is
24844      # case insensitive, let's make it lowercase to improve readability.
24845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24846      # Now convert it back to Unix-style (cygpath)
24847      input_path=`$CYGPATH -u "$shortmode_path"`
24848      new_path="$input_path"
24849    fi
24850  fi
24851
24852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24853  if test "x$test_cygdrive_prefix" = x; then
24854    # As a simple fix, exclude /usr/bin since it's not a real path.
24855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24857      # a path prefixed by /cygdrive for fixpath to work.
24858      new_path="$CYGWIN_ROOT_PATH$input_path"
24859    fi
24860  fi
24861
24862
24863  if test "x$path" != "x$new_path"; then
24864    BOOT_JDK="$new_path"
24865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24867  fi
24868
24869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24870
24871  path="$BOOT_JDK"
24872  has_colon=`$ECHO $path | $GREP ^.:`
24873  new_path="$path"
24874  if test "x$has_colon" = x; then
24875    # Not in mixed or Windows style, start by that.
24876    new_path=`cmd //c echo $path`
24877  fi
24878
24879
24880  input_path="$new_path"
24881  # Check if we need to convert this using DOS-style short mode. If the path
24882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24883  # take no chances and rewrite it.
24884  # Note: m4 eats our [], so we need to use [ and ] instead.
24885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24886  if test "x$has_forbidden_chars" != x; then
24887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24889  fi
24890
24891
24892  windows_path="$new_path"
24893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24894    unix_path=`$CYGPATH -u "$windows_path"`
24895    new_path="$unix_path"
24896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24898    new_path="$unix_path"
24899  fi
24900
24901  if test "x$path" != "x$new_path"; then
24902    BOOT_JDK="$new_path"
24903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24905  fi
24906
24907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24909
24910    else
24911      # We're on a unix platform. Hooray! :)
24912      path="$BOOT_JDK"
24913      has_space=`$ECHO "$path" | $GREP " "`
24914      if test "x$has_space" != x; then
24915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24918      fi
24919
24920      # Use eval to expand a potential ~
24921      eval path="$path"
24922      if test ! -f "$path" && test ! -d "$path"; then
24923        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24924      fi
24925
24926      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24927    fi
24928  fi
24929
24930            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24931$as_echo_n "checking for Boot JDK... " >&6; }
24932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24933$as_echo "$BOOT_JDK" >&6; }
24934            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24935$as_echo_n "checking Boot JDK version... " >&6; }
24936            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24938$as_echo "$BOOT_JDK_VERSION" >&6; }
24939          fi # end check jdk version
24940        fi # end check javac
24941      fi # end check java
24942    fi # end check boot jdk found
24943  fi
24944
24945    done
24946  fi
24947
24948
24949    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24950    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24951      # Do we have a bin/java?
24952      if test ! -x "$BOOT_JDK/bin/java"; then
24953        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24955        BOOT_JDK_FOUND=no
24956      else
24957        # Do we have a bin/javac?
24958        if test ! -x "$BOOT_JDK/bin/javac"; then
24959          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24961          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24962$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24963          BOOT_JDK_FOUND=no
24964        else
24965          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24966          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24967
24968          # Extra M4 quote needed to protect [] in grep expression.
24969          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24970          if test "x$FOUND_CORRECT_VERSION" = x; then
24971            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24973            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24974$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24975            BOOT_JDK_FOUND=no
24976          else
24977            # We're done! :-)
24978            BOOT_JDK_FOUND=yes
24979
24980  # Only process if variable expands to non-empty
24981
24982  if test "x$BOOT_JDK" != x; then
24983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24984
24985  # Input might be given as Windows format, start by converting to
24986  # unix format.
24987  path="$BOOT_JDK"
24988  new_path=`$CYGPATH -u "$path"`
24989
24990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24993  # "foo.exe" is OK but "foo" is an error.
24994  #
24995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24996  # It is also a way to make sure we got the proper file name for the real test later on.
24997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24998  if test "x$test_shortpath" = x; then
24999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25001    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25002  fi
25003
25004  # Call helper function which possibly converts this using DOS-style short mode.
25005  # If so, the updated path is stored in $new_path.
25006
25007  input_path="$new_path"
25008  # Check if we need to convert this using DOS-style short mode. If the path
25009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25010  # take no chances and rewrite it.
25011  # Note: m4 eats our [], so we need to use [ and ] instead.
25012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25013  if test "x$has_forbidden_chars" != x; then
25014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25018      # Going to short mode and back again did indeed matter. Since short mode is
25019      # case insensitive, let's make it lowercase to improve readability.
25020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25021      # Now convert it back to Unix-style (cygpath)
25022      input_path=`$CYGPATH -u "$shortmode_path"`
25023      new_path="$input_path"
25024    fi
25025  fi
25026
25027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25028  if test "x$test_cygdrive_prefix" = x; then
25029    # As a simple fix, exclude /usr/bin since it's not a real path.
25030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25032      # a path prefixed by /cygdrive for fixpath to work.
25033      new_path="$CYGWIN_ROOT_PATH$input_path"
25034    fi
25035  fi
25036
25037
25038  if test "x$path" != "x$new_path"; then
25039    BOOT_JDK="$new_path"
25040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25042  fi
25043
25044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25045
25046  path="$BOOT_JDK"
25047  has_colon=`$ECHO $path | $GREP ^.:`
25048  new_path="$path"
25049  if test "x$has_colon" = x; then
25050    # Not in mixed or Windows style, start by that.
25051    new_path=`cmd //c echo $path`
25052  fi
25053
25054
25055  input_path="$new_path"
25056  # Check if we need to convert this using DOS-style short mode. If the path
25057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25058  # take no chances and rewrite it.
25059  # Note: m4 eats our [], so we need to use [ and ] instead.
25060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25061  if test "x$has_forbidden_chars" != x; then
25062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25064  fi
25065
25066
25067  windows_path="$new_path"
25068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25069    unix_path=`$CYGPATH -u "$windows_path"`
25070    new_path="$unix_path"
25071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25073    new_path="$unix_path"
25074  fi
25075
25076  if test "x$path" != "x$new_path"; then
25077    BOOT_JDK="$new_path"
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25080  fi
25081
25082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25084
25085    else
25086      # We're on a unix platform. Hooray! :)
25087      path="$BOOT_JDK"
25088      has_space=`$ECHO "$path" | $GREP " "`
25089      if test "x$has_space" != x; then
25090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25093      fi
25094
25095      # Use eval to expand a potential ~
25096      eval path="$path"
25097      if test ! -f "$path" && test ! -d "$path"; then
25098        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25099      fi
25100
25101      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25102    fi
25103  fi
25104
25105            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25106$as_echo_n "checking for Boot JDK... " >&6; }
25107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25108$as_echo "$BOOT_JDK" >&6; }
25109            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25110$as_echo_n "checking Boot JDK version... " >&6; }
25111            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25113$as_echo "$BOOT_JDK_VERSION" >&6; }
25114          fi # end check jdk version
25115        fi # end check javac
25116      fi # end check java
25117    fi # end check boot jdk found
25118  fi
25119
25120  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
25121
25122  if test "x$BOOT_JDK_FOUND" = xno; then
25123    # Now execute the test
25124
25125  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
25126  BOOT_JDK_SUFFIX="/Contents/Home"
25127  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25128  if test "x$ALL_JDKS_FOUND" != x; then
25129    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25130
25131  if test "x$BOOT_JDK_FOUND" = xno; then
25132    # Now execute the test
25133
25134        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25135        if test -d "$BOOT_JDK"; then
25136          BOOT_JDK_FOUND=maybe
25137          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25138$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25139        fi
25140
25141
25142    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25143    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25144      # Do we have a bin/java?
25145      if test ! -x "$BOOT_JDK/bin/java"; then
25146        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25148        BOOT_JDK_FOUND=no
25149      else
25150        # Do we have a bin/javac?
25151        if test ! -x "$BOOT_JDK/bin/javac"; then
25152          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25154          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25155$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25156          BOOT_JDK_FOUND=no
25157        else
25158          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25159          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25160
25161          # Extra M4 quote needed to protect [] in grep expression.
25162          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25163          if test "x$FOUND_CORRECT_VERSION" = x; then
25164            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25166            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25167$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25168            BOOT_JDK_FOUND=no
25169          else
25170            # We're done! :-)
25171            BOOT_JDK_FOUND=yes
25172
25173  # Only process if variable expands to non-empty
25174
25175  if test "x$BOOT_JDK" != x; then
25176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25177
25178  # Input might be given as Windows format, start by converting to
25179  # unix format.
25180  path="$BOOT_JDK"
25181  new_path=`$CYGPATH -u "$path"`
25182
25183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25186  # "foo.exe" is OK but "foo" is an error.
25187  #
25188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25189  # It is also a way to make sure we got the proper file name for the real test later on.
25190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25191  if test "x$test_shortpath" = x; then
25192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25194    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25195  fi
25196
25197  # Call helper function which possibly converts this using DOS-style short mode.
25198  # If so, the updated path is stored in $new_path.
25199
25200  input_path="$new_path"
25201  # Check if we need to convert this using DOS-style short mode. If the path
25202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25203  # take no chances and rewrite it.
25204  # Note: m4 eats our [], so we need to use [ and ] instead.
25205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25206  if test "x$has_forbidden_chars" != x; then
25207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25211      # Going to short mode and back again did indeed matter. Since short mode is
25212      # case insensitive, let's make it lowercase to improve readability.
25213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25214      # Now convert it back to Unix-style (cygpath)
25215      input_path=`$CYGPATH -u "$shortmode_path"`
25216      new_path="$input_path"
25217    fi
25218  fi
25219
25220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25221  if test "x$test_cygdrive_prefix" = x; then
25222    # As a simple fix, exclude /usr/bin since it's not a real path.
25223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25225      # a path prefixed by /cygdrive for fixpath to work.
25226      new_path="$CYGWIN_ROOT_PATH$input_path"
25227    fi
25228  fi
25229
25230
25231  if test "x$path" != "x$new_path"; then
25232    BOOT_JDK="$new_path"
25233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25235  fi
25236
25237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25238
25239  path="$BOOT_JDK"
25240  has_colon=`$ECHO $path | $GREP ^.:`
25241  new_path="$path"
25242  if test "x$has_colon" = x; then
25243    # Not in mixed or Windows style, start by that.
25244    new_path=`cmd //c echo $path`
25245  fi
25246
25247
25248  input_path="$new_path"
25249  # Check if we need to convert this using DOS-style short mode. If the path
25250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25251  # take no chances and rewrite it.
25252  # Note: m4 eats our [], so we need to use [ and ] instead.
25253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25254  if test "x$has_forbidden_chars" != x; then
25255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25257  fi
25258
25259
25260  windows_path="$new_path"
25261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25262    unix_path=`$CYGPATH -u "$windows_path"`
25263    new_path="$unix_path"
25264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25266    new_path="$unix_path"
25267  fi
25268
25269  if test "x$path" != "x$new_path"; then
25270    BOOT_JDK="$new_path"
25271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25273  fi
25274
25275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25277
25278    else
25279      # We're on a unix platform. Hooray! :)
25280      path="$BOOT_JDK"
25281      has_space=`$ECHO "$path" | $GREP " "`
25282      if test "x$has_space" != x; then
25283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25286      fi
25287
25288      # Use eval to expand a potential ~
25289      eval path="$path"
25290      if test ! -f "$path" && test ! -d "$path"; then
25291        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25292      fi
25293
25294      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25295    fi
25296  fi
25297
25298            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25299$as_echo_n "checking for Boot JDK... " >&6; }
25300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25301$as_echo "$BOOT_JDK" >&6; }
25302            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25303$as_echo_n "checking Boot JDK version... " >&6; }
25304            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25306$as_echo "$BOOT_JDK_VERSION" >&6; }
25307          fi # end check jdk version
25308        fi # end check javac
25309      fi # end check java
25310    fi # end check boot jdk found
25311  fi
25312
25313    done
25314  fi
25315
25316
25317    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25318    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25319      # Do we have a bin/java?
25320      if test ! -x "$BOOT_JDK/bin/java"; then
25321        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25323        BOOT_JDK_FOUND=no
25324      else
25325        # Do we have a bin/javac?
25326        if test ! -x "$BOOT_JDK/bin/javac"; then
25327          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25329          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25330$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25331          BOOT_JDK_FOUND=no
25332        else
25333          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25334          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25335
25336          # Extra M4 quote needed to protect [] in grep expression.
25337          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25338          if test "x$FOUND_CORRECT_VERSION" = x; then
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25342$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25343            BOOT_JDK_FOUND=no
25344          else
25345            # We're done! :-)
25346            BOOT_JDK_FOUND=yes
25347
25348  # Only process if variable expands to non-empty
25349
25350  if test "x$BOOT_JDK" != x; then
25351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25352
25353  # Input might be given as Windows format, start by converting to
25354  # unix format.
25355  path="$BOOT_JDK"
25356  new_path=`$CYGPATH -u "$path"`
25357
25358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25361  # "foo.exe" is OK but "foo" is an error.
25362  #
25363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25364  # It is also a way to make sure we got the proper file name for the real test later on.
25365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25366  if test "x$test_shortpath" = x; then
25367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25369    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25370  fi
25371
25372  # Call helper function which possibly converts this using DOS-style short mode.
25373  # If so, the updated path is stored in $new_path.
25374
25375  input_path="$new_path"
25376  # Check if we need to convert this using DOS-style short mode. If the path
25377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25378  # take no chances and rewrite it.
25379  # Note: m4 eats our [], so we need to use [ and ] instead.
25380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25381  if test "x$has_forbidden_chars" != x; then
25382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25386      # Going to short mode and back again did indeed matter. Since short mode is
25387      # case insensitive, let's make it lowercase to improve readability.
25388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25389      # Now convert it back to Unix-style (cygpath)
25390      input_path=`$CYGPATH -u "$shortmode_path"`
25391      new_path="$input_path"
25392    fi
25393  fi
25394
25395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25396  if test "x$test_cygdrive_prefix" = x; then
25397    # As a simple fix, exclude /usr/bin since it's not a real path.
25398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25400      # a path prefixed by /cygdrive for fixpath to work.
25401      new_path="$CYGWIN_ROOT_PATH$input_path"
25402    fi
25403  fi
25404
25405
25406  if test "x$path" != "x$new_path"; then
25407    BOOT_JDK="$new_path"
25408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25409$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25410  fi
25411
25412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25413
25414  path="$BOOT_JDK"
25415  has_colon=`$ECHO $path | $GREP ^.:`
25416  new_path="$path"
25417  if test "x$has_colon" = x; then
25418    # Not in mixed or Windows style, start by that.
25419    new_path=`cmd //c echo $path`
25420  fi
25421
25422
25423  input_path="$new_path"
25424  # Check if we need to convert this using DOS-style short mode. If the path
25425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25426  # take no chances and rewrite it.
25427  # Note: m4 eats our [], so we need to use [ and ] instead.
25428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25429  if test "x$has_forbidden_chars" != x; then
25430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25432  fi
25433
25434
25435  windows_path="$new_path"
25436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25437    unix_path=`$CYGPATH -u "$windows_path"`
25438    new_path="$unix_path"
25439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25441    new_path="$unix_path"
25442  fi
25443
25444  if test "x$path" != "x$new_path"; then
25445    BOOT_JDK="$new_path"
25446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25448  fi
25449
25450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25452
25453    else
25454      # We're on a unix platform. Hooray! :)
25455      path="$BOOT_JDK"
25456      has_space=`$ECHO "$path" | $GREP " "`
25457      if test "x$has_space" != x; then
25458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25461      fi
25462
25463      # Use eval to expand a potential ~
25464      eval path="$path"
25465      if test ! -f "$path" && test ! -d "$path"; then
25466        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25467      fi
25468
25469      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25470    fi
25471  fi
25472
25473            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25474$as_echo_n "checking for Boot JDK... " >&6; }
25475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25476$as_echo "$BOOT_JDK" >&6; }
25477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25478$as_echo_n "checking Boot JDK version... " >&6; }
25479            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25481$as_echo "$BOOT_JDK_VERSION" >&6; }
25482          fi # end check jdk version
25483        fi # end check javac
25484      fi # end check java
25485    fi # end check boot jdk found
25486  fi
25487
25488
25489  if test "x$BOOT_JDK_FOUND" = xno; then
25490    # Now execute the test
25491
25492  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25493  BOOT_JDK_SUFFIX="/Contents/Home"
25494  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25495  if test "x$ALL_JDKS_FOUND" != x; then
25496    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25497
25498  if test "x$BOOT_JDK_FOUND" = xno; then
25499    # Now execute the test
25500
25501        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25502        if test -d "$BOOT_JDK"; then
25503          BOOT_JDK_FOUND=maybe
25504          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25505$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25506        fi
25507
25508
25509    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25510    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25511      # Do we have a bin/java?
25512      if test ! -x "$BOOT_JDK/bin/java"; then
25513        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25515        BOOT_JDK_FOUND=no
25516      else
25517        # Do we have a bin/javac?
25518        if test ! -x "$BOOT_JDK/bin/javac"; then
25519          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25521          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25522$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25523          BOOT_JDK_FOUND=no
25524        else
25525          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25526          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25527
25528          # Extra M4 quote needed to protect [] in grep expression.
25529          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25530          if test "x$FOUND_CORRECT_VERSION" = x; then
25531            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25533            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25534$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25535            BOOT_JDK_FOUND=no
25536          else
25537            # We're done! :-)
25538            BOOT_JDK_FOUND=yes
25539
25540  # Only process if variable expands to non-empty
25541
25542  if test "x$BOOT_JDK" != x; then
25543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25544
25545  # Input might be given as Windows format, start by converting to
25546  # unix format.
25547  path="$BOOT_JDK"
25548  new_path=`$CYGPATH -u "$path"`
25549
25550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25553  # "foo.exe" is OK but "foo" is an error.
25554  #
25555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25556  # It is also a way to make sure we got the proper file name for the real test later on.
25557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25558  if test "x$test_shortpath" = x; then
25559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25561    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25562  fi
25563
25564  # Call helper function which possibly converts this using DOS-style short mode.
25565  # If so, the updated path is stored in $new_path.
25566
25567  input_path="$new_path"
25568  # Check if we need to convert this using DOS-style short mode. If the path
25569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25570  # take no chances and rewrite it.
25571  # Note: m4 eats our [], so we need to use [ and ] instead.
25572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25573  if test "x$has_forbidden_chars" != x; then
25574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25578      # Going to short mode and back again did indeed matter. Since short mode is
25579      # case insensitive, let's make it lowercase to improve readability.
25580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25581      # Now convert it back to Unix-style (cygpath)
25582      input_path=`$CYGPATH -u "$shortmode_path"`
25583      new_path="$input_path"
25584    fi
25585  fi
25586
25587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25588  if test "x$test_cygdrive_prefix" = x; then
25589    # As a simple fix, exclude /usr/bin since it's not a real path.
25590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25592      # a path prefixed by /cygdrive for fixpath to work.
25593      new_path="$CYGWIN_ROOT_PATH$input_path"
25594    fi
25595  fi
25596
25597
25598  if test "x$path" != "x$new_path"; then
25599    BOOT_JDK="$new_path"
25600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25602  fi
25603
25604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25605
25606  path="$BOOT_JDK"
25607  has_colon=`$ECHO $path | $GREP ^.:`
25608  new_path="$path"
25609  if test "x$has_colon" = x; then
25610    # Not in mixed or Windows style, start by that.
25611    new_path=`cmd //c echo $path`
25612  fi
25613
25614
25615  input_path="$new_path"
25616  # Check if we need to convert this using DOS-style short mode. If the path
25617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25618  # take no chances and rewrite it.
25619  # Note: m4 eats our [], so we need to use [ and ] instead.
25620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25621  if test "x$has_forbidden_chars" != x; then
25622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25624  fi
25625
25626
25627  windows_path="$new_path"
25628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25629    unix_path=`$CYGPATH -u "$windows_path"`
25630    new_path="$unix_path"
25631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25633    new_path="$unix_path"
25634  fi
25635
25636  if test "x$path" != "x$new_path"; then
25637    BOOT_JDK="$new_path"
25638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25640  fi
25641
25642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25644
25645    else
25646      # We're on a unix platform. Hooray! :)
25647      path="$BOOT_JDK"
25648      has_space=`$ECHO "$path" | $GREP " "`
25649      if test "x$has_space" != x; then
25650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25653      fi
25654
25655      # Use eval to expand a potential ~
25656      eval path="$path"
25657      if test ! -f "$path" && test ! -d "$path"; then
25658        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25659      fi
25660
25661      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25662    fi
25663  fi
25664
25665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25666$as_echo_n "checking for Boot JDK... " >&6; }
25667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25668$as_echo "$BOOT_JDK" >&6; }
25669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25670$as_echo_n "checking Boot JDK version... " >&6; }
25671            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25673$as_echo "$BOOT_JDK_VERSION" >&6; }
25674          fi # end check jdk version
25675        fi # end check javac
25676      fi # end check java
25677    fi # end check boot jdk found
25678  fi
25679
25680    done
25681  fi
25682
25683
25684    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25685    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25686      # Do we have a bin/java?
25687      if test ! -x "$BOOT_JDK/bin/java"; then
25688        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25690        BOOT_JDK_FOUND=no
25691      else
25692        # Do we have a bin/javac?
25693        if test ! -x "$BOOT_JDK/bin/javac"; then
25694          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25696          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25697$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25698          BOOT_JDK_FOUND=no
25699        else
25700          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25701          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25702
25703          # Extra M4 quote needed to protect [] in grep expression.
25704          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25705          if test "x$FOUND_CORRECT_VERSION" = x; then
25706            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25708            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25709$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25710            BOOT_JDK_FOUND=no
25711          else
25712            # We're done! :-)
25713            BOOT_JDK_FOUND=yes
25714
25715  # Only process if variable expands to non-empty
25716
25717  if test "x$BOOT_JDK" != x; then
25718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25719
25720  # Input might be given as Windows format, start by converting to
25721  # unix format.
25722  path="$BOOT_JDK"
25723  new_path=`$CYGPATH -u "$path"`
25724
25725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25728  # "foo.exe" is OK but "foo" is an error.
25729  #
25730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25731  # It is also a way to make sure we got the proper file name for the real test later on.
25732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25733  if test "x$test_shortpath" = x; then
25734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25736    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25737  fi
25738
25739  # Call helper function which possibly converts this using DOS-style short mode.
25740  # If so, the updated path is stored in $new_path.
25741
25742  input_path="$new_path"
25743  # Check if we need to convert this using DOS-style short mode. If the path
25744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25745  # take no chances and rewrite it.
25746  # Note: m4 eats our [], so we need to use [ and ] instead.
25747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25748  if test "x$has_forbidden_chars" != x; then
25749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25753      # Going to short mode and back again did indeed matter. Since short mode is
25754      # case insensitive, let's make it lowercase to improve readability.
25755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25756      # Now convert it back to Unix-style (cygpath)
25757      input_path=`$CYGPATH -u "$shortmode_path"`
25758      new_path="$input_path"
25759    fi
25760  fi
25761
25762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25763  if test "x$test_cygdrive_prefix" = x; then
25764    # As a simple fix, exclude /usr/bin since it's not a real path.
25765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25767      # a path prefixed by /cygdrive for fixpath to work.
25768      new_path="$CYGWIN_ROOT_PATH$input_path"
25769    fi
25770  fi
25771
25772
25773  if test "x$path" != "x$new_path"; then
25774    BOOT_JDK="$new_path"
25775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25776$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25777  fi
25778
25779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25780
25781  path="$BOOT_JDK"
25782  has_colon=`$ECHO $path | $GREP ^.:`
25783  new_path="$path"
25784  if test "x$has_colon" = x; then
25785    # Not in mixed or Windows style, start by that.
25786    new_path=`cmd //c echo $path`
25787  fi
25788
25789
25790  input_path="$new_path"
25791  # Check if we need to convert this using DOS-style short mode. If the path
25792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25793  # take no chances and rewrite it.
25794  # Note: m4 eats our [], so we need to use [ and ] instead.
25795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25796  if test "x$has_forbidden_chars" != x; then
25797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25799  fi
25800
25801
25802  windows_path="$new_path"
25803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25804    unix_path=`$CYGPATH -u "$windows_path"`
25805    new_path="$unix_path"
25806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25808    new_path="$unix_path"
25809  fi
25810
25811  if test "x$path" != "x$new_path"; then
25812    BOOT_JDK="$new_path"
25813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25814$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25815  fi
25816
25817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25819
25820    else
25821      # We're on a unix platform. Hooray! :)
25822      path="$BOOT_JDK"
25823      has_space=`$ECHO "$path" | $GREP " "`
25824      if test "x$has_space" != x; then
25825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25828      fi
25829
25830      # Use eval to expand a potential ~
25831      eval path="$path"
25832      if test ! -f "$path" && test ! -d "$path"; then
25833        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25834      fi
25835
25836      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25837    fi
25838  fi
25839
25840            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25841$as_echo_n "checking for Boot JDK... " >&6; }
25842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25843$as_echo "$BOOT_JDK" >&6; }
25844            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25845$as_echo_n "checking Boot JDK version... " >&6; }
25846            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25848$as_echo "$BOOT_JDK_VERSION" >&6; }
25849          fi # end check jdk version
25850        fi # end check javac
25851      fi # end check java
25852    fi # end check boot jdk found
25853  fi
25854
25855  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25856
25857  if test "x$BOOT_JDK_FOUND" = xno; then
25858    # Now execute the test
25859
25860  BOOT_JDK_PREFIX="/usr/lib/jvm"
25861  BOOT_JDK_SUFFIX=""
25862  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25863  if test "x$ALL_JDKS_FOUND" != x; then
25864    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25865
25866  if test "x$BOOT_JDK_FOUND" = xno; then
25867    # Now execute the test
25868
25869        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25870        if test -d "$BOOT_JDK"; then
25871          BOOT_JDK_FOUND=maybe
25872          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25873$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25874        fi
25875
25876
25877    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25878    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25879      # Do we have a bin/java?
25880      if test ! -x "$BOOT_JDK/bin/java"; then
25881        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25883        BOOT_JDK_FOUND=no
25884      else
25885        # Do we have a bin/javac?
25886        if test ! -x "$BOOT_JDK/bin/javac"; then
25887          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25889          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25890$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25891          BOOT_JDK_FOUND=no
25892        else
25893          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25894          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25895
25896          # Extra M4 quote needed to protect [] in grep expression.
25897          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25898          if test "x$FOUND_CORRECT_VERSION" = x; then
25899            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25901            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25902$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25903            BOOT_JDK_FOUND=no
25904          else
25905            # We're done! :-)
25906            BOOT_JDK_FOUND=yes
25907
25908  # Only process if variable expands to non-empty
25909
25910  if test "x$BOOT_JDK" != x; then
25911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25912
25913  # Input might be given as Windows format, start by converting to
25914  # unix format.
25915  path="$BOOT_JDK"
25916  new_path=`$CYGPATH -u "$path"`
25917
25918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25921  # "foo.exe" is OK but "foo" is an error.
25922  #
25923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25924  # It is also a way to make sure we got the proper file name for the real test later on.
25925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25926  if test "x$test_shortpath" = x; then
25927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25929    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25930  fi
25931
25932  # Call helper function which possibly converts this using DOS-style short mode.
25933  # If so, the updated path is stored in $new_path.
25934
25935  input_path="$new_path"
25936  # Check if we need to convert this using DOS-style short mode. If the path
25937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25938  # take no chances and rewrite it.
25939  # Note: m4 eats our [], so we need to use [ and ] instead.
25940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25941  if test "x$has_forbidden_chars" != x; then
25942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25946      # Going to short mode and back again did indeed matter. Since short mode is
25947      # case insensitive, let's make it lowercase to improve readability.
25948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25949      # Now convert it back to Unix-style (cygpath)
25950      input_path=`$CYGPATH -u "$shortmode_path"`
25951      new_path="$input_path"
25952    fi
25953  fi
25954
25955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25956  if test "x$test_cygdrive_prefix" = x; then
25957    # As a simple fix, exclude /usr/bin since it's not a real path.
25958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25960      # a path prefixed by /cygdrive for fixpath to work.
25961      new_path="$CYGWIN_ROOT_PATH$input_path"
25962    fi
25963  fi
25964
25965
25966  if test "x$path" != "x$new_path"; then
25967    BOOT_JDK="$new_path"
25968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25970  fi
25971
25972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25973
25974  path="$BOOT_JDK"
25975  has_colon=`$ECHO $path | $GREP ^.:`
25976  new_path="$path"
25977  if test "x$has_colon" = x; then
25978    # Not in mixed or Windows style, start by that.
25979    new_path=`cmd //c echo $path`
25980  fi
25981
25982
25983  input_path="$new_path"
25984  # Check if we need to convert this using DOS-style short mode. If the path
25985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25986  # take no chances and rewrite it.
25987  # Note: m4 eats our [], so we need to use [ and ] instead.
25988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25989  if test "x$has_forbidden_chars" != x; then
25990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25992  fi
25993
25994
25995  windows_path="$new_path"
25996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25997    unix_path=`$CYGPATH -u "$windows_path"`
25998    new_path="$unix_path"
25999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26001    new_path="$unix_path"
26002  fi
26003
26004  if test "x$path" != "x$new_path"; then
26005    BOOT_JDK="$new_path"
26006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26007$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26008  fi
26009
26010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26012
26013    else
26014      # We're on a unix platform. Hooray! :)
26015      path="$BOOT_JDK"
26016      has_space=`$ECHO "$path" | $GREP " "`
26017      if test "x$has_space" != x; then
26018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26021      fi
26022
26023      # Use eval to expand a potential ~
26024      eval path="$path"
26025      if test ! -f "$path" && test ! -d "$path"; then
26026        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26027      fi
26028
26029      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26030    fi
26031  fi
26032
26033            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26034$as_echo_n "checking for Boot JDK... " >&6; }
26035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26036$as_echo "$BOOT_JDK" >&6; }
26037            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26038$as_echo_n "checking Boot JDK version... " >&6; }
26039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26041$as_echo "$BOOT_JDK_VERSION" >&6; }
26042          fi # end check jdk version
26043        fi # end check javac
26044      fi # end check java
26045    fi # end check boot jdk found
26046  fi
26047
26048    done
26049  fi
26050
26051
26052    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26053    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26054      # Do we have a bin/java?
26055      if test ! -x "$BOOT_JDK/bin/java"; then
26056        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26058        BOOT_JDK_FOUND=no
26059      else
26060        # Do we have a bin/javac?
26061        if test ! -x "$BOOT_JDK/bin/javac"; then
26062          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26064          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26065$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26066          BOOT_JDK_FOUND=no
26067        else
26068          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26069          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26070
26071          # Extra M4 quote needed to protect [] in grep expression.
26072          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26073          if test "x$FOUND_CORRECT_VERSION" = x; then
26074            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26076            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26077$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26078            BOOT_JDK_FOUND=no
26079          else
26080            # We're done! :-)
26081            BOOT_JDK_FOUND=yes
26082
26083  # Only process if variable expands to non-empty
26084
26085  if test "x$BOOT_JDK" != x; then
26086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26087
26088  # Input might be given as Windows format, start by converting to
26089  # unix format.
26090  path="$BOOT_JDK"
26091  new_path=`$CYGPATH -u "$path"`
26092
26093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26096  # "foo.exe" is OK but "foo" is an error.
26097  #
26098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26099  # It is also a way to make sure we got the proper file name for the real test later on.
26100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26101  if test "x$test_shortpath" = x; then
26102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26103$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26104    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26105  fi
26106
26107  # Call helper function which possibly converts this using DOS-style short mode.
26108  # If so, the updated path is stored in $new_path.
26109
26110  input_path="$new_path"
26111  # Check if we need to convert this using DOS-style short mode. If the path
26112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26113  # take no chances and rewrite it.
26114  # Note: m4 eats our [], so we need to use [ and ] instead.
26115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26116  if test "x$has_forbidden_chars" != x; then
26117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26121      # Going to short mode and back again did indeed matter. Since short mode is
26122      # case insensitive, let's make it lowercase to improve readability.
26123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26124      # Now convert it back to Unix-style (cygpath)
26125      input_path=`$CYGPATH -u "$shortmode_path"`
26126      new_path="$input_path"
26127    fi
26128  fi
26129
26130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26131  if test "x$test_cygdrive_prefix" = x; then
26132    # As a simple fix, exclude /usr/bin since it's not a real path.
26133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26135      # a path prefixed by /cygdrive for fixpath to work.
26136      new_path="$CYGWIN_ROOT_PATH$input_path"
26137    fi
26138  fi
26139
26140
26141  if test "x$path" != "x$new_path"; then
26142    BOOT_JDK="$new_path"
26143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26144$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26145  fi
26146
26147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26148
26149  path="$BOOT_JDK"
26150  has_colon=`$ECHO $path | $GREP ^.:`
26151  new_path="$path"
26152  if test "x$has_colon" = x; then
26153    # Not in mixed or Windows style, start by that.
26154    new_path=`cmd //c echo $path`
26155  fi
26156
26157
26158  input_path="$new_path"
26159  # Check if we need to convert this using DOS-style short mode. If the path
26160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26161  # take no chances and rewrite it.
26162  # Note: m4 eats our [], so we need to use [ and ] instead.
26163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26164  if test "x$has_forbidden_chars" != x; then
26165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26167  fi
26168
26169
26170  windows_path="$new_path"
26171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26172    unix_path=`$CYGPATH -u "$windows_path"`
26173    new_path="$unix_path"
26174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26176    new_path="$unix_path"
26177  fi
26178
26179  if test "x$path" != "x$new_path"; then
26180    BOOT_JDK="$new_path"
26181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26182$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26183  fi
26184
26185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26187
26188    else
26189      # We're on a unix platform. Hooray! :)
26190      path="$BOOT_JDK"
26191      has_space=`$ECHO "$path" | $GREP " "`
26192      if test "x$has_space" != x; then
26193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26196      fi
26197
26198      # Use eval to expand a potential ~
26199      eval path="$path"
26200      if test ! -f "$path" && test ! -d "$path"; then
26201        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26202      fi
26203
26204      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26205    fi
26206  fi
26207
26208            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26209$as_echo_n "checking for Boot JDK... " >&6; }
26210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26211$as_echo "$BOOT_JDK" >&6; }
26212            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26213$as_echo_n "checking Boot JDK version... " >&6; }
26214            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26216$as_echo "$BOOT_JDK_VERSION" >&6; }
26217          fi # end check jdk version
26218        fi # end check javac
26219      fi # end check java
26220    fi # end check boot jdk found
26221  fi
26222
26223  fi
26224
26225
26226    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26227    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26228      # Do we have a bin/java?
26229      if test ! -x "$BOOT_JDK/bin/java"; then
26230        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26232        BOOT_JDK_FOUND=no
26233      else
26234        # Do we have a bin/javac?
26235        if test ! -x "$BOOT_JDK/bin/javac"; then
26236          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26238          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26239$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26240          BOOT_JDK_FOUND=no
26241        else
26242          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26243          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26244
26245          # Extra M4 quote needed to protect [] in grep expression.
26246          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26247          if test "x$FOUND_CORRECT_VERSION" = x; then
26248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26250            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26251$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26252            BOOT_JDK_FOUND=no
26253          else
26254            # We're done! :-)
26255            BOOT_JDK_FOUND=yes
26256
26257  # Only process if variable expands to non-empty
26258
26259  if test "x$BOOT_JDK" != x; then
26260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26261
26262  # Input might be given as Windows format, start by converting to
26263  # unix format.
26264  path="$BOOT_JDK"
26265  new_path=`$CYGPATH -u "$path"`
26266
26267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26270  # "foo.exe" is OK but "foo" is an error.
26271  #
26272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26273  # It is also a way to make sure we got the proper file name for the real test later on.
26274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26275  if test "x$test_shortpath" = x; then
26276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26278    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26279  fi
26280
26281  # Call helper function which possibly converts this using DOS-style short mode.
26282  # If so, the updated path is stored in $new_path.
26283
26284  input_path="$new_path"
26285  # Check if we need to convert this using DOS-style short mode. If the path
26286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26287  # take no chances and rewrite it.
26288  # Note: m4 eats our [], so we need to use [ and ] instead.
26289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26290  if test "x$has_forbidden_chars" != x; then
26291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26295      # Going to short mode and back again did indeed matter. Since short mode is
26296      # case insensitive, let's make it lowercase to improve readability.
26297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26298      # Now convert it back to Unix-style (cygpath)
26299      input_path=`$CYGPATH -u "$shortmode_path"`
26300      new_path="$input_path"
26301    fi
26302  fi
26303
26304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26305  if test "x$test_cygdrive_prefix" = x; then
26306    # As a simple fix, exclude /usr/bin since it's not a real path.
26307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26309      # a path prefixed by /cygdrive for fixpath to work.
26310      new_path="$CYGWIN_ROOT_PATH$input_path"
26311    fi
26312  fi
26313
26314
26315  if test "x$path" != "x$new_path"; then
26316    BOOT_JDK="$new_path"
26317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26319  fi
26320
26321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26322
26323  path="$BOOT_JDK"
26324  has_colon=`$ECHO $path | $GREP ^.:`
26325  new_path="$path"
26326  if test "x$has_colon" = x; then
26327    # Not in mixed or Windows style, start by that.
26328    new_path=`cmd //c echo $path`
26329  fi
26330
26331
26332  input_path="$new_path"
26333  # Check if we need to convert this using DOS-style short mode. If the path
26334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26335  # take no chances and rewrite it.
26336  # Note: m4 eats our [], so we need to use [ and ] instead.
26337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26338  if test "x$has_forbidden_chars" != x; then
26339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26341  fi
26342
26343
26344  windows_path="$new_path"
26345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26346    unix_path=`$CYGPATH -u "$windows_path"`
26347    new_path="$unix_path"
26348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26350    new_path="$unix_path"
26351  fi
26352
26353  if test "x$path" != "x$new_path"; then
26354    BOOT_JDK="$new_path"
26355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26357  fi
26358
26359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26361
26362    else
26363      # We're on a unix platform. Hooray! :)
26364      path="$BOOT_JDK"
26365      has_space=`$ECHO "$path" | $GREP " "`
26366      if test "x$has_space" != x; then
26367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26370      fi
26371
26372      # Use eval to expand a potential ~
26373      eval path="$path"
26374      if test ! -f "$path" && test ! -d "$path"; then
26375        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26376      fi
26377
26378      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26379    fi
26380  fi
26381
26382            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26383$as_echo_n "checking for Boot JDK... " >&6; }
26384            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26385$as_echo "$BOOT_JDK" >&6; }
26386            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26387$as_echo_n "checking Boot JDK version... " >&6; }
26388            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26389            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26390$as_echo "$BOOT_JDK_VERSION" >&6; }
26391          fi # end check jdk version
26392        fi # end check javac
26393      fi # end check java
26394    fi # end check boot jdk found
26395  fi
26396
26397
26398  # If we haven't found anything yet, we've truly lost. Give up.
26399  if test "x$BOOT_JDK_FOUND" = xno; then
26400
26401  # Print a helpful message on how to acquire the necessary build dependency.
26402  # openjdk is the help tag: freetype, cups, alsa etc
26403  MISSING_DEPENDENCY=openjdk
26404
26405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26406    cygwin_help $MISSING_DEPENDENCY
26407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26408    msys_help $MISSING_DEPENDENCY
26409  else
26410    PKGHANDLER_COMMAND=
26411
26412    case $PKGHANDLER in
26413      apt-get)
26414        apt_help     $MISSING_DEPENDENCY ;;
26415      yum)
26416        yum_help     $MISSING_DEPENDENCY ;;
26417      port)
26418        port_help    $MISSING_DEPENDENCY ;;
26419      pkgutil)
26420        pkgutil_help $MISSING_DEPENDENCY ;;
26421      pkgadd)
26422        pkgadd_help  $MISSING_DEPENDENCY ;;
26423    esac
26424
26425    if test "x$PKGHANDLER_COMMAND" != x; then
26426      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
26427    fi
26428  fi
26429
26430    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
26431$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
26432    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
26433$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26434    as_fn_error $? "Cannot continue" "$LINENO" 5
26435  fi
26436
26437
26438
26439  # Setup tools from the Boot JDK.
26440
26441  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26442
26443  # Publish this variable in the help.
26444
26445
26446  if [ -z "${JAVA+x}" ]; then
26447    # The variable is not set by user, try to locate tool using the code snippet
26448
26449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26450$as_echo_n "checking for java in Boot JDK... " >&6; }
26451      JAVA=$BOOT_JDK/bin/java
26452      if test ! -x $JAVA; then
26453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26454$as_echo "not found" >&6; }
26455        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26456$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26457        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26458      fi
26459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26460$as_echo "ok" >&6; }
26461
26462
26463  else
26464    # The variable is set, but is it from the command line or the environment?
26465
26466    # Try to remove the string !JAVA! from our list.
26467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26469      # If it failed, the variable was not from the command line. Ignore it,
26470      # but warn the user (except for BASH, which is always set by the calling BASH).
26471      if test "xJAVA" != xBASH; then
26472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26473$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26474      fi
26475      # Try to locate tool using the code snippet
26476
26477      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26478$as_echo_n "checking for java in Boot JDK... " >&6; }
26479      JAVA=$BOOT_JDK/bin/java
26480      if test ! -x $JAVA; then
26481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26482$as_echo "not found" >&6; }
26483        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26484$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26485        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26486      fi
26487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26488$as_echo "ok" >&6; }
26489
26490
26491    else
26492      # If it succeeded, then it was overridden by the user. We will use it
26493      # for the tool.
26494
26495      # First remove it from the list of overridden variables, so we can test
26496      # for unknown variables in the end.
26497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26498
26499      # Check if we try to supply an empty value
26500      if test "x$JAVA" = x; then
26501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
26502$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
26503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26504$as_echo_n "checking for JAVA... " >&6; }
26505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26506$as_echo "disabled" >&6; }
26507      else
26508        # Check if the provided tool contains a complete path.
26509        tool_specified="$JAVA"
26510        tool_basename="${tool_specified##*/}"
26511        if test "x$tool_basename" = "x$tool_specified"; then
26512          # A command without a complete path is provided, search $PATH.
26513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26514$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26515          # Extract the first word of "$tool_basename", so it can be a program name with args.
26516set dummy $tool_basename; ac_word=$2
26517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26518$as_echo_n "checking for $ac_word... " >&6; }
26519if ${ac_cv_path_JAVA+:} false; then :
26520  $as_echo_n "(cached) " >&6
26521else
26522  case $JAVA in
26523  [\\/]* | ?:[\\/]*)
26524  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26525  ;;
26526  *)
26527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26528for as_dir in $PATH
26529do
26530  IFS=$as_save_IFS
26531  test -z "$as_dir" && as_dir=.
26532    for ac_exec_ext in '' $ac_executable_extensions; do
26533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26534    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26536    break 2
26537  fi
26538done
26539  done
26540IFS=$as_save_IFS
26541
26542  ;;
26543esac
26544fi
26545JAVA=$ac_cv_path_JAVA
26546if test -n "$JAVA"; then
26547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26548$as_echo "$JAVA" >&6; }
26549else
26550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26551$as_echo "no" >&6; }
26552fi
26553
26554
26555          if test "x$JAVA" = x; then
26556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26557          fi
26558        else
26559          # Otherwise we believe it is a complete path. Use it as it is.
26560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26561$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26563$as_echo_n "checking for JAVA... " >&6; }
26564          if test ! -x "$tool_specified"; then
26565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26566$as_echo "not found" >&6; }
26567            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26568          fi
26569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26570$as_echo "$tool_specified" >&6; }
26571        fi
26572      fi
26573    fi
26574  fi
26575
26576
26577
26578  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26579
26580  # Publish this variable in the help.
26581
26582
26583  if [ -z "${JAVAC+x}" ]; then
26584    # The variable is not set by user, try to locate tool using the code snippet
26585
26586      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26587$as_echo_n "checking for javac in Boot JDK... " >&6; }
26588      JAVAC=$BOOT_JDK/bin/javac
26589      if test ! -x $JAVAC; then
26590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26591$as_echo "not found" >&6; }
26592        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26593$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26594        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26595      fi
26596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26597$as_echo "ok" >&6; }
26598
26599
26600  else
26601    # The variable is set, but is it from the command line or the environment?
26602
26603    # Try to remove the string !JAVAC! from our list.
26604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26606      # If it failed, the variable was not from the command line. Ignore it,
26607      # but warn the user (except for BASH, which is always set by the calling BASH).
26608      if test "xJAVAC" != xBASH; then
26609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26610$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26611      fi
26612      # Try to locate tool using the code snippet
26613
26614      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26615$as_echo_n "checking for javac in Boot JDK... " >&6; }
26616      JAVAC=$BOOT_JDK/bin/javac
26617      if test ! -x $JAVAC; then
26618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26619$as_echo "not found" >&6; }
26620        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26621$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26622        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26623      fi
26624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26625$as_echo "ok" >&6; }
26626
26627
26628    else
26629      # If it succeeded, then it was overridden by the user. We will use it
26630      # for the tool.
26631
26632      # First remove it from the list of overridden variables, so we can test
26633      # for unknown variables in the end.
26634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26635
26636      # Check if we try to supply an empty value
26637      if test "x$JAVAC" = x; then
26638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
26639$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
26640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26641$as_echo_n "checking for JAVAC... " >&6; }
26642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26643$as_echo "disabled" >&6; }
26644      else
26645        # Check if the provided tool contains a complete path.
26646        tool_specified="$JAVAC"
26647        tool_basename="${tool_specified##*/}"
26648        if test "x$tool_basename" = "x$tool_specified"; then
26649          # A command without a complete path is provided, search $PATH.
26650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26651$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26652          # Extract the first word of "$tool_basename", so it can be a program name with args.
26653set dummy $tool_basename; ac_word=$2
26654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26655$as_echo_n "checking for $ac_word... " >&6; }
26656if ${ac_cv_path_JAVAC+:} false; then :
26657  $as_echo_n "(cached) " >&6
26658else
26659  case $JAVAC in
26660  [\\/]* | ?:[\\/]*)
26661  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26662  ;;
26663  *)
26664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26665for as_dir in $PATH
26666do
26667  IFS=$as_save_IFS
26668  test -z "$as_dir" && as_dir=.
26669    for ac_exec_ext in '' $ac_executable_extensions; do
26670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26671    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26673    break 2
26674  fi
26675done
26676  done
26677IFS=$as_save_IFS
26678
26679  ;;
26680esac
26681fi
26682JAVAC=$ac_cv_path_JAVAC
26683if test -n "$JAVAC"; then
26684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26685$as_echo "$JAVAC" >&6; }
26686else
26687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26688$as_echo "no" >&6; }
26689fi
26690
26691
26692          if test "x$JAVAC" = x; then
26693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26694          fi
26695        else
26696          # Otherwise we believe it is a complete path. Use it as it is.
26697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26698$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26700$as_echo_n "checking for JAVAC... " >&6; }
26701          if test ! -x "$tool_specified"; then
26702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26703$as_echo "not found" >&6; }
26704            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26705          fi
26706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26707$as_echo "$tool_specified" >&6; }
26708        fi
26709      fi
26710    fi
26711  fi
26712
26713
26714
26715  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26716
26717  # Publish this variable in the help.
26718
26719
26720  if [ -z "${JAVAH+x}" ]; then
26721    # The variable is not set by user, try to locate tool using the code snippet
26722
26723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26724$as_echo_n "checking for javah in Boot JDK... " >&6; }
26725      JAVAH=$BOOT_JDK/bin/javah
26726      if test ! -x $JAVAH; then
26727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26728$as_echo "not found" >&6; }
26729        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26730$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26731        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26732      fi
26733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26734$as_echo "ok" >&6; }
26735
26736
26737  else
26738    # The variable is set, but is it from the command line or the environment?
26739
26740    # Try to remove the string !JAVAH! from our list.
26741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26743      # If it failed, the variable was not from the command line. Ignore it,
26744      # but warn the user (except for BASH, which is always set by the calling BASH).
26745      if test "xJAVAH" != xBASH; then
26746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26747$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26748      fi
26749      # Try to locate tool using the code snippet
26750
26751      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26752$as_echo_n "checking for javah in Boot JDK... " >&6; }
26753      JAVAH=$BOOT_JDK/bin/javah
26754      if test ! -x $JAVAH; then
26755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26756$as_echo "not found" >&6; }
26757        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26758$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26759        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26760      fi
26761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26762$as_echo "ok" >&6; }
26763
26764
26765    else
26766      # If it succeeded, then it was overridden by the user. We will use it
26767      # for the tool.
26768
26769      # First remove it from the list of overridden variables, so we can test
26770      # for unknown variables in the end.
26771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26772
26773      # Check if we try to supply an empty value
26774      if test "x$JAVAH" = x; then
26775        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
26776$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
26777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26778$as_echo_n "checking for JAVAH... " >&6; }
26779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26780$as_echo "disabled" >&6; }
26781      else
26782        # Check if the provided tool contains a complete path.
26783        tool_specified="$JAVAH"
26784        tool_basename="${tool_specified##*/}"
26785        if test "x$tool_basename" = "x$tool_specified"; then
26786          # A command without a complete path is provided, search $PATH.
26787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26788$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26789          # Extract the first word of "$tool_basename", so it can be a program name with args.
26790set dummy $tool_basename; ac_word=$2
26791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26792$as_echo_n "checking for $ac_word... " >&6; }
26793if ${ac_cv_path_JAVAH+:} false; then :
26794  $as_echo_n "(cached) " >&6
26795else
26796  case $JAVAH in
26797  [\\/]* | ?:[\\/]*)
26798  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26799  ;;
26800  *)
26801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26802for as_dir in $PATH
26803do
26804  IFS=$as_save_IFS
26805  test -z "$as_dir" && as_dir=.
26806    for ac_exec_ext in '' $ac_executable_extensions; do
26807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26808    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26810    break 2
26811  fi
26812done
26813  done
26814IFS=$as_save_IFS
26815
26816  ;;
26817esac
26818fi
26819JAVAH=$ac_cv_path_JAVAH
26820if test -n "$JAVAH"; then
26821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26822$as_echo "$JAVAH" >&6; }
26823else
26824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26825$as_echo "no" >&6; }
26826fi
26827
26828
26829          if test "x$JAVAH" = x; then
26830            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26831          fi
26832        else
26833          # Otherwise we believe it is a complete path. Use it as it is.
26834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26835$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26837$as_echo_n "checking for JAVAH... " >&6; }
26838          if test ! -x "$tool_specified"; then
26839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26840$as_echo "not found" >&6; }
26841            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26842          fi
26843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26844$as_echo "$tool_specified" >&6; }
26845        fi
26846      fi
26847    fi
26848  fi
26849
26850
26851
26852  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26853
26854  # Publish this variable in the help.
26855
26856
26857  if [ -z "${JAR+x}" ]; then
26858    # The variable is not set by user, try to locate tool using the code snippet
26859
26860      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26861$as_echo_n "checking for jar in Boot JDK... " >&6; }
26862      JAR=$BOOT_JDK/bin/jar
26863      if test ! -x $JAR; then
26864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26865$as_echo "not found" >&6; }
26866        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26867$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26868        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26869      fi
26870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26871$as_echo "ok" >&6; }
26872
26873
26874  else
26875    # The variable is set, but is it from the command line or the environment?
26876
26877    # Try to remove the string !JAR! from our list.
26878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26880      # If it failed, the variable was not from the command line. Ignore it,
26881      # but warn the user (except for BASH, which is always set by the calling BASH).
26882      if test "xJAR" != xBASH; then
26883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26884$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26885      fi
26886      # Try to locate tool using the code snippet
26887
26888      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26889$as_echo_n "checking for jar in Boot JDK... " >&6; }
26890      JAR=$BOOT_JDK/bin/jar
26891      if test ! -x $JAR; then
26892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26893$as_echo "not found" >&6; }
26894        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26895$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26896        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26897      fi
26898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26899$as_echo "ok" >&6; }
26900
26901
26902    else
26903      # If it succeeded, then it was overridden by the user. We will use it
26904      # for the tool.
26905
26906      # First remove it from the list of overridden variables, so we can test
26907      # for unknown variables in the end.
26908      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26909
26910      # Check if we try to supply an empty value
26911      if test "x$JAR" = x; then
26912        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
26913$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
26914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26915$as_echo_n "checking for JAR... " >&6; }
26916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26917$as_echo "disabled" >&6; }
26918      else
26919        # Check if the provided tool contains a complete path.
26920        tool_specified="$JAR"
26921        tool_basename="${tool_specified##*/}"
26922        if test "x$tool_basename" = "x$tool_specified"; then
26923          # A command without a complete path is provided, search $PATH.
26924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26925$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26926          # Extract the first word of "$tool_basename", so it can be a program name with args.
26927set dummy $tool_basename; ac_word=$2
26928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26929$as_echo_n "checking for $ac_word... " >&6; }
26930if ${ac_cv_path_JAR+:} false; then :
26931  $as_echo_n "(cached) " >&6
26932else
26933  case $JAR in
26934  [\\/]* | ?:[\\/]*)
26935  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26936  ;;
26937  *)
26938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26939for as_dir in $PATH
26940do
26941  IFS=$as_save_IFS
26942  test -z "$as_dir" && as_dir=.
26943    for ac_exec_ext in '' $ac_executable_extensions; do
26944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26945    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26947    break 2
26948  fi
26949done
26950  done
26951IFS=$as_save_IFS
26952
26953  ;;
26954esac
26955fi
26956JAR=$ac_cv_path_JAR
26957if test -n "$JAR"; then
26958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26959$as_echo "$JAR" >&6; }
26960else
26961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26962$as_echo "no" >&6; }
26963fi
26964
26965
26966          if test "x$JAR" = x; then
26967            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26968          fi
26969        else
26970          # Otherwise we believe it is a complete path. Use it as it is.
26971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26972$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26973          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26974$as_echo_n "checking for JAR... " >&6; }
26975          if test ! -x "$tool_specified"; then
26976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26977$as_echo "not found" >&6; }
26978            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26979          fi
26980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26981$as_echo "$tool_specified" >&6; }
26982        fi
26983      fi
26984    fi
26985  fi
26986
26987
26988
26989  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26990
26991  # Publish this variable in the help.
26992
26993
26994  if [ -z "${JARSIGNER+x}" ]; then
26995    # The variable is not set by user, try to locate tool using the code snippet
26996
26997      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26998$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26999      JARSIGNER=$BOOT_JDK/bin/jarsigner
27000      if test ! -x $JARSIGNER; then
27001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27002$as_echo "not found" >&6; }
27003        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
27004$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
27005        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
27006      fi
27007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27008$as_echo "ok" >&6; }
27009
27010
27011  else
27012    # The variable is set, but is it from the command line or the environment?
27013
27014    # Try to remove the string !JARSIGNER! from our list.
27015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
27016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
27017      # If it failed, the variable was not from the command line. Ignore it,
27018      # but warn the user (except for BASH, which is always set by the calling BASH).
27019      if test "xJARSIGNER" != xBASH; then
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
27021$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
27022      fi
27023      # Try to locate tool using the code snippet
27024
27025      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
27026$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
27027      JARSIGNER=$BOOT_JDK/bin/jarsigner
27028      if test ! -x $JARSIGNER; then
27029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27030$as_echo "not found" >&6; }
27031        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
27032$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
27033        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
27034      fi
27035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27036$as_echo "ok" >&6; }
27037
27038
27039    else
27040      # If it succeeded, then it was overridden by the user. We will use it
27041      # for the tool.
27042
27043      # First remove it from the list of overridden variables, so we can test
27044      # for unknown variables in the end.
27045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
27046
27047      # Check if we try to supply an empty value
27048      if test "x$JARSIGNER" = x; then
27049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
27050$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
27051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
27052$as_echo_n "checking for JARSIGNER... " >&6; }
27053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
27054$as_echo "disabled" >&6; }
27055      else
27056        # Check if the provided tool contains a complete path.
27057        tool_specified="$JARSIGNER"
27058        tool_basename="${tool_specified##*/}"
27059        if test "x$tool_basename" = "x$tool_specified"; then
27060          # A command without a complete path is provided, search $PATH.
27061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
27062$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
27063          # Extract the first word of "$tool_basename", so it can be a program name with args.
27064set dummy $tool_basename; ac_word=$2
27065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27066$as_echo_n "checking for $ac_word... " >&6; }
27067if ${ac_cv_path_JARSIGNER+:} false; then :
27068  $as_echo_n "(cached) " >&6
27069else
27070  case $JARSIGNER in
27071  [\\/]* | ?:[\\/]*)
27072  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
27073  ;;
27074  *)
27075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27076for as_dir in $PATH
27077do
27078  IFS=$as_save_IFS
27079  test -z "$as_dir" && as_dir=.
27080    for ac_exec_ext in '' $ac_executable_extensions; do
27081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27082    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
27083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27084    break 2
27085  fi
27086done
27087  done
27088IFS=$as_save_IFS
27089
27090  ;;
27091esac
27092fi
27093JARSIGNER=$ac_cv_path_JARSIGNER
27094if test -n "$JARSIGNER"; then
27095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
27096$as_echo "$JARSIGNER" >&6; }
27097else
27098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27099$as_echo "no" >&6; }
27100fi
27101
27102
27103          if test "x$JARSIGNER" = x; then
27104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
27105          fi
27106        else
27107          # Otherwise we believe it is a complete path. Use it as it is.
27108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
27109$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
27110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
27111$as_echo_n "checking for JARSIGNER... " >&6; }
27112          if test ! -x "$tool_specified"; then
27113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27114$as_echo "not found" >&6; }
27115            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
27116          fi
27117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
27118$as_echo "$tool_specified" >&6; }
27119        fi
27120      fi
27121    fi
27122  fi
27123
27124
27125
27126  # Finally, set some other options...
27127
27128  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
27129  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
27130
27131
27132
27133  # Check if the boot jdk is 32 or 64 bit
27134  if "$JAVA" -d64 -version > /dev/null 2>&1; then
27135    BOOT_JDK_BITS="64"
27136  else
27137    BOOT_JDK_BITS="32"
27138  fi
27139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
27140$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
27141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
27142$as_echo "$BOOT_JDK_BITS" >&6; }
27143
27144
27145
27146###############################################################################
27147#
27148# Configure the sources to use. We can add or override individual directories.
27149#
27150###############################################################################
27151
27152
27153  # Where are the sources. Any of these can be overridden
27154  # using --with-override-corba and the likes.
27155  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
27156  CORBA_TOPDIR="$SRC_ROOT/corba"
27157  JAXP_TOPDIR="$SRC_ROOT/jaxp"
27158  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
27159  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
27160  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
27161  JDK_TOPDIR="$SRC_ROOT/jdk"
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172  ###############################################################################
27173  #
27174  # Pickup additional source for a component from outside of the source root
27175  # or override source for a component.
27176  #
27177
27178# Check whether --with-add-source-root was given.
27179if test "${with_add_source_root+set}" = set; then :
27180  withval=$with_add_source_root;
27181fi
27182
27183
27184
27185# Check whether --with-override-source-root was given.
27186if test "${with_override_source_root+set}" = set; then :
27187  withval=$with_override_source_root;
27188fi
27189
27190
27191
27192# Check whether --with-adds-and-overrides was given.
27193if test "${with_adds_and_overrides+set}" = set; then :
27194  withval=$with_adds_and_overrides;
27195fi
27196
27197
27198  if test "x$with_adds_and_overrides" != x; then
27199    with_add_source_root="$with_adds_and_overrides/adds"
27200    with_override_source_root="$with_adds_and_overrides/overrides"
27201  fi
27202
27203  if test "x$with_add_source_root" != x; then
27204    if ! test -d $with_add_source_root; then
27205      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
27206    fi
27207    CURDIR="$PWD"
27208    cd "$with_add_source_root"
27209    ADD_SRC_ROOT="`pwd`"
27210    cd "$CURDIR"
27211    # Verify that the addon source root does not have any root makefiles.
27212    # If it does, then it is usually an error, prevent this.
27213    if test -f $with_add_source_root/langtools/make/Makefile; then
27214      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
27215    fi
27216    if test -f $with_add_source_root/corba/make/Makefile; then
27217      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
27218    fi
27219    if test -f $with_add_source_root/jaxp/make/Makefile; then
27220      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
27221    fi
27222    if test -f $with_add_source_root/jaxws/make/Makefile; then
27223      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
27224    fi
27225    if test -f $with_add_source_root/hotspot/make/Makefile; then
27226      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
27227    fi
27228    if test -f $with_add_source_root/nashorn/make/Makefile; then
27229      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
27230    fi
27231    if test -f $with_add_source_root/jdk/make/Makefile; then
27232      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
27233    fi
27234  fi
27235
27236
27237  if test "x$with_override_source_root" != x; then
27238    if ! test -d $with_override_source_root; then
27239      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
27240    fi
27241    CURDIR="$PWD"
27242    cd "$with_override_source_root"
27243    OVERRIDE_SRC_ROOT="`pwd`"
27244    cd "$CURDIR"
27245    if test -f $with_override_source_root/langtools/make/Makefile; then
27246      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
27247    fi
27248    if test -f $with_override_source_root/corba/make/Makefile; then
27249      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
27250    fi
27251    if test -f $with_override_source_root/jaxp/make/Makefile; then
27252      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
27253    fi
27254    if test -f $with_override_source_root/jaxws/make/Makefile; then
27255      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
27256    fi
27257    if test -f $with_override_source_root/hotspot/make/Makefile; then
27258      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
27259    fi
27260    if test -f $with_override_source_root/nashorn/make/Makefile; then
27261      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
27262    fi
27263    if test -f $with_override_source_root/jdk/make/Makefile; then
27264      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
27265    fi
27266  fi
27267
27268
27269  ###############################################################################
27270  #
27271  # Override a repo completely, this is used for example when you have 3 small
27272  # development sandboxes of the langtools sources and want to avoid having 3 full
27273  # OpenJDK sources checked out on disk.
27274  #
27275  # Assuming that the 3 langtools sandboxes are located here:
27276  # /home/fredrik/sandbox1/langtools
27277  # /home/fredrik/sandbox2/langtools
27278  # /home/fredrik/sandbox3/langtools
27279  #
27280  # From the source root you create build subdirs manually:
27281  #     mkdir -p build1 build2 build3
27282  # in each build directory run:
27283  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
27284  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
27285  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
27286  #
27287
27288
27289# Check whether --with-override-langtools was given.
27290if test "${with_override_langtools+set}" = set; then :
27291  withval=$with_override_langtools;
27292fi
27293
27294
27295
27296# Check whether --with-override-corba was given.
27297if test "${with_override_corba+set}" = set; then :
27298  withval=$with_override_corba;
27299fi
27300
27301
27302
27303# Check whether --with-override-jaxp was given.
27304if test "${with_override_jaxp+set}" = set; then :
27305  withval=$with_override_jaxp;
27306fi
27307
27308
27309
27310# Check whether --with-override-jaxws was given.
27311if test "${with_override_jaxws+set}" = set; then :
27312  withval=$with_override_jaxws;
27313fi
27314
27315
27316
27317# Check whether --with-override-hotspot was given.
27318if test "${with_override_hotspot+set}" = set; then :
27319  withval=$with_override_hotspot;
27320fi
27321
27322
27323
27324# Check whether --with-override-nashorn was given.
27325if test "${with_override_nashorn+set}" = set; then :
27326  withval=$with_override_nashorn;
27327fi
27328
27329
27330
27331# Check whether --with-override-jdk was given.
27332if test "${with_override_jdk+set}" = set; then :
27333  withval=$with_override_jdk;
27334fi
27335
27336
27337  if test "x$with_override_langtools" != x; then
27338    CURDIR="$PWD"
27339    cd "$with_override_langtools"
27340    LANGTOOLS_TOPDIR="`pwd`"
27341    cd "$CURDIR"
27342    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
27343      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
27344    fi
27345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
27346$as_echo_n "checking if langtools should be overridden... " >&6; }
27347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
27348$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
27349  fi
27350  if test "x$with_override_corba" != x; then
27351    CURDIR="$PWD"
27352    cd "$with_override_corba"
27353    CORBA_TOPDIR="`pwd`"
27354    cd "$CURDIR"
27355    if ! test -f $CORBA_TOPDIR/make/Makefile; then
27356      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
27357    fi
27358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
27359$as_echo_n "checking if corba should be overridden... " >&6; }
27360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
27361$as_echo "yes with $CORBA_TOPDIR" >&6; }
27362  fi
27363  if test "x$with_override_jaxp" != x; then
27364    CURDIR="$PWD"
27365    cd "$with_override_jaxp"
27366    JAXP_TOPDIR="`pwd`"
27367    cd "$CURDIR"
27368    if ! test -f $JAXP_TOPDIR/make/Makefile; then
27369      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
27370    fi
27371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
27372$as_echo_n "checking if jaxp should be overridden... " >&6; }
27373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
27374$as_echo "yes with $JAXP_TOPDIR" >&6; }
27375  fi
27376  if test "x$with_override_jaxws" != x; then
27377    CURDIR="$PWD"
27378    cd "$with_override_jaxws"
27379    JAXWS_TOPDIR="`pwd`"
27380    cd "$CURDIR"
27381    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
27382      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
27383    fi
27384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
27385$as_echo_n "checking if jaxws should be overridden... " >&6; }
27386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
27387$as_echo "yes with $JAXWS_TOPDIR" >&6; }
27388  fi
27389  if test "x$with_override_hotspot" != x; then
27390    CURDIR="$PWD"
27391    cd "$with_override_hotspot"
27392    HOTSPOT_TOPDIR="`pwd`"
27393    cd "$CURDIR"
27394    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
27395      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
27396    fi
27397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
27398$as_echo_n "checking if hotspot should be overridden... " >&6; }
27399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
27400$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
27401  fi
27402  if test "x$with_override_nashorn" != x; then
27403    CURDIR="$PWD"
27404    cd "$with_override_nashorn"
27405    NASHORN_TOPDIR="`pwd`"
27406    cd "$CURDIR"
27407    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
27408      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
27409    fi
27410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
27411$as_echo_n "checking if nashorn should be overridden... " >&6; }
27412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
27413$as_echo "yes with $NASHORN_TOPDIR" >&6; }
27414  fi
27415  if test "x$with_override_jdk" != x; then
27416    CURDIR="$PWD"
27417    cd "$with_override_jdk"
27418    JDK_TOPDIR="`pwd`"
27419    cd "$CURDIR"
27420    if ! test -f $JDK_TOPDIR/make/Makefile; then
27421      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
27422    fi
27423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
27424$as_echo_n "checking if JDK should be overridden... " >&6; }
27425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
27426$as_echo "yes with $JDK_TOPDIR" >&6; }
27427  fi
27428
27429
27430  BUILD_OUTPUT="$OUTPUT_ROOT"
27431
27432
27433  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
27434  BUILD_HOTSPOT=true
27435
27436
27437
27438# Check whether --with-import-hotspot was given.
27439if test "${with_import_hotspot+set}" = set; then :
27440  withval=$with_import_hotspot;
27441fi
27442
27443  if test "x$with_import_hotspot" != x; then
27444    CURDIR="$PWD"
27445    cd "$with_import_hotspot"
27446    HOTSPOT_DIST="`pwd`"
27447    cd "$CURDIR"
27448    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
27449      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
27450    fi
27451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
27452$as_echo_n "checking if hotspot should be imported... " >&6; }
27453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
27454$as_echo "yes from $HOTSPOT_DIST" >&6; }
27455    BUILD_HOTSPOT=false
27456  fi
27457
27458  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
27459
27460
27461###############################################################################
27462#
27463# Setup the toolchain (compilers etc), i.e. tools used to compile and process
27464# native code.
27465#
27466###############################################################################
27467
27468# First determine the toolchain type (compiler family)
27469
27470
27471# Check whether --with-toolchain-type was given.
27472if test "${with_toolchain_type+set}" = set; then :
27473  withval=$with_toolchain_type;
27474fi
27475
27476
27477  # Use indirect variable referencing
27478  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
27479  VALID_TOOLCHAINS=${!toolchain_var_name}
27480
27481  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27482    if test -n "$XCODEBUILD"; then
27483      # On Mac OS X, default toolchain to clang after Xcode 5
27484      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
27485      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
27486      if test $? -ne 0; then
27487        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
27488      fi
27489      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
27490          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
27491          $CUT -f 1 -d .`
27492      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
27493$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
27494      if test $XCODE_MAJOR_VERSION -ge 5; then
27495          DEFAULT_TOOLCHAIN="clang"
27496      else
27497          DEFAULT_TOOLCHAIN="gcc"
27498      fi
27499    else
27500      # If Xcode is not installed, but the command line tools are
27501      # then we can't run xcodebuild. On these systems we should
27502      # default to clang
27503      DEFAULT_TOOLCHAIN="clang"
27504    fi
27505  else
27506    # First toolchain type in the list is the default
27507    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
27508  fi
27509
27510  if test "x$with_toolchain_type" = xlist; then
27511    # List all toolchains
27512    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
27513$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
27514    for toolchain in $VALID_TOOLCHAINS; do
27515      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27516      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27517      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27518    done
27519
27520    exit 0
27521  elif test "x$with_toolchain_type" != x; then
27522    # User override; check that it is valid
27523    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27524      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27525$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27526      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27527$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27528      as_fn_error $? "Cannot continue." "$LINENO" 5
27529    fi
27530    TOOLCHAIN_TYPE=$with_toolchain_type
27531  else
27532    # No flag given, use default
27533    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27534  fi
27535
27536
27537  TOOLCHAIN_CC_BINARY_clang="clang"
27538  TOOLCHAIN_CC_BINARY_gcc="gcc"
27539  TOOLCHAIN_CC_BINARY_microsoft="cl"
27540  TOOLCHAIN_CC_BINARY_solstudio="cc"
27541  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27542
27543  TOOLCHAIN_CXX_BINARY_clang="clang++"
27544  TOOLCHAIN_CXX_BINARY_gcc="g++"
27545  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27546  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27547  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27548
27549  # Use indirect variable referencing
27550  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27551  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27552  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27553  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27554  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27555  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27556
27557
27558  # Define filename patterns
27559  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27560    LIBRARY_PREFIX=
27561    SHARED_LIBRARY_SUFFIX='.dll'
27562    STATIC_LIBRARY_SUFFIX='.lib'
27563    SHARED_LIBRARY='$1.dll'
27564    STATIC_LIBRARY='$1.lib'
27565    OBJ_SUFFIX='.obj'
27566    EXE_SUFFIX='.exe'
27567  else
27568    LIBRARY_PREFIX=lib
27569    SHARED_LIBRARY_SUFFIX='.so'
27570    STATIC_LIBRARY_SUFFIX='.a'
27571    SHARED_LIBRARY='lib$1.so'
27572    STATIC_LIBRARY='lib$1.a'
27573    OBJ_SUFFIX='.o'
27574    EXE_SUFFIX=''
27575    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27576      SHARED_LIBRARY='lib$1.dylib'
27577      SHARED_LIBRARY_SUFFIX='.dylib'
27578    fi
27579  fi
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27591    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27592$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27593  else
27594    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27595$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27596  fi
27597
27598
27599# User supplied flags should be used when configure detects compilers
27600
27601  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27602    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27603$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27604  fi
27605
27606  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27607    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27608$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27609  fi
27610
27611  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27612    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27613$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27614  fi
27615
27616
27617# Check whether --with-extra-cflags was given.
27618if test "${with_extra_cflags+set}" = set; then :
27619  withval=$with_extra_cflags;
27620fi
27621
27622
27623
27624# Check whether --with-extra-cxxflags was given.
27625if test "${with_extra_cxxflags+set}" = set; then :
27626  withval=$with_extra_cxxflags;
27627fi
27628
27629
27630
27631# Check whether --with-extra-ldflags was given.
27632if test "${with_extra_ldflags+set}" = set; then :
27633  withval=$with_extra_ldflags;
27634fi
27635
27636
27637  EXTRA_CFLAGS="$with_extra_cflags"
27638  EXTRA_CXXFLAGS="$with_extra_cxxflags"
27639  EXTRA_LDFLAGS="$with_extra_ldflags"
27640
27641  # Hotspot needs these set in their legacy form
27642  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
27643  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
27644  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
27645
27646
27647
27648
27649
27650  # The global CFLAGS and LDLAGS variables are used by configure tests and
27651  # should include the extra parameters
27652  CFLAGS="$EXTRA_CFLAGS"
27653  CXXFLAGS="$EXTRA_CXXFLAGS"
27654  LDFLAGS="$EXTRA_LDFLAGS"
27655  CPPFLAGS=""
27656
27657# The sysroot cflags are needed for configure to be able to run the compilers
27658
27659  if test "x$SYSROOT" != "x"; then
27660    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
27661      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27662        # Solaris Studio does not have a concept of sysroot. Instead we must
27663        # make sure the default include and lib dirs are appended to each
27664        # compile and link command line.
27665        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
27666        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
27667            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
27668            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
27669      fi
27670    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
27671      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
27672      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
27673    elif test "x$TOOLCHAIN_TYPE" = xclang; then
27674      SYSROOT_CFLAGS="-isysroot $SYSROOT"
27675      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
27676    fi
27677    # Propagate the sysroot args to hotspot
27678    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
27679    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
27680    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
27681    # The global CFLAGS and LDFLAGS variables need these for configure to function
27682    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
27683    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
27684    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
27685    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
27686  fi
27687
27688  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27689    # We also need -iframework<path>/System/Library/Frameworks
27690    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
27691    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
27692    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
27693    # set this here so it doesn't have to be peppered throughout the forest
27694    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
27695    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
27696  fi
27697
27698
27699
27700
27701
27702# Then detect the actual binaries needed
27703
27704  # FIXME: Is this needed?
27705  ac_ext=cpp
27706ac_cpp='$CXXCPP $CPPFLAGS'
27707ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27708ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27709ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27710
27711
27712  # Store the CFLAGS etc passed to the configure script.
27713  ORG_CFLAGS="$CFLAGS"
27714  ORG_CXXFLAGS="$CXXFLAGS"
27715
27716  # autoconf magic only relies on PATH, so update it if tools dir is specified
27717  OLD_PATH="$PATH"
27718
27719  # On Windows, we need to detect the visual studio installation first.
27720  # This will change the PATH, but we need to keep that new PATH even
27721  # after toolchain detection is done, since the compiler (on x86) uses
27722  # it for DLL resolution in runtime.
27723  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27724      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27725
27726  # Store path to cygwin link.exe to help excluding it when searching for
27727  # VS linker. This must be done before changing the PATH when looking for VS.
27728  # Extract the first word of "link", so it can be a program name with args.
27729set dummy link; ac_word=$2
27730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27731$as_echo_n "checking for $ac_word... " >&6; }
27732if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27733  $as_echo_n "(cached) " >&6
27734else
27735  case $CYGWIN_LINK in
27736  [\\/]* | ?:[\\/]*)
27737  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27738  ;;
27739  *)
27740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27741for as_dir in $PATH
27742do
27743  IFS=$as_save_IFS
27744  test -z "$as_dir" && as_dir=.
27745    for ac_exec_ext in '' $ac_executable_extensions; do
27746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27747    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27749    break 2
27750  fi
27751done
27752  done
27753IFS=$as_save_IFS
27754
27755  ;;
27756esac
27757fi
27758CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27759if test -n "$CYGWIN_LINK"; then
27760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27761$as_echo "$CYGWIN_LINK" >&6; }
27762else
27763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27764$as_echo "no" >&6; }
27765fi
27766
27767
27768  if test "x$CYGWIN_LINK" != x; then
27769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27770$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27771    "$CYGWIN_LINK" --version > /dev/null
27772    if test $? -eq 0 ; then
27773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27774$as_echo "yes" >&6; }
27775    else
27776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27777$as_echo "no" >&6; }
27778      # This might be the VS linker. Don't exclude it later on.
27779      CYGWIN_LINK=""
27780    fi
27781  fi
27782
27783  # First-hand choice is to locate and run the vsvars bat file.
27784
27785
27786# Check whether --with-toolchain-version was given.
27787if test "${with_toolchain_version+set}" = set; then :
27788  withval=$with_toolchain_version;
27789fi
27790
27791
27792  if test "x$with_toolchain_version" = xlist; then
27793    # List all toolchains
27794    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27795$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27796    for version in $VALID_VS_VERSIONS; do
27797      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27798      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27799    done
27800
27801    exit 0
27802  elif test "x$DEVKIT_VS_VERSION" != x; then
27803    VS_VERSION=$DEVKIT_VS_VERSION
27804    TOOLCHAIN_VERSION=$VS_VERSION
27805    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27806    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27807    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27808    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27809    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27810    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27811
27812    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27813    # can still be exported as INCLUDE for compiler invocations without
27814    # SYSROOT_CFLAGS
27815    OLDIFS="$IFS"
27816    IFS=";"
27817    for i in $DEVKIT_VS_INCLUDE; do
27818      ipath=$i
27819
27820  unix_path="$ipath"
27821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27822    windows_path=`$CYGPATH -m "$unix_path"`
27823    ipath="$windows_path"
27824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27825    windows_path=`cmd //c echo $unix_path`
27826    ipath="$windows_path"
27827  fi
27828
27829      VS_INCLUDE="$VS_INCLUDE;$ipath"
27830    done
27831    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27832    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27833    for i in $DEVKIT_VS_LIB; do
27834      libpath=$i
27835
27836  unix_path="$libpath"
27837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27838    windows_path=`$CYGPATH -m "$unix_path"`
27839    libpath="$windows_path"
27840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27841    windows_path=`cmd //c echo $unix_path`
27842    libpath="$windows_path"
27843  fi
27844
27845      VS_LIB="$VS_LIB;$libpath"
27846    done
27847    IFS="$OLDIFS"
27848
27849    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27850$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27851
27852  elif test "x$with_toolchain_version" != x; then
27853    # User override; check that it is valid
27854    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27855      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27856$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27857      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27858$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27859      as_fn_error $? "Cannot continue." "$LINENO" 5
27860    fi
27861    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27862  else
27863    # No flag given, use default
27864    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27865  fi
27866
27867  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27868
27869  VS_VERSION="$VS_VERSION"
27870  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27871  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27872  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27873  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27874
27875  # When using --with-tools-dir, assume it points to the correct and default
27876  # version of Visual Studio or that --with-toolchain-version was also set.
27877  if test "x$with_tools_dir" != x; then
27878
27879  if test "x$VS_ENV_CMD" = x; then
27880    VS_VERSION="${VS_VERSION}"
27881    VS_BASE="$with_tools_dir/../.."
27882    METHOD="--with-tools-dir"
27883
27884    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27885      VCVARSFILE="vc/bin/vcvars32.bat"
27886    else
27887      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27888    fi
27889
27890
27891  windows_path="$VS_BASE"
27892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27893    unix_path=`$CYGPATH -u "$windows_path"`
27894    VS_BASE="$unix_path"
27895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27897    VS_BASE="$unix_path"
27898  fi
27899
27900    if test -d "$VS_BASE"; then
27901      if test -f "$VS_BASE/$VCVARSFILE"; then
27902        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27903$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27904        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27905        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27906        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27907        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27908      else
27909        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27910$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27911        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27912$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27913      fi
27914    fi
27915  fi
27916
27917
27918  if test "x$VS_ENV_CMD" = x; then
27919    VS_VERSION="${VS_VERSION}"
27920    VS_BASE="$with_tools_dir/../../.."
27921    METHOD="--with-tools-dir"
27922
27923    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27924      VCVARSFILE="vc/bin/vcvars32.bat"
27925    else
27926      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27927    fi
27928
27929
27930  windows_path="$VS_BASE"
27931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27932    unix_path=`$CYGPATH -u "$windows_path"`
27933    VS_BASE="$unix_path"
27934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27936    VS_BASE="$unix_path"
27937  fi
27938
27939    if test -d "$VS_BASE"; then
27940      if test -f "$VS_BASE/$VCVARSFILE"; then
27941        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27942$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27943        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27944        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27945        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27946        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27947      else
27948        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27949$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27950        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27951$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27952      fi
27953    fi
27954  fi
27955
27956    if test "x$VS_ENV_CMD" = x; then
27957      # Having specified an argument which is incorrect will produce an instant failure;
27958      # we should not go on looking
27959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27960$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27961      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27962$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27963      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27964$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27965      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27966    fi
27967  fi
27968
27969  VS_ENV_CMD=""
27970  VS_ENV_ARGS=""
27971
27972  if test "x$VS_COMNTOOLS" != x; then
27973
27974  if test "x$VS_ENV_CMD" = x; then
27975    VS_VERSION="${VS_VERSION}"
27976    VS_BASE="$VS_COMNTOOLS/../.."
27977    METHOD="$VS_COMNTOOLS_VAR variable"
27978
27979    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27980      VCVARSFILE="vc/bin/vcvars32.bat"
27981    else
27982      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27983    fi
27984
27985
27986  windows_path="$VS_BASE"
27987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27988    unix_path=`$CYGPATH -u "$windows_path"`
27989    VS_BASE="$unix_path"
27990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27992    VS_BASE="$unix_path"
27993  fi
27994
27995    if test -d "$VS_BASE"; then
27996      if test -f "$VS_BASE/$VCVARSFILE"; then
27997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27998$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27999        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
28000        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28001        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28002        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28003      else
28004        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28005$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28006        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28007$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28008      fi
28009    fi
28010  fi
28011
28012  fi
28013  if test "x$PROGRAMFILES" != x; then
28014
28015  if test "x$VS_ENV_CMD" = x; then
28016    VS_VERSION="${VS_VERSION}"
28017    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
28018    METHOD="well-known name"
28019
28020    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28021      VCVARSFILE="vc/bin/vcvars32.bat"
28022    else
28023      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
28024    fi
28025
28026
28027  windows_path="$VS_BASE"
28028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28029    unix_path=`$CYGPATH -u "$windows_path"`
28030    VS_BASE="$unix_path"
28031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28033    VS_BASE="$unix_path"
28034  fi
28035
28036    if test -d "$VS_BASE"; then
28037      if test -f "$VS_BASE/$VCVARSFILE"; then
28038        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28039$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28040        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
28041        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28042        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28043        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28044      else
28045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28046$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28047        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28048$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28049      fi
28050    fi
28051  fi
28052
28053  fi
28054  # Work around the insanely named ProgramFiles(x86) env variable
28055  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
28056  if test "x$PROGRAMFILES_X86" != x; then
28057
28058  if test "x$VS_ENV_CMD" = x; then
28059    VS_VERSION="${VS_VERSION}"
28060    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
28061    METHOD="well-known name"
28062
28063    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28064      VCVARSFILE="vc/bin/vcvars32.bat"
28065    else
28066      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
28067    fi
28068
28069
28070  windows_path="$VS_BASE"
28071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28072    unix_path=`$CYGPATH -u "$windows_path"`
28073    VS_BASE="$unix_path"
28074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28076    VS_BASE="$unix_path"
28077  fi
28078
28079    if test -d "$VS_BASE"; then
28080      if test -f "$VS_BASE/$VCVARSFILE"; then
28081        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28082$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28083        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
28084        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28085        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28086        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28087      else
28088        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28089$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28090        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28091$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28092      fi
28093    fi
28094  fi
28095
28096  fi
28097
28098  if test "x$VS_ENV_CMD" = x; then
28099    VS_VERSION="${VS_VERSION}"
28100    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
28101    METHOD="well-known name"
28102
28103    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28104      VCVARSFILE="vc/bin/vcvars32.bat"
28105    else
28106      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
28107    fi
28108
28109
28110  windows_path="$VS_BASE"
28111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28112    unix_path=`$CYGPATH -u "$windows_path"`
28113    VS_BASE="$unix_path"
28114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28116    VS_BASE="$unix_path"
28117  fi
28118
28119    if test -d "$VS_BASE"; then
28120      if test -f "$VS_BASE/$VCVARSFILE"; then
28121        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28122$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28123        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
28124        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28125        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28126        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28127      else
28128        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28129$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28130        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28131$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28132      fi
28133    fi
28134  fi
28135
28136
28137  if test "x$VS_ENV_CMD" = x; then
28138    VS_VERSION="${VS_VERSION}"
28139    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
28140    METHOD="well-known name"
28141
28142    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28143      VCVARSFILE="vc/bin/vcvars32.bat"
28144    else
28145      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
28146    fi
28147
28148
28149  windows_path="$VS_BASE"
28150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28151    unix_path=`$CYGPATH -u "$windows_path"`
28152    VS_BASE="$unix_path"
28153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28155    VS_BASE="$unix_path"
28156  fi
28157
28158    if test -d "$VS_BASE"; then
28159      if test -f "$VS_BASE/$VCVARSFILE"; then
28160        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28161$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28162        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
28163        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28164        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28165        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28166      else
28167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28168$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28169        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28170$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28171      fi
28172    fi
28173  fi
28174
28175
28176  if test "x$SDK_INSTALL_DIR" != x; then
28177    if test "x$ProgramW6432" != x; then
28178
28179  if test "x$VS_ENV_CMD" = x; then
28180    VS_VERSION="${VS_VERSION}"
28181    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
28182    METHOD="well-known name"
28183
28184  windows_path="$WIN_SDK_BASE"
28185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28186    unix_path=`$CYGPATH -u "$windows_path"`
28187    WIN_SDK_BASE="$unix_path"
28188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28190    WIN_SDK_BASE="$unix_path"
28191  fi
28192
28193    if test -d "$WIN_SDK_BASE"; then
28194      # There have been cases of partial or broken SDK installations. A missing
28195      # lib dir is not going to work.
28196      if test ! -d "$WIN_SDK_BASE/lib"; then
28197        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28198$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28199        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28200$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28201      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28202        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28203$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28204        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28205        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28206          VS_ENV_ARGS="/x86"
28207        else
28208          VS_ENV_ARGS="/x64"
28209        fi
28210        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28211        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28212        # TODO: improve detection for other versions of SDK
28213        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28214      else
28215        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28216$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28217        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28218$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28219      fi
28220    fi
28221  fi
28222
28223    fi
28224    if test "x$PROGRAMW6432" != x; then
28225
28226  if test "x$VS_ENV_CMD" = x; then
28227    VS_VERSION="${VS_VERSION}"
28228    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
28229    METHOD="well-known name"
28230
28231  windows_path="$WIN_SDK_BASE"
28232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28233    unix_path=`$CYGPATH -u "$windows_path"`
28234    WIN_SDK_BASE="$unix_path"
28235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28237    WIN_SDK_BASE="$unix_path"
28238  fi
28239
28240    if test -d "$WIN_SDK_BASE"; then
28241      # There have been cases of partial or broken SDK installations. A missing
28242      # lib dir is not going to work.
28243      if test ! -d "$WIN_SDK_BASE/lib"; then
28244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28245$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28246        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28247$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28248      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28249        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28250$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28251        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28252        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28253          VS_ENV_ARGS="/x86"
28254        else
28255          VS_ENV_ARGS="/x64"
28256        fi
28257        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28258        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28259        # TODO: improve detection for other versions of SDK
28260        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28261      else
28262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28263$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28264        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28265$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28266      fi
28267    fi
28268  fi
28269
28270    fi
28271    if test "x$PROGRAMFILES" != x; then
28272
28273  if test "x$VS_ENV_CMD" = x; then
28274    VS_VERSION="${VS_VERSION}"
28275    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
28276    METHOD="well-known name"
28277
28278  windows_path="$WIN_SDK_BASE"
28279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28280    unix_path=`$CYGPATH -u "$windows_path"`
28281    WIN_SDK_BASE="$unix_path"
28282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28284    WIN_SDK_BASE="$unix_path"
28285  fi
28286
28287    if test -d "$WIN_SDK_BASE"; then
28288      # There have been cases of partial or broken SDK installations. A missing
28289      # lib dir is not going to work.
28290      if test ! -d "$WIN_SDK_BASE/lib"; then
28291        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28292$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28293        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28294$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28295      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28296        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28297$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28298        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28299        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28300          VS_ENV_ARGS="/x86"
28301        else
28302          VS_ENV_ARGS="/x64"
28303        fi
28304        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28305        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28306        # TODO: improve detection for other versions of SDK
28307        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28308      else
28309        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28310$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28311        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28312$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28313      fi
28314    fi
28315  fi
28316
28317    fi
28318
28319  if test "x$VS_ENV_CMD" = x; then
28320    VS_VERSION="${VS_VERSION}"
28321    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
28322    METHOD="well-known name"
28323
28324  windows_path="$WIN_SDK_BASE"
28325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28326    unix_path=`$CYGPATH -u "$windows_path"`
28327    WIN_SDK_BASE="$unix_path"
28328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28330    WIN_SDK_BASE="$unix_path"
28331  fi
28332
28333    if test -d "$WIN_SDK_BASE"; then
28334      # There have been cases of partial or broken SDK installations. A missing
28335      # lib dir is not going to work.
28336      if test ! -d "$WIN_SDK_BASE/lib"; then
28337        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28338$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28339        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28340$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28341      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28342        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28343$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28344        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28345        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28346          VS_ENV_ARGS="/x86"
28347        else
28348          VS_ENV_ARGS="/x64"
28349        fi
28350        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28351        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28352        # TODO: improve detection for other versions of SDK
28353        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28354      else
28355        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28356$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28357        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28358$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28359      fi
28360    fi
28361  fi
28362
28363
28364  if test "x$VS_ENV_CMD" = x; then
28365    VS_VERSION="${VS_VERSION}"
28366    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
28367    METHOD="well-known name"
28368
28369  windows_path="$WIN_SDK_BASE"
28370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28371    unix_path=`$CYGPATH -u "$windows_path"`
28372    WIN_SDK_BASE="$unix_path"
28373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28375    WIN_SDK_BASE="$unix_path"
28376  fi
28377
28378    if test -d "$WIN_SDK_BASE"; then
28379      # There have been cases of partial or broken SDK installations. A missing
28380      # lib dir is not going to work.
28381      if test ! -d "$WIN_SDK_BASE/lib"; then
28382        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28383$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28384        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28385$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28386      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28387        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28388$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28389        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28390        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28391          VS_ENV_ARGS="/x86"
28392        else
28393          VS_ENV_ARGS="/x64"
28394        fi
28395        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28396        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28397        # TODO: improve detection for other versions of SDK
28398        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28399      else
28400        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28401$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28402        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28403$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28404      fi
28405    fi
28406  fi
28407
28408  fi
28409
28410    if test "x$VS_ENV_CMD" != x; then
28411      TOOLCHAIN_VERSION=$VS_VERSION
28412      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
28413      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
28414      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
28415      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
28416      # The rest of the variables are already evaled while probing
28417      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
28418$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
28419      break
28420    fi
28421  done
28422
28423
28424  # If we have a devkit, skip all of the below.
28425  if test "x$DEVKIT_VS_VERSION" = x; then
28426    if test "x$VS_ENV_CMD" != x; then
28427      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
28428
28429  # Only process if variable expands to non-empty
28430
28431  if test "x$VS_ENV_CMD" != x; then
28432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28433
28434  # First separate the path from the arguments. This will split at the first
28435  # space.
28436  complete="$VS_ENV_CMD"
28437  path="${complete%% *}"
28438  tmp="$complete EOL"
28439  arguments="${tmp#* }"
28440
28441  # Input might be given as Windows format, start by converting to
28442  # unix format.
28443  new_path=`$CYGPATH -u "$path"`
28444
28445  # Now try to locate executable using which
28446  new_path=`$WHICH "$new_path" 2> /dev/null`
28447  # bat and cmd files are not always considered executable in cygwin causing which
28448  # to not find them
28449  if test "x$new_path" = x \
28450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28452    new_path=`$CYGPATH -u "$path"`
28453  fi
28454  if test "x$new_path" = x; then
28455    # Oops. Which didn't find the executable.
28456    # The splitting of arguments from the executable at a space might have been incorrect,
28457    # since paths with space are more likely in Windows. Give it another try with the whole
28458    # argument.
28459    path="$complete"
28460    arguments="EOL"
28461    new_path=`$CYGPATH -u "$path"`
28462    new_path=`$WHICH "$new_path" 2> /dev/null`
28463    # bat and cmd files are not always considered executable in cygwin causing which
28464    # to not find them
28465    if test "x$new_path" = x \
28466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28468      new_path=`$CYGPATH -u "$path"`
28469    fi
28470    if test "x$new_path" = x; then
28471      # It's still not found. Now this is an unrecoverable error.
28472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28473$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28474      has_space=`$ECHO "$complete" | $GREP " "`
28475      if test "x$has_space" != x; then
28476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28478      fi
28479      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28480    fi
28481  fi
28482
28483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28486  # "foo.exe" is OK but "foo" is an error.
28487  #
28488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28489  # It is also a way to make sure we got the proper file name for the real test later on.
28490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28491  if test "x$test_shortpath" = x; then
28492    # Short path failed, file does not exist as specified.
28493    # Try adding .exe or .cmd
28494    if test -f "${new_path}.exe"; then
28495      input_to_shortpath="${new_path}.exe"
28496    elif test -f "${new_path}.cmd"; then
28497      input_to_shortpath="${new_path}.cmd"
28498    else
28499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
28500$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
28501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28503      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28504    fi
28505  else
28506    input_to_shortpath="$new_path"
28507  fi
28508
28509  # Call helper function which possibly converts this using DOS-style short mode.
28510  # If so, the updated path is stored in $new_path.
28511  new_path="$input_to_shortpath"
28512
28513  input_path="$input_to_shortpath"
28514  # Check if we need to convert this using DOS-style short mode. If the path
28515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28516  # take no chances and rewrite it.
28517  # Note: m4 eats our [], so we need to use [ and ] instead.
28518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28519  if test "x$has_forbidden_chars" != x; then
28520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28524      # Going to short mode and back again did indeed matter. Since short mode is
28525      # case insensitive, let's make it lowercase to improve readability.
28526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28527      # Now convert it back to Unix-style (cygpath)
28528      input_path=`$CYGPATH -u "$shortmode_path"`
28529      new_path="$input_path"
28530    fi
28531  fi
28532
28533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28534  if test "x$test_cygdrive_prefix" = x; then
28535    # As a simple fix, exclude /usr/bin since it's not a real path.
28536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28538      # a path prefixed by /cygdrive for fixpath to work.
28539      new_path="$CYGWIN_ROOT_PATH$input_path"
28540    fi
28541  fi
28542
28543  # remove trailing .exe if any
28544  new_path="${new_path/%.exe/}"
28545
28546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28547
28548  # First separate the path from the arguments. This will split at the first
28549  # space.
28550  complete="$VS_ENV_CMD"
28551  path="${complete%% *}"
28552  tmp="$complete EOL"
28553  arguments="${tmp#* }"
28554
28555  # Input might be given as Windows format, start by converting to
28556  # unix format.
28557  new_path="$path"
28558
28559  windows_path="$new_path"
28560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28561    unix_path=`$CYGPATH -u "$windows_path"`
28562    new_path="$unix_path"
28563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28565    new_path="$unix_path"
28566  fi
28567
28568
28569  # Now try to locate executable using which
28570  new_path=`$WHICH "$new_path" 2> /dev/null`
28571
28572  if test "x$new_path" = x; then
28573    # Oops. Which didn't find the executable.
28574    # The splitting of arguments from the executable at a space might have been incorrect,
28575    # since paths with space are more likely in Windows. Give it another try with the whole
28576    # argument.
28577    path="$complete"
28578    arguments="EOL"
28579    new_path="$path"
28580
28581  windows_path="$new_path"
28582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28583    unix_path=`$CYGPATH -u "$windows_path"`
28584    new_path="$unix_path"
28585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28587    new_path="$unix_path"
28588  fi
28589
28590
28591    new_path=`$WHICH "$new_path" 2> /dev/null`
28592    # bat and cmd files are not always considered executable in MSYS causing which
28593    # to not find them
28594    if test "x$new_path" = x \
28595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28597      new_path="$path"
28598
28599  windows_path="$new_path"
28600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28601    unix_path=`$CYGPATH -u "$windows_path"`
28602    new_path="$unix_path"
28603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28605    new_path="$unix_path"
28606  fi
28607
28608    fi
28609
28610    if test "x$new_path" = x; then
28611      # It's still not found. Now this is an unrecoverable error.
28612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28613$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28614      has_space=`$ECHO "$complete" | $GREP " "`
28615      if test "x$has_space" != x; then
28616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28618      fi
28619      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28620    fi
28621  fi
28622
28623  # Now new_path has a complete unix path to the binary
28624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28625    # Keep paths in /bin as-is, but remove trailing .exe if any
28626    new_path="${new_path/%.exe/}"
28627    # Do not save /bin paths to all_fixpath_prefixes!
28628  else
28629    # Not in mixed or Windows style, start by that.
28630    new_path=`cmd //c echo $new_path`
28631
28632  input_path="$new_path"
28633  # Check if we need to convert this using DOS-style short mode. If the path
28634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28635  # take no chances and rewrite it.
28636  # Note: m4 eats our [], so we need to use [ and ] instead.
28637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28638  if test "x$has_forbidden_chars" != x; then
28639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28641  fi
28642
28643    # Output is in $new_path
28644
28645  windows_path="$new_path"
28646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28647    unix_path=`$CYGPATH -u "$windows_path"`
28648    new_path="$unix_path"
28649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28651    new_path="$unix_path"
28652  fi
28653
28654    # remove trailing .exe if any
28655    new_path="${new_path/%.exe/}"
28656
28657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28659  fi
28660
28661    else
28662      # We're on a unix platform. Hooray! :)
28663      # First separate the path from the arguments. This will split at the first
28664      # space.
28665      complete="$VS_ENV_CMD"
28666      path="${complete%% *}"
28667      tmp="$complete EOL"
28668      arguments="${tmp#* }"
28669
28670      # Cannot rely on the command "which" here since it doesn't always work.
28671      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28672      if test -z "$is_absolute_path"; then
28673        # Path to executable is not absolute. Find it.
28674        IFS_save="$IFS"
28675        IFS=:
28676        for p in $PATH; do
28677          if test -f "$p/$path" && test -x "$p/$path"; then
28678            new_path="$p/$path"
28679            break
28680          fi
28681        done
28682        IFS="$IFS_save"
28683      else
28684        # This is an absolute path, we can use it without further modifications.
28685        new_path="$path"
28686      fi
28687
28688      if test "x$new_path" = x; then
28689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28690$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28691        has_space=`$ECHO "$complete" | $GREP " "`
28692        if test "x$has_space" != x; then
28693          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28695        fi
28696        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28697      fi
28698    fi
28699
28700    # Now join together the path and the arguments once again
28701    if test "x$arguments" != xEOL; then
28702      new_complete="$new_path ${arguments% *}"
28703    else
28704      new_complete="$new_path"
28705    fi
28706
28707    if test "x$complete" != "x$new_complete"; then
28708      VS_ENV_CMD="$new_complete"
28709      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28710$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28711    fi
28712  fi
28713
28714
28715      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28716      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28717$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28718
28719      # We need to create a couple of temporary files.
28720      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28721      $MKDIR -p $VS_ENV_TMP_DIR
28722
28723      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28724      # Instead create a shell script which will set the relevant variables when run.
28725      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28726
28727  unix_path="$WINPATH_VS_ENV_CMD"
28728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28729    windows_path=`$CYGPATH -m "$unix_path"`
28730    WINPATH_VS_ENV_CMD="$windows_path"
28731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28732    windows_path=`cmd //c echo $unix_path`
28733    WINPATH_VS_ENV_CMD="$windows_path"
28734  fi
28735
28736      WINPATH_BASH="$BASH"
28737
28738  unix_path="$WINPATH_BASH"
28739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28740    windows_path=`$CYGPATH -m "$unix_path"`
28741    WINPATH_BASH="$windows_path"
28742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28743    windows_path=`cmd //c echo $unix_path`
28744    WINPATH_BASH="$windows_path"
28745  fi
28746
28747
28748      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28749      # script (executable by bash) that will setup the important variables.
28750      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28751      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28752      # This will end up something like:
28753      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28754      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28755      # These will end up something like:
28756      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28757      # The trailing space for everyone except PATH is no typo, but is needed due
28758      # to trailing \ in the Windows paths. These will be stripped later.
28759      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28760          >> $EXTRACT_VC_ENV_BAT_FILE
28761      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28762          >> $EXTRACT_VC_ENV_BAT_FILE
28763      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28764          >> $EXTRACT_VC_ENV_BAT_FILE
28765      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28766          >> $EXTRACT_VC_ENV_BAT_FILE
28767      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28768          >> $EXTRACT_VC_ENV_BAT_FILE
28769      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28770          >> $EXTRACT_VC_ENV_BAT_FILE
28771
28772      # Now execute the newly created bat file.
28773      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28774      # Change directory so we don't need to mess with Windows paths in redirects.
28775      cd $VS_ENV_TMP_DIR
28776      cmd /c extract-vs-env.bat | $CAT
28777      cd $CURDIR
28778
28779      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28780        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28781$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28782        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28783$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28784        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28785$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28786        as_fn_error $? "Cannot continue" "$LINENO" 5
28787      fi
28788
28789      # Now set all paths and other env variables. This will allow the rest of
28790      # the configure script to find and run the compiler in the proper way.
28791      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28792$as_echo "$as_me: Setting extracted environment variables" >&6;}
28793      . $VS_ENV_TMP_DIR/set-vs-env.sh
28794      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28795      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28796    else
28797      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28798      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28799$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28800    fi
28801  fi
28802
28803  # At this point, we should have correct variables in the environment, or we can't continue.
28804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28805$as_echo_n "checking for Visual Studio variables... " >&6; }
28806
28807  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28808      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28809    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28811$as_echo "present but broken" >&6; }
28812      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28813    else
28814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28815$as_echo "ok" >&6; }
28816      # Remove any trailing "\" ";" and " " from the variables.
28817      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28818      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28819      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28820      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28821      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28822      # Remove any paths containing # (typically F#) as that messes up make. This
28823      # is needed if visual studio was installed with F# support.
28824      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28825
28826
28827
28828
28829
28830      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28831      OLDIFS="$IFS"
28832      IFS=";"
28833      for i in $VS_INCLUDE; do
28834        ipath=$i
28835        # Only process non-empty elements
28836        if test "x$ipath" != x; then
28837          IFS="$OLDIFS"
28838          # Check that directory exists before calling fixup_path
28839          testpath=$ipath
28840
28841  windows_path="$testpath"
28842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28843    unix_path=`$CYGPATH -u "$windows_path"`
28844    testpath="$unix_path"
28845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28847    testpath="$unix_path"
28848  fi
28849
28850          if test -d "$testpath"; then
28851
28852  # Only process if variable expands to non-empty
28853
28854  if test "x$ipath" != x; then
28855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28856
28857  # Input might be given as Windows format, start by converting to
28858  # unix format.
28859  path="$ipath"
28860  new_path=`$CYGPATH -u "$path"`
28861
28862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28865  # "foo.exe" is OK but "foo" is an error.
28866  #
28867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28868  # It is also a way to make sure we got the proper file name for the real test later on.
28869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28870  if test "x$test_shortpath" = x; then
28871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28872$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28873    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28874  fi
28875
28876  # Call helper function which possibly converts this using DOS-style short mode.
28877  # If so, the updated path is stored in $new_path.
28878
28879  input_path="$new_path"
28880  # Check if we need to convert this using DOS-style short mode. If the path
28881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28882  # take no chances and rewrite it.
28883  # Note: m4 eats our [], so we need to use [ and ] instead.
28884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28885  if test "x$has_forbidden_chars" != x; then
28886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28890      # Going to short mode and back again did indeed matter. Since short mode is
28891      # case insensitive, let's make it lowercase to improve readability.
28892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28893      # Now convert it back to Unix-style (cygpath)
28894      input_path=`$CYGPATH -u "$shortmode_path"`
28895      new_path="$input_path"
28896    fi
28897  fi
28898
28899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28900  if test "x$test_cygdrive_prefix" = x; then
28901    # As a simple fix, exclude /usr/bin since it's not a real path.
28902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28904      # a path prefixed by /cygdrive for fixpath to work.
28905      new_path="$CYGWIN_ROOT_PATH$input_path"
28906    fi
28907  fi
28908
28909
28910  if test "x$path" != "x$new_path"; then
28911    ipath="$new_path"
28912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28913$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28914  fi
28915
28916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28917
28918  path="$ipath"
28919  has_colon=`$ECHO $path | $GREP ^.:`
28920  new_path="$path"
28921  if test "x$has_colon" = x; then
28922    # Not in mixed or Windows style, start by that.
28923    new_path=`cmd //c echo $path`
28924  fi
28925
28926
28927  input_path="$new_path"
28928  # Check if we need to convert this using DOS-style short mode. If the path
28929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28930  # take no chances and rewrite it.
28931  # Note: m4 eats our [], so we need to use [ and ] instead.
28932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28933  if test "x$has_forbidden_chars" != x; then
28934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28936  fi
28937
28938
28939  windows_path="$new_path"
28940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28941    unix_path=`$CYGPATH -u "$windows_path"`
28942    new_path="$unix_path"
28943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28945    new_path="$unix_path"
28946  fi
28947
28948  if test "x$path" != "x$new_path"; then
28949    ipath="$new_path"
28950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28951$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28952  fi
28953
28954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28956
28957    else
28958      # We're on a unix platform. Hooray! :)
28959      path="$ipath"
28960      has_space=`$ECHO "$path" | $GREP " "`
28961      if test "x$has_space" != x; then
28962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28963$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28965      fi
28966
28967      # Use eval to expand a potential ~
28968      eval path="$path"
28969      if test ! -f "$path" && test ! -d "$path"; then
28970        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28971      fi
28972
28973      ipath="`cd "$path"; $THEPWDCMD -L`"
28974    fi
28975  fi
28976
28977            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28978          fi
28979          IFS=";"
28980        fi
28981      done
28982      # Convert VS_LIB into SYSROOT_LDFLAGS
28983      for i in $VS_LIB; do
28984        libpath=$i
28985        # Only process non-empty elements
28986        if test "x$libpath" != x; then
28987          IFS="$OLDIFS"
28988          # Check that directory exists before calling fixup_path
28989          testpath=$libpath
28990
28991  windows_path="$testpath"
28992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28993    unix_path=`$CYGPATH -u "$windows_path"`
28994    testpath="$unix_path"
28995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28997    testpath="$unix_path"
28998  fi
28999
29000          if test -d "$testpath"; then
29001
29002  # Only process if variable expands to non-empty
29003
29004  if test "x$libpath" != x; then
29005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29006
29007  # Input might be given as Windows format, start by converting to
29008  # unix format.
29009  path="$libpath"
29010  new_path=`$CYGPATH -u "$path"`
29011
29012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29015  # "foo.exe" is OK but "foo" is an error.
29016  #
29017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29018  # It is also a way to make sure we got the proper file name for the real test later on.
29019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29020  if test "x$test_shortpath" = x; then
29021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
29022$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
29023    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
29024  fi
29025
29026  # Call helper function which possibly converts this using DOS-style short mode.
29027  # If so, the updated path is stored in $new_path.
29028
29029  input_path="$new_path"
29030  # Check if we need to convert this using DOS-style short mode. If the path
29031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29032  # take no chances and rewrite it.
29033  # Note: m4 eats our [], so we need to use [ and ] instead.
29034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29035  if test "x$has_forbidden_chars" != x; then
29036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29040      # Going to short mode and back again did indeed matter. Since short mode is
29041      # case insensitive, let's make it lowercase to improve readability.
29042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29043      # Now convert it back to Unix-style (cygpath)
29044      input_path=`$CYGPATH -u "$shortmode_path"`
29045      new_path="$input_path"
29046    fi
29047  fi
29048
29049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29050  if test "x$test_cygdrive_prefix" = x; then
29051    # As a simple fix, exclude /usr/bin since it's not a real path.
29052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29054      # a path prefixed by /cygdrive for fixpath to work.
29055      new_path="$CYGWIN_ROOT_PATH$input_path"
29056    fi
29057  fi
29058
29059
29060  if test "x$path" != "x$new_path"; then
29061    libpath="$new_path"
29062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
29063$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
29064  fi
29065
29066    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29067
29068  path="$libpath"
29069  has_colon=`$ECHO $path | $GREP ^.:`
29070  new_path="$path"
29071  if test "x$has_colon" = x; then
29072    # Not in mixed or Windows style, start by that.
29073    new_path=`cmd //c echo $path`
29074  fi
29075
29076
29077  input_path="$new_path"
29078  # Check if we need to convert this using DOS-style short mode. If the path
29079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29080  # take no chances and rewrite it.
29081  # Note: m4 eats our [], so we need to use [ and ] instead.
29082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29083  if test "x$has_forbidden_chars" != x; then
29084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29086  fi
29087
29088
29089  windows_path="$new_path"
29090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29091    unix_path=`$CYGPATH -u "$windows_path"`
29092    new_path="$unix_path"
29093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29095    new_path="$unix_path"
29096  fi
29097
29098  if test "x$path" != "x$new_path"; then
29099    libpath="$new_path"
29100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
29101$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
29102  fi
29103
29104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29106
29107    else
29108      # We're on a unix platform. Hooray! :)
29109      path="$libpath"
29110      has_space=`$ECHO "$path" | $GREP " "`
29111      if test "x$has_space" != x; then
29112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
29113$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
29114        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29115      fi
29116
29117      # Use eval to expand a potential ~
29118      eval path="$path"
29119      if test ! -f "$path" && test ! -d "$path"; then
29120        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
29121      fi
29122
29123      libpath="`cd "$path"; $THEPWDCMD -L`"
29124    fi
29125  fi
29126
29127            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
29128          fi
29129          IFS=";"
29130        fi
29131      done
29132      IFS="$OLDIFS"
29133    fi
29134  else
29135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29136$as_echo "not found" >&6; }
29137
29138    if test "x$VS_ENV_CMD" = x; then
29139      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
29140$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
29141      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
29142$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
29143    else
29144      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
29145$as_echo "$as_me: Running the extraction script failed." >&6;}
29146    fi
29147    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
29148$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
29149    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
29150$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
29151    as_fn_error $? "Cannot continue" "$LINENO" 5
29152  fi
29153
29154    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
29155    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
29156    PATH="$VS_PATH"
29157    # The microsoft toolchain also requires INCLUDE and LIB to be set.
29158    export INCLUDE="$VS_INCLUDE"
29159    export LIB="$VS_LIB"
29160  fi
29161
29162  # For solaris we really need solaris tools, and not the GNU equivalent.
29163  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
29164  # so add that to path before starting to probe.
29165  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
29166  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
29167    PATH="/usr/ccs/bin:$PATH"
29168  fi
29169
29170  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
29171  # override all other locations.
29172  if test "x$TOOLCHAIN_PATH" != x; then
29173    PATH=$TOOLCHAIN_PATH:$PATH
29174  fi
29175
29176
29177  #
29178  # Setup the compilers (CC and CXX)
29179  #
29180
29181  COMPILER_NAME=C
29182  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
29183
29184  if test "x$CC" != x; then
29185    # User has supplied compiler name already, always let that override.
29186    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
29187$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
29188    if test "x`basename $CC`" = "x$CC"; then
29189      # A command without a complete path is provided, search $PATH.
29190
29191      for ac_prog in $CC
29192do
29193  # Extract the first word of "$ac_prog", so it can be a program name with args.
29194set dummy $ac_prog; ac_word=$2
29195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29196$as_echo_n "checking for $ac_word... " >&6; }
29197if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29198  $as_echo_n "(cached) " >&6
29199else
29200  case $POTENTIAL_CC in
29201  [\\/]* | ?:[\\/]*)
29202  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29203  ;;
29204  *)
29205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29206for as_dir in $PATH
29207do
29208  IFS=$as_save_IFS
29209  test -z "$as_dir" && as_dir=.
29210    for ac_exec_ext in '' $ac_executable_extensions; do
29211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29212    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29214    break 2
29215  fi
29216done
29217  done
29218IFS=$as_save_IFS
29219
29220  ;;
29221esac
29222fi
29223POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29224if test -n "$POTENTIAL_CC"; then
29225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29226$as_echo "$POTENTIAL_CC" >&6; }
29227else
29228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29229$as_echo "no" >&6; }
29230fi
29231
29232
29233  test -n "$POTENTIAL_CC" && break
29234done
29235
29236      if test "x$POTENTIAL_CC" != x; then
29237        CC=$POTENTIAL_CC
29238      else
29239        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
29240      fi
29241    else
29242      # Otherwise it might already be a complete path
29243      if test ! -x "$CC"; then
29244        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
29245      fi
29246    fi
29247  else
29248    # No user supplied value. Locate compiler ourselves.
29249
29250    # If we are cross compiling, assume cross compilation tools follows the
29251    # cross compilation standard where they are prefixed with the autoconf
29252    # standard name for the target. For example the binary
29253    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29254    # If we are not cross compiling, then the default compiler name will be
29255    # used.
29256
29257    CC=
29258    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29259    # before checking the rest of the PATH.
29260    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29261    # step, this should not be necessary.
29262    if test -n "$TOOLCHAIN_PATH"; then
29263      PATH_save="$PATH"
29264      PATH="$TOOLCHAIN_PATH"
29265      for ac_prog in $SEARCH_LIST
29266do
29267  # Extract the first word of "$ac_prog", so it can be a program name with args.
29268set dummy $ac_prog; ac_word=$2
29269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29270$as_echo_n "checking for $ac_word... " >&6; }
29271if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
29272  $as_echo_n "(cached) " >&6
29273else
29274  case $TOOLCHAIN_PATH_CC in
29275  [\\/]* | ?:[\\/]*)
29276  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
29277  ;;
29278  *)
29279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29280for as_dir in $PATH
29281do
29282  IFS=$as_save_IFS
29283  test -z "$as_dir" && as_dir=.
29284    for ac_exec_ext in '' $ac_executable_extensions; do
29285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29286    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
29287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29288    break 2
29289  fi
29290done
29291  done
29292IFS=$as_save_IFS
29293
29294  ;;
29295esac
29296fi
29297TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
29298if test -n "$TOOLCHAIN_PATH_CC"; then
29299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
29300$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
29301else
29302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29303$as_echo "no" >&6; }
29304fi
29305
29306
29307  test -n "$TOOLCHAIN_PATH_CC" && break
29308done
29309
29310      CC=$TOOLCHAIN_PATH_CC
29311      PATH="$PATH_save"
29312    fi
29313
29314    # AC_PATH_PROGS can't be run multiple times with the same variable,
29315    # so create a new name for this run.
29316    if test "x$CC" = x; then
29317      for ac_prog in $SEARCH_LIST
29318do
29319  # Extract the first word of "$ac_prog", so it can be a program name with args.
29320set dummy $ac_prog; ac_word=$2
29321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29322$as_echo_n "checking for $ac_word... " >&6; }
29323if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29324  $as_echo_n "(cached) " >&6
29325else
29326  case $POTENTIAL_CC in
29327  [\\/]* | ?:[\\/]*)
29328  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29329  ;;
29330  *)
29331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29332for as_dir in $PATH
29333do
29334  IFS=$as_save_IFS
29335  test -z "$as_dir" && as_dir=.
29336    for ac_exec_ext in '' $ac_executable_extensions; do
29337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29338    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29340    break 2
29341  fi
29342done
29343  done
29344IFS=$as_save_IFS
29345
29346  ;;
29347esac
29348fi
29349POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29350if test -n "$POTENTIAL_CC"; then
29351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29352$as_echo "$POTENTIAL_CC" >&6; }
29353else
29354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29355$as_echo "no" >&6; }
29356fi
29357
29358
29359  test -n "$POTENTIAL_CC" && break
29360done
29361
29362      CC=$POTENTIAL_CC
29363    fi
29364
29365    if test "x$CC" = x; then
29366
29367  # Print a helpful message on how to acquire the necessary build dependency.
29368  # devkit is the help tag: freetype, cups, alsa etc
29369  MISSING_DEPENDENCY=devkit
29370
29371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29372    cygwin_help $MISSING_DEPENDENCY
29373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29374    msys_help $MISSING_DEPENDENCY
29375  else
29376    PKGHANDLER_COMMAND=
29377
29378    case $PKGHANDLER in
29379      apt-get)
29380        apt_help     $MISSING_DEPENDENCY ;;
29381      yum)
29382        yum_help     $MISSING_DEPENDENCY ;;
29383      port)
29384        port_help    $MISSING_DEPENDENCY ;;
29385      pkgutil)
29386        pkgutil_help $MISSING_DEPENDENCY ;;
29387      pkgadd)
29388        pkgadd_help  $MISSING_DEPENDENCY ;;
29389    esac
29390
29391    if test "x$PKGHANDLER_COMMAND" != x; then
29392      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29393    fi
29394  fi
29395
29396      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29397    fi
29398  fi
29399
29400  # Now we have a compiler binary in CC. Make sure it's okay.
29401
29402  # Only process if variable expands to non-empty
29403
29404  if test "x$CC" != x; then
29405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29406
29407  # First separate the path from the arguments. This will split at the first
29408  # space.
29409  complete="$CC"
29410  path="${complete%% *}"
29411  tmp="$complete EOL"
29412  arguments="${tmp#* }"
29413
29414  # Input might be given as Windows format, start by converting to
29415  # unix format.
29416  new_path=`$CYGPATH -u "$path"`
29417
29418  # Now try to locate executable using which
29419  new_path=`$WHICH "$new_path" 2> /dev/null`
29420  # bat and cmd files are not always considered executable in cygwin causing which
29421  # to not find them
29422  if test "x$new_path" = x \
29423      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29424      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29425    new_path=`$CYGPATH -u "$path"`
29426  fi
29427  if test "x$new_path" = x; then
29428    # Oops. Which didn't find the executable.
29429    # The splitting of arguments from the executable at a space might have been incorrect,
29430    # since paths with space are more likely in Windows. Give it another try with the whole
29431    # argument.
29432    path="$complete"
29433    arguments="EOL"
29434    new_path=`$CYGPATH -u "$path"`
29435    new_path=`$WHICH "$new_path" 2> /dev/null`
29436    # bat and cmd files are not always considered executable in cygwin causing which
29437    # to not find them
29438    if test "x$new_path" = x \
29439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29441      new_path=`$CYGPATH -u "$path"`
29442    fi
29443    if test "x$new_path" = x; then
29444      # It's still not found. Now this is an unrecoverable error.
29445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29446$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29447      has_space=`$ECHO "$complete" | $GREP " "`
29448      if test "x$has_space" != x; then
29449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29451      fi
29452      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29453    fi
29454  fi
29455
29456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29459  # "foo.exe" is OK but "foo" is an error.
29460  #
29461  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29462  # It is also a way to make sure we got the proper file name for the real test later on.
29463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29464  if test "x$test_shortpath" = x; then
29465    # Short path failed, file does not exist as specified.
29466    # Try adding .exe or .cmd
29467    if test -f "${new_path}.exe"; then
29468      input_to_shortpath="${new_path}.exe"
29469    elif test -f "${new_path}.cmd"; then
29470      input_to_shortpath="${new_path}.cmd"
29471    else
29472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29473$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29476      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29477    fi
29478  else
29479    input_to_shortpath="$new_path"
29480  fi
29481
29482  # Call helper function which possibly converts this using DOS-style short mode.
29483  # If so, the updated path is stored in $new_path.
29484  new_path="$input_to_shortpath"
29485
29486  input_path="$input_to_shortpath"
29487  # Check if we need to convert this using DOS-style short mode. If the path
29488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29489  # take no chances and rewrite it.
29490  # Note: m4 eats our [], so we need to use [ and ] instead.
29491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29492  if test "x$has_forbidden_chars" != x; then
29493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29497      # Going to short mode and back again did indeed matter. Since short mode is
29498      # case insensitive, let's make it lowercase to improve readability.
29499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29500      # Now convert it back to Unix-style (cygpath)
29501      input_path=`$CYGPATH -u "$shortmode_path"`
29502      new_path="$input_path"
29503    fi
29504  fi
29505
29506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29507  if test "x$test_cygdrive_prefix" = x; then
29508    # As a simple fix, exclude /usr/bin since it's not a real path.
29509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29511      # a path prefixed by /cygdrive for fixpath to work.
29512      new_path="$CYGWIN_ROOT_PATH$input_path"
29513    fi
29514  fi
29515
29516  # remove trailing .exe if any
29517  new_path="${new_path/%.exe/}"
29518
29519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29520
29521  # First separate the path from the arguments. This will split at the first
29522  # space.
29523  complete="$CC"
29524  path="${complete%% *}"
29525  tmp="$complete EOL"
29526  arguments="${tmp#* }"
29527
29528  # Input might be given as Windows format, start by converting to
29529  # unix format.
29530  new_path="$path"
29531
29532  windows_path="$new_path"
29533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29534    unix_path=`$CYGPATH -u "$windows_path"`
29535    new_path="$unix_path"
29536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29538    new_path="$unix_path"
29539  fi
29540
29541
29542  # Now try to locate executable using which
29543  new_path=`$WHICH "$new_path" 2> /dev/null`
29544
29545  if test "x$new_path" = x; then
29546    # Oops. Which didn't find the executable.
29547    # The splitting of arguments from the executable at a space might have been incorrect,
29548    # since paths with space are more likely in Windows. Give it another try with the whole
29549    # argument.
29550    path="$complete"
29551    arguments="EOL"
29552    new_path="$path"
29553
29554  windows_path="$new_path"
29555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29556    unix_path=`$CYGPATH -u "$windows_path"`
29557    new_path="$unix_path"
29558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29560    new_path="$unix_path"
29561  fi
29562
29563
29564    new_path=`$WHICH "$new_path" 2> /dev/null`
29565    # bat and cmd files are not always considered executable in MSYS causing which
29566    # to not find them
29567    if test "x$new_path" = x \
29568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29570      new_path="$path"
29571
29572  windows_path="$new_path"
29573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29574    unix_path=`$CYGPATH -u "$windows_path"`
29575    new_path="$unix_path"
29576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29578    new_path="$unix_path"
29579  fi
29580
29581    fi
29582
29583    if test "x$new_path" = x; then
29584      # It's still not found. Now this is an unrecoverable error.
29585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29586$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29587      has_space=`$ECHO "$complete" | $GREP " "`
29588      if test "x$has_space" != x; then
29589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29591      fi
29592      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29593    fi
29594  fi
29595
29596  # Now new_path has a complete unix path to the binary
29597  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29598    # Keep paths in /bin as-is, but remove trailing .exe if any
29599    new_path="${new_path/%.exe/}"
29600    # Do not save /bin paths to all_fixpath_prefixes!
29601  else
29602    # Not in mixed or Windows style, start by that.
29603    new_path=`cmd //c echo $new_path`
29604
29605  input_path="$new_path"
29606  # Check if we need to convert this using DOS-style short mode. If the path
29607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29608  # take no chances and rewrite it.
29609  # Note: m4 eats our [], so we need to use [ and ] instead.
29610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29611  if test "x$has_forbidden_chars" != x; then
29612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29614  fi
29615
29616    # Output is in $new_path
29617
29618  windows_path="$new_path"
29619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29620    unix_path=`$CYGPATH -u "$windows_path"`
29621    new_path="$unix_path"
29622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29624    new_path="$unix_path"
29625  fi
29626
29627    # remove trailing .exe if any
29628    new_path="${new_path/%.exe/}"
29629
29630    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29631    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29632  fi
29633
29634    else
29635      # We're on a unix platform. Hooray! :)
29636      # First separate the path from the arguments. This will split at the first
29637      # space.
29638      complete="$CC"
29639      path="${complete%% *}"
29640      tmp="$complete EOL"
29641      arguments="${tmp#* }"
29642
29643      # Cannot rely on the command "which" here since it doesn't always work.
29644      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29645      if test -z "$is_absolute_path"; then
29646        # Path to executable is not absolute. Find it.
29647        IFS_save="$IFS"
29648        IFS=:
29649        for p in $PATH; do
29650          if test -f "$p/$path" && test -x "$p/$path"; then
29651            new_path="$p/$path"
29652            break
29653          fi
29654        done
29655        IFS="$IFS_save"
29656      else
29657        # This is an absolute path, we can use it without further modifications.
29658        new_path="$path"
29659      fi
29660
29661      if test "x$new_path" = x; then
29662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29663$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29664        has_space=`$ECHO "$complete" | $GREP " "`
29665        if test "x$has_space" != x; then
29666          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29668        fi
29669        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29670      fi
29671    fi
29672
29673    # Now join together the path and the arguments once again
29674    if test "x$arguments" != xEOL; then
29675      new_complete="$new_path ${arguments% *}"
29676    else
29677      new_complete="$new_path"
29678    fi
29679
29680    if test "x$complete" != "x$new_complete"; then
29681      CC="$new_complete"
29682      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29683$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29684    fi
29685  fi
29686
29687  TEST_COMPILER="$CC"
29688  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29689  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29690  if test "x$OPENJDK_BUILD_OS" != xaix; then
29691    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29693$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29694
29695  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29696    # Follow a chain of symbolic links. Use readlink
29697    # where it exists, else fall back to horribly
29698    # complicated shell code.
29699    if test "x$READLINK_TESTED" != yes; then
29700      # On MacOSX there is a readlink tool with a different
29701      # purpose than the GNU readlink tool. Check the found readlink.
29702      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29703      if test "x$ISGNU" = x; then
29704        # A readlink that we do not know how to use.
29705        # Are there other non-GNU readlinks out there?
29706        READLINK_TESTED=yes
29707        READLINK=
29708      fi
29709    fi
29710
29711    if test "x$READLINK" != x; then
29712      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29713    else
29714      # Save the current directory for restoring afterwards
29715      STARTDIR=$PWD
29716      COUNTER=0
29717      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29718      sym_link_file=`$BASENAME $TEST_COMPILER`
29719      cd $sym_link_dir
29720      # Use -P flag to resolve symlinks in directories.
29721      cd `$THEPWDCMD -P`
29722      sym_link_dir=`$THEPWDCMD -P`
29723      # Resolve file symlinks
29724      while test $COUNTER -lt 20; do
29725        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29726        if test "x$ISLINK" == x; then
29727          # This is not a symbolic link! We are done!
29728          break
29729        fi
29730        # Again resolve directory symlinks since the target of the just found
29731        # link could be in a different directory
29732        cd `$DIRNAME $ISLINK`
29733        sym_link_dir=`$THEPWDCMD -P`
29734        sym_link_file=`$BASENAME $ISLINK`
29735        let COUNTER=COUNTER+1
29736      done
29737      cd $STARTDIR
29738      TEST_COMPILER=$sym_link_dir/$sym_link_file
29739    fi
29740  fi
29741
29742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29743$as_echo "$TEST_COMPILER" >&6; }
29744  fi
29745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29746$as_echo_n "checking if CC is disguised ccache... " >&6; }
29747
29748  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29749  if test "x$COMPILER_BASENAME" = "xccache"; then
29750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29751$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29752    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29753    # We want to control ccache invocation ourselves, so ignore this cc and try
29754    # searching again.
29755
29756    # Remove the path to the fake ccache cc from the PATH
29757    RETRY_COMPILER_SAVED_PATH="$PATH"
29758    COMPILER_DIRNAME=`$DIRNAME $CC`
29759    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29760
29761    # Try again looking for our compiler
29762    if test -n "$ac_tool_prefix"; then
29763  for ac_prog in $TOOLCHAIN_CC_BINARY
29764  do
29765    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29766set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29768$as_echo_n "checking for $ac_word... " >&6; }
29769if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29770  $as_echo_n "(cached) " >&6
29771else
29772  if test -n "$PROPER_COMPILER_CC"; then
29773  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29774else
29775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29776for as_dir in $PATH
29777do
29778  IFS=$as_save_IFS
29779  test -z "$as_dir" && as_dir=.
29780    for ac_exec_ext in '' $ac_executable_extensions; do
29781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29782    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29784    break 2
29785  fi
29786done
29787  done
29788IFS=$as_save_IFS
29789
29790fi
29791fi
29792PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29793if test -n "$PROPER_COMPILER_CC"; then
29794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29795$as_echo "$PROPER_COMPILER_CC" >&6; }
29796else
29797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29798$as_echo "no" >&6; }
29799fi
29800
29801
29802    test -n "$PROPER_COMPILER_CC" && break
29803  done
29804fi
29805if test -z "$PROPER_COMPILER_CC"; then
29806  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29807  for ac_prog in $TOOLCHAIN_CC_BINARY
29808do
29809  # Extract the first word of "$ac_prog", so it can be a program name with args.
29810set dummy $ac_prog; ac_word=$2
29811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29812$as_echo_n "checking for $ac_word... " >&6; }
29813if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29814  $as_echo_n "(cached) " >&6
29815else
29816  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29817  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29818else
29819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29820for as_dir in $PATH
29821do
29822  IFS=$as_save_IFS
29823  test -z "$as_dir" && as_dir=.
29824    for ac_exec_ext in '' $ac_executable_extensions; do
29825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29826    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29828    break 2
29829  fi
29830done
29831  done
29832IFS=$as_save_IFS
29833
29834fi
29835fi
29836ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29837if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29839$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29840else
29841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29842$as_echo "no" >&6; }
29843fi
29844
29845
29846  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29847done
29848
29849  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29850    PROPER_COMPILER_CC=""
29851  else
29852    case $cross_compiling:$ac_tool_warned in
29853yes:)
29854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29856ac_tool_warned=yes ;;
29857esac
29858    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29859  fi
29860fi
29861
29862
29863  # Only process if variable expands to non-empty
29864
29865  if test "x$PROPER_COMPILER_CC" != x; then
29866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29867
29868  # First separate the path from the arguments. This will split at the first
29869  # space.
29870  complete="$PROPER_COMPILER_CC"
29871  path="${complete%% *}"
29872  tmp="$complete EOL"
29873  arguments="${tmp#* }"
29874
29875  # Input might be given as Windows format, start by converting to
29876  # unix format.
29877  new_path=`$CYGPATH -u "$path"`
29878
29879  # Now try to locate executable using which
29880  new_path=`$WHICH "$new_path" 2> /dev/null`
29881  # bat and cmd files are not always considered executable in cygwin causing which
29882  # to not find them
29883  if test "x$new_path" = x \
29884      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29885      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29886    new_path=`$CYGPATH -u "$path"`
29887  fi
29888  if test "x$new_path" = x; then
29889    # Oops. Which didn't find the executable.
29890    # The splitting of arguments from the executable at a space might have been incorrect,
29891    # since paths with space are more likely in Windows. Give it another try with the whole
29892    # argument.
29893    path="$complete"
29894    arguments="EOL"
29895    new_path=`$CYGPATH -u "$path"`
29896    new_path=`$WHICH "$new_path" 2> /dev/null`
29897    # bat and cmd files are not always considered executable in cygwin causing which
29898    # to not find them
29899    if test "x$new_path" = x \
29900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29902      new_path=`$CYGPATH -u "$path"`
29903    fi
29904    if test "x$new_path" = x; then
29905      # It's still not found. Now this is an unrecoverable error.
29906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29907$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29908      has_space=`$ECHO "$complete" | $GREP " "`
29909      if test "x$has_space" != x; then
29910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29912      fi
29913      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29914    fi
29915  fi
29916
29917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29920  # "foo.exe" is OK but "foo" is an error.
29921  #
29922  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29923  # It is also a way to make sure we got the proper file name for the real test later on.
29924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29925  if test "x$test_shortpath" = x; then
29926    # Short path failed, file does not exist as specified.
29927    # Try adding .exe or .cmd
29928    if test -f "${new_path}.exe"; then
29929      input_to_shortpath="${new_path}.exe"
29930    elif test -f "${new_path}.cmd"; then
29931      input_to_shortpath="${new_path}.cmd"
29932    else
29933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29934$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29937      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29938    fi
29939  else
29940    input_to_shortpath="$new_path"
29941  fi
29942
29943  # Call helper function which possibly converts this using DOS-style short mode.
29944  # If so, the updated path is stored in $new_path.
29945  new_path="$input_to_shortpath"
29946
29947  input_path="$input_to_shortpath"
29948  # Check if we need to convert this using DOS-style short mode. If the path
29949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29950  # take no chances and rewrite it.
29951  # Note: m4 eats our [], so we need to use [ and ] instead.
29952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29953  if test "x$has_forbidden_chars" != x; then
29954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29958      # Going to short mode and back again did indeed matter. Since short mode is
29959      # case insensitive, let's make it lowercase to improve readability.
29960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29961      # Now convert it back to Unix-style (cygpath)
29962      input_path=`$CYGPATH -u "$shortmode_path"`
29963      new_path="$input_path"
29964    fi
29965  fi
29966
29967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29968  if test "x$test_cygdrive_prefix" = x; then
29969    # As a simple fix, exclude /usr/bin since it's not a real path.
29970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29972      # a path prefixed by /cygdrive for fixpath to work.
29973      new_path="$CYGWIN_ROOT_PATH$input_path"
29974    fi
29975  fi
29976
29977  # remove trailing .exe if any
29978  new_path="${new_path/%.exe/}"
29979
29980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29981
29982  # First separate the path from the arguments. This will split at the first
29983  # space.
29984  complete="$PROPER_COMPILER_CC"
29985  path="${complete%% *}"
29986  tmp="$complete EOL"
29987  arguments="${tmp#* }"
29988
29989  # Input might be given as Windows format, start by converting to
29990  # unix format.
29991  new_path="$path"
29992
29993  windows_path="$new_path"
29994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29995    unix_path=`$CYGPATH -u "$windows_path"`
29996    new_path="$unix_path"
29997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29999    new_path="$unix_path"
30000  fi
30001
30002
30003  # Now try to locate executable using which
30004  new_path=`$WHICH "$new_path" 2> /dev/null`
30005
30006  if test "x$new_path" = x; then
30007    # Oops. Which didn't find the executable.
30008    # The splitting of arguments from the executable at a space might have been incorrect,
30009    # since paths with space are more likely in Windows. Give it another try with the whole
30010    # argument.
30011    path="$complete"
30012    arguments="EOL"
30013    new_path="$path"
30014
30015  windows_path="$new_path"
30016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30017    unix_path=`$CYGPATH -u "$windows_path"`
30018    new_path="$unix_path"
30019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30021    new_path="$unix_path"
30022  fi
30023
30024
30025    new_path=`$WHICH "$new_path" 2> /dev/null`
30026    # bat and cmd files are not always considered executable in MSYS causing which
30027    # to not find them
30028    if test "x$new_path" = x \
30029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30031      new_path="$path"
30032
30033  windows_path="$new_path"
30034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30035    unix_path=`$CYGPATH -u "$windows_path"`
30036    new_path="$unix_path"
30037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30039    new_path="$unix_path"
30040  fi
30041
30042    fi
30043
30044    if test "x$new_path" = x; then
30045      # It's still not found. Now this is an unrecoverable error.
30046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30047$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30048      has_space=`$ECHO "$complete" | $GREP " "`
30049      if test "x$has_space" != x; then
30050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30052      fi
30053      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30054    fi
30055  fi
30056
30057  # Now new_path has a complete unix path to the binary
30058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30059    # Keep paths in /bin as-is, but remove trailing .exe if any
30060    new_path="${new_path/%.exe/}"
30061    # Do not save /bin paths to all_fixpath_prefixes!
30062  else
30063    # Not in mixed or Windows style, start by that.
30064    new_path=`cmd //c echo $new_path`
30065
30066  input_path="$new_path"
30067  # Check if we need to convert this using DOS-style short mode. If the path
30068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30069  # take no chances and rewrite it.
30070  # Note: m4 eats our [], so we need to use [ and ] instead.
30071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30072  if test "x$has_forbidden_chars" != x; then
30073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30075  fi
30076
30077    # Output is in $new_path
30078
30079  windows_path="$new_path"
30080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30081    unix_path=`$CYGPATH -u "$windows_path"`
30082    new_path="$unix_path"
30083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30085    new_path="$unix_path"
30086  fi
30087
30088    # remove trailing .exe if any
30089    new_path="${new_path/%.exe/}"
30090
30091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30093  fi
30094
30095    else
30096      # We're on a unix platform. Hooray! :)
30097      # First separate the path from the arguments. This will split at the first
30098      # space.
30099      complete="$PROPER_COMPILER_CC"
30100      path="${complete%% *}"
30101      tmp="$complete EOL"
30102      arguments="${tmp#* }"
30103
30104      # Cannot rely on the command "which" here since it doesn't always work.
30105      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30106      if test -z "$is_absolute_path"; then
30107        # Path to executable is not absolute. Find it.
30108        IFS_save="$IFS"
30109        IFS=:
30110        for p in $PATH; do
30111          if test -f "$p/$path" && test -x "$p/$path"; then
30112            new_path="$p/$path"
30113            break
30114          fi
30115        done
30116        IFS="$IFS_save"
30117      else
30118        # This is an absolute path, we can use it without further modifications.
30119        new_path="$path"
30120      fi
30121
30122      if test "x$new_path" = x; then
30123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30124$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30125        has_space=`$ECHO "$complete" | $GREP " "`
30126        if test "x$has_space" != x; then
30127          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30129        fi
30130        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30131      fi
30132    fi
30133
30134    # Now join together the path and the arguments once again
30135    if test "x$arguments" != xEOL; then
30136      new_complete="$new_path ${arguments% *}"
30137    else
30138      new_complete="$new_path"
30139    fi
30140
30141    if test "x$complete" != "x$new_complete"; then
30142      PROPER_COMPILER_CC="$new_complete"
30143      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
30144$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
30145    fi
30146  fi
30147
30148    PATH="$RETRY_COMPILER_SAVED_PATH"
30149
30150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
30151$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
30152
30153  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30154    # Follow a chain of symbolic links. Use readlink
30155    # where it exists, else fall back to horribly
30156    # complicated shell code.
30157    if test "x$READLINK_TESTED" != yes; then
30158      # On MacOSX there is a readlink tool with a different
30159      # purpose than the GNU readlink tool. Check the found readlink.
30160      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30161      if test "x$ISGNU" = x; then
30162        # A readlink that we do not know how to use.
30163        # Are there other non-GNU readlinks out there?
30164        READLINK_TESTED=yes
30165        READLINK=
30166      fi
30167    fi
30168
30169    if test "x$READLINK" != x; then
30170      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
30171    else
30172      # Save the current directory for restoring afterwards
30173      STARTDIR=$PWD
30174      COUNTER=0
30175      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
30176      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
30177      cd $sym_link_dir
30178      # Use -P flag to resolve symlinks in directories.
30179      cd `$THEPWDCMD -P`
30180      sym_link_dir=`$THEPWDCMD -P`
30181      # Resolve file symlinks
30182      while test $COUNTER -lt 20; do
30183        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30184        if test "x$ISLINK" == x; then
30185          # This is not a symbolic link! We are done!
30186          break
30187        fi
30188        # Again resolve directory symlinks since the target of the just found
30189        # link could be in a different directory
30190        cd `$DIRNAME $ISLINK`
30191        sym_link_dir=`$THEPWDCMD -P`
30192        sym_link_file=`$BASENAME $ISLINK`
30193        let COUNTER=COUNTER+1
30194      done
30195      cd $STARTDIR
30196      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
30197    fi
30198  fi
30199
30200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
30201$as_echo "$PROPER_COMPILER_CC" >&6; }
30202    CC="$PROPER_COMPILER_CC"
30203  else
30204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
30205$as_echo "no, keeping CC" >&6; }
30206  fi
30207
30208
30209  COMPILER=$CC
30210  COMPILER_NAME=$COMPILER_NAME
30211
30212  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30213    # cc -V output typically looks like
30214    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30215    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30216    # Check that this is likely to be the Solaris Studio cc.
30217    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30218    if test $? -ne 0; then
30219      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30220      { $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
30221$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30222      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30223$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30224      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30225$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30226      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30227    fi
30228    # Remove usage instructions (if present), and
30229    # collapse compiler output into a single line
30230    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30231        $SED -e 's/ *[Uu]sage:.*//'`
30232    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30233        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30234  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30235    # xlc -qversion output typically looks like
30236    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30237    #     Version: 11.01.0000.0015
30238    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30239    # Check that this is likely to be the IBM XL C compiler.
30240    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30241    if test $? -ne 0; then
30242      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30243      { $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
30244$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30245      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30246$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30247      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30248$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30249      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30250    fi
30251    # Collapse compiler output into a single line
30252    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30253    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30254        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30255  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30256    # There is no specific version flag, but all output starts with a version string.
30257    # First line typically looks something like:
30258    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30259    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30260    # Check that this is likely to be Microsoft CL.EXE.
30261    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30262    if test $? -ne 0; then
30263      { $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
30264$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30265      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30266$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30267      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30268    fi
30269    # Collapse compiler output into a single line
30270    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30271    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30272        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30273  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30274    # gcc --version output typically looks like
30275    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30276    #     Copyright (C) 2013 Free Software Foundation, Inc.
30277    #     This is free software; see the source for copying conditions.  There is NO
30278    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30279    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30280    # Check that this is likely to be GCC.
30281    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30282    if test $? -ne 0; then
30283      { $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
30284$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30285      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30286$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30287      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30288    fi
30289    # Remove Copyright and legalese from version string, and
30290    # collapse into a single line
30291    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30292        $SED -e 's/ *Copyright .*//'`
30293    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30294        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30295  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30296    # clang --version output typically looks like
30297    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30298    #    clang version 3.3 (tags/RELEASE_33/final)
30299    # or
30300    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30301    #    Target: x86_64-pc-linux-gnu
30302    #    Thread model: posix
30303    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30304    # Check that this is likely to be clang
30305    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30306    if test $? -ne 0; then
30307      { $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
30308$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30309      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30310$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30311      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30312    fi
30313    # Collapse compiler output into a single line
30314    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30315    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30316        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30317  else
30318      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30319  fi
30320  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30321  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30322  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30323  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
30324
30325  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30326$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30327
30328
30329  # Now that we have resolved CC ourself, let autoconf have its go at it
30330  ac_ext=c
30331ac_cpp='$CPP $CPPFLAGS'
30332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30334ac_compiler_gnu=$ac_cv_c_compiler_gnu
30335if test -n "$ac_tool_prefix"; then
30336  for ac_prog in $CC
30337  do
30338    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30339set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30341$as_echo_n "checking for $ac_word... " >&6; }
30342if ${ac_cv_prog_CC+:} false; then :
30343  $as_echo_n "(cached) " >&6
30344else
30345  if test -n "$CC"; then
30346  ac_cv_prog_CC="$CC" # Let the user override the test.
30347else
30348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30349for as_dir in $PATH
30350do
30351  IFS=$as_save_IFS
30352  test -z "$as_dir" && as_dir=.
30353    for ac_exec_ext in '' $ac_executable_extensions; do
30354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30355    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
30356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30357    break 2
30358  fi
30359done
30360  done
30361IFS=$as_save_IFS
30362
30363fi
30364fi
30365CC=$ac_cv_prog_CC
30366if test -n "$CC"; then
30367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
30368$as_echo "$CC" >&6; }
30369else
30370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30371$as_echo "no" >&6; }
30372fi
30373
30374
30375    test -n "$CC" && break
30376  done
30377fi
30378if test -z "$CC"; then
30379  ac_ct_CC=$CC
30380  for ac_prog in $CC
30381do
30382  # Extract the first word of "$ac_prog", so it can be a program name with args.
30383set dummy $ac_prog; ac_word=$2
30384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30385$as_echo_n "checking for $ac_word... " >&6; }
30386if ${ac_cv_prog_ac_ct_CC+:} false; then :
30387  $as_echo_n "(cached) " >&6
30388else
30389  if test -n "$ac_ct_CC"; then
30390  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
30391else
30392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30393for as_dir in $PATH
30394do
30395  IFS=$as_save_IFS
30396  test -z "$as_dir" && as_dir=.
30397    for ac_exec_ext in '' $ac_executable_extensions; do
30398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30399    ac_cv_prog_ac_ct_CC="$ac_prog"
30400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30401    break 2
30402  fi
30403done
30404  done
30405IFS=$as_save_IFS
30406
30407fi
30408fi
30409ac_ct_CC=$ac_cv_prog_ac_ct_CC
30410if test -n "$ac_ct_CC"; then
30411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
30412$as_echo "$ac_ct_CC" >&6; }
30413else
30414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30415$as_echo "no" >&6; }
30416fi
30417
30418
30419  test -n "$ac_ct_CC" && break
30420done
30421
30422  if test "x$ac_ct_CC" = x; then
30423    CC=""
30424  else
30425    case $cross_compiling:$ac_tool_warned in
30426yes:)
30427{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30428$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30429ac_tool_warned=yes ;;
30430esac
30431    CC=$ac_ct_CC
30432  fi
30433fi
30434
30435
30436test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30438as_fn_error $? "no acceptable C compiler found in \$PATH
30439See \`config.log' for more details" "$LINENO" 5; }
30440
30441# Provide some information about the compiler.
30442$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
30443set X $ac_compile
30444ac_compiler=$2
30445for ac_option in --version -v -V -qversion; do
30446  { { ac_try="$ac_compiler $ac_option >&5"
30447case "(($ac_try" in
30448  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30449  *) ac_try_echo=$ac_try;;
30450esac
30451eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30452$as_echo "$ac_try_echo"; } >&5
30453  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30454  ac_status=$?
30455  if test -s conftest.err; then
30456    sed '10a\
30457... rest of stderr output deleted ...
30458         10q' conftest.err >conftest.er1
30459    cat conftest.er1 >&5
30460  fi
30461  rm -f conftest.er1 conftest.err
30462  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30463  test $ac_status = 0; }
30464done
30465
30466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30467/* end confdefs.h.  */
30468
30469int
30470main ()
30471{
30472
30473  ;
30474  return 0;
30475}
30476_ACEOF
30477ac_clean_files_save=$ac_clean_files
30478ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30479# Try to create an executable without -o first, disregard a.out.
30480# It will help us diagnose broken compilers, and finding out an intuition
30481# of exeext.
30482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30483$as_echo_n "checking whether the C compiler works... " >&6; }
30484ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30485
30486# The possible output files:
30487ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30488
30489ac_rmfiles=
30490for ac_file in $ac_files
30491do
30492  case $ac_file in
30493    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30494    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30495  esac
30496done
30497rm -f $ac_rmfiles
30498
30499if { { ac_try="$ac_link_default"
30500case "(($ac_try" in
30501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30502  *) ac_try_echo=$ac_try;;
30503esac
30504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30505$as_echo "$ac_try_echo"; } >&5
30506  (eval "$ac_link_default") 2>&5
30507  ac_status=$?
30508  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30509  test $ac_status = 0; }; then :
30510  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30511# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30512# in a Makefile.  We should not override ac_cv_exeext if it was cached,
30513# so that the user can short-circuit this test for compilers unknown to
30514# Autoconf.
30515for ac_file in $ac_files ''
30516do
30517  test -f "$ac_file" || continue
30518  case $ac_file in
30519    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30520	;;
30521    [ab].out )
30522	# We found the default executable, but exeext='' is most
30523	# certainly right.
30524	break;;
30525    *.* )
30526	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30527	then :; else
30528	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30529	fi
30530	# We set ac_cv_exeext here because the later test for it is not
30531	# safe: cross compilers may not add the suffix if given an `-o'
30532	# argument, so we may need to know it at that point already.
30533	# Even if this section looks crufty: it has the advantage of
30534	# actually working.
30535	break;;
30536    * )
30537	break;;
30538  esac
30539done
30540test "$ac_cv_exeext" = no && ac_cv_exeext=
30541
30542else
30543  ac_file=''
30544fi
30545if test -z "$ac_file"; then :
30546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30547$as_echo "no" >&6; }
30548$as_echo "$as_me: failed program was:" >&5
30549sed 's/^/| /' conftest.$ac_ext >&5
30550
30551{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30552$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30553as_fn_error 77 "C compiler cannot create executables
30554See \`config.log' for more details" "$LINENO" 5; }
30555else
30556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30557$as_echo "yes" >&6; }
30558fi
30559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30560$as_echo_n "checking for C compiler default output file name... " >&6; }
30561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30562$as_echo "$ac_file" >&6; }
30563ac_exeext=$ac_cv_exeext
30564
30565rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30566ac_clean_files=$ac_clean_files_save
30567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30568$as_echo_n "checking for suffix of executables... " >&6; }
30569if { { ac_try="$ac_link"
30570case "(($ac_try" in
30571  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30572  *) ac_try_echo=$ac_try;;
30573esac
30574eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30575$as_echo "$ac_try_echo"; } >&5
30576  (eval "$ac_link") 2>&5
30577  ac_status=$?
30578  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30579  test $ac_status = 0; }; then :
30580  # If both `conftest.exe' and `conftest' are `present' (well, observable)
30581# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30582# work properly (i.e., refer to `conftest.exe'), while it won't with
30583# `rm'.
30584for ac_file in conftest.exe conftest conftest.*; do
30585  test -f "$ac_file" || continue
30586  case $ac_file in
30587    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30588    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30589	  break;;
30590    * ) break;;
30591  esac
30592done
30593else
30594  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30596as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30597See \`config.log' for more details" "$LINENO" 5; }
30598fi
30599rm -f conftest conftest$ac_cv_exeext
30600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30601$as_echo "$ac_cv_exeext" >&6; }
30602
30603rm -f conftest.$ac_ext
30604EXEEXT=$ac_cv_exeext
30605ac_exeext=$EXEEXT
30606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30607/* end confdefs.h.  */
30608#include <stdio.h>
30609int
30610main ()
30611{
30612FILE *f = fopen ("conftest.out", "w");
30613 return ferror (f) || fclose (f) != 0;
30614
30615  ;
30616  return 0;
30617}
30618_ACEOF
30619ac_clean_files="$ac_clean_files conftest.out"
30620# Check that the compiler produces executables we can run.  If not, either
30621# the compiler is broken, or we cross compile.
30622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30623$as_echo_n "checking whether we are cross compiling... " >&6; }
30624if test "$cross_compiling" != yes; then
30625  { { ac_try="$ac_link"
30626case "(($ac_try" in
30627  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30628  *) ac_try_echo=$ac_try;;
30629esac
30630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30631$as_echo "$ac_try_echo"; } >&5
30632  (eval "$ac_link") 2>&5
30633  ac_status=$?
30634  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30635  test $ac_status = 0; }
30636  if { ac_try='./conftest$ac_cv_exeext'
30637  { { case "(($ac_try" in
30638  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30639  *) ac_try_echo=$ac_try;;
30640esac
30641eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30642$as_echo "$ac_try_echo"; } >&5
30643  (eval "$ac_try") 2>&5
30644  ac_status=$?
30645  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30646  test $ac_status = 0; }; }; then
30647    cross_compiling=no
30648  else
30649    if test "$cross_compiling" = maybe; then
30650	cross_compiling=yes
30651    else
30652	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30654as_fn_error $? "cannot run C compiled programs.
30655If you meant to cross compile, use \`--host'.
30656See \`config.log' for more details" "$LINENO" 5; }
30657    fi
30658  fi
30659fi
30660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30661$as_echo "$cross_compiling" >&6; }
30662
30663rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30664ac_clean_files=$ac_clean_files_save
30665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30666$as_echo_n "checking for suffix of object files... " >&6; }
30667if ${ac_cv_objext+:} false; then :
30668  $as_echo_n "(cached) " >&6
30669else
30670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30671/* end confdefs.h.  */
30672
30673int
30674main ()
30675{
30676
30677  ;
30678  return 0;
30679}
30680_ACEOF
30681rm -f conftest.o conftest.obj
30682if { { ac_try="$ac_compile"
30683case "(($ac_try" in
30684  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30685  *) ac_try_echo=$ac_try;;
30686esac
30687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30688$as_echo "$ac_try_echo"; } >&5
30689  (eval "$ac_compile") 2>&5
30690  ac_status=$?
30691  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30692  test $ac_status = 0; }; then :
30693  for ac_file in conftest.o conftest.obj conftest.*; do
30694  test -f "$ac_file" || continue;
30695  case $ac_file in
30696    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30697    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30698       break;;
30699  esac
30700done
30701else
30702  $as_echo "$as_me: failed program was:" >&5
30703sed 's/^/| /' conftest.$ac_ext >&5
30704
30705{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30707as_fn_error $? "cannot compute suffix of object files: cannot compile
30708See \`config.log' for more details" "$LINENO" 5; }
30709fi
30710rm -f conftest.$ac_cv_objext conftest.$ac_ext
30711fi
30712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30713$as_echo "$ac_cv_objext" >&6; }
30714OBJEXT=$ac_cv_objext
30715ac_objext=$OBJEXT
30716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30717$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30718if ${ac_cv_c_compiler_gnu+:} false; then :
30719  $as_echo_n "(cached) " >&6
30720else
30721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30722/* end confdefs.h.  */
30723
30724int
30725main ()
30726{
30727#ifndef __GNUC__
30728       choke me
30729#endif
30730
30731  ;
30732  return 0;
30733}
30734_ACEOF
30735if ac_fn_c_try_compile "$LINENO"; then :
30736  ac_compiler_gnu=yes
30737else
30738  ac_compiler_gnu=no
30739fi
30740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30741ac_cv_c_compiler_gnu=$ac_compiler_gnu
30742
30743fi
30744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30745$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30746if test $ac_compiler_gnu = yes; then
30747  GCC=yes
30748else
30749  GCC=
30750fi
30751ac_test_CFLAGS=${CFLAGS+set}
30752ac_save_CFLAGS=$CFLAGS
30753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30754$as_echo_n "checking whether $CC accepts -g... " >&6; }
30755if ${ac_cv_prog_cc_g+:} false; then :
30756  $as_echo_n "(cached) " >&6
30757else
30758  ac_save_c_werror_flag=$ac_c_werror_flag
30759   ac_c_werror_flag=yes
30760   ac_cv_prog_cc_g=no
30761   CFLAGS="-g"
30762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30763/* end confdefs.h.  */
30764
30765int
30766main ()
30767{
30768
30769  ;
30770  return 0;
30771}
30772_ACEOF
30773if ac_fn_c_try_compile "$LINENO"; then :
30774  ac_cv_prog_cc_g=yes
30775else
30776  CFLAGS=""
30777      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30778/* end confdefs.h.  */
30779
30780int
30781main ()
30782{
30783
30784  ;
30785  return 0;
30786}
30787_ACEOF
30788if ac_fn_c_try_compile "$LINENO"; then :
30789
30790else
30791  ac_c_werror_flag=$ac_save_c_werror_flag
30792	 CFLAGS="-g"
30793	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30794/* end confdefs.h.  */
30795
30796int
30797main ()
30798{
30799
30800  ;
30801  return 0;
30802}
30803_ACEOF
30804if ac_fn_c_try_compile "$LINENO"; then :
30805  ac_cv_prog_cc_g=yes
30806fi
30807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30808fi
30809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30810fi
30811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30812   ac_c_werror_flag=$ac_save_c_werror_flag
30813fi
30814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30815$as_echo "$ac_cv_prog_cc_g" >&6; }
30816if test "$ac_test_CFLAGS" = set; then
30817  CFLAGS=$ac_save_CFLAGS
30818elif test $ac_cv_prog_cc_g = yes; then
30819  if test "$GCC" = yes; then
30820    CFLAGS="-g -O2"
30821  else
30822    CFLAGS="-g"
30823  fi
30824else
30825  if test "$GCC" = yes; then
30826    CFLAGS="-O2"
30827  else
30828    CFLAGS=
30829  fi
30830fi
30831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30832$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30833if ${ac_cv_prog_cc_c89+:} false; then :
30834  $as_echo_n "(cached) " >&6
30835else
30836  ac_cv_prog_cc_c89=no
30837ac_save_CC=$CC
30838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30839/* end confdefs.h.  */
30840#include <stdarg.h>
30841#include <stdio.h>
30842struct stat;
30843/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30844struct buf { int x; };
30845FILE * (*rcsopen) (struct buf *, struct stat *, int);
30846static char *e (p, i)
30847     char **p;
30848     int i;
30849{
30850  return p[i];
30851}
30852static char *f (char * (*g) (char **, int), char **p, ...)
30853{
30854  char *s;
30855  va_list v;
30856  va_start (v,p);
30857  s = g (p, va_arg (v,int));
30858  va_end (v);
30859  return s;
30860}
30861
30862/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30863   function prototypes and stuff, but not '\xHH' hex character constants.
30864   These don't provoke an error unfortunately, instead are silently treated
30865   as 'x'.  The following induces an error, until -std is added to get
30866   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30867   array size at least.  It's necessary to write '\x00'==0 to get something
30868   that's true only with -std.  */
30869int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30870
30871/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30872   inside strings and character constants.  */
30873#define FOO(x) 'x'
30874int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30875
30876int test (int i, double x);
30877struct s1 {int (*f) (int a);};
30878struct s2 {int (*f) (double a);};
30879int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30880int argc;
30881char **argv;
30882int
30883main ()
30884{
30885return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30886  ;
30887  return 0;
30888}
30889_ACEOF
30890for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30891	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30892do
30893  CC="$ac_save_CC $ac_arg"
30894  if ac_fn_c_try_compile "$LINENO"; then :
30895  ac_cv_prog_cc_c89=$ac_arg
30896fi
30897rm -f core conftest.err conftest.$ac_objext
30898  test "x$ac_cv_prog_cc_c89" != "xno" && break
30899done
30900rm -f conftest.$ac_ext
30901CC=$ac_save_CC
30902
30903fi
30904# AC_CACHE_VAL
30905case "x$ac_cv_prog_cc_c89" in
30906  x)
30907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30908$as_echo "none needed" >&6; } ;;
30909  xno)
30910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30911$as_echo "unsupported" >&6; } ;;
30912  *)
30913    CC="$CC $ac_cv_prog_cc_c89"
30914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30915$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30916esac
30917if test "x$ac_cv_prog_cc_c89" != xno; then :
30918
30919fi
30920
30921ac_ext=cpp
30922ac_cpp='$CXXCPP $CPPFLAGS'
30923ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30924ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30925ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30926
30927
30928
30929  COMPILER_NAME=C++
30930  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30931
30932  if test "x$CXX" != x; then
30933    # User has supplied compiler name already, always let that override.
30934    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30935$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30936    if test "x`basename $CXX`" = "x$CXX"; then
30937      # A command without a complete path is provided, search $PATH.
30938
30939      for ac_prog in $CXX
30940do
30941  # Extract the first word of "$ac_prog", so it can be a program name with args.
30942set dummy $ac_prog; ac_word=$2
30943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30944$as_echo_n "checking for $ac_word... " >&6; }
30945if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30946  $as_echo_n "(cached) " >&6
30947else
30948  case $POTENTIAL_CXX in
30949  [\\/]* | ?:[\\/]*)
30950  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30951  ;;
30952  *)
30953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30954for as_dir in $PATH
30955do
30956  IFS=$as_save_IFS
30957  test -z "$as_dir" && as_dir=.
30958    for ac_exec_ext in '' $ac_executable_extensions; do
30959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30960    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30962    break 2
30963  fi
30964done
30965  done
30966IFS=$as_save_IFS
30967
30968  ;;
30969esac
30970fi
30971POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30972if test -n "$POTENTIAL_CXX"; then
30973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30974$as_echo "$POTENTIAL_CXX" >&6; }
30975else
30976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30977$as_echo "no" >&6; }
30978fi
30979
30980
30981  test -n "$POTENTIAL_CXX" && break
30982done
30983
30984      if test "x$POTENTIAL_CXX" != x; then
30985        CXX=$POTENTIAL_CXX
30986      else
30987        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30988      fi
30989    else
30990      # Otherwise it might already be a complete path
30991      if test ! -x "$CXX"; then
30992        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30993      fi
30994    fi
30995  else
30996    # No user supplied value. Locate compiler ourselves.
30997
30998    # If we are cross compiling, assume cross compilation tools follows the
30999    # cross compilation standard where they are prefixed with the autoconf
31000    # standard name for the target. For example the binary
31001    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31002    # If we are not cross compiling, then the default compiler name will be
31003    # used.
31004
31005    CXX=
31006    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31007    # before checking the rest of the PATH.
31008    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31009    # step, this should not be necessary.
31010    if test -n "$TOOLCHAIN_PATH"; then
31011      PATH_save="$PATH"
31012      PATH="$TOOLCHAIN_PATH"
31013      for ac_prog in $SEARCH_LIST
31014do
31015  # Extract the first word of "$ac_prog", so it can be a program name with args.
31016set dummy $ac_prog; ac_word=$2
31017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31018$as_echo_n "checking for $ac_word... " >&6; }
31019if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
31020  $as_echo_n "(cached) " >&6
31021else
31022  case $TOOLCHAIN_PATH_CXX in
31023  [\\/]* | ?:[\\/]*)
31024  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
31025  ;;
31026  *)
31027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31028for as_dir in $PATH
31029do
31030  IFS=$as_save_IFS
31031  test -z "$as_dir" && as_dir=.
31032    for ac_exec_ext in '' $ac_executable_extensions; do
31033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31034    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
31035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31036    break 2
31037  fi
31038done
31039  done
31040IFS=$as_save_IFS
31041
31042  ;;
31043esac
31044fi
31045TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
31046if test -n "$TOOLCHAIN_PATH_CXX"; then
31047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
31048$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
31049else
31050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31051$as_echo "no" >&6; }
31052fi
31053
31054
31055  test -n "$TOOLCHAIN_PATH_CXX" && break
31056done
31057
31058      CXX=$TOOLCHAIN_PATH_CXX
31059      PATH="$PATH_save"
31060    fi
31061
31062    # AC_PATH_PROGS can't be run multiple times with the same variable,
31063    # so create a new name for this run.
31064    if test "x$CXX" = x; then
31065      for ac_prog in $SEARCH_LIST
31066do
31067  # Extract the first word of "$ac_prog", so it can be a program name with args.
31068set dummy $ac_prog; ac_word=$2
31069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31070$as_echo_n "checking for $ac_word... " >&6; }
31071if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31072  $as_echo_n "(cached) " >&6
31073else
31074  case $POTENTIAL_CXX in
31075  [\\/]* | ?:[\\/]*)
31076  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31077  ;;
31078  *)
31079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31080for as_dir in $PATH
31081do
31082  IFS=$as_save_IFS
31083  test -z "$as_dir" && as_dir=.
31084    for ac_exec_ext in '' $ac_executable_extensions; do
31085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31086    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31088    break 2
31089  fi
31090done
31091  done
31092IFS=$as_save_IFS
31093
31094  ;;
31095esac
31096fi
31097POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31098if test -n "$POTENTIAL_CXX"; then
31099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31100$as_echo "$POTENTIAL_CXX" >&6; }
31101else
31102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31103$as_echo "no" >&6; }
31104fi
31105
31106
31107  test -n "$POTENTIAL_CXX" && break
31108done
31109
31110      CXX=$POTENTIAL_CXX
31111    fi
31112
31113    if test "x$CXX" = x; then
31114
31115  # Print a helpful message on how to acquire the necessary build dependency.
31116  # devkit is the help tag: freetype, cups, alsa etc
31117  MISSING_DEPENDENCY=devkit
31118
31119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31120    cygwin_help $MISSING_DEPENDENCY
31121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31122    msys_help $MISSING_DEPENDENCY
31123  else
31124    PKGHANDLER_COMMAND=
31125
31126    case $PKGHANDLER in
31127      apt-get)
31128        apt_help     $MISSING_DEPENDENCY ;;
31129      yum)
31130        yum_help     $MISSING_DEPENDENCY ;;
31131      port)
31132        port_help    $MISSING_DEPENDENCY ;;
31133      pkgutil)
31134        pkgutil_help $MISSING_DEPENDENCY ;;
31135      pkgadd)
31136        pkgadd_help  $MISSING_DEPENDENCY ;;
31137    esac
31138
31139    if test "x$PKGHANDLER_COMMAND" != x; then
31140      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31141    fi
31142  fi
31143
31144      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31145    fi
31146  fi
31147
31148  # Now we have a compiler binary in CXX. Make sure it's okay.
31149
31150  # Only process if variable expands to non-empty
31151
31152  if test "x$CXX" != x; then
31153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31154
31155  # First separate the path from the arguments. This will split at the first
31156  # space.
31157  complete="$CXX"
31158  path="${complete%% *}"
31159  tmp="$complete EOL"
31160  arguments="${tmp#* }"
31161
31162  # Input might be given as Windows format, start by converting to
31163  # unix format.
31164  new_path=`$CYGPATH -u "$path"`
31165
31166  # Now try to locate executable using which
31167  new_path=`$WHICH "$new_path" 2> /dev/null`
31168  # bat and cmd files are not always considered executable in cygwin causing which
31169  # to not find them
31170  if test "x$new_path" = x \
31171      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31172      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31173    new_path=`$CYGPATH -u "$path"`
31174  fi
31175  if test "x$new_path" = x; then
31176    # Oops. Which didn't find the executable.
31177    # The splitting of arguments from the executable at a space might have been incorrect,
31178    # since paths with space are more likely in Windows. Give it another try with the whole
31179    # argument.
31180    path="$complete"
31181    arguments="EOL"
31182    new_path=`$CYGPATH -u "$path"`
31183    new_path=`$WHICH "$new_path" 2> /dev/null`
31184    # bat and cmd files are not always considered executable in cygwin causing which
31185    # to not find them
31186    if test "x$new_path" = x \
31187        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31188        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31189      new_path=`$CYGPATH -u "$path"`
31190    fi
31191    if test "x$new_path" = x; then
31192      # It's still not found. Now this is an unrecoverable error.
31193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31194$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31195      has_space=`$ECHO "$complete" | $GREP " "`
31196      if test "x$has_space" != x; then
31197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31199      fi
31200      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31201    fi
31202  fi
31203
31204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31207  # "foo.exe" is OK but "foo" is an error.
31208  #
31209  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31210  # It is also a way to make sure we got the proper file name for the real test later on.
31211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31212  if test "x$test_shortpath" = x; then
31213    # Short path failed, file does not exist as specified.
31214    # Try adding .exe or .cmd
31215    if test -f "${new_path}.exe"; then
31216      input_to_shortpath="${new_path}.exe"
31217    elif test -f "${new_path}.cmd"; then
31218      input_to_shortpath="${new_path}.cmd"
31219    else
31220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
31221$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
31222      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31223$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31224      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31225    fi
31226  else
31227    input_to_shortpath="$new_path"
31228  fi
31229
31230  # Call helper function which possibly converts this using DOS-style short mode.
31231  # If so, the updated path is stored in $new_path.
31232  new_path="$input_to_shortpath"
31233
31234  input_path="$input_to_shortpath"
31235  # Check if we need to convert this using DOS-style short mode. If the path
31236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31237  # take no chances and rewrite it.
31238  # Note: m4 eats our [], so we need to use [ and ] instead.
31239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31240  if test "x$has_forbidden_chars" != x; then
31241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31245      # Going to short mode and back again did indeed matter. Since short mode is
31246      # case insensitive, let's make it lowercase to improve readability.
31247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31248      # Now convert it back to Unix-style (cygpath)
31249      input_path=`$CYGPATH -u "$shortmode_path"`
31250      new_path="$input_path"
31251    fi
31252  fi
31253
31254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31255  if test "x$test_cygdrive_prefix" = x; then
31256    # As a simple fix, exclude /usr/bin since it's not a real path.
31257    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31259      # a path prefixed by /cygdrive for fixpath to work.
31260      new_path="$CYGWIN_ROOT_PATH$input_path"
31261    fi
31262  fi
31263
31264  # remove trailing .exe if any
31265  new_path="${new_path/%.exe/}"
31266
31267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31268
31269  # First separate the path from the arguments. This will split at the first
31270  # space.
31271  complete="$CXX"
31272  path="${complete%% *}"
31273  tmp="$complete EOL"
31274  arguments="${tmp#* }"
31275
31276  # Input might be given as Windows format, start by converting to
31277  # unix format.
31278  new_path="$path"
31279
31280  windows_path="$new_path"
31281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31282    unix_path=`$CYGPATH -u "$windows_path"`
31283    new_path="$unix_path"
31284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31286    new_path="$unix_path"
31287  fi
31288
31289
31290  # Now try to locate executable using which
31291  new_path=`$WHICH "$new_path" 2> /dev/null`
31292
31293  if test "x$new_path" = x; then
31294    # Oops. Which didn't find the executable.
31295    # The splitting of arguments from the executable at a space might have been incorrect,
31296    # since paths with space are more likely in Windows. Give it another try with the whole
31297    # argument.
31298    path="$complete"
31299    arguments="EOL"
31300    new_path="$path"
31301
31302  windows_path="$new_path"
31303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31304    unix_path=`$CYGPATH -u "$windows_path"`
31305    new_path="$unix_path"
31306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31308    new_path="$unix_path"
31309  fi
31310
31311
31312    new_path=`$WHICH "$new_path" 2> /dev/null`
31313    # bat and cmd files are not always considered executable in MSYS causing which
31314    # to not find them
31315    if test "x$new_path" = x \
31316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31318      new_path="$path"
31319
31320  windows_path="$new_path"
31321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31322    unix_path=`$CYGPATH -u "$windows_path"`
31323    new_path="$unix_path"
31324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31326    new_path="$unix_path"
31327  fi
31328
31329    fi
31330
31331    if test "x$new_path" = x; then
31332      # It's still not found. Now this is an unrecoverable error.
31333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31334$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31335      has_space=`$ECHO "$complete" | $GREP " "`
31336      if test "x$has_space" != x; then
31337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31339      fi
31340      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31341    fi
31342  fi
31343
31344  # Now new_path has a complete unix path to the binary
31345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31346    # Keep paths in /bin as-is, but remove trailing .exe if any
31347    new_path="${new_path/%.exe/}"
31348    # Do not save /bin paths to all_fixpath_prefixes!
31349  else
31350    # Not in mixed or Windows style, start by that.
31351    new_path=`cmd //c echo $new_path`
31352
31353  input_path="$new_path"
31354  # Check if we need to convert this using DOS-style short mode. If the path
31355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31356  # take no chances and rewrite it.
31357  # Note: m4 eats our [], so we need to use [ and ] instead.
31358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31359  if test "x$has_forbidden_chars" != x; then
31360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31362  fi
31363
31364    # Output is in $new_path
31365
31366  windows_path="$new_path"
31367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31368    unix_path=`$CYGPATH -u "$windows_path"`
31369    new_path="$unix_path"
31370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31372    new_path="$unix_path"
31373  fi
31374
31375    # remove trailing .exe if any
31376    new_path="${new_path/%.exe/}"
31377
31378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31380  fi
31381
31382    else
31383      # We're on a unix platform. Hooray! :)
31384      # First separate the path from the arguments. This will split at the first
31385      # space.
31386      complete="$CXX"
31387      path="${complete%% *}"
31388      tmp="$complete EOL"
31389      arguments="${tmp#* }"
31390
31391      # Cannot rely on the command "which" here since it doesn't always work.
31392      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31393      if test -z "$is_absolute_path"; then
31394        # Path to executable is not absolute. Find it.
31395        IFS_save="$IFS"
31396        IFS=:
31397        for p in $PATH; do
31398          if test -f "$p/$path" && test -x "$p/$path"; then
31399            new_path="$p/$path"
31400            break
31401          fi
31402        done
31403        IFS="$IFS_save"
31404      else
31405        # This is an absolute path, we can use it without further modifications.
31406        new_path="$path"
31407      fi
31408
31409      if test "x$new_path" = x; then
31410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31411$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31412        has_space=`$ECHO "$complete" | $GREP " "`
31413        if test "x$has_space" != x; then
31414          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31415$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31416        fi
31417        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31418      fi
31419    fi
31420
31421    # Now join together the path and the arguments once again
31422    if test "x$arguments" != xEOL; then
31423      new_complete="$new_path ${arguments% *}"
31424    else
31425      new_complete="$new_path"
31426    fi
31427
31428    if test "x$complete" != "x$new_complete"; then
31429      CXX="$new_complete"
31430      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
31431$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
31432    fi
31433  fi
31434
31435  TEST_COMPILER="$CXX"
31436  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31437  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31438  if test "x$OPENJDK_BUILD_OS" != xaix; then
31439    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
31441$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
31442
31443  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31444    # Follow a chain of symbolic links. Use readlink
31445    # where it exists, else fall back to horribly
31446    # complicated shell code.
31447    if test "x$READLINK_TESTED" != yes; then
31448      # On MacOSX there is a readlink tool with a different
31449      # purpose than the GNU readlink tool. Check the found readlink.
31450      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31451      if test "x$ISGNU" = x; then
31452        # A readlink that we do not know how to use.
31453        # Are there other non-GNU readlinks out there?
31454        READLINK_TESTED=yes
31455        READLINK=
31456      fi
31457    fi
31458
31459    if test "x$READLINK" != x; then
31460      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31461    else
31462      # Save the current directory for restoring afterwards
31463      STARTDIR=$PWD
31464      COUNTER=0
31465      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31466      sym_link_file=`$BASENAME $TEST_COMPILER`
31467      cd $sym_link_dir
31468      # Use -P flag to resolve symlinks in directories.
31469      cd `$THEPWDCMD -P`
31470      sym_link_dir=`$THEPWDCMD -P`
31471      # Resolve file symlinks
31472      while test $COUNTER -lt 20; do
31473        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31474        if test "x$ISLINK" == x; then
31475          # This is not a symbolic link! We are done!
31476          break
31477        fi
31478        # Again resolve directory symlinks since the target of the just found
31479        # link could be in a different directory
31480        cd `$DIRNAME $ISLINK`
31481        sym_link_dir=`$THEPWDCMD -P`
31482        sym_link_file=`$BASENAME $ISLINK`
31483        let COUNTER=COUNTER+1
31484      done
31485      cd $STARTDIR
31486      TEST_COMPILER=$sym_link_dir/$sym_link_file
31487    fi
31488  fi
31489
31490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31491$as_echo "$TEST_COMPILER" >&6; }
31492  fi
31493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31494$as_echo_n "checking if CXX is disguised ccache... " >&6; }
31495
31496  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31497  if test "x$COMPILER_BASENAME" = "xccache"; then
31498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31499$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31500    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31501    # We want to control ccache invocation ourselves, so ignore this cc and try
31502    # searching again.
31503
31504    # Remove the path to the fake ccache cc from the PATH
31505    RETRY_COMPILER_SAVED_PATH="$PATH"
31506    COMPILER_DIRNAME=`$DIRNAME $CXX`
31507    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31508
31509    # Try again looking for our compiler
31510    if test -n "$ac_tool_prefix"; then
31511  for ac_prog in $TOOLCHAIN_CXX_BINARY
31512  do
31513    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31514set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31516$as_echo_n "checking for $ac_word... " >&6; }
31517if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31518  $as_echo_n "(cached) " >&6
31519else
31520  if test -n "$PROPER_COMPILER_CXX"; then
31521  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31522else
31523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31524for as_dir in $PATH
31525do
31526  IFS=$as_save_IFS
31527  test -z "$as_dir" && as_dir=.
31528    for ac_exec_ext in '' $ac_executable_extensions; do
31529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31530    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31532    break 2
31533  fi
31534done
31535  done
31536IFS=$as_save_IFS
31537
31538fi
31539fi
31540PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31541if test -n "$PROPER_COMPILER_CXX"; then
31542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31543$as_echo "$PROPER_COMPILER_CXX" >&6; }
31544else
31545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31546$as_echo "no" >&6; }
31547fi
31548
31549
31550    test -n "$PROPER_COMPILER_CXX" && break
31551  done
31552fi
31553if test -z "$PROPER_COMPILER_CXX"; then
31554  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31555  for ac_prog in $TOOLCHAIN_CXX_BINARY
31556do
31557  # Extract the first word of "$ac_prog", so it can be a program name with args.
31558set dummy $ac_prog; ac_word=$2
31559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31560$as_echo_n "checking for $ac_word... " >&6; }
31561if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31562  $as_echo_n "(cached) " >&6
31563else
31564  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31565  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31566else
31567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31568for as_dir in $PATH
31569do
31570  IFS=$as_save_IFS
31571  test -z "$as_dir" && as_dir=.
31572    for ac_exec_ext in '' $ac_executable_extensions; do
31573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31574    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31576    break 2
31577  fi
31578done
31579  done
31580IFS=$as_save_IFS
31581
31582fi
31583fi
31584ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31585if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31587$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31588else
31589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31590$as_echo "no" >&6; }
31591fi
31592
31593
31594  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31595done
31596
31597  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31598    PROPER_COMPILER_CXX=""
31599  else
31600    case $cross_compiling:$ac_tool_warned in
31601yes:)
31602{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31603$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31604ac_tool_warned=yes ;;
31605esac
31606    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31607  fi
31608fi
31609
31610
31611  # Only process if variable expands to non-empty
31612
31613  if test "x$PROPER_COMPILER_CXX" != x; then
31614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31615
31616  # First separate the path from the arguments. This will split at the first
31617  # space.
31618  complete="$PROPER_COMPILER_CXX"
31619  path="${complete%% *}"
31620  tmp="$complete EOL"
31621  arguments="${tmp#* }"
31622
31623  # Input might be given as Windows format, start by converting to
31624  # unix format.
31625  new_path=`$CYGPATH -u "$path"`
31626
31627  # Now try to locate executable using which
31628  new_path=`$WHICH "$new_path" 2> /dev/null`
31629  # bat and cmd files are not always considered executable in cygwin causing which
31630  # to not find them
31631  if test "x$new_path" = x \
31632      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31633      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31634    new_path=`$CYGPATH -u "$path"`
31635  fi
31636  if test "x$new_path" = x; then
31637    # Oops. Which didn't find the executable.
31638    # The splitting of arguments from the executable at a space might have been incorrect,
31639    # since paths with space are more likely in Windows. Give it another try with the whole
31640    # argument.
31641    path="$complete"
31642    arguments="EOL"
31643    new_path=`$CYGPATH -u "$path"`
31644    new_path=`$WHICH "$new_path" 2> /dev/null`
31645    # bat and cmd files are not always considered executable in cygwin causing which
31646    # to not find them
31647    if test "x$new_path" = x \
31648        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31649        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31650      new_path=`$CYGPATH -u "$path"`
31651    fi
31652    if test "x$new_path" = x; then
31653      # It's still not found. Now this is an unrecoverable error.
31654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31655$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31656      has_space=`$ECHO "$complete" | $GREP " "`
31657      if test "x$has_space" != x; then
31658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31660      fi
31661      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31662    fi
31663  fi
31664
31665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31668  # "foo.exe" is OK but "foo" is an error.
31669  #
31670  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31671  # It is also a way to make sure we got the proper file name for the real test later on.
31672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31673  if test "x$test_shortpath" = x; then
31674    # Short path failed, file does not exist as specified.
31675    # Try adding .exe or .cmd
31676    if test -f "${new_path}.exe"; then
31677      input_to_shortpath="${new_path}.exe"
31678    elif test -f "${new_path}.cmd"; then
31679      input_to_shortpath="${new_path}.cmd"
31680    else
31681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31682$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31683      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31684$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31685      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31686    fi
31687  else
31688    input_to_shortpath="$new_path"
31689  fi
31690
31691  # Call helper function which possibly converts this using DOS-style short mode.
31692  # If so, the updated path is stored in $new_path.
31693  new_path="$input_to_shortpath"
31694
31695  input_path="$input_to_shortpath"
31696  # Check if we need to convert this using DOS-style short mode. If the path
31697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31698  # take no chances and rewrite it.
31699  # Note: m4 eats our [], so we need to use [ and ] instead.
31700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31701  if test "x$has_forbidden_chars" != x; then
31702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31706      # Going to short mode and back again did indeed matter. Since short mode is
31707      # case insensitive, let's make it lowercase to improve readability.
31708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31709      # Now convert it back to Unix-style (cygpath)
31710      input_path=`$CYGPATH -u "$shortmode_path"`
31711      new_path="$input_path"
31712    fi
31713  fi
31714
31715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31716  if test "x$test_cygdrive_prefix" = x; then
31717    # As a simple fix, exclude /usr/bin since it's not a real path.
31718    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31720      # a path prefixed by /cygdrive for fixpath to work.
31721      new_path="$CYGWIN_ROOT_PATH$input_path"
31722    fi
31723  fi
31724
31725  # remove trailing .exe if any
31726  new_path="${new_path/%.exe/}"
31727
31728    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31729
31730  # First separate the path from the arguments. This will split at the first
31731  # space.
31732  complete="$PROPER_COMPILER_CXX"
31733  path="${complete%% *}"
31734  tmp="$complete EOL"
31735  arguments="${tmp#* }"
31736
31737  # Input might be given as Windows format, start by converting to
31738  # unix format.
31739  new_path="$path"
31740
31741  windows_path="$new_path"
31742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31743    unix_path=`$CYGPATH -u "$windows_path"`
31744    new_path="$unix_path"
31745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31747    new_path="$unix_path"
31748  fi
31749
31750
31751  # Now try to locate executable using which
31752  new_path=`$WHICH "$new_path" 2> /dev/null`
31753
31754  if test "x$new_path" = x; then
31755    # Oops. Which didn't find the executable.
31756    # The splitting of arguments from the executable at a space might have been incorrect,
31757    # since paths with space are more likely in Windows. Give it another try with the whole
31758    # argument.
31759    path="$complete"
31760    arguments="EOL"
31761    new_path="$path"
31762
31763  windows_path="$new_path"
31764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31765    unix_path=`$CYGPATH -u "$windows_path"`
31766    new_path="$unix_path"
31767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31769    new_path="$unix_path"
31770  fi
31771
31772
31773    new_path=`$WHICH "$new_path" 2> /dev/null`
31774    # bat and cmd files are not always considered executable in MSYS causing which
31775    # to not find them
31776    if test "x$new_path" = x \
31777        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31778        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31779      new_path="$path"
31780
31781  windows_path="$new_path"
31782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31783    unix_path=`$CYGPATH -u "$windows_path"`
31784    new_path="$unix_path"
31785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31787    new_path="$unix_path"
31788  fi
31789
31790    fi
31791
31792    if test "x$new_path" = x; then
31793      # It's still not found. Now this is an unrecoverable error.
31794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31795$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31796      has_space=`$ECHO "$complete" | $GREP " "`
31797      if test "x$has_space" != x; then
31798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31800      fi
31801      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31802    fi
31803  fi
31804
31805  # Now new_path has a complete unix path to the binary
31806  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31807    # Keep paths in /bin as-is, but remove trailing .exe if any
31808    new_path="${new_path/%.exe/}"
31809    # Do not save /bin paths to all_fixpath_prefixes!
31810  else
31811    # Not in mixed or Windows style, start by that.
31812    new_path=`cmd //c echo $new_path`
31813
31814  input_path="$new_path"
31815  # Check if we need to convert this using DOS-style short mode. If the path
31816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31817  # take no chances and rewrite it.
31818  # Note: m4 eats our [], so we need to use [ and ] instead.
31819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31820  if test "x$has_forbidden_chars" != x; then
31821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31823  fi
31824
31825    # Output is in $new_path
31826
31827  windows_path="$new_path"
31828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31829    unix_path=`$CYGPATH -u "$windows_path"`
31830    new_path="$unix_path"
31831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31833    new_path="$unix_path"
31834  fi
31835
31836    # remove trailing .exe if any
31837    new_path="${new_path/%.exe/}"
31838
31839    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31840    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31841  fi
31842
31843    else
31844      # We're on a unix platform. Hooray! :)
31845      # First separate the path from the arguments. This will split at the first
31846      # space.
31847      complete="$PROPER_COMPILER_CXX"
31848      path="${complete%% *}"
31849      tmp="$complete EOL"
31850      arguments="${tmp#* }"
31851
31852      # Cannot rely on the command "which" here since it doesn't always work.
31853      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31854      if test -z "$is_absolute_path"; then
31855        # Path to executable is not absolute. Find it.
31856        IFS_save="$IFS"
31857        IFS=:
31858        for p in $PATH; do
31859          if test -f "$p/$path" && test -x "$p/$path"; then
31860            new_path="$p/$path"
31861            break
31862          fi
31863        done
31864        IFS="$IFS_save"
31865      else
31866        # This is an absolute path, we can use it without further modifications.
31867        new_path="$path"
31868      fi
31869
31870      if test "x$new_path" = x; then
31871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31872$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31873        has_space=`$ECHO "$complete" | $GREP " "`
31874        if test "x$has_space" != x; then
31875          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31876$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31877        fi
31878        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31879      fi
31880    fi
31881
31882    # Now join together the path and the arguments once again
31883    if test "x$arguments" != xEOL; then
31884      new_complete="$new_path ${arguments% *}"
31885    else
31886      new_complete="$new_path"
31887    fi
31888
31889    if test "x$complete" != "x$new_complete"; then
31890      PROPER_COMPILER_CXX="$new_complete"
31891      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31892$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31893    fi
31894  fi
31895
31896    PATH="$RETRY_COMPILER_SAVED_PATH"
31897
31898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31899$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31900
31901  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31902    # Follow a chain of symbolic links. Use readlink
31903    # where it exists, else fall back to horribly
31904    # complicated shell code.
31905    if test "x$READLINK_TESTED" != yes; then
31906      # On MacOSX there is a readlink tool with a different
31907      # purpose than the GNU readlink tool. Check the found readlink.
31908      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31909      if test "x$ISGNU" = x; then
31910        # A readlink that we do not know how to use.
31911        # Are there other non-GNU readlinks out there?
31912        READLINK_TESTED=yes
31913        READLINK=
31914      fi
31915    fi
31916
31917    if test "x$READLINK" != x; then
31918      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31919    else
31920      # Save the current directory for restoring afterwards
31921      STARTDIR=$PWD
31922      COUNTER=0
31923      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31924      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31925      cd $sym_link_dir
31926      # Use -P flag to resolve symlinks in directories.
31927      cd `$THEPWDCMD -P`
31928      sym_link_dir=`$THEPWDCMD -P`
31929      # Resolve file symlinks
31930      while test $COUNTER -lt 20; do
31931        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31932        if test "x$ISLINK" == x; then
31933          # This is not a symbolic link! We are done!
31934          break
31935        fi
31936        # Again resolve directory symlinks since the target of the just found
31937        # link could be in a different directory
31938        cd `$DIRNAME $ISLINK`
31939        sym_link_dir=`$THEPWDCMD -P`
31940        sym_link_file=`$BASENAME $ISLINK`
31941        let COUNTER=COUNTER+1
31942      done
31943      cd $STARTDIR
31944      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31945    fi
31946  fi
31947
31948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31949$as_echo "$PROPER_COMPILER_CXX" >&6; }
31950    CXX="$PROPER_COMPILER_CXX"
31951  else
31952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31953$as_echo "no, keeping CXX" >&6; }
31954  fi
31955
31956
31957  COMPILER=$CXX
31958  COMPILER_NAME=$COMPILER_NAME
31959
31960  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31961    # cc -V output typically looks like
31962    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31963    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31964    # Check that this is likely to be the Solaris Studio cc.
31965    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31966    if test $? -ne 0; then
31967      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31968      { $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
31969$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31970      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31971$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31972      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31973$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31974      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31975    fi
31976    # Remove usage instructions (if present), and
31977    # collapse compiler output into a single line
31978    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31979        $SED -e 's/ *[Uu]sage:.*//'`
31980    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31981        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31982  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31983    # xlc -qversion output typically looks like
31984    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31985    #     Version: 11.01.0000.0015
31986    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31987    # Check that this is likely to be the IBM XL C compiler.
31988    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31989    if test $? -ne 0; then
31990      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31991      { $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
31992$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31993      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31994$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31995      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31996$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31997      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31998    fi
31999    # Collapse compiler output into a single line
32000    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32001    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32002        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32003  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32004    # There is no specific version flag, but all output starts with a version string.
32005    # First line typically looks something like:
32006    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32007    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32008    # Check that this is likely to be Microsoft CL.EXE.
32009    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32010    if test $? -ne 0; then
32011      { $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
32012$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32013      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32014$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32015      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32016    fi
32017    # Collapse compiler output into a single line
32018    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32019    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32020        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32021  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32022    # gcc --version output typically looks like
32023    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32024    #     Copyright (C) 2013 Free Software Foundation, Inc.
32025    #     This is free software; see the source for copying conditions.  There is NO
32026    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32027    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32028    # Check that this is likely to be GCC.
32029    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32030    if test $? -ne 0; then
32031      { $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
32032$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32033      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32034$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32035      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32036    fi
32037    # Remove Copyright and legalese from version string, and
32038    # collapse into a single line
32039    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32040        $SED -e 's/ *Copyright .*//'`
32041    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32042        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32043  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32044    # clang --version output typically looks like
32045    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32046    #    clang version 3.3 (tags/RELEASE_33/final)
32047    # or
32048    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32049    #    Target: x86_64-pc-linux-gnu
32050    #    Thread model: posix
32051    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32052    # Check that this is likely to be clang
32053    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32054    if test $? -ne 0; then
32055      { $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
32056$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32057      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32058$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32059      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32060    fi
32061    # Collapse compiler output into a single line
32062    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32063    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32064        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32065  else
32066      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32067  fi
32068  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32069  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32070  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32071  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
32072
32073  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32074$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32075
32076
32077  # Now that we have resolved CXX ourself, let autoconf have its go at it
32078  ac_ext=cpp
32079ac_cpp='$CXXCPP $CPPFLAGS'
32080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32083if test -z "$CXX"; then
32084  if test -n "$CCC"; then
32085    CXX=$CCC
32086  else
32087    if test -n "$ac_tool_prefix"; then
32088  for ac_prog in $CXX
32089  do
32090    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32091set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32093$as_echo_n "checking for $ac_word... " >&6; }
32094if ${ac_cv_prog_CXX+:} false; then :
32095  $as_echo_n "(cached) " >&6
32096else
32097  if test -n "$CXX"; then
32098  ac_cv_prog_CXX="$CXX" # Let the user override the test.
32099else
32100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32101for as_dir in $PATH
32102do
32103  IFS=$as_save_IFS
32104  test -z "$as_dir" && as_dir=.
32105    for ac_exec_ext in '' $ac_executable_extensions; do
32106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32107    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
32108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32109    break 2
32110  fi
32111done
32112  done
32113IFS=$as_save_IFS
32114
32115fi
32116fi
32117CXX=$ac_cv_prog_CXX
32118if test -n "$CXX"; then
32119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
32120$as_echo "$CXX" >&6; }
32121else
32122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32123$as_echo "no" >&6; }
32124fi
32125
32126
32127    test -n "$CXX" && break
32128  done
32129fi
32130if test -z "$CXX"; then
32131  ac_ct_CXX=$CXX
32132  for ac_prog in $CXX
32133do
32134  # Extract the first word of "$ac_prog", so it can be a program name with args.
32135set dummy $ac_prog; ac_word=$2
32136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32137$as_echo_n "checking for $ac_word... " >&6; }
32138if ${ac_cv_prog_ac_ct_CXX+:} false; then :
32139  $as_echo_n "(cached) " >&6
32140else
32141  if test -n "$ac_ct_CXX"; then
32142  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
32143else
32144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32145for as_dir in $PATH
32146do
32147  IFS=$as_save_IFS
32148  test -z "$as_dir" && as_dir=.
32149    for ac_exec_ext in '' $ac_executable_extensions; do
32150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32151    ac_cv_prog_ac_ct_CXX="$ac_prog"
32152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32153    break 2
32154  fi
32155done
32156  done
32157IFS=$as_save_IFS
32158
32159fi
32160fi
32161ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
32162if test -n "$ac_ct_CXX"; then
32163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
32164$as_echo "$ac_ct_CXX" >&6; }
32165else
32166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32167$as_echo "no" >&6; }
32168fi
32169
32170
32171  test -n "$ac_ct_CXX" && break
32172done
32173
32174  if test "x$ac_ct_CXX" = x; then
32175    CXX="g++"
32176  else
32177    case $cross_compiling:$ac_tool_warned in
32178yes:)
32179{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32180$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32181ac_tool_warned=yes ;;
32182esac
32183    CXX=$ac_ct_CXX
32184  fi
32185fi
32186
32187  fi
32188fi
32189# Provide some information about the compiler.
32190$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
32191set X $ac_compile
32192ac_compiler=$2
32193for ac_option in --version -v -V -qversion; do
32194  { { ac_try="$ac_compiler $ac_option >&5"
32195case "(($ac_try" in
32196  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32197  *) ac_try_echo=$ac_try;;
32198esac
32199eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32200$as_echo "$ac_try_echo"; } >&5
32201  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32202  ac_status=$?
32203  if test -s conftest.err; then
32204    sed '10a\
32205... rest of stderr output deleted ...
32206         10q' conftest.err >conftest.er1
32207    cat conftest.er1 >&5
32208  fi
32209  rm -f conftest.er1 conftest.err
32210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32211  test $ac_status = 0; }
32212done
32213
32214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
32215$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
32216if ${ac_cv_cxx_compiler_gnu+:} false; then :
32217  $as_echo_n "(cached) " >&6
32218else
32219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32220/* end confdefs.h.  */
32221
32222int
32223main ()
32224{
32225#ifndef __GNUC__
32226       choke me
32227#endif
32228
32229  ;
32230  return 0;
32231}
32232_ACEOF
32233if ac_fn_cxx_try_compile "$LINENO"; then :
32234  ac_compiler_gnu=yes
32235else
32236  ac_compiler_gnu=no
32237fi
32238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32239ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
32240
32241fi
32242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
32243$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
32244if test $ac_compiler_gnu = yes; then
32245  GXX=yes
32246else
32247  GXX=
32248fi
32249ac_test_CXXFLAGS=${CXXFLAGS+set}
32250ac_save_CXXFLAGS=$CXXFLAGS
32251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
32252$as_echo_n "checking whether $CXX accepts -g... " >&6; }
32253if ${ac_cv_prog_cxx_g+:} false; then :
32254  $as_echo_n "(cached) " >&6
32255else
32256  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
32257   ac_cxx_werror_flag=yes
32258   ac_cv_prog_cxx_g=no
32259   CXXFLAGS="-g"
32260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32261/* end confdefs.h.  */
32262
32263int
32264main ()
32265{
32266
32267  ;
32268  return 0;
32269}
32270_ACEOF
32271if ac_fn_cxx_try_compile "$LINENO"; then :
32272  ac_cv_prog_cxx_g=yes
32273else
32274  CXXFLAGS=""
32275      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32276/* end confdefs.h.  */
32277
32278int
32279main ()
32280{
32281
32282  ;
32283  return 0;
32284}
32285_ACEOF
32286if ac_fn_cxx_try_compile "$LINENO"; then :
32287
32288else
32289  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32290	 CXXFLAGS="-g"
32291	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32292/* end confdefs.h.  */
32293
32294int
32295main ()
32296{
32297
32298  ;
32299  return 0;
32300}
32301_ACEOF
32302if ac_fn_cxx_try_compile "$LINENO"; then :
32303  ac_cv_prog_cxx_g=yes
32304fi
32305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32306fi
32307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32308fi
32309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32310   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32311fi
32312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
32313$as_echo "$ac_cv_prog_cxx_g" >&6; }
32314if test "$ac_test_CXXFLAGS" = set; then
32315  CXXFLAGS=$ac_save_CXXFLAGS
32316elif test $ac_cv_prog_cxx_g = yes; then
32317  if test "$GXX" = yes; then
32318    CXXFLAGS="-g -O2"
32319  else
32320    CXXFLAGS="-g"
32321  fi
32322else
32323  if test "$GXX" = yes; then
32324    CXXFLAGS="-O2"
32325  else
32326    CXXFLAGS=
32327  fi
32328fi
32329ac_ext=cpp
32330ac_cpp='$CXXCPP $CPPFLAGS'
32331ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32332ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32333ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32334
32335
32336  #
32337  # Setup the preprocessor (CPP and CXXCPP)
32338  #
32339  ac_ext=c
32340ac_cpp='$CPP $CPPFLAGS'
32341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32343ac_compiler_gnu=$ac_cv_c_compiler_gnu
32344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
32345$as_echo_n "checking how to run the C preprocessor... " >&6; }
32346# On Suns, sometimes $CPP names a directory.
32347if test -n "$CPP" && test -d "$CPP"; then
32348  CPP=
32349fi
32350if test -z "$CPP"; then
32351  if ${ac_cv_prog_CPP+:} false; then :
32352  $as_echo_n "(cached) " >&6
32353else
32354      # Double quotes because CPP needs to be expanded
32355    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
32356    do
32357      ac_preproc_ok=false
32358for ac_c_preproc_warn_flag in '' yes
32359do
32360  # Use a header file that comes with gcc, so configuring glibc
32361  # with a fresh cross-compiler works.
32362  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32363  # <limits.h> exists even on freestanding compilers.
32364  # On the NeXT, cc -E runs the code through the compiler's parser,
32365  # not just through cpp. "Syntax error" is here to catch this case.
32366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32367/* end confdefs.h.  */
32368#ifdef __STDC__
32369# include <limits.h>
32370#else
32371# include <assert.h>
32372#endif
32373		     Syntax error
32374_ACEOF
32375if ac_fn_c_try_cpp "$LINENO"; then :
32376
32377else
32378  # Broken: fails on valid input.
32379continue
32380fi
32381rm -f conftest.err conftest.i conftest.$ac_ext
32382
32383  # OK, works on sane cases.  Now check whether nonexistent headers
32384  # can be detected and how.
32385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32386/* end confdefs.h.  */
32387#include <ac_nonexistent.h>
32388_ACEOF
32389if ac_fn_c_try_cpp "$LINENO"; then :
32390  # Broken: success on invalid input.
32391continue
32392else
32393  # Passes both tests.
32394ac_preproc_ok=:
32395break
32396fi
32397rm -f conftest.err conftest.i conftest.$ac_ext
32398
32399done
32400# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32401rm -f conftest.i conftest.err conftest.$ac_ext
32402if $ac_preproc_ok; then :
32403  break
32404fi
32405
32406    done
32407    ac_cv_prog_CPP=$CPP
32408
32409fi
32410  CPP=$ac_cv_prog_CPP
32411else
32412  ac_cv_prog_CPP=$CPP
32413fi
32414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
32415$as_echo "$CPP" >&6; }
32416ac_preproc_ok=false
32417for ac_c_preproc_warn_flag in '' yes
32418do
32419  # Use a header file that comes with gcc, so configuring glibc
32420  # with a fresh cross-compiler works.
32421  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32422  # <limits.h> exists even on freestanding compilers.
32423  # On the NeXT, cc -E runs the code through the compiler's parser,
32424  # not just through cpp. "Syntax error" is here to catch this case.
32425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32426/* end confdefs.h.  */
32427#ifdef __STDC__
32428# include <limits.h>
32429#else
32430# include <assert.h>
32431#endif
32432		     Syntax error
32433_ACEOF
32434if ac_fn_c_try_cpp "$LINENO"; then :
32435
32436else
32437  # Broken: fails on valid input.
32438continue
32439fi
32440rm -f conftest.err conftest.i conftest.$ac_ext
32441
32442  # OK, works on sane cases.  Now check whether nonexistent headers
32443  # can be detected and how.
32444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32445/* end confdefs.h.  */
32446#include <ac_nonexistent.h>
32447_ACEOF
32448if ac_fn_c_try_cpp "$LINENO"; then :
32449  # Broken: success on invalid input.
32450continue
32451else
32452  # Passes both tests.
32453ac_preproc_ok=:
32454break
32455fi
32456rm -f conftest.err conftest.i conftest.$ac_ext
32457
32458done
32459# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32460rm -f conftest.i conftest.err conftest.$ac_ext
32461if $ac_preproc_ok; then :
32462
32463else
32464  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32466as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
32467See \`config.log' for more details" "$LINENO" 5; }
32468fi
32469
32470ac_ext=cpp
32471ac_cpp='$CXXCPP $CPPFLAGS'
32472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32475
32476
32477  # Only process if variable expands to non-empty
32478
32479  if test "x$CPP" != x; then
32480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32481
32482  # First separate the path from the arguments. This will split at the first
32483  # space.
32484  complete="$CPP"
32485  path="${complete%% *}"
32486  tmp="$complete EOL"
32487  arguments="${tmp#* }"
32488
32489  # Input might be given as Windows format, start by converting to
32490  # unix format.
32491  new_path=`$CYGPATH -u "$path"`
32492
32493  # Now try to locate executable using which
32494  new_path=`$WHICH "$new_path" 2> /dev/null`
32495  # bat and cmd files are not always considered executable in cygwin causing which
32496  # to not find them
32497  if test "x$new_path" = x \
32498      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32499      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32500    new_path=`$CYGPATH -u "$path"`
32501  fi
32502  if test "x$new_path" = x; then
32503    # Oops. Which didn't find the executable.
32504    # The splitting of arguments from the executable at a space might have been incorrect,
32505    # since paths with space are more likely in Windows. Give it another try with the whole
32506    # argument.
32507    path="$complete"
32508    arguments="EOL"
32509    new_path=`$CYGPATH -u "$path"`
32510    new_path=`$WHICH "$new_path" 2> /dev/null`
32511    # bat and cmd files are not always considered executable in cygwin causing which
32512    # to not find them
32513    if test "x$new_path" = x \
32514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32516      new_path=`$CYGPATH -u "$path"`
32517    fi
32518    if test "x$new_path" = x; then
32519      # It's still not found. Now this is an unrecoverable error.
32520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32521$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32522      has_space=`$ECHO "$complete" | $GREP " "`
32523      if test "x$has_space" != x; then
32524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32526      fi
32527      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32528    fi
32529  fi
32530
32531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32534  # "foo.exe" is OK but "foo" is an error.
32535  #
32536  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32537  # It is also a way to make sure we got the proper file name for the real test later on.
32538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32539  if test "x$test_shortpath" = x; then
32540    # Short path failed, file does not exist as specified.
32541    # Try adding .exe or .cmd
32542    if test -f "${new_path}.exe"; then
32543      input_to_shortpath="${new_path}.exe"
32544    elif test -f "${new_path}.cmd"; then
32545      input_to_shortpath="${new_path}.cmd"
32546    else
32547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
32548$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
32549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32551      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32552    fi
32553  else
32554    input_to_shortpath="$new_path"
32555  fi
32556
32557  # Call helper function which possibly converts this using DOS-style short mode.
32558  # If so, the updated path is stored in $new_path.
32559  new_path="$input_to_shortpath"
32560
32561  input_path="$input_to_shortpath"
32562  # Check if we need to convert this using DOS-style short mode. If the path
32563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32564  # take no chances and rewrite it.
32565  # Note: m4 eats our [], so we need to use [ and ] instead.
32566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32567  if test "x$has_forbidden_chars" != x; then
32568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32572      # Going to short mode and back again did indeed matter. Since short mode is
32573      # case insensitive, let's make it lowercase to improve readability.
32574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32575      # Now convert it back to Unix-style (cygpath)
32576      input_path=`$CYGPATH -u "$shortmode_path"`
32577      new_path="$input_path"
32578    fi
32579  fi
32580
32581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32582  if test "x$test_cygdrive_prefix" = x; then
32583    # As a simple fix, exclude /usr/bin since it's not a real path.
32584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32586      # a path prefixed by /cygdrive for fixpath to work.
32587      new_path="$CYGWIN_ROOT_PATH$input_path"
32588    fi
32589  fi
32590
32591  # remove trailing .exe if any
32592  new_path="${new_path/%.exe/}"
32593
32594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32595
32596  # First separate the path from the arguments. This will split at the first
32597  # space.
32598  complete="$CPP"
32599  path="${complete%% *}"
32600  tmp="$complete EOL"
32601  arguments="${tmp#* }"
32602
32603  # Input might be given as Windows format, start by converting to
32604  # unix format.
32605  new_path="$path"
32606
32607  windows_path="$new_path"
32608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32609    unix_path=`$CYGPATH -u "$windows_path"`
32610    new_path="$unix_path"
32611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32613    new_path="$unix_path"
32614  fi
32615
32616
32617  # Now try to locate executable using which
32618  new_path=`$WHICH "$new_path" 2> /dev/null`
32619
32620  if test "x$new_path" = x; then
32621    # Oops. Which didn't find the executable.
32622    # The splitting of arguments from the executable at a space might have been incorrect,
32623    # since paths with space are more likely in Windows. Give it another try with the whole
32624    # argument.
32625    path="$complete"
32626    arguments="EOL"
32627    new_path="$path"
32628
32629  windows_path="$new_path"
32630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32631    unix_path=`$CYGPATH -u "$windows_path"`
32632    new_path="$unix_path"
32633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32635    new_path="$unix_path"
32636  fi
32637
32638
32639    new_path=`$WHICH "$new_path" 2> /dev/null`
32640    # bat and cmd files are not always considered executable in MSYS causing which
32641    # to not find them
32642    if test "x$new_path" = x \
32643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32645      new_path="$path"
32646
32647  windows_path="$new_path"
32648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32649    unix_path=`$CYGPATH -u "$windows_path"`
32650    new_path="$unix_path"
32651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32653    new_path="$unix_path"
32654  fi
32655
32656    fi
32657
32658    if test "x$new_path" = x; then
32659      # It's still not found. Now this is an unrecoverable error.
32660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32661$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32662      has_space=`$ECHO "$complete" | $GREP " "`
32663      if test "x$has_space" != x; then
32664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32666      fi
32667      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32668    fi
32669  fi
32670
32671  # Now new_path has a complete unix path to the binary
32672  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32673    # Keep paths in /bin as-is, but remove trailing .exe if any
32674    new_path="${new_path/%.exe/}"
32675    # Do not save /bin paths to all_fixpath_prefixes!
32676  else
32677    # Not in mixed or Windows style, start by that.
32678    new_path=`cmd //c echo $new_path`
32679
32680  input_path="$new_path"
32681  # Check if we need to convert this using DOS-style short mode. If the path
32682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32683  # take no chances and rewrite it.
32684  # Note: m4 eats our [], so we need to use [ and ] instead.
32685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32686  if test "x$has_forbidden_chars" != x; then
32687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32689  fi
32690
32691    # Output is in $new_path
32692
32693  windows_path="$new_path"
32694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32695    unix_path=`$CYGPATH -u "$windows_path"`
32696    new_path="$unix_path"
32697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32699    new_path="$unix_path"
32700  fi
32701
32702    # remove trailing .exe if any
32703    new_path="${new_path/%.exe/}"
32704
32705    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32706    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32707  fi
32708
32709    else
32710      # We're on a unix platform. Hooray! :)
32711      # First separate the path from the arguments. This will split at the first
32712      # space.
32713      complete="$CPP"
32714      path="${complete%% *}"
32715      tmp="$complete EOL"
32716      arguments="${tmp#* }"
32717
32718      # Cannot rely on the command "which" here since it doesn't always work.
32719      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32720      if test -z "$is_absolute_path"; then
32721        # Path to executable is not absolute. Find it.
32722        IFS_save="$IFS"
32723        IFS=:
32724        for p in $PATH; do
32725          if test -f "$p/$path" && test -x "$p/$path"; then
32726            new_path="$p/$path"
32727            break
32728          fi
32729        done
32730        IFS="$IFS_save"
32731      else
32732        # This is an absolute path, we can use it without further modifications.
32733        new_path="$path"
32734      fi
32735
32736      if test "x$new_path" = x; then
32737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32738$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32739        has_space=`$ECHO "$complete" | $GREP " "`
32740        if test "x$has_space" != x; then
32741          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32742$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32743        fi
32744        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32745      fi
32746    fi
32747
32748    # Now join together the path and the arguments once again
32749    if test "x$arguments" != xEOL; then
32750      new_complete="$new_path ${arguments% *}"
32751    else
32752      new_complete="$new_path"
32753    fi
32754
32755    if test "x$complete" != "x$new_complete"; then
32756      CPP="$new_complete"
32757      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32758$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32759    fi
32760  fi
32761
32762  ac_ext=cpp
32763ac_cpp='$CXXCPP $CPPFLAGS'
32764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32768$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32769if test -z "$CXXCPP"; then
32770  if ${ac_cv_prog_CXXCPP+:} false; then :
32771  $as_echo_n "(cached) " >&6
32772else
32773      # Double quotes because CXXCPP needs to be expanded
32774    for CXXCPP in "$CXX -E" "/lib/cpp"
32775    do
32776      ac_preproc_ok=false
32777for ac_cxx_preproc_warn_flag in '' yes
32778do
32779  # Use a header file that comes with gcc, so configuring glibc
32780  # with a fresh cross-compiler works.
32781  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32782  # <limits.h> exists even on freestanding compilers.
32783  # On the NeXT, cc -E runs the code through the compiler's parser,
32784  # not just through cpp. "Syntax error" is here to catch this case.
32785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32786/* end confdefs.h.  */
32787#ifdef __STDC__
32788# include <limits.h>
32789#else
32790# include <assert.h>
32791#endif
32792		     Syntax error
32793_ACEOF
32794if ac_fn_cxx_try_cpp "$LINENO"; then :
32795
32796else
32797  # Broken: fails on valid input.
32798continue
32799fi
32800rm -f conftest.err conftest.i conftest.$ac_ext
32801
32802  # OK, works on sane cases.  Now check whether nonexistent headers
32803  # can be detected and how.
32804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32805/* end confdefs.h.  */
32806#include <ac_nonexistent.h>
32807_ACEOF
32808if ac_fn_cxx_try_cpp "$LINENO"; then :
32809  # Broken: success on invalid input.
32810continue
32811else
32812  # Passes both tests.
32813ac_preproc_ok=:
32814break
32815fi
32816rm -f conftest.err conftest.i conftest.$ac_ext
32817
32818done
32819# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32820rm -f conftest.i conftest.err conftest.$ac_ext
32821if $ac_preproc_ok; then :
32822  break
32823fi
32824
32825    done
32826    ac_cv_prog_CXXCPP=$CXXCPP
32827
32828fi
32829  CXXCPP=$ac_cv_prog_CXXCPP
32830else
32831  ac_cv_prog_CXXCPP=$CXXCPP
32832fi
32833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32834$as_echo "$CXXCPP" >&6; }
32835ac_preproc_ok=false
32836for ac_cxx_preproc_warn_flag in '' yes
32837do
32838  # Use a header file that comes with gcc, so configuring glibc
32839  # with a fresh cross-compiler works.
32840  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32841  # <limits.h> exists even on freestanding compilers.
32842  # On the NeXT, cc -E runs the code through the compiler's parser,
32843  # not just through cpp. "Syntax error" is here to catch this case.
32844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32845/* end confdefs.h.  */
32846#ifdef __STDC__
32847# include <limits.h>
32848#else
32849# include <assert.h>
32850#endif
32851		     Syntax error
32852_ACEOF
32853if ac_fn_cxx_try_cpp "$LINENO"; then :
32854
32855else
32856  # Broken: fails on valid input.
32857continue
32858fi
32859rm -f conftest.err conftest.i conftest.$ac_ext
32860
32861  # OK, works on sane cases.  Now check whether nonexistent headers
32862  # can be detected and how.
32863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32864/* end confdefs.h.  */
32865#include <ac_nonexistent.h>
32866_ACEOF
32867if ac_fn_cxx_try_cpp "$LINENO"; then :
32868  # Broken: success on invalid input.
32869continue
32870else
32871  # Passes both tests.
32872ac_preproc_ok=:
32873break
32874fi
32875rm -f conftest.err conftest.i conftest.$ac_ext
32876
32877done
32878# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32879rm -f conftest.i conftest.err conftest.$ac_ext
32880if $ac_preproc_ok; then :
32881
32882else
32883  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32885as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32886See \`config.log' for more details" "$LINENO" 5; }
32887fi
32888
32889ac_ext=cpp
32890ac_cpp='$CXXCPP $CPPFLAGS'
32891ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32892ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32893ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32894
32895
32896  # Only process if variable expands to non-empty
32897
32898  if test "x$CXXCPP" != x; then
32899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32900
32901  # First separate the path from the arguments. This will split at the first
32902  # space.
32903  complete="$CXXCPP"
32904  path="${complete%% *}"
32905  tmp="$complete EOL"
32906  arguments="${tmp#* }"
32907
32908  # Input might be given as Windows format, start by converting to
32909  # unix format.
32910  new_path=`$CYGPATH -u "$path"`
32911
32912  # Now try to locate executable using which
32913  new_path=`$WHICH "$new_path" 2> /dev/null`
32914  # bat and cmd files are not always considered executable in cygwin causing which
32915  # to not find them
32916  if test "x$new_path" = x \
32917      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32918      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32919    new_path=`$CYGPATH -u "$path"`
32920  fi
32921  if test "x$new_path" = x; then
32922    # Oops. Which didn't find the executable.
32923    # The splitting of arguments from the executable at a space might have been incorrect,
32924    # since paths with space are more likely in Windows. Give it another try with the whole
32925    # argument.
32926    path="$complete"
32927    arguments="EOL"
32928    new_path=`$CYGPATH -u "$path"`
32929    new_path=`$WHICH "$new_path" 2> /dev/null`
32930    # bat and cmd files are not always considered executable in cygwin causing which
32931    # to not find them
32932    if test "x$new_path" = x \
32933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32935      new_path=`$CYGPATH -u "$path"`
32936    fi
32937    if test "x$new_path" = x; then
32938      # It's still not found. Now this is an unrecoverable error.
32939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32940$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32941      has_space=`$ECHO "$complete" | $GREP " "`
32942      if test "x$has_space" != x; then
32943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32945      fi
32946      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32947    fi
32948  fi
32949
32950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32953  # "foo.exe" is OK but "foo" is an error.
32954  #
32955  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32956  # It is also a way to make sure we got the proper file name for the real test later on.
32957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32958  if test "x$test_shortpath" = x; then
32959    # Short path failed, file does not exist as specified.
32960    # Try adding .exe or .cmd
32961    if test -f "${new_path}.exe"; then
32962      input_to_shortpath="${new_path}.exe"
32963    elif test -f "${new_path}.cmd"; then
32964      input_to_shortpath="${new_path}.cmd"
32965    else
32966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32967$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32968      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32969$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32970      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32971    fi
32972  else
32973    input_to_shortpath="$new_path"
32974  fi
32975
32976  # Call helper function which possibly converts this using DOS-style short mode.
32977  # If so, the updated path is stored in $new_path.
32978  new_path="$input_to_shortpath"
32979
32980  input_path="$input_to_shortpath"
32981  # Check if we need to convert this using DOS-style short mode. If the path
32982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32983  # take no chances and rewrite it.
32984  # Note: m4 eats our [], so we need to use [ and ] instead.
32985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32986  if test "x$has_forbidden_chars" != x; then
32987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32991      # Going to short mode and back again did indeed matter. Since short mode is
32992      # case insensitive, let's make it lowercase to improve readability.
32993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32994      # Now convert it back to Unix-style (cygpath)
32995      input_path=`$CYGPATH -u "$shortmode_path"`
32996      new_path="$input_path"
32997    fi
32998  fi
32999
33000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33001  if test "x$test_cygdrive_prefix" = x; then
33002    # As a simple fix, exclude /usr/bin since it's not a real path.
33003    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33005      # a path prefixed by /cygdrive for fixpath to work.
33006      new_path="$CYGWIN_ROOT_PATH$input_path"
33007    fi
33008  fi
33009
33010  # remove trailing .exe if any
33011  new_path="${new_path/%.exe/}"
33012
33013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33014
33015  # First separate the path from the arguments. This will split at the first
33016  # space.
33017  complete="$CXXCPP"
33018  path="${complete%% *}"
33019  tmp="$complete EOL"
33020  arguments="${tmp#* }"
33021
33022  # Input might be given as Windows format, start by converting to
33023  # unix format.
33024  new_path="$path"
33025
33026  windows_path="$new_path"
33027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33028    unix_path=`$CYGPATH -u "$windows_path"`
33029    new_path="$unix_path"
33030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33032    new_path="$unix_path"
33033  fi
33034
33035
33036  # Now try to locate executable using which
33037  new_path=`$WHICH "$new_path" 2> /dev/null`
33038
33039  if test "x$new_path" = x; then
33040    # Oops. Which didn't find the executable.
33041    # The splitting of arguments from the executable at a space might have been incorrect,
33042    # since paths with space are more likely in Windows. Give it another try with the whole
33043    # argument.
33044    path="$complete"
33045    arguments="EOL"
33046    new_path="$path"
33047
33048  windows_path="$new_path"
33049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33050    unix_path=`$CYGPATH -u "$windows_path"`
33051    new_path="$unix_path"
33052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33054    new_path="$unix_path"
33055  fi
33056
33057
33058    new_path=`$WHICH "$new_path" 2> /dev/null`
33059    # bat and cmd files are not always considered executable in MSYS causing which
33060    # to not find them
33061    if test "x$new_path" = x \
33062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33064      new_path="$path"
33065
33066  windows_path="$new_path"
33067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33068    unix_path=`$CYGPATH -u "$windows_path"`
33069    new_path="$unix_path"
33070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33072    new_path="$unix_path"
33073  fi
33074
33075    fi
33076
33077    if test "x$new_path" = x; then
33078      # It's still not found. Now this is an unrecoverable error.
33079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
33080$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
33081      has_space=`$ECHO "$complete" | $GREP " "`
33082      if test "x$has_space" != x; then
33083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33085      fi
33086      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
33087    fi
33088  fi
33089
33090  # Now new_path has a complete unix path to the binary
33091  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33092    # Keep paths in /bin as-is, but remove trailing .exe if any
33093    new_path="${new_path/%.exe/}"
33094    # Do not save /bin paths to all_fixpath_prefixes!
33095  else
33096    # Not in mixed or Windows style, start by that.
33097    new_path=`cmd //c echo $new_path`
33098
33099  input_path="$new_path"
33100  # Check if we need to convert this using DOS-style short mode. If the path
33101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33102  # take no chances and rewrite it.
33103  # Note: m4 eats our [], so we need to use [ and ] instead.
33104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33105  if test "x$has_forbidden_chars" != x; then
33106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33108  fi
33109
33110    # Output is in $new_path
33111
33112  windows_path="$new_path"
33113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33114    unix_path=`$CYGPATH -u "$windows_path"`
33115    new_path="$unix_path"
33116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33118    new_path="$unix_path"
33119  fi
33120
33121    # remove trailing .exe if any
33122    new_path="${new_path/%.exe/}"
33123
33124    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33125    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33126  fi
33127
33128    else
33129      # We're on a unix platform. Hooray! :)
33130      # First separate the path from the arguments. This will split at the first
33131      # space.
33132      complete="$CXXCPP"
33133      path="${complete%% *}"
33134      tmp="$complete EOL"
33135      arguments="${tmp#* }"
33136
33137      # Cannot rely on the command "which" here since it doesn't always work.
33138      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33139      if test -z "$is_absolute_path"; then
33140        # Path to executable is not absolute. Find it.
33141        IFS_save="$IFS"
33142        IFS=:
33143        for p in $PATH; do
33144          if test -f "$p/$path" && test -x "$p/$path"; then
33145            new_path="$p/$path"
33146            break
33147          fi
33148        done
33149        IFS="$IFS_save"
33150      else
33151        # This is an absolute path, we can use it without further modifications.
33152        new_path="$path"
33153      fi
33154
33155      if test "x$new_path" = x; then
33156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
33157$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
33158        has_space=`$ECHO "$complete" | $GREP " "`
33159        if test "x$has_space" != x; then
33160          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33161$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33162        fi
33163        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
33164      fi
33165    fi
33166
33167    # Now join together the path and the arguments once again
33168    if test "x$arguments" != xEOL; then
33169      new_complete="$new_path ${arguments% *}"
33170    else
33171      new_complete="$new_path"
33172    fi
33173
33174    if test "x$complete" != "x$new_complete"; then
33175      CXXCPP="$new_complete"
33176      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
33177$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
33178    fi
33179  fi
33180
33181
33182  #
33183  # Setup the linker (LD)
33184  #
33185  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33186    # In the Microsoft toolchain we have a separate LD command "link".
33187    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
33188    # a cygwin program for something completely different.
33189    # Extract the first word of "link", so it can be a program name with args.
33190set dummy link; ac_word=$2
33191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33192$as_echo_n "checking for $ac_word... " >&6; }
33193if ${ac_cv_prog_LD+:} false; then :
33194  $as_echo_n "(cached) " >&6
33195else
33196  if test -n "$LD"; then
33197  ac_cv_prog_LD="$LD" # Let the user override the test.
33198else
33199  ac_prog_rejected=no
33200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33201for as_dir in $PATH
33202do
33203  IFS=$as_save_IFS
33204  test -z "$as_dir" && as_dir=.
33205    for ac_exec_ext in '' $ac_executable_extensions; do
33206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33207    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
33208       ac_prog_rejected=yes
33209       continue
33210     fi
33211    ac_cv_prog_LD="link"
33212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33213    break 2
33214  fi
33215done
33216  done
33217IFS=$as_save_IFS
33218
33219if test $ac_prog_rejected = yes; then
33220  # We found a bogon in the path, so make sure we never use it.
33221  set dummy $ac_cv_prog_LD
33222  shift
33223  if test $# != 0; then
33224    # We chose a different compiler from the bogus one.
33225    # However, it has the same basename, so the bogon will be chosen
33226    # first if we set LD to just the basename; use the full file name.
33227    shift
33228    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
33229  fi
33230fi
33231fi
33232fi
33233LD=$ac_cv_prog_LD
33234if test -n "$LD"; then
33235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
33236$as_echo "$LD" >&6; }
33237else
33238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33239$as_echo "no" >&6; }
33240fi
33241
33242
33243
33244  # Only process if variable expands to non-empty
33245
33246  if test "x$LD" != x; then
33247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33248
33249  # First separate the path from the arguments. This will split at the first
33250  # space.
33251  complete="$LD"
33252  path="${complete%% *}"
33253  tmp="$complete EOL"
33254  arguments="${tmp#* }"
33255
33256  # Input might be given as Windows format, start by converting to
33257  # unix format.
33258  new_path=`$CYGPATH -u "$path"`
33259
33260  # Now try to locate executable using which
33261  new_path=`$WHICH "$new_path" 2> /dev/null`
33262  # bat and cmd files are not always considered executable in cygwin causing which
33263  # to not find them
33264  if test "x$new_path" = x \
33265      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33266      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33267    new_path=`$CYGPATH -u "$path"`
33268  fi
33269  if test "x$new_path" = x; then
33270    # Oops. Which didn't find the executable.
33271    # The splitting of arguments from the executable at a space might have been incorrect,
33272    # since paths with space are more likely in Windows. Give it another try with the whole
33273    # argument.
33274    path="$complete"
33275    arguments="EOL"
33276    new_path=`$CYGPATH -u "$path"`
33277    new_path=`$WHICH "$new_path" 2> /dev/null`
33278    # bat and cmd files are not always considered executable in cygwin causing which
33279    # to not find them
33280    if test "x$new_path" = x \
33281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33283      new_path=`$CYGPATH -u "$path"`
33284    fi
33285    if test "x$new_path" = x; then
33286      # It's still not found. Now this is an unrecoverable error.
33287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33288$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33289      has_space=`$ECHO "$complete" | $GREP " "`
33290      if test "x$has_space" != x; then
33291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33293      fi
33294      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33295    fi
33296  fi
33297
33298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33301  # "foo.exe" is OK but "foo" is an error.
33302  #
33303  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33304  # It is also a way to make sure we got the proper file name for the real test later on.
33305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33306  if test "x$test_shortpath" = x; then
33307    # Short path failed, file does not exist as specified.
33308    # Try adding .exe or .cmd
33309    if test -f "${new_path}.exe"; then
33310      input_to_shortpath="${new_path}.exe"
33311    elif test -f "${new_path}.cmd"; then
33312      input_to_shortpath="${new_path}.cmd"
33313    else
33314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
33315$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
33316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33318      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33319    fi
33320  else
33321    input_to_shortpath="$new_path"
33322  fi
33323
33324  # Call helper function which possibly converts this using DOS-style short mode.
33325  # If so, the updated path is stored in $new_path.
33326  new_path="$input_to_shortpath"
33327
33328  input_path="$input_to_shortpath"
33329  # Check if we need to convert this using DOS-style short mode. If the path
33330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33331  # take no chances and rewrite it.
33332  # Note: m4 eats our [], so we need to use [ and ] instead.
33333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33334  if test "x$has_forbidden_chars" != x; then
33335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33339      # Going to short mode and back again did indeed matter. Since short mode is
33340      # case insensitive, let's make it lowercase to improve readability.
33341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33342      # Now convert it back to Unix-style (cygpath)
33343      input_path=`$CYGPATH -u "$shortmode_path"`
33344      new_path="$input_path"
33345    fi
33346  fi
33347
33348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33349  if test "x$test_cygdrive_prefix" = x; then
33350    # As a simple fix, exclude /usr/bin since it's not a real path.
33351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33353      # a path prefixed by /cygdrive for fixpath to work.
33354      new_path="$CYGWIN_ROOT_PATH$input_path"
33355    fi
33356  fi
33357
33358  # remove trailing .exe if any
33359  new_path="${new_path/%.exe/}"
33360
33361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33362
33363  # First separate the path from the arguments. This will split at the first
33364  # space.
33365  complete="$LD"
33366  path="${complete%% *}"
33367  tmp="$complete EOL"
33368  arguments="${tmp#* }"
33369
33370  # Input might be given as Windows format, start by converting to
33371  # unix format.
33372  new_path="$path"
33373
33374  windows_path="$new_path"
33375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33376    unix_path=`$CYGPATH -u "$windows_path"`
33377    new_path="$unix_path"
33378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33380    new_path="$unix_path"
33381  fi
33382
33383
33384  # Now try to locate executable using which
33385  new_path=`$WHICH "$new_path" 2> /dev/null`
33386
33387  if test "x$new_path" = x; then
33388    # Oops. Which didn't find the executable.
33389    # The splitting of arguments from the executable at a space might have been incorrect,
33390    # since paths with space are more likely in Windows. Give it another try with the whole
33391    # argument.
33392    path="$complete"
33393    arguments="EOL"
33394    new_path="$path"
33395
33396  windows_path="$new_path"
33397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33398    unix_path=`$CYGPATH -u "$windows_path"`
33399    new_path="$unix_path"
33400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33402    new_path="$unix_path"
33403  fi
33404
33405
33406    new_path=`$WHICH "$new_path" 2> /dev/null`
33407    # bat and cmd files are not always considered executable in MSYS causing which
33408    # to not find them
33409    if test "x$new_path" = x \
33410        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33411        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33412      new_path="$path"
33413
33414  windows_path="$new_path"
33415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33416    unix_path=`$CYGPATH -u "$windows_path"`
33417    new_path="$unix_path"
33418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33420    new_path="$unix_path"
33421  fi
33422
33423    fi
33424
33425    if test "x$new_path" = x; then
33426      # It's still not found. Now this is an unrecoverable error.
33427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33428$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33429      has_space=`$ECHO "$complete" | $GREP " "`
33430      if test "x$has_space" != x; then
33431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33433      fi
33434      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33435    fi
33436  fi
33437
33438  # Now new_path has a complete unix path to the binary
33439  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33440    # Keep paths in /bin as-is, but remove trailing .exe if any
33441    new_path="${new_path/%.exe/}"
33442    # Do not save /bin paths to all_fixpath_prefixes!
33443  else
33444    # Not in mixed or Windows style, start by that.
33445    new_path=`cmd //c echo $new_path`
33446
33447  input_path="$new_path"
33448  # Check if we need to convert this using DOS-style short mode. If the path
33449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33450  # take no chances and rewrite it.
33451  # Note: m4 eats our [], so we need to use [ and ] instead.
33452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33453  if test "x$has_forbidden_chars" != x; then
33454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33456  fi
33457
33458    # Output is in $new_path
33459
33460  windows_path="$new_path"
33461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33462    unix_path=`$CYGPATH -u "$windows_path"`
33463    new_path="$unix_path"
33464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33466    new_path="$unix_path"
33467  fi
33468
33469    # remove trailing .exe if any
33470    new_path="${new_path/%.exe/}"
33471
33472    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33473    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33474  fi
33475
33476    else
33477      # We're on a unix platform. Hooray! :)
33478      # First separate the path from the arguments. This will split at the first
33479      # space.
33480      complete="$LD"
33481      path="${complete%% *}"
33482      tmp="$complete EOL"
33483      arguments="${tmp#* }"
33484
33485      # Cannot rely on the command "which" here since it doesn't always work.
33486      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33487      if test -z "$is_absolute_path"; then
33488        # Path to executable is not absolute. Find it.
33489        IFS_save="$IFS"
33490        IFS=:
33491        for p in $PATH; do
33492          if test -f "$p/$path" && test -x "$p/$path"; then
33493            new_path="$p/$path"
33494            break
33495          fi
33496        done
33497        IFS="$IFS_save"
33498      else
33499        # This is an absolute path, we can use it without further modifications.
33500        new_path="$path"
33501      fi
33502
33503      if test "x$new_path" = x; then
33504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33505$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33506        has_space=`$ECHO "$complete" | $GREP " "`
33507        if test "x$has_space" != x; then
33508          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33509$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33510        fi
33511        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33512      fi
33513    fi
33514
33515    # Now join together the path and the arguments once again
33516    if test "x$arguments" != xEOL; then
33517      new_complete="$new_path ${arguments% *}"
33518    else
33519      new_complete="$new_path"
33520    fi
33521
33522    if test "x$complete" != "x$new_complete"; then
33523      LD="$new_complete"
33524      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
33525$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
33526    fi
33527  fi
33528
33529    # Verify that we indeed succeeded with this trick.
33530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33531$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33532    "$LD" --version > /dev/null
33533    if test $? -eq 0 ; then
33534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33535$as_echo "no" >&6; }
33536      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33537    else
33538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33539$as_echo "yes" >&6; }
33540    fi
33541    LDCXX="$LD"
33542  else
33543    # All other toolchains use the compiler to link.
33544    LD="$CC"
33545    LDCXX="$CXX"
33546  fi
33547
33548  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
33549
33550
33551  #
33552  # Setup the assembler (AS)
33553  #
33554  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
33555    # FIXME: should this really be solaris, or solstudio?
33556
33557
33558  # Publish this variable in the help.
33559
33560
33561  if [ -z "${AS+x}" ]; then
33562    # The variable is not set by user, try to locate tool using the code snippet
33563    for ac_prog in as
33564do
33565  # Extract the first word of "$ac_prog", so it can be a program name with args.
33566set dummy $ac_prog; ac_word=$2
33567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33568$as_echo_n "checking for $ac_word... " >&6; }
33569if ${ac_cv_path_AS+:} false; then :
33570  $as_echo_n "(cached) " >&6
33571else
33572  case $AS in
33573  [\\/]* | ?:[\\/]*)
33574  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33575  ;;
33576  *)
33577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33578for as_dir in $PATH
33579do
33580  IFS=$as_save_IFS
33581  test -z "$as_dir" && as_dir=.
33582    for ac_exec_ext in '' $ac_executable_extensions; do
33583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33584    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33586    break 2
33587  fi
33588done
33589  done
33590IFS=$as_save_IFS
33591
33592  ;;
33593esac
33594fi
33595AS=$ac_cv_path_AS
33596if test -n "$AS"; then
33597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33598$as_echo "$AS" >&6; }
33599else
33600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33601$as_echo "no" >&6; }
33602fi
33603
33604
33605  test -n "$AS" && break
33606done
33607
33608  else
33609    # The variable is set, but is it from the command line or the environment?
33610
33611    # Try to remove the string !AS! from our list.
33612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
33613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33614      # If it failed, the variable was not from the command line. Ignore it,
33615      # but warn the user (except for BASH, which is always set by the calling BASH).
33616      if test "xAS" != xBASH; then
33617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33618$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33619      fi
33620      # Try to locate tool using the code snippet
33621      for ac_prog in as
33622do
33623  # Extract the first word of "$ac_prog", so it can be a program name with args.
33624set dummy $ac_prog; ac_word=$2
33625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33626$as_echo_n "checking for $ac_word... " >&6; }
33627if ${ac_cv_path_AS+:} false; then :
33628  $as_echo_n "(cached) " >&6
33629else
33630  case $AS in
33631  [\\/]* | ?:[\\/]*)
33632  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33633  ;;
33634  *)
33635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33636for as_dir in $PATH
33637do
33638  IFS=$as_save_IFS
33639  test -z "$as_dir" && as_dir=.
33640    for ac_exec_ext in '' $ac_executable_extensions; do
33641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33642    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33644    break 2
33645  fi
33646done
33647  done
33648IFS=$as_save_IFS
33649
33650  ;;
33651esac
33652fi
33653AS=$ac_cv_path_AS
33654if test -n "$AS"; then
33655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33656$as_echo "$AS" >&6; }
33657else
33658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33659$as_echo "no" >&6; }
33660fi
33661
33662
33663  test -n "$AS" && break
33664done
33665
33666    else
33667      # If it succeeded, then it was overridden by the user. We will use it
33668      # for the tool.
33669
33670      # First remove it from the list of overridden variables, so we can test
33671      # for unknown variables in the end.
33672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33673
33674      # Check if we try to supply an empty value
33675      if test "x$AS" = x; then
33676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
33677$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
33678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33679$as_echo_n "checking for AS... " >&6; }
33680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
33681$as_echo "disabled" >&6; }
33682      else
33683        # Check if the provided tool contains a complete path.
33684        tool_specified="$AS"
33685        tool_basename="${tool_specified##*/}"
33686        if test "x$tool_basename" = "x$tool_specified"; then
33687          # A command without a complete path is provided, search $PATH.
33688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33689$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33690          # Extract the first word of "$tool_basename", so it can be a program name with args.
33691set dummy $tool_basename; ac_word=$2
33692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33693$as_echo_n "checking for $ac_word... " >&6; }
33694if ${ac_cv_path_AS+:} false; then :
33695  $as_echo_n "(cached) " >&6
33696else
33697  case $AS in
33698  [\\/]* | ?:[\\/]*)
33699  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33700  ;;
33701  *)
33702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33703for as_dir in $PATH
33704do
33705  IFS=$as_save_IFS
33706  test -z "$as_dir" && as_dir=.
33707    for ac_exec_ext in '' $ac_executable_extensions; do
33708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33709    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33711    break 2
33712  fi
33713done
33714  done
33715IFS=$as_save_IFS
33716
33717  ;;
33718esac
33719fi
33720AS=$ac_cv_path_AS
33721if test -n "$AS"; then
33722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33723$as_echo "$AS" >&6; }
33724else
33725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33726$as_echo "no" >&6; }
33727fi
33728
33729
33730          if test "x$AS" = x; then
33731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33732          fi
33733        else
33734          # Otherwise we believe it is a complete path. Use it as it is.
33735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33736$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33738$as_echo_n "checking for AS... " >&6; }
33739          if test ! -x "$tool_specified"; then
33740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33741$as_echo "not found" >&6; }
33742            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33743          fi
33744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33745$as_echo "$tool_specified" >&6; }
33746        fi
33747      fi
33748    fi
33749  fi
33750
33751
33752
33753  # Only process if variable expands to non-empty
33754
33755  if test "x$AS" != x; then
33756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33757
33758  # First separate the path from the arguments. This will split at the first
33759  # space.
33760  complete="$AS"
33761  path="${complete%% *}"
33762  tmp="$complete EOL"
33763  arguments="${tmp#* }"
33764
33765  # Input might be given as Windows format, start by converting to
33766  # unix format.
33767  new_path=`$CYGPATH -u "$path"`
33768
33769  # Now try to locate executable using which
33770  new_path=`$WHICH "$new_path" 2> /dev/null`
33771  # bat and cmd files are not always considered executable in cygwin causing which
33772  # to not find them
33773  if test "x$new_path" = x \
33774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33776    new_path=`$CYGPATH -u "$path"`
33777  fi
33778  if test "x$new_path" = x; then
33779    # Oops. Which didn't find the executable.
33780    # The splitting of arguments from the executable at a space might have been incorrect,
33781    # since paths with space are more likely in Windows. Give it another try with the whole
33782    # argument.
33783    path="$complete"
33784    arguments="EOL"
33785    new_path=`$CYGPATH -u "$path"`
33786    new_path=`$WHICH "$new_path" 2> /dev/null`
33787    # bat and cmd files are not always considered executable in cygwin causing which
33788    # to not find them
33789    if test "x$new_path" = x \
33790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33792      new_path=`$CYGPATH -u "$path"`
33793    fi
33794    if test "x$new_path" = x; then
33795      # It's still not found. Now this is an unrecoverable error.
33796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33797$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33798      has_space=`$ECHO "$complete" | $GREP " "`
33799      if test "x$has_space" != x; then
33800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33802      fi
33803      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33804    fi
33805  fi
33806
33807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33810  # "foo.exe" is OK but "foo" is an error.
33811  #
33812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33813  # It is also a way to make sure we got the proper file name for the real test later on.
33814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33815  if test "x$test_shortpath" = x; then
33816    # Short path failed, file does not exist as specified.
33817    # Try adding .exe or .cmd
33818    if test -f "${new_path}.exe"; then
33819      input_to_shortpath="${new_path}.exe"
33820    elif test -f "${new_path}.cmd"; then
33821      input_to_shortpath="${new_path}.cmd"
33822    else
33823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33824$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33827      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33828    fi
33829  else
33830    input_to_shortpath="$new_path"
33831  fi
33832
33833  # Call helper function which possibly converts this using DOS-style short mode.
33834  # If so, the updated path is stored in $new_path.
33835  new_path="$input_to_shortpath"
33836
33837  input_path="$input_to_shortpath"
33838  # Check if we need to convert this using DOS-style short mode. If the path
33839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33840  # take no chances and rewrite it.
33841  # Note: m4 eats our [], so we need to use [ and ] instead.
33842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33843  if test "x$has_forbidden_chars" != x; then
33844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33848      # Going to short mode and back again did indeed matter. Since short mode is
33849      # case insensitive, let's make it lowercase to improve readability.
33850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33851      # Now convert it back to Unix-style (cygpath)
33852      input_path=`$CYGPATH -u "$shortmode_path"`
33853      new_path="$input_path"
33854    fi
33855  fi
33856
33857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33858  if test "x$test_cygdrive_prefix" = x; then
33859    # As a simple fix, exclude /usr/bin since it's not a real path.
33860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33862      # a path prefixed by /cygdrive for fixpath to work.
33863      new_path="$CYGWIN_ROOT_PATH$input_path"
33864    fi
33865  fi
33866
33867  # remove trailing .exe if any
33868  new_path="${new_path/%.exe/}"
33869
33870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33871
33872  # First separate the path from the arguments. This will split at the first
33873  # space.
33874  complete="$AS"
33875  path="${complete%% *}"
33876  tmp="$complete EOL"
33877  arguments="${tmp#* }"
33878
33879  # Input might be given as Windows format, start by converting to
33880  # unix format.
33881  new_path="$path"
33882
33883  windows_path="$new_path"
33884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33885    unix_path=`$CYGPATH -u "$windows_path"`
33886    new_path="$unix_path"
33887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33889    new_path="$unix_path"
33890  fi
33891
33892
33893  # Now try to locate executable using which
33894  new_path=`$WHICH "$new_path" 2> /dev/null`
33895
33896  if test "x$new_path" = x; then
33897    # Oops. Which didn't find the executable.
33898    # The splitting of arguments from the executable at a space might have been incorrect,
33899    # since paths with space are more likely in Windows. Give it another try with the whole
33900    # argument.
33901    path="$complete"
33902    arguments="EOL"
33903    new_path="$path"
33904
33905  windows_path="$new_path"
33906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33907    unix_path=`$CYGPATH -u "$windows_path"`
33908    new_path="$unix_path"
33909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33911    new_path="$unix_path"
33912  fi
33913
33914
33915    new_path=`$WHICH "$new_path" 2> /dev/null`
33916    # bat and cmd files are not always considered executable in MSYS causing which
33917    # to not find them
33918    if test "x$new_path" = x \
33919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33921      new_path="$path"
33922
33923  windows_path="$new_path"
33924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33925    unix_path=`$CYGPATH -u "$windows_path"`
33926    new_path="$unix_path"
33927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33929    new_path="$unix_path"
33930  fi
33931
33932    fi
33933
33934    if test "x$new_path" = x; then
33935      # It's still not found. Now this is an unrecoverable error.
33936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33937$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33938      has_space=`$ECHO "$complete" | $GREP " "`
33939      if test "x$has_space" != x; then
33940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33942      fi
33943      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33944    fi
33945  fi
33946
33947  # Now new_path has a complete unix path to the binary
33948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33949    # Keep paths in /bin as-is, but remove trailing .exe if any
33950    new_path="${new_path/%.exe/}"
33951    # Do not save /bin paths to all_fixpath_prefixes!
33952  else
33953    # Not in mixed or Windows style, start by that.
33954    new_path=`cmd //c echo $new_path`
33955
33956  input_path="$new_path"
33957  # Check if we need to convert this using DOS-style short mode. If the path
33958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33959  # take no chances and rewrite it.
33960  # Note: m4 eats our [], so we need to use [ and ] instead.
33961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33962  if test "x$has_forbidden_chars" != x; then
33963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33965  fi
33966
33967    # Output is in $new_path
33968
33969  windows_path="$new_path"
33970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33971    unix_path=`$CYGPATH -u "$windows_path"`
33972    new_path="$unix_path"
33973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33975    new_path="$unix_path"
33976  fi
33977
33978    # remove trailing .exe if any
33979    new_path="${new_path/%.exe/}"
33980
33981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33983  fi
33984
33985    else
33986      # We're on a unix platform. Hooray! :)
33987      # First separate the path from the arguments. This will split at the first
33988      # space.
33989      complete="$AS"
33990      path="${complete%% *}"
33991      tmp="$complete EOL"
33992      arguments="${tmp#* }"
33993
33994      # Cannot rely on the command "which" here since it doesn't always work.
33995      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33996      if test -z "$is_absolute_path"; then
33997        # Path to executable is not absolute. Find it.
33998        IFS_save="$IFS"
33999        IFS=:
34000        for p in $PATH; do
34001          if test -f "$p/$path" && test -x "$p/$path"; then
34002            new_path="$p/$path"
34003            break
34004          fi
34005        done
34006        IFS="$IFS_save"
34007      else
34008        # This is an absolute path, we can use it without further modifications.
34009        new_path="$path"
34010      fi
34011
34012      if test "x$new_path" = x; then
34013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
34014$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
34015        has_space=`$ECHO "$complete" | $GREP " "`
34016        if test "x$has_space" != x; then
34017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34019        fi
34020        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34021      fi
34022    fi
34023
34024    # Now join together the path and the arguments once again
34025    if test "x$arguments" != xEOL; then
34026      new_complete="$new_path ${arguments% *}"
34027    else
34028      new_complete="$new_path"
34029    fi
34030
34031    if test "x$complete" != "x$new_complete"; then
34032      AS="$new_complete"
34033      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
34034$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
34035    fi
34036  fi
34037
34038  else
34039    # FIXME: is this correct for microsoft?
34040    AS="$CC -c"
34041  fi
34042
34043
34044  #
34045  # Setup the archiver (AR)
34046  #
34047  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34048    # The corresponding ar tool is lib.exe (used to create static libraries)
34049    # Extract the first word of "lib", so it can be a program name with args.
34050set dummy lib; ac_word=$2
34051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34052$as_echo_n "checking for $ac_word... " >&6; }
34053if ${ac_cv_prog_AR+:} false; then :
34054  $as_echo_n "(cached) " >&6
34055else
34056  if test -n "$AR"; then
34057  ac_cv_prog_AR="$AR" # Let the user override the test.
34058else
34059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34060for as_dir in $PATH
34061do
34062  IFS=$as_save_IFS
34063  test -z "$as_dir" && as_dir=.
34064    for ac_exec_ext in '' $ac_executable_extensions; do
34065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34066    ac_cv_prog_AR="lib"
34067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34068    break 2
34069  fi
34070done
34071  done
34072IFS=$as_save_IFS
34073
34074fi
34075fi
34076AR=$ac_cv_prog_AR
34077if test -n "$AR"; then
34078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34079$as_echo "$AR" >&6; }
34080else
34081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34082$as_echo "no" >&6; }
34083fi
34084
34085
34086  else
34087
34088
34089  # Publish this variable in the help.
34090
34091
34092  if [ -z "${AR+x}" ]; then
34093    # The variable is not set by user, try to locate tool using the code snippet
34094    if test -n "$ac_tool_prefix"; then
34095  for ac_prog in ar
34096  do
34097    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34100$as_echo_n "checking for $ac_word... " >&6; }
34101if ${ac_cv_prog_AR+:} false; then :
34102  $as_echo_n "(cached) " >&6
34103else
34104  if test -n "$AR"; then
34105  ac_cv_prog_AR="$AR" # Let the user override the test.
34106else
34107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34108for as_dir in $PATH
34109do
34110  IFS=$as_save_IFS
34111  test -z "$as_dir" && as_dir=.
34112    for ac_exec_ext in '' $ac_executable_extensions; do
34113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34114    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
34115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34116    break 2
34117  fi
34118done
34119  done
34120IFS=$as_save_IFS
34121
34122fi
34123fi
34124AR=$ac_cv_prog_AR
34125if test -n "$AR"; then
34126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34127$as_echo "$AR" >&6; }
34128else
34129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34130$as_echo "no" >&6; }
34131fi
34132
34133
34134    test -n "$AR" && break
34135  done
34136fi
34137if test -z "$AR"; then
34138  ac_ct_AR=$AR
34139  for ac_prog in ar
34140do
34141  # Extract the first word of "$ac_prog", so it can be a program name with args.
34142set dummy $ac_prog; ac_word=$2
34143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34144$as_echo_n "checking for $ac_word... " >&6; }
34145if ${ac_cv_prog_ac_ct_AR+:} false; then :
34146  $as_echo_n "(cached) " >&6
34147else
34148  if test -n "$ac_ct_AR"; then
34149  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
34150else
34151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34152for as_dir in $PATH
34153do
34154  IFS=$as_save_IFS
34155  test -z "$as_dir" && as_dir=.
34156    for ac_exec_ext in '' $ac_executable_extensions; do
34157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34158    ac_cv_prog_ac_ct_AR="$ac_prog"
34159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34160    break 2
34161  fi
34162done
34163  done
34164IFS=$as_save_IFS
34165
34166fi
34167fi
34168ac_ct_AR=$ac_cv_prog_ac_ct_AR
34169if test -n "$ac_ct_AR"; then
34170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
34171$as_echo "$ac_ct_AR" >&6; }
34172else
34173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34174$as_echo "no" >&6; }
34175fi
34176
34177
34178  test -n "$ac_ct_AR" && break
34179done
34180
34181  if test "x$ac_ct_AR" = x; then
34182    AR=""
34183  else
34184    case $cross_compiling:$ac_tool_warned in
34185yes:)
34186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34188ac_tool_warned=yes ;;
34189esac
34190    AR=$ac_ct_AR
34191  fi
34192fi
34193
34194  else
34195    # The variable is set, but is it from the command line or the environment?
34196
34197    # Try to remove the string !AR! from our list.
34198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
34199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34200      # If it failed, the variable was not from the command line. Ignore it,
34201      # but warn the user (except for BASH, which is always set by the calling BASH).
34202      if test "xAR" != xBASH; then
34203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
34204$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
34205      fi
34206      # Try to locate tool using the code snippet
34207      if test -n "$ac_tool_prefix"; then
34208  for ac_prog in ar
34209  do
34210    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34211set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34213$as_echo_n "checking for $ac_word... " >&6; }
34214if ${ac_cv_prog_AR+:} false; then :
34215  $as_echo_n "(cached) " >&6
34216else
34217  if test -n "$AR"; then
34218  ac_cv_prog_AR="$AR" # Let the user override the test.
34219else
34220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34221for as_dir in $PATH
34222do
34223  IFS=$as_save_IFS
34224  test -z "$as_dir" && as_dir=.
34225    for ac_exec_ext in '' $ac_executable_extensions; do
34226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34227    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
34228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34229    break 2
34230  fi
34231done
34232  done
34233IFS=$as_save_IFS
34234
34235fi
34236fi
34237AR=$ac_cv_prog_AR
34238if test -n "$AR"; then
34239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34240$as_echo "$AR" >&6; }
34241else
34242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34243$as_echo "no" >&6; }
34244fi
34245
34246
34247    test -n "$AR" && break
34248  done
34249fi
34250if test -z "$AR"; then
34251  ac_ct_AR=$AR
34252  for ac_prog in ar
34253do
34254  # Extract the first word of "$ac_prog", so it can be a program name with args.
34255set dummy $ac_prog; ac_word=$2
34256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34257$as_echo_n "checking for $ac_word... " >&6; }
34258if ${ac_cv_prog_ac_ct_AR+:} false; then :
34259  $as_echo_n "(cached) " >&6
34260else
34261  if test -n "$ac_ct_AR"; then
34262  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
34263else
34264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34265for as_dir in $PATH
34266do
34267  IFS=$as_save_IFS
34268  test -z "$as_dir" && as_dir=.
34269    for ac_exec_ext in '' $ac_executable_extensions; do
34270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34271    ac_cv_prog_ac_ct_AR="$ac_prog"
34272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34273    break 2
34274  fi
34275done
34276  done
34277IFS=$as_save_IFS
34278
34279fi
34280fi
34281ac_ct_AR=$ac_cv_prog_ac_ct_AR
34282if test -n "$ac_ct_AR"; then
34283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
34284$as_echo "$ac_ct_AR" >&6; }
34285else
34286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34287$as_echo "no" >&6; }
34288fi
34289
34290
34291  test -n "$ac_ct_AR" && break
34292done
34293
34294  if test "x$ac_ct_AR" = x; then
34295    AR=""
34296  else
34297    case $cross_compiling:$ac_tool_warned in
34298yes:)
34299{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34300$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34301ac_tool_warned=yes ;;
34302esac
34303    AR=$ac_ct_AR
34304  fi
34305fi
34306
34307    else
34308      # If it succeeded, then it was overridden by the user. We will use it
34309      # for the tool.
34310
34311      # First remove it from the list of overridden variables, so we can test
34312      # for unknown variables in the end.
34313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34314
34315      # Check if we try to supply an empty value
34316      if test "x$AR" = x; then
34317        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
34318$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
34319        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
34320$as_echo_n "checking for AR... " >&6; }
34321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
34322$as_echo "disabled" >&6; }
34323      else
34324        # Check if the provided tool contains a complete path.
34325        tool_specified="$AR"
34326        tool_basename="${tool_specified##*/}"
34327        if test "x$tool_basename" = "x$tool_specified"; then
34328          # A command without a complete path is provided, search $PATH.
34329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
34330$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
34331          # Extract the first word of "$tool_basename", so it can be a program name with args.
34332set dummy $tool_basename; ac_word=$2
34333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34334$as_echo_n "checking for $ac_word... " >&6; }
34335if ${ac_cv_path_AR+:} false; then :
34336  $as_echo_n "(cached) " >&6
34337else
34338  case $AR in
34339  [\\/]* | ?:[\\/]*)
34340  ac_cv_path_AR="$AR" # Let the user override the test with a path.
34341  ;;
34342  *)
34343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34344for as_dir in $PATH
34345do
34346  IFS=$as_save_IFS
34347  test -z "$as_dir" && as_dir=.
34348    for ac_exec_ext in '' $ac_executable_extensions; do
34349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34350    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
34351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34352    break 2
34353  fi
34354done
34355  done
34356IFS=$as_save_IFS
34357
34358  ;;
34359esac
34360fi
34361AR=$ac_cv_path_AR
34362if test -n "$AR"; then
34363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34364$as_echo "$AR" >&6; }
34365else
34366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34367$as_echo "no" >&6; }
34368fi
34369
34370
34371          if test "x$AR" = x; then
34372            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34373          fi
34374        else
34375          # Otherwise we believe it is a complete path. Use it as it is.
34376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
34377$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
34378          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
34379$as_echo_n "checking for AR... " >&6; }
34380          if test ! -x "$tool_specified"; then
34381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34382$as_echo "not found" >&6; }
34383            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
34384          fi
34385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34386$as_echo "$tool_specified" >&6; }
34387        fi
34388      fi
34389    fi
34390  fi
34391
34392
34393  fi
34394
34395  # Only process if variable expands to non-empty
34396
34397  if test "x$AR" != x; then
34398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34399
34400  # First separate the path from the arguments. This will split at the first
34401  # space.
34402  complete="$AR"
34403  path="${complete%% *}"
34404  tmp="$complete EOL"
34405  arguments="${tmp#* }"
34406
34407  # Input might be given as Windows format, start by converting to
34408  # unix format.
34409  new_path=`$CYGPATH -u "$path"`
34410
34411  # Now try to locate executable using which
34412  new_path=`$WHICH "$new_path" 2> /dev/null`
34413  # bat and cmd files are not always considered executable in cygwin causing which
34414  # to not find them
34415  if test "x$new_path" = x \
34416      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34417      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34418    new_path=`$CYGPATH -u "$path"`
34419  fi
34420  if test "x$new_path" = x; then
34421    # Oops. Which didn't find the executable.
34422    # The splitting of arguments from the executable at a space might have been incorrect,
34423    # since paths with space are more likely in Windows. Give it another try with the whole
34424    # argument.
34425    path="$complete"
34426    arguments="EOL"
34427    new_path=`$CYGPATH -u "$path"`
34428    new_path=`$WHICH "$new_path" 2> /dev/null`
34429    # bat and cmd files are not always considered executable in cygwin causing which
34430    # to not find them
34431    if test "x$new_path" = x \
34432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34434      new_path=`$CYGPATH -u "$path"`
34435    fi
34436    if test "x$new_path" = x; then
34437      # It's still not found. Now this is an unrecoverable error.
34438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34439$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34440      has_space=`$ECHO "$complete" | $GREP " "`
34441      if test "x$has_space" != x; then
34442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34444      fi
34445      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34446    fi
34447  fi
34448
34449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34452  # "foo.exe" is OK but "foo" is an error.
34453  #
34454  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34455  # It is also a way to make sure we got the proper file name for the real test later on.
34456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34457  if test "x$test_shortpath" = x; then
34458    # Short path failed, file does not exist as specified.
34459    # Try adding .exe or .cmd
34460    if test -f "${new_path}.exe"; then
34461      input_to_shortpath="${new_path}.exe"
34462    elif test -f "${new_path}.cmd"; then
34463      input_to_shortpath="${new_path}.cmd"
34464    else
34465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
34466$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
34467      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34468$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34469      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34470    fi
34471  else
34472    input_to_shortpath="$new_path"
34473  fi
34474
34475  # Call helper function which possibly converts this using DOS-style short mode.
34476  # If so, the updated path is stored in $new_path.
34477  new_path="$input_to_shortpath"
34478
34479  input_path="$input_to_shortpath"
34480  # Check if we need to convert this using DOS-style short mode. If the path
34481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34482  # take no chances and rewrite it.
34483  # Note: m4 eats our [], so we need to use [ and ] instead.
34484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34485  if test "x$has_forbidden_chars" != x; then
34486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34490      # Going to short mode and back again did indeed matter. Since short mode is
34491      # case insensitive, let's make it lowercase to improve readability.
34492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34493      # Now convert it back to Unix-style (cygpath)
34494      input_path=`$CYGPATH -u "$shortmode_path"`
34495      new_path="$input_path"
34496    fi
34497  fi
34498
34499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34500  if test "x$test_cygdrive_prefix" = x; then
34501    # As a simple fix, exclude /usr/bin since it's not a real path.
34502    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34504      # a path prefixed by /cygdrive for fixpath to work.
34505      new_path="$CYGWIN_ROOT_PATH$input_path"
34506    fi
34507  fi
34508
34509  # remove trailing .exe if any
34510  new_path="${new_path/%.exe/}"
34511
34512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34513
34514  # First separate the path from the arguments. This will split at the first
34515  # space.
34516  complete="$AR"
34517  path="${complete%% *}"
34518  tmp="$complete EOL"
34519  arguments="${tmp#* }"
34520
34521  # Input might be given as Windows format, start by converting to
34522  # unix format.
34523  new_path="$path"
34524
34525  windows_path="$new_path"
34526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34527    unix_path=`$CYGPATH -u "$windows_path"`
34528    new_path="$unix_path"
34529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34531    new_path="$unix_path"
34532  fi
34533
34534
34535  # Now try to locate executable using which
34536  new_path=`$WHICH "$new_path" 2> /dev/null`
34537
34538  if test "x$new_path" = x; then
34539    # Oops. Which didn't find the executable.
34540    # The splitting of arguments from the executable at a space might have been incorrect,
34541    # since paths with space are more likely in Windows. Give it another try with the whole
34542    # argument.
34543    path="$complete"
34544    arguments="EOL"
34545    new_path="$path"
34546
34547  windows_path="$new_path"
34548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34549    unix_path=`$CYGPATH -u "$windows_path"`
34550    new_path="$unix_path"
34551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34553    new_path="$unix_path"
34554  fi
34555
34556
34557    new_path=`$WHICH "$new_path" 2> /dev/null`
34558    # bat and cmd files are not always considered executable in MSYS causing which
34559    # to not find them
34560    if test "x$new_path" = x \
34561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34563      new_path="$path"
34564
34565  windows_path="$new_path"
34566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34567    unix_path=`$CYGPATH -u "$windows_path"`
34568    new_path="$unix_path"
34569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34571    new_path="$unix_path"
34572  fi
34573
34574    fi
34575
34576    if test "x$new_path" = x; then
34577      # It's still not found. Now this is an unrecoverable error.
34578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34579$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34580      has_space=`$ECHO "$complete" | $GREP " "`
34581      if test "x$has_space" != x; then
34582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34584      fi
34585      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34586    fi
34587  fi
34588
34589  # Now new_path has a complete unix path to the binary
34590  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34591    # Keep paths in /bin as-is, but remove trailing .exe if any
34592    new_path="${new_path/%.exe/}"
34593    # Do not save /bin paths to all_fixpath_prefixes!
34594  else
34595    # Not in mixed or Windows style, start by that.
34596    new_path=`cmd //c echo $new_path`
34597
34598  input_path="$new_path"
34599  # Check if we need to convert this using DOS-style short mode. If the path
34600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34601  # take no chances and rewrite it.
34602  # Note: m4 eats our [], so we need to use [ and ] instead.
34603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34604  if test "x$has_forbidden_chars" != x; then
34605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34607  fi
34608
34609    # Output is in $new_path
34610
34611  windows_path="$new_path"
34612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34613    unix_path=`$CYGPATH -u "$windows_path"`
34614    new_path="$unix_path"
34615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34617    new_path="$unix_path"
34618  fi
34619
34620    # remove trailing .exe if any
34621    new_path="${new_path/%.exe/}"
34622
34623    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34624    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34625  fi
34626
34627    else
34628      # We're on a unix platform. Hooray! :)
34629      # First separate the path from the arguments. This will split at the first
34630      # space.
34631      complete="$AR"
34632      path="${complete%% *}"
34633      tmp="$complete EOL"
34634      arguments="${tmp#* }"
34635
34636      # Cannot rely on the command "which" here since it doesn't always work.
34637      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34638      if test -z "$is_absolute_path"; then
34639        # Path to executable is not absolute. Find it.
34640        IFS_save="$IFS"
34641        IFS=:
34642        for p in $PATH; do
34643          if test -f "$p/$path" && test -x "$p/$path"; then
34644            new_path="$p/$path"
34645            break
34646          fi
34647        done
34648        IFS="$IFS_save"
34649      else
34650        # This is an absolute path, we can use it without further modifications.
34651        new_path="$path"
34652      fi
34653
34654      if test "x$new_path" = x; then
34655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34656$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34657        has_space=`$ECHO "$complete" | $GREP " "`
34658        if test "x$has_space" != x; then
34659          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34660$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34661        fi
34662        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34663      fi
34664    fi
34665
34666    # Now join together the path and the arguments once again
34667    if test "x$arguments" != xEOL; then
34668      new_complete="$new_path ${arguments% *}"
34669    else
34670      new_complete="$new_path"
34671    fi
34672
34673    if test "x$complete" != "x$new_complete"; then
34674      AR="$new_complete"
34675      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34676$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34677    fi
34678  fi
34679
34680
34681
34682  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34683
34684
34685  # Publish this variable in the help.
34686
34687
34688  if [ -z "${LIPO+x}" ]; then
34689    # The variable is not set by user, try to locate tool using the code snippet
34690    for ac_prog in lipo
34691do
34692  # Extract the first word of "$ac_prog", so it can be a program name with args.
34693set dummy $ac_prog; ac_word=$2
34694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34695$as_echo_n "checking for $ac_word... " >&6; }
34696if ${ac_cv_path_LIPO+:} false; then :
34697  $as_echo_n "(cached) " >&6
34698else
34699  case $LIPO in
34700  [\\/]* | ?:[\\/]*)
34701  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34702  ;;
34703  *)
34704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34705for as_dir in $PATH
34706do
34707  IFS=$as_save_IFS
34708  test -z "$as_dir" && as_dir=.
34709    for ac_exec_ext in '' $ac_executable_extensions; do
34710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34711    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34713    break 2
34714  fi
34715done
34716  done
34717IFS=$as_save_IFS
34718
34719  ;;
34720esac
34721fi
34722LIPO=$ac_cv_path_LIPO
34723if test -n "$LIPO"; then
34724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34725$as_echo "$LIPO" >&6; }
34726else
34727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34728$as_echo "no" >&6; }
34729fi
34730
34731
34732  test -n "$LIPO" && break
34733done
34734
34735  else
34736    # The variable is set, but is it from the command line or the environment?
34737
34738    # Try to remove the string !LIPO! from our list.
34739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34741      # If it failed, the variable was not from the command line. Ignore it,
34742      # but warn the user (except for BASH, which is always set by the calling BASH).
34743      if test "xLIPO" != xBASH; then
34744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34745$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34746      fi
34747      # Try to locate tool using the code snippet
34748      for ac_prog in lipo
34749do
34750  # Extract the first word of "$ac_prog", so it can be a program name with args.
34751set dummy $ac_prog; ac_word=$2
34752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34753$as_echo_n "checking for $ac_word... " >&6; }
34754if ${ac_cv_path_LIPO+:} false; then :
34755  $as_echo_n "(cached) " >&6
34756else
34757  case $LIPO in
34758  [\\/]* | ?:[\\/]*)
34759  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34760  ;;
34761  *)
34762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34763for as_dir in $PATH
34764do
34765  IFS=$as_save_IFS
34766  test -z "$as_dir" && as_dir=.
34767    for ac_exec_ext in '' $ac_executable_extensions; do
34768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34769    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34771    break 2
34772  fi
34773done
34774  done
34775IFS=$as_save_IFS
34776
34777  ;;
34778esac
34779fi
34780LIPO=$ac_cv_path_LIPO
34781if test -n "$LIPO"; then
34782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34783$as_echo "$LIPO" >&6; }
34784else
34785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34786$as_echo "no" >&6; }
34787fi
34788
34789
34790  test -n "$LIPO" && break
34791done
34792
34793    else
34794      # If it succeeded, then it was overridden by the user. We will use it
34795      # for the tool.
34796
34797      # First remove it from the list of overridden variables, so we can test
34798      # for unknown variables in the end.
34799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34800
34801      # Check if we try to supply an empty value
34802      if test "x$LIPO" = x; then
34803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
34804$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
34805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34806$as_echo_n "checking for LIPO... " >&6; }
34807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
34808$as_echo "disabled" >&6; }
34809      else
34810        # Check if the provided tool contains a complete path.
34811        tool_specified="$LIPO"
34812        tool_basename="${tool_specified##*/}"
34813        if test "x$tool_basename" = "x$tool_specified"; then
34814          # A command without a complete path is provided, search $PATH.
34815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34816$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34817          # Extract the first word of "$tool_basename", so it can be a program name with args.
34818set dummy $tool_basename; ac_word=$2
34819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34820$as_echo_n "checking for $ac_word... " >&6; }
34821if ${ac_cv_path_LIPO+:} false; then :
34822  $as_echo_n "(cached) " >&6
34823else
34824  case $LIPO in
34825  [\\/]* | ?:[\\/]*)
34826  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34827  ;;
34828  *)
34829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34830for as_dir in $PATH
34831do
34832  IFS=$as_save_IFS
34833  test -z "$as_dir" && as_dir=.
34834    for ac_exec_ext in '' $ac_executable_extensions; do
34835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34836    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34838    break 2
34839  fi
34840done
34841  done
34842IFS=$as_save_IFS
34843
34844  ;;
34845esac
34846fi
34847LIPO=$ac_cv_path_LIPO
34848if test -n "$LIPO"; then
34849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34850$as_echo "$LIPO" >&6; }
34851else
34852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34853$as_echo "no" >&6; }
34854fi
34855
34856
34857          if test "x$LIPO" = x; then
34858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34859          fi
34860        else
34861          # Otherwise we believe it is a complete path. Use it as it is.
34862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34863$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34865$as_echo_n "checking for LIPO... " >&6; }
34866          if test ! -x "$tool_specified"; then
34867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34868$as_echo "not found" >&6; }
34869            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34870          fi
34871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34872$as_echo "$tool_specified" >&6; }
34873        fi
34874      fi
34875    fi
34876  fi
34877
34878
34879
34880  # Only process if variable expands to non-empty
34881
34882  if test "x$LIPO" != x; then
34883    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34884
34885  # First separate the path from the arguments. This will split at the first
34886  # space.
34887  complete="$LIPO"
34888  path="${complete%% *}"
34889  tmp="$complete EOL"
34890  arguments="${tmp#* }"
34891
34892  # Input might be given as Windows format, start by converting to
34893  # unix format.
34894  new_path=`$CYGPATH -u "$path"`
34895
34896  # Now try to locate executable using which
34897  new_path=`$WHICH "$new_path" 2> /dev/null`
34898  # bat and cmd files are not always considered executable in cygwin causing which
34899  # to not find them
34900  if test "x$new_path" = x \
34901      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34902      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34903    new_path=`$CYGPATH -u "$path"`
34904  fi
34905  if test "x$new_path" = x; then
34906    # Oops. Which didn't find the executable.
34907    # The splitting of arguments from the executable at a space might have been incorrect,
34908    # since paths with space are more likely in Windows. Give it another try with the whole
34909    # argument.
34910    path="$complete"
34911    arguments="EOL"
34912    new_path=`$CYGPATH -u "$path"`
34913    new_path=`$WHICH "$new_path" 2> /dev/null`
34914    # bat and cmd files are not always considered executable in cygwin causing which
34915    # to not find them
34916    if test "x$new_path" = x \
34917        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34918        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34919      new_path=`$CYGPATH -u "$path"`
34920    fi
34921    if test "x$new_path" = x; then
34922      # It's still not found. Now this is an unrecoverable error.
34923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34924$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34925      has_space=`$ECHO "$complete" | $GREP " "`
34926      if test "x$has_space" != x; then
34927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34929      fi
34930      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34931    fi
34932  fi
34933
34934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34937  # "foo.exe" is OK but "foo" is an error.
34938  #
34939  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34940  # It is also a way to make sure we got the proper file name for the real test later on.
34941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34942  if test "x$test_shortpath" = x; then
34943    # Short path failed, file does not exist as specified.
34944    # Try adding .exe or .cmd
34945    if test -f "${new_path}.exe"; then
34946      input_to_shortpath="${new_path}.exe"
34947    elif test -f "${new_path}.cmd"; then
34948      input_to_shortpath="${new_path}.cmd"
34949    else
34950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34951$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34952      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34953$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34954      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34955    fi
34956  else
34957    input_to_shortpath="$new_path"
34958  fi
34959
34960  # Call helper function which possibly converts this using DOS-style short mode.
34961  # If so, the updated path is stored in $new_path.
34962  new_path="$input_to_shortpath"
34963
34964  input_path="$input_to_shortpath"
34965  # Check if we need to convert this using DOS-style short mode. If the path
34966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34967  # take no chances and rewrite it.
34968  # Note: m4 eats our [], so we need to use [ and ] instead.
34969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34970  if test "x$has_forbidden_chars" != x; then
34971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34975      # Going to short mode and back again did indeed matter. Since short mode is
34976      # case insensitive, let's make it lowercase to improve readability.
34977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34978      # Now convert it back to Unix-style (cygpath)
34979      input_path=`$CYGPATH -u "$shortmode_path"`
34980      new_path="$input_path"
34981    fi
34982  fi
34983
34984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34985  if test "x$test_cygdrive_prefix" = x; then
34986    # As a simple fix, exclude /usr/bin since it's not a real path.
34987    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34989      # a path prefixed by /cygdrive for fixpath to work.
34990      new_path="$CYGWIN_ROOT_PATH$input_path"
34991    fi
34992  fi
34993
34994  # remove trailing .exe if any
34995  new_path="${new_path/%.exe/}"
34996
34997    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34998
34999  # First separate the path from the arguments. This will split at the first
35000  # space.
35001  complete="$LIPO"
35002  path="${complete%% *}"
35003  tmp="$complete EOL"
35004  arguments="${tmp#* }"
35005
35006  # Input might be given as Windows format, start by converting to
35007  # unix format.
35008  new_path="$path"
35009
35010  windows_path="$new_path"
35011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35012    unix_path=`$CYGPATH -u "$windows_path"`
35013    new_path="$unix_path"
35014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35016    new_path="$unix_path"
35017  fi
35018
35019
35020  # Now try to locate executable using which
35021  new_path=`$WHICH "$new_path" 2> /dev/null`
35022
35023  if test "x$new_path" = x; then
35024    # Oops. Which didn't find the executable.
35025    # The splitting of arguments from the executable at a space might have been incorrect,
35026    # since paths with space are more likely in Windows. Give it another try with the whole
35027    # argument.
35028    path="$complete"
35029    arguments="EOL"
35030    new_path="$path"
35031
35032  windows_path="$new_path"
35033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35034    unix_path=`$CYGPATH -u "$windows_path"`
35035    new_path="$unix_path"
35036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35038    new_path="$unix_path"
35039  fi
35040
35041
35042    new_path=`$WHICH "$new_path" 2> /dev/null`
35043    # bat and cmd files are not always considered executable in MSYS causing which
35044    # to not find them
35045    if test "x$new_path" = x \
35046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35048      new_path="$path"
35049
35050  windows_path="$new_path"
35051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35052    unix_path=`$CYGPATH -u "$windows_path"`
35053    new_path="$unix_path"
35054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35056    new_path="$unix_path"
35057  fi
35058
35059    fi
35060
35061    if test "x$new_path" = x; then
35062      # It's still not found. Now this is an unrecoverable error.
35063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
35064$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
35065      has_space=`$ECHO "$complete" | $GREP " "`
35066      if test "x$has_space" != x; then
35067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35069      fi
35070      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
35071    fi
35072  fi
35073
35074  # Now new_path has a complete unix path to the binary
35075  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35076    # Keep paths in /bin as-is, but remove trailing .exe if any
35077    new_path="${new_path/%.exe/}"
35078    # Do not save /bin paths to all_fixpath_prefixes!
35079  else
35080    # Not in mixed or Windows style, start by that.
35081    new_path=`cmd //c echo $new_path`
35082
35083  input_path="$new_path"
35084  # Check if we need to convert this using DOS-style short mode. If the path
35085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35086  # take no chances and rewrite it.
35087  # Note: m4 eats our [], so we need to use [ and ] instead.
35088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35089  if test "x$has_forbidden_chars" != x; then
35090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35092  fi
35093
35094    # Output is in $new_path
35095
35096  windows_path="$new_path"
35097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35098    unix_path=`$CYGPATH -u "$windows_path"`
35099    new_path="$unix_path"
35100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35102    new_path="$unix_path"
35103  fi
35104
35105    # remove trailing .exe if any
35106    new_path="${new_path/%.exe/}"
35107
35108    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35109    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35110  fi
35111
35112    else
35113      # We're on a unix platform. Hooray! :)
35114      # First separate the path from the arguments. This will split at the first
35115      # space.
35116      complete="$LIPO"
35117      path="${complete%% *}"
35118      tmp="$complete EOL"
35119      arguments="${tmp#* }"
35120
35121      # Cannot rely on the command "which" here since it doesn't always work.
35122      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35123      if test -z "$is_absolute_path"; then
35124        # Path to executable is not absolute. Find it.
35125        IFS_save="$IFS"
35126        IFS=:
35127        for p in $PATH; do
35128          if test -f "$p/$path" && test -x "$p/$path"; then
35129            new_path="$p/$path"
35130            break
35131          fi
35132        done
35133        IFS="$IFS_save"
35134      else
35135        # This is an absolute path, we can use it without further modifications.
35136        new_path="$path"
35137      fi
35138
35139      if test "x$new_path" = x; then
35140        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
35141$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
35142        has_space=`$ECHO "$complete" | $GREP " "`
35143        if test "x$has_space" != x; then
35144          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35145$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35146        fi
35147        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
35148      fi
35149    fi
35150
35151    # Now join together the path and the arguments once again
35152    if test "x$arguments" != xEOL; then
35153      new_complete="$new_path ${arguments% *}"
35154    else
35155      new_complete="$new_path"
35156    fi
35157
35158    if test "x$complete" != "x$new_complete"; then
35159      LIPO="$new_complete"
35160      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
35161$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
35162    fi
35163  fi
35164
35165  fi
35166
35167  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35168    # Extract the first word of "mt", so it can be a program name with args.
35169set dummy mt; ac_word=$2
35170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35171$as_echo_n "checking for $ac_word... " >&6; }
35172if ${ac_cv_prog_MT+:} false; then :
35173  $as_echo_n "(cached) " >&6
35174else
35175  if test -n "$MT"; then
35176  ac_cv_prog_MT="$MT" # Let the user override the test.
35177else
35178  ac_prog_rejected=no
35179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35180for as_dir in $PATH
35181do
35182  IFS=$as_save_IFS
35183  test -z "$as_dir" && as_dir=.
35184    for ac_exec_ext in '' $ac_executable_extensions; do
35185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35186    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
35187       ac_prog_rejected=yes
35188       continue
35189     fi
35190    ac_cv_prog_MT="mt"
35191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35192    break 2
35193  fi
35194done
35195  done
35196IFS=$as_save_IFS
35197
35198if test $ac_prog_rejected = yes; then
35199  # We found a bogon in the path, so make sure we never use it.
35200  set dummy $ac_cv_prog_MT
35201  shift
35202  if test $# != 0; then
35203    # We chose a different compiler from the bogus one.
35204    # However, it has the same basename, so the bogon will be chosen
35205    # first if we set MT to just the basename; use the full file name.
35206    shift
35207    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
35208  fi
35209fi
35210fi
35211fi
35212MT=$ac_cv_prog_MT
35213if test -n "$MT"; then
35214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
35215$as_echo "$MT" >&6; }
35216else
35217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35218$as_echo "no" >&6; }
35219fi
35220
35221
35222
35223  # Only process if variable expands to non-empty
35224
35225  if test "x$MT" != x; then
35226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35227
35228  # First separate the path from the arguments. This will split at the first
35229  # space.
35230  complete="$MT"
35231  path="${complete%% *}"
35232  tmp="$complete EOL"
35233  arguments="${tmp#* }"
35234
35235  # Input might be given as Windows format, start by converting to
35236  # unix format.
35237  new_path=`$CYGPATH -u "$path"`
35238
35239  # Now try to locate executable using which
35240  new_path=`$WHICH "$new_path" 2> /dev/null`
35241  # bat and cmd files are not always considered executable in cygwin causing which
35242  # to not find them
35243  if test "x$new_path" = x \
35244      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35245      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35246    new_path=`$CYGPATH -u "$path"`
35247  fi
35248  if test "x$new_path" = x; then
35249    # Oops. Which didn't find the executable.
35250    # The splitting of arguments from the executable at a space might have been incorrect,
35251    # since paths with space are more likely in Windows. Give it another try with the whole
35252    # argument.
35253    path="$complete"
35254    arguments="EOL"
35255    new_path=`$CYGPATH -u "$path"`
35256    new_path=`$WHICH "$new_path" 2> /dev/null`
35257    # bat and cmd files are not always considered executable in cygwin causing which
35258    # to not find them
35259    if test "x$new_path" = x \
35260        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35261        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35262      new_path=`$CYGPATH -u "$path"`
35263    fi
35264    if test "x$new_path" = x; then
35265      # It's still not found. Now this is an unrecoverable error.
35266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35267$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35268      has_space=`$ECHO "$complete" | $GREP " "`
35269      if test "x$has_space" != x; then
35270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35272      fi
35273      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35274    fi
35275  fi
35276
35277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35280  # "foo.exe" is OK but "foo" is an error.
35281  #
35282  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35283  # It is also a way to make sure we got the proper file name for the real test later on.
35284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35285  if test "x$test_shortpath" = x; then
35286    # Short path failed, file does not exist as specified.
35287    # Try adding .exe or .cmd
35288    if test -f "${new_path}.exe"; then
35289      input_to_shortpath="${new_path}.exe"
35290    elif test -f "${new_path}.cmd"; then
35291      input_to_shortpath="${new_path}.cmd"
35292    else
35293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
35294$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
35295      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35296$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35297      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35298    fi
35299  else
35300    input_to_shortpath="$new_path"
35301  fi
35302
35303  # Call helper function which possibly converts this using DOS-style short mode.
35304  # If so, the updated path is stored in $new_path.
35305  new_path="$input_to_shortpath"
35306
35307  input_path="$input_to_shortpath"
35308  # Check if we need to convert this using DOS-style short mode. If the path
35309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35310  # take no chances and rewrite it.
35311  # Note: m4 eats our [], so we need to use [ and ] instead.
35312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35313  if test "x$has_forbidden_chars" != x; then
35314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35318      # Going to short mode and back again did indeed matter. Since short mode is
35319      # case insensitive, let's make it lowercase to improve readability.
35320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35321      # Now convert it back to Unix-style (cygpath)
35322      input_path=`$CYGPATH -u "$shortmode_path"`
35323      new_path="$input_path"
35324    fi
35325  fi
35326
35327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35328  if test "x$test_cygdrive_prefix" = x; then
35329    # As a simple fix, exclude /usr/bin since it's not a real path.
35330    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35332      # a path prefixed by /cygdrive for fixpath to work.
35333      new_path="$CYGWIN_ROOT_PATH$input_path"
35334    fi
35335  fi
35336
35337  # remove trailing .exe if any
35338  new_path="${new_path/%.exe/}"
35339
35340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35341
35342  # First separate the path from the arguments. This will split at the first
35343  # space.
35344  complete="$MT"
35345  path="${complete%% *}"
35346  tmp="$complete EOL"
35347  arguments="${tmp#* }"
35348
35349  # Input might be given as Windows format, start by converting to
35350  # unix format.
35351  new_path="$path"
35352
35353  windows_path="$new_path"
35354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35355    unix_path=`$CYGPATH -u "$windows_path"`
35356    new_path="$unix_path"
35357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35359    new_path="$unix_path"
35360  fi
35361
35362
35363  # Now try to locate executable using which
35364  new_path=`$WHICH "$new_path" 2> /dev/null`
35365
35366  if test "x$new_path" = x; then
35367    # Oops. Which didn't find the executable.
35368    # The splitting of arguments from the executable at a space might have been incorrect,
35369    # since paths with space are more likely in Windows. Give it another try with the whole
35370    # argument.
35371    path="$complete"
35372    arguments="EOL"
35373    new_path="$path"
35374
35375  windows_path="$new_path"
35376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35377    unix_path=`$CYGPATH -u "$windows_path"`
35378    new_path="$unix_path"
35379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35381    new_path="$unix_path"
35382  fi
35383
35384
35385    new_path=`$WHICH "$new_path" 2> /dev/null`
35386    # bat and cmd files are not always considered executable in MSYS causing which
35387    # to not find them
35388    if test "x$new_path" = x \
35389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35391      new_path="$path"
35392
35393  windows_path="$new_path"
35394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35395    unix_path=`$CYGPATH -u "$windows_path"`
35396    new_path="$unix_path"
35397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35399    new_path="$unix_path"
35400  fi
35401
35402    fi
35403
35404    if test "x$new_path" = x; then
35405      # It's still not found. Now this is an unrecoverable error.
35406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35407$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35408      has_space=`$ECHO "$complete" | $GREP " "`
35409      if test "x$has_space" != x; then
35410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35412      fi
35413      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35414    fi
35415  fi
35416
35417  # Now new_path has a complete unix path to the binary
35418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35419    # Keep paths in /bin as-is, but remove trailing .exe if any
35420    new_path="${new_path/%.exe/}"
35421    # Do not save /bin paths to all_fixpath_prefixes!
35422  else
35423    # Not in mixed or Windows style, start by that.
35424    new_path=`cmd //c echo $new_path`
35425
35426  input_path="$new_path"
35427  # Check if we need to convert this using DOS-style short mode. If the path
35428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35429  # take no chances and rewrite it.
35430  # Note: m4 eats our [], so we need to use [ and ] instead.
35431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35432  if test "x$has_forbidden_chars" != x; then
35433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35435  fi
35436
35437    # Output is in $new_path
35438
35439  windows_path="$new_path"
35440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35441    unix_path=`$CYGPATH -u "$windows_path"`
35442    new_path="$unix_path"
35443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35445    new_path="$unix_path"
35446  fi
35447
35448    # remove trailing .exe if any
35449    new_path="${new_path/%.exe/}"
35450
35451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35453  fi
35454
35455    else
35456      # We're on a unix platform. Hooray! :)
35457      # First separate the path from the arguments. This will split at the first
35458      # space.
35459      complete="$MT"
35460      path="${complete%% *}"
35461      tmp="$complete EOL"
35462      arguments="${tmp#* }"
35463
35464      # Cannot rely on the command "which" here since it doesn't always work.
35465      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35466      if test -z "$is_absolute_path"; then
35467        # Path to executable is not absolute. Find it.
35468        IFS_save="$IFS"
35469        IFS=:
35470        for p in $PATH; do
35471          if test -f "$p/$path" && test -x "$p/$path"; then
35472            new_path="$p/$path"
35473            break
35474          fi
35475        done
35476        IFS="$IFS_save"
35477      else
35478        # This is an absolute path, we can use it without further modifications.
35479        new_path="$path"
35480      fi
35481
35482      if test "x$new_path" = x; then
35483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35484$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35485        has_space=`$ECHO "$complete" | $GREP " "`
35486        if test "x$has_space" != x; then
35487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35489        fi
35490        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35491      fi
35492    fi
35493
35494    # Now join together the path and the arguments once again
35495    if test "x$arguments" != xEOL; then
35496      new_complete="$new_path ${arguments% *}"
35497    else
35498      new_complete="$new_path"
35499    fi
35500
35501    if test "x$complete" != "x$new_complete"; then
35502      MT="$new_complete"
35503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
35504$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
35505    fi
35506  fi
35507
35508    # Setup the resource compiler (RC)
35509    # Extract the first word of "rc", so it can be a program name with args.
35510set dummy rc; ac_word=$2
35511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35512$as_echo_n "checking for $ac_word... " >&6; }
35513if ${ac_cv_prog_RC+:} false; then :
35514  $as_echo_n "(cached) " >&6
35515else
35516  if test -n "$RC"; then
35517  ac_cv_prog_RC="$RC" # Let the user override the test.
35518else
35519  ac_prog_rejected=no
35520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35521for as_dir in $PATH
35522do
35523  IFS=$as_save_IFS
35524  test -z "$as_dir" && as_dir=.
35525    for ac_exec_ext in '' $ac_executable_extensions; do
35526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35527    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
35528       ac_prog_rejected=yes
35529       continue
35530     fi
35531    ac_cv_prog_RC="rc"
35532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35533    break 2
35534  fi
35535done
35536  done
35537IFS=$as_save_IFS
35538
35539if test $ac_prog_rejected = yes; then
35540  # We found a bogon in the path, so make sure we never use it.
35541  set dummy $ac_cv_prog_RC
35542  shift
35543  if test $# != 0; then
35544    # We chose a different compiler from the bogus one.
35545    # However, it has the same basename, so the bogon will be chosen
35546    # first if we set RC to just the basename; use the full file name.
35547    shift
35548    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
35549  fi
35550fi
35551fi
35552fi
35553RC=$ac_cv_prog_RC
35554if test -n "$RC"; then
35555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
35556$as_echo "$RC" >&6; }
35557else
35558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35559$as_echo "no" >&6; }
35560fi
35561
35562
35563
35564  # Only process if variable expands to non-empty
35565
35566  if test "x$RC" != x; then
35567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35568
35569  # First separate the path from the arguments. This will split at the first
35570  # space.
35571  complete="$RC"
35572  path="${complete%% *}"
35573  tmp="$complete EOL"
35574  arguments="${tmp#* }"
35575
35576  # Input might be given as Windows format, start by converting to
35577  # unix format.
35578  new_path=`$CYGPATH -u "$path"`
35579
35580  # Now try to locate executable using which
35581  new_path=`$WHICH "$new_path" 2> /dev/null`
35582  # bat and cmd files are not always considered executable in cygwin causing which
35583  # to not find them
35584  if test "x$new_path" = x \
35585      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35586      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35587    new_path=`$CYGPATH -u "$path"`
35588  fi
35589  if test "x$new_path" = x; then
35590    # Oops. Which didn't find the executable.
35591    # The splitting of arguments from the executable at a space might have been incorrect,
35592    # since paths with space are more likely in Windows. Give it another try with the whole
35593    # argument.
35594    path="$complete"
35595    arguments="EOL"
35596    new_path=`$CYGPATH -u "$path"`
35597    new_path=`$WHICH "$new_path" 2> /dev/null`
35598    # bat and cmd files are not always considered executable in cygwin causing which
35599    # to not find them
35600    if test "x$new_path" = x \
35601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35603      new_path=`$CYGPATH -u "$path"`
35604    fi
35605    if test "x$new_path" = x; then
35606      # It's still not found. Now this is an unrecoverable error.
35607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35608$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35609      has_space=`$ECHO "$complete" | $GREP " "`
35610      if test "x$has_space" != x; then
35611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35613      fi
35614      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35615    fi
35616  fi
35617
35618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35621  # "foo.exe" is OK but "foo" is an error.
35622  #
35623  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35624  # It is also a way to make sure we got the proper file name for the real test later on.
35625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35626  if test "x$test_shortpath" = x; then
35627    # Short path failed, file does not exist as specified.
35628    # Try adding .exe or .cmd
35629    if test -f "${new_path}.exe"; then
35630      input_to_shortpath="${new_path}.exe"
35631    elif test -f "${new_path}.cmd"; then
35632      input_to_shortpath="${new_path}.cmd"
35633    else
35634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
35635$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
35636      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35637$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35638      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35639    fi
35640  else
35641    input_to_shortpath="$new_path"
35642  fi
35643
35644  # Call helper function which possibly converts this using DOS-style short mode.
35645  # If so, the updated path is stored in $new_path.
35646  new_path="$input_to_shortpath"
35647
35648  input_path="$input_to_shortpath"
35649  # Check if we need to convert this using DOS-style short mode. If the path
35650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35651  # take no chances and rewrite it.
35652  # Note: m4 eats our [], so we need to use [ and ] instead.
35653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35654  if test "x$has_forbidden_chars" != x; then
35655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35659      # Going to short mode and back again did indeed matter. Since short mode is
35660      # case insensitive, let's make it lowercase to improve readability.
35661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35662      # Now convert it back to Unix-style (cygpath)
35663      input_path=`$CYGPATH -u "$shortmode_path"`
35664      new_path="$input_path"
35665    fi
35666  fi
35667
35668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35669  if test "x$test_cygdrive_prefix" = x; then
35670    # As a simple fix, exclude /usr/bin since it's not a real path.
35671    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35673      # a path prefixed by /cygdrive for fixpath to work.
35674      new_path="$CYGWIN_ROOT_PATH$input_path"
35675    fi
35676  fi
35677
35678  # remove trailing .exe if any
35679  new_path="${new_path/%.exe/}"
35680
35681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35682
35683  # First separate the path from the arguments. This will split at the first
35684  # space.
35685  complete="$RC"
35686  path="${complete%% *}"
35687  tmp="$complete EOL"
35688  arguments="${tmp#* }"
35689
35690  # Input might be given as Windows format, start by converting to
35691  # unix format.
35692  new_path="$path"
35693
35694  windows_path="$new_path"
35695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35696    unix_path=`$CYGPATH -u "$windows_path"`
35697    new_path="$unix_path"
35698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35700    new_path="$unix_path"
35701  fi
35702
35703
35704  # Now try to locate executable using which
35705  new_path=`$WHICH "$new_path" 2> /dev/null`
35706
35707  if test "x$new_path" = x; then
35708    # Oops. Which didn't find the executable.
35709    # The splitting of arguments from the executable at a space might have been incorrect,
35710    # since paths with space are more likely in Windows. Give it another try with the whole
35711    # argument.
35712    path="$complete"
35713    arguments="EOL"
35714    new_path="$path"
35715
35716  windows_path="$new_path"
35717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35718    unix_path=`$CYGPATH -u "$windows_path"`
35719    new_path="$unix_path"
35720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35722    new_path="$unix_path"
35723  fi
35724
35725
35726    new_path=`$WHICH "$new_path" 2> /dev/null`
35727    # bat and cmd files are not always considered executable in MSYS causing which
35728    # to not find them
35729    if test "x$new_path" = x \
35730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35732      new_path="$path"
35733
35734  windows_path="$new_path"
35735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35736    unix_path=`$CYGPATH -u "$windows_path"`
35737    new_path="$unix_path"
35738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35740    new_path="$unix_path"
35741  fi
35742
35743    fi
35744
35745    if test "x$new_path" = x; then
35746      # It's still not found. Now this is an unrecoverable error.
35747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35748$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35749      has_space=`$ECHO "$complete" | $GREP " "`
35750      if test "x$has_space" != x; then
35751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35753      fi
35754      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35755    fi
35756  fi
35757
35758  # Now new_path has a complete unix path to the binary
35759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35760    # Keep paths in /bin as-is, but remove trailing .exe if any
35761    new_path="${new_path/%.exe/}"
35762    # Do not save /bin paths to all_fixpath_prefixes!
35763  else
35764    # Not in mixed or Windows style, start by that.
35765    new_path=`cmd //c echo $new_path`
35766
35767  input_path="$new_path"
35768  # Check if we need to convert this using DOS-style short mode. If the path
35769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35770  # take no chances and rewrite it.
35771  # Note: m4 eats our [], so we need to use [ and ] instead.
35772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35773  if test "x$has_forbidden_chars" != x; then
35774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35776  fi
35777
35778    # Output is in $new_path
35779
35780  windows_path="$new_path"
35781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35782    unix_path=`$CYGPATH -u "$windows_path"`
35783    new_path="$unix_path"
35784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35786    new_path="$unix_path"
35787  fi
35788
35789    # remove trailing .exe if any
35790    new_path="${new_path/%.exe/}"
35791
35792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35794  fi
35795
35796    else
35797      # We're on a unix platform. Hooray! :)
35798      # First separate the path from the arguments. This will split at the first
35799      # space.
35800      complete="$RC"
35801      path="${complete%% *}"
35802      tmp="$complete EOL"
35803      arguments="${tmp#* }"
35804
35805      # Cannot rely on the command "which" here since it doesn't always work.
35806      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35807      if test -z "$is_absolute_path"; then
35808        # Path to executable is not absolute. Find it.
35809        IFS_save="$IFS"
35810        IFS=:
35811        for p in $PATH; do
35812          if test -f "$p/$path" && test -x "$p/$path"; then
35813            new_path="$p/$path"
35814            break
35815          fi
35816        done
35817        IFS="$IFS_save"
35818      else
35819        # This is an absolute path, we can use it without further modifications.
35820        new_path="$path"
35821      fi
35822
35823      if test "x$new_path" = x; then
35824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35825$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35826        has_space=`$ECHO "$complete" | $GREP " "`
35827        if test "x$has_space" != x; then
35828          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35830        fi
35831        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35832      fi
35833    fi
35834
35835    # Now join together the path and the arguments once again
35836    if test "x$arguments" != xEOL; then
35837      new_complete="$new_path ${arguments% *}"
35838    else
35839      new_complete="$new_path"
35840    fi
35841
35842    if test "x$complete" != "x$new_complete"; then
35843      RC="$new_complete"
35844      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35845$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35846    fi
35847  fi
35848
35849    # Extract the first word of "dumpbin", so it can be a program name with args.
35850set dummy dumpbin; ac_word=$2
35851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35852$as_echo_n "checking for $ac_word... " >&6; }
35853if ${ac_cv_prog_DUMPBIN+:} false; then :
35854  $as_echo_n "(cached) " >&6
35855else
35856  if test -n "$DUMPBIN"; then
35857  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35858else
35859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35860for as_dir in $PATH
35861do
35862  IFS=$as_save_IFS
35863  test -z "$as_dir" && as_dir=.
35864    for ac_exec_ext in '' $ac_executable_extensions; do
35865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35866    ac_cv_prog_DUMPBIN="dumpbin"
35867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35868    break 2
35869  fi
35870done
35871  done
35872IFS=$as_save_IFS
35873
35874fi
35875fi
35876DUMPBIN=$ac_cv_prog_DUMPBIN
35877if test -n "$DUMPBIN"; then
35878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35879$as_echo "$DUMPBIN" >&6; }
35880else
35881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35882$as_echo "no" >&6; }
35883fi
35884
35885
35886
35887  # Only process if variable expands to non-empty
35888
35889  if test "x$DUMPBIN" != x; then
35890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35891
35892  # First separate the path from the arguments. This will split at the first
35893  # space.
35894  complete="$DUMPBIN"
35895  path="${complete%% *}"
35896  tmp="$complete EOL"
35897  arguments="${tmp#* }"
35898
35899  # Input might be given as Windows format, start by converting to
35900  # unix format.
35901  new_path=`$CYGPATH -u "$path"`
35902
35903  # Now try to locate executable using which
35904  new_path=`$WHICH "$new_path" 2> /dev/null`
35905  # bat and cmd files are not always considered executable in cygwin causing which
35906  # to not find them
35907  if test "x$new_path" = x \
35908      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35909      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35910    new_path=`$CYGPATH -u "$path"`
35911  fi
35912  if test "x$new_path" = x; then
35913    # Oops. Which didn't find the executable.
35914    # The splitting of arguments from the executable at a space might have been incorrect,
35915    # since paths with space are more likely in Windows. Give it another try with the whole
35916    # argument.
35917    path="$complete"
35918    arguments="EOL"
35919    new_path=`$CYGPATH -u "$path"`
35920    new_path=`$WHICH "$new_path" 2> /dev/null`
35921    # bat and cmd files are not always considered executable in cygwin causing which
35922    # to not find them
35923    if test "x$new_path" = x \
35924        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35925        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35926      new_path=`$CYGPATH -u "$path"`
35927    fi
35928    if test "x$new_path" = x; then
35929      # It's still not found. Now this is an unrecoverable error.
35930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35931$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35932      has_space=`$ECHO "$complete" | $GREP " "`
35933      if test "x$has_space" != x; then
35934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35936      fi
35937      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35938    fi
35939  fi
35940
35941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35944  # "foo.exe" is OK but "foo" is an error.
35945  #
35946  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35947  # It is also a way to make sure we got the proper file name for the real test later on.
35948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35949  if test "x$test_shortpath" = x; then
35950    # Short path failed, file does not exist as specified.
35951    # Try adding .exe or .cmd
35952    if test -f "${new_path}.exe"; then
35953      input_to_shortpath="${new_path}.exe"
35954    elif test -f "${new_path}.cmd"; then
35955      input_to_shortpath="${new_path}.cmd"
35956    else
35957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35958$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35959      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35960$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35961      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35962    fi
35963  else
35964    input_to_shortpath="$new_path"
35965  fi
35966
35967  # Call helper function which possibly converts this using DOS-style short mode.
35968  # If so, the updated path is stored in $new_path.
35969  new_path="$input_to_shortpath"
35970
35971  input_path="$input_to_shortpath"
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35982      # Going to short mode and back again did indeed matter. Since short mode is
35983      # case insensitive, let's make it lowercase to improve readability.
35984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35985      # Now convert it back to Unix-style (cygpath)
35986      input_path=`$CYGPATH -u "$shortmode_path"`
35987      new_path="$input_path"
35988    fi
35989  fi
35990
35991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35992  if test "x$test_cygdrive_prefix" = x; then
35993    # As a simple fix, exclude /usr/bin since it's not a real path.
35994    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35996      # a path prefixed by /cygdrive for fixpath to work.
35997      new_path="$CYGWIN_ROOT_PATH$input_path"
35998    fi
35999  fi
36000
36001  # remove trailing .exe if any
36002  new_path="${new_path/%.exe/}"
36003
36004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36005
36006  # First separate the path from the arguments. This will split at the first
36007  # space.
36008  complete="$DUMPBIN"
36009  path="${complete%% *}"
36010  tmp="$complete EOL"
36011  arguments="${tmp#* }"
36012
36013  # Input might be given as Windows format, start by converting to
36014  # unix format.
36015  new_path="$path"
36016
36017  windows_path="$new_path"
36018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36019    unix_path=`$CYGPATH -u "$windows_path"`
36020    new_path="$unix_path"
36021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36023    new_path="$unix_path"
36024  fi
36025
36026
36027  # Now try to locate executable using which
36028  new_path=`$WHICH "$new_path" 2> /dev/null`
36029
36030  if test "x$new_path" = x; then
36031    # Oops. Which didn't find the executable.
36032    # The splitting of arguments from the executable at a space might have been incorrect,
36033    # since paths with space are more likely in Windows. Give it another try with the whole
36034    # argument.
36035    path="$complete"
36036    arguments="EOL"
36037    new_path="$path"
36038
36039  windows_path="$new_path"
36040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36041    unix_path=`$CYGPATH -u "$windows_path"`
36042    new_path="$unix_path"
36043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36045    new_path="$unix_path"
36046  fi
36047
36048
36049    new_path=`$WHICH "$new_path" 2> /dev/null`
36050    # bat and cmd files are not always considered executable in MSYS causing which
36051    # to not find them
36052    if test "x$new_path" = x \
36053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36055      new_path="$path"
36056
36057  windows_path="$new_path"
36058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36059    unix_path=`$CYGPATH -u "$windows_path"`
36060    new_path="$unix_path"
36061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36063    new_path="$unix_path"
36064  fi
36065
36066    fi
36067
36068    if test "x$new_path" = x; then
36069      # It's still not found. Now this is an unrecoverable error.
36070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
36071$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
36072      has_space=`$ECHO "$complete" | $GREP " "`
36073      if test "x$has_space" != x; then
36074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36076      fi
36077      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
36078    fi
36079  fi
36080
36081  # Now new_path has a complete unix path to the binary
36082  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36083    # Keep paths in /bin as-is, but remove trailing .exe if any
36084    new_path="${new_path/%.exe/}"
36085    # Do not save /bin paths to all_fixpath_prefixes!
36086  else
36087    # Not in mixed or Windows style, start by that.
36088    new_path=`cmd //c echo $new_path`
36089
36090  input_path="$new_path"
36091  # Check if we need to convert this using DOS-style short mode. If the path
36092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36093  # take no chances and rewrite it.
36094  # Note: m4 eats our [], so we need to use [ and ] instead.
36095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36096  if test "x$has_forbidden_chars" != x; then
36097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36099  fi
36100
36101    # Output is in $new_path
36102
36103  windows_path="$new_path"
36104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36105    unix_path=`$CYGPATH -u "$windows_path"`
36106    new_path="$unix_path"
36107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36109    new_path="$unix_path"
36110  fi
36111
36112    # remove trailing .exe if any
36113    new_path="${new_path/%.exe/}"
36114
36115    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36116    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36117  fi
36118
36119    else
36120      # We're on a unix platform. Hooray! :)
36121      # First separate the path from the arguments. This will split at the first
36122      # space.
36123      complete="$DUMPBIN"
36124      path="${complete%% *}"
36125      tmp="$complete EOL"
36126      arguments="${tmp#* }"
36127
36128      # Cannot rely on the command "which" here since it doesn't always work.
36129      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36130      if test -z "$is_absolute_path"; then
36131        # Path to executable is not absolute. Find it.
36132        IFS_save="$IFS"
36133        IFS=:
36134        for p in $PATH; do
36135          if test -f "$p/$path" && test -x "$p/$path"; then
36136            new_path="$p/$path"
36137            break
36138          fi
36139        done
36140        IFS="$IFS_save"
36141      else
36142        # This is an absolute path, we can use it without further modifications.
36143        new_path="$path"
36144      fi
36145
36146      if test "x$new_path" = x; then
36147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
36148$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
36149        has_space=`$ECHO "$complete" | $GREP " "`
36150        if test "x$has_space" != x; then
36151          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36153        fi
36154        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
36155      fi
36156    fi
36157
36158    # Now join together the path and the arguments once again
36159    if test "x$arguments" != xEOL; then
36160      new_complete="$new_path ${arguments% *}"
36161    else
36162      new_complete="$new_path"
36163    fi
36164
36165    if test "x$complete" != "x$new_complete"; then
36166      DUMPBIN="$new_complete"
36167      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
36168$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
36169    fi
36170  fi
36171
36172    # We need to check for 'msbuild.exe' because at the place where we expect to
36173    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
36174    # won't find the 'msbuild.exe' executable in that case (and the
36175    # 'ac_executable_extensions' is unusable due to performance reasons).
36176    # Notice that we intentionally don't fix up the path to MSBUILD because we
36177    # will call it in a DOS shell during freetype detection on Windows (see
36178    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
36179    # Extract the first word of "msbuild.exe", so it can be a program name with args.
36180set dummy msbuild.exe; ac_word=$2
36181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36182$as_echo_n "checking for $ac_word... " >&6; }
36183if ${ac_cv_prog_MSBUILD+:} false; then :
36184  $as_echo_n "(cached) " >&6
36185else
36186  if test -n "$MSBUILD"; then
36187  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
36188else
36189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36190for as_dir in $PATH
36191do
36192  IFS=$as_save_IFS
36193  test -z "$as_dir" && as_dir=.
36194    for ac_exec_ext in '' $ac_executable_extensions; do
36195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36196    ac_cv_prog_MSBUILD="msbuild.exe"
36197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36198    break 2
36199  fi
36200done
36201  done
36202IFS=$as_save_IFS
36203
36204fi
36205fi
36206MSBUILD=$ac_cv_prog_MSBUILD
36207if test -n "$MSBUILD"; then
36208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
36209$as_echo "$MSBUILD" >&6; }
36210else
36211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36212$as_echo "no" >&6; }
36213fi
36214
36215
36216  fi
36217
36218  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36219
36220
36221  # Publish this variable in the help.
36222
36223
36224  if [ -z "${STRIP+x}" ]; then
36225    # The variable is not set by user, try to locate tool using the code snippet
36226    for ac_prog in strip
36227do
36228  # Extract the first word of "$ac_prog", so it can be a program name with args.
36229set dummy $ac_prog; ac_word=$2
36230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36231$as_echo_n "checking for $ac_word... " >&6; }
36232if ${ac_cv_path_STRIP+:} false; then :
36233  $as_echo_n "(cached) " >&6
36234else
36235  case $STRIP in
36236  [\\/]* | ?:[\\/]*)
36237  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36238  ;;
36239  *)
36240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36241for as_dir in $PATH
36242do
36243  IFS=$as_save_IFS
36244  test -z "$as_dir" && as_dir=.
36245    for ac_exec_ext in '' $ac_executable_extensions; do
36246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36247    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36249    break 2
36250  fi
36251done
36252  done
36253IFS=$as_save_IFS
36254
36255  ;;
36256esac
36257fi
36258STRIP=$ac_cv_path_STRIP
36259if test -n "$STRIP"; then
36260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36261$as_echo "$STRIP" >&6; }
36262else
36263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36264$as_echo "no" >&6; }
36265fi
36266
36267
36268  test -n "$STRIP" && break
36269done
36270
36271  else
36272    # The variable is set, but is it from the command line or the environment?
36273
36274    # Try to remove the string !STRIP! from our list.
36275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36277      # If it failed, the variable was not from the command line. Ignore it,
36278      # but warn the user (except for BASH, which is always set by the calling BASH).
36279      if test "xSTRIP" != xBASH; then
36280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36281$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36282      fi
36283      # Try to locate tool using the code snippet
36284      for ac_prog in strip
36285do
36286  # Extract the first word of "$ac_prog", so it can be a program name with args.
36287set dummy $ac_prog; ac_word=$2
36288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36289$as_echo_n "checking for $ac_word... " >&6; }
36290if ${ac_cv_path_STRIP+:} false; then :
36291  $as_echo_n "(cached) " >&6
36292else
36293  case $STRIP in
36294  [\\/]* | ?:[\\/]*)
36295  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36296  ;;
36297  *)
36298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36299for as_dir in $PATH
36300do
36301  IFS=$as_save_IFS
36302  test -z "$as_dir" && as_dir=.
36303    for ac_exec_ext in '' $ac_executable_extensions; do
36304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36305    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36307    break 2
36308  fi
36309done
36310  done
36311IFS=$as_save_IFS
36312
36313  ;;
36314esac
36315fi
36316STRIP=$ac_cv_path_STRIP
36317if test -n "$STRIP"; then
36318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36319$as_echo "$STRIP" >&6; }
36320else
36321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36322$as_echo "no" >&6; }
36323fi
36324
36325
36326  test -n "$STRIP" && break
36327done
36328
36329    else
36330      # If it succeeded, then it was overridden by the user. We will use it
36331      # for the tool.
36332
36333      # First remove it from the list of overridden variables, so we can test
36334      # for unknown variables in the end.
36335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36336
36337      # Check if we try to supply an empty value
36338      if test "x$STRIP" = x; then
36339        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
36340$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
36341        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36342$as_echo_n "checking for STRIP... " >&6; }
36343        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36344$as_echo "disabled" >&6; }
36345      else
36346        # Check if the provided tool contains a complete path.
36347        tool_specified="$STRIP"
36348        tool_basename="${tool_specified##*/}"
36349        if test "x$tool_basename" = "x$tool_specified"; then
36350          # A command without a complete path is provided, search $PATH.
36351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36352$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36353          # Extract the first word of "$tool_basename", so it can be a program name with args.
36354set dummy $tool_basename; ac_word=$2
36355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36356$as_echo_n "checking for $ac_word... " >&6; }
36357if ${ac_cv_path_STRIP+:} false; then :
36358  $as_echo_n "(cached) " >&6
36359else
36360  case $STRIP in
36361  [\\/]* | ?:[\\/]*)
36362  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36363  ;;
36364  *)
36365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36366for as_dir in $PATH
36367do
36368  IFS=$as_save_IFS
36369  test -z "$as_dir" && as_dir=.
36370    for ac_exec_ext in '' $ac_executable_extensions; do
36371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36372    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36374    break 2
36375  fi
36376done
36377  done
36378IFS=$as_save_IFS
36379
36380  ;;
36381esac
36382fi
36383STRIP=$ac_cv_path_STRIP
36384if test -n "$STRIP"; then
36385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36386$as_echo "$STRIP" >&6; }
36387else
36388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36389$as_echo "no" >&6; }
36390fi
36391
36392
36393          if test "x$STRIP" = x; then
36394            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36395          fi
36396        else
36397          # Otherwise we believe it is a complete path. Use it as it is.
36398          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36399$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36400          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36401$as_echo_n "checking for STRIP... " >&6; }
36402          if test ! -x "$tool_specified"; then
36403            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36404$as_echo "not found" >&6; }
36405            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36406          fi
36407          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36408$as_echo "$tool_specified" >&6; }
36409        fi
36410      fi
36411    fi
36412  fi
36413
36414
36415
36416  # Only process if variable expands to non-empty
36417
36418  if test "x$STRIP" != x; then
36419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36420
36421  # First separate the path from the arguments. This will split at the first
36422  # space.
36423  complete="$STRIP"
36424  path="${complete%% *}"
36425  tmp="$complete EOL"
36426  arguments="${tmp#* }"
36427
36428  # Input might be given as Windows format, start by converting to
36429  # unix format.
36430  new_path=`$CYGPATH -u "$path"`
36431
36432  # Now try to locate executable using which
36433  new_path=`$WHICH "$new_path" 2> /dev/null`
36434  # bat and cmd files are not always considered executable in cygwin causing which
36435  # to not find them
36436  if test "x$new_path" = x \
36437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36439    new_path=`$CYGPATH -u "$path"`
36440  fi
36441  if test "x$new_path" = x; then
36442    # Oops. Which didn't find the executable.
36443    # The splitting of arguments from the executable at a space might have been incorrect,
36444    # since paths with space are more likely in Windows. Give it another try with the whole
36445    # argument.
36446    path="$complete"
36447    arguments="EOL"
36448    new_path=`$CYGPATH -u "$path"`
36449    new_path=`$WHICH "$new_path" 2> /dev/null`
36450    # bat and cmd files are not always considered executable in cygwin causing which
36451    # to not find them
36452    if test "x$new_path" = x \
36453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36455      new_path=`$CYGPATH -u "$path"`
36456    fi
36457    if test "x$new_path" = x; then
36458      # It's still not found. Now this is an unrecoverable error.
36459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36460$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36461      has_space=`$ECHO "$complete" | $GREP " "`
36462      if test "x$has_space" != x; then
36463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36465      fi
36466      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36467    fi
36468  fi
36469
36470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36473  # "foo.exe" is OK but "foo" is an error.
36474  #
36475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36476  # It is also a way to make sure we got the proper file name for the real test later on.
36477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36478  if test "x$test_shortpath" = x; then
36479    # Short path failed, file does not exist as specified.
36480    # Try adding .exe or .cmd
36481    if test -f "${new_path}.exe"; then
36482      input_to_shortpath="${new_path}.exe"
36483    elif test -f "${new_path}.cmd"; then
36484      input_to_shortpath="${new_path}.cmd"
36485    else
36486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36487$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36490      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36491    fi
36492  else
36493    input_to_shortpath="$new_path"
36494  fi
36495
36496  # Call helper function which possibly converts this using DOS-style short mode.
36497  # If so, the updated path is stored in $new_path.
36498  new_path="$input_to_shortpath"
36499
36500  input_path="$input_to_shortpath"
36501  # Check if we need to convert this using DOS-style short mode. If the path
36502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36503  # take no chances and rewrite it.
36504  # Note: m4 eats our [], so we need to use [ and ] instead.
36505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36506  if test "x$has_forbidden_chars" != x; then
36507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36511      # Going to short mode and back again did indeed matter. Since short mode is
36512      # case insensitive, let's make it lowercase to improve readability.
36513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36514      # Now convert it back to Unix-style (cygpath)
36515      input_path=`$CYGPATH -u "$shortmode_path"`
36516      new_path="$input_path"
36517    fi
36518  fi
36519
36520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36521  if test "x$test_cygdrive_prefix" = x; then
36522    # As a simple fix, exclude /usr/bin since it's not a real path.
36523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36525      # a path prefixed by /cygdrive for fixpath to work.
36526      new_path="$CYGWIN_ROOT_PATH$input_path"
36527    fi
36528  fi
36529
36530  # remove trailing .exe if any
36531  new_path="${new_path/%.exe/}"
36532
36533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36534
36535  # First separate the path from the arguments. This will split at the first
36536  # space.
36537  complete="$STRIP"
36538  path="${complete%% *}"
36539  tmp="$complete EOL"
36540  arguments="${tmp#* }"
36541
36542  # Input might be given as Windows format, start by converting to
36543  # unix format.
36544  new_path="$path"
36545
36546  windows_path="$new_path"
36547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36548    unix_path=`$CYGPATH -u "$windows_path"`
36549    new_path="$unix_path"
36550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36552    new_path="$unix_path"
36553  fi
36554
36555
36556  # Now try to locate executable using which
36557  new_path=`$WHICH "$new_path" 2> /dev/null`
36558
36559  if test "x$new_path" = x; then
36560    # Oops. Which didn't find the executable.
36561    # The splitting of arguments from the executable at a space might have been incorrect,
36562    # since paths with space are more likely in Windows. Give it another try with the whole
36563    # argument.
36564    path="$complete"
36565    arguments="EOL"
36566    new_path="$path"
36567
36568  windows_path="$new_path"
36569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36570    unix_path=`$CYGPATH -u "$windows_path"`
36571    new_path="$unix_path"
36572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36574    new_path="$unix_path"
36575  fi
36576
36577
36578    new_path=`$WHICH "$new_path" 2> /dev/null`
36579    # bat and cmd files are not always considered executable in MSYS causing which
36580    # to not find them
36581    if test "x$new_path" = x \
36582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36584      new_path="$path"
36585
36586  windows_path="$new_path"
36587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36588    unix_path=`$CYGPATH -u "$windows_path"`
36589    new_path="$unix_path"
36590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36592    new_path="$unix_path"
36593  fi
36594
36595    fi
36596
36597    if test "x$new_path" = x; then
36598      # It's still not found. Now this is an unrecoverable error.
36599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36600$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36601      has_space=`$ECHO "$complete" | $GREP " "`
36602      if test "x$has_space" != x; then
36603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36605      fi
36606      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36607    fi
36608  fi
36609
36610  # Now new_path has a complete unix path to the binary
36611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36612    # Keep paths in /bin as-is, but remove trailing .exe if any
36613    new_path="${new_path/%.exe/}"
36614    # Do not save /bin paths to all_fixpath_prefixes!
36615  else
36616    # Not in mixed or Windows style, start by that.
36617    new_path=`cmd //c echo $new_path`
36618
36619  input_path="$new_path"
36620  # Check if we need to convert this using DOS-style short mode. If the path
36621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36622  # take no chances and rewrite it.
36623  # Note: m4 eats our [], so we need to use [ and ] instead.
36624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36625  if test "x$has_forbidden_chars" != x; then
36626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36628  fi
36629
36630    # Output is in $new_path
36631
36632  windows_path="$new_path"
36633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36634    unix_path=`$CYGPATH -u "$windows_path"`
36635    new_path="$unix_path"
36636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36638    new_path="$unix_path"
36639  fi
36640
36641    # remove trailing .exe if any
36642    new_path="${new_path/%.exe/}"
36643
36644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36646  fi
36647
36648    else
36649      # We're on a unix platform. Hooray! :)
36650      # First separate the path from the arguments. This will split at the first
36651      # space.
36652      complete="$STRIP"
36653      path="${complete%% *}"
36654      tmp="$complete EOL"
36655      arguments="${tmp#* }"
36656
36657      # Cannot rely on the command "which" here since it doesn't always work.
36658      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36659      if test -z "$is_absolute_path"; then
36660        # Path to executable is not absolute. Find it.
36661        IFS_save="$IFS"
36662        IFS=:
36663        for p in $PATH; do
36664          if test -f "$p/$path" && test -x "$p/$path"; then
36665            new_path="$p/$path"
36666            break
36667          fi
36668        done
36669        IFS="$IFS_save"
36670      else
36671        # This is an absolute path, we can use it without further modifications.
36672        new_path="$path"
36673      fi
36674
36675      if test "x$new_path" = x; then
36676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36677$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36678        has_space=`$ECHO "$complete" | $GREP " "`
36679        if test "x$has_space" != x; then
36680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36682        fi
36683        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36684      fi
36685    fi
36686
36687    # Now join together the path and the arguments once again
36688    if test "x$arguments" != xEOL; then
36689      new_complete="$new_path ${arguments% *}"
36690    else
36691      new_complete="$new_path"
36692    fi
36693
36694    if test "x$complete" != "x$new_complete"; then
36695      STRIP="$new_complete"
36696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36697$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36698    fi
36699  fi
36700
36701
36702
36703  # Publish this variable in the help.
36704
36705
36706  if [ -z "${NM+x}" ]; then
36707    # The variable is not set by user, try to locate tool using the code snippet
36708    for ac_prog in nm
36709do
36710  # Extract the first word of "$ac_prog", so it can be a program name with args.
36711set dummy $ac_prog; ac_word=$2
36712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36713$as_echo_n "checking for $ac_word... " >&6; }
36714if ${ac_cv_path_NM+:} false; then :
36715  $as_echo_n "(cached) " >&6
36716else
36717  case $NM in
36718  [\\/]* | ?:[\\/]*)
36719  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36720  ;;
36721  *)
36722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36723for as_dir in $PATH
36724do
36725  IFS=$as_save_IFS
36726  test -z "$as_dir" && as_dir=.
36727    for ac_exec_ext in '' $ac_executable_extensions; do
36728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36729    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36731    break 2
36732  fi
36733done
36734  done
36735IFS=$as_save_IFS
36736
36737  ;;
36738esac
36739fi
36740NM=$ac_cv_path_NM
36741if test -n "$NM"; then
36742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36743$as_echo "$NM" >&6; }
36744else
36745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36746$as_echo "no" >&6; }
36747fi
36748
36749
36750  test -n "$NM" && break
36751done
36752
36753  else
36754    # The variable is set, but is it from the command line or the environment?
36755
36756    # Try to remove the string !NM! from our list.
36757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36759      # If it failed, the variable was not from the command line. Ignore it,
36760      # but warn the user (except for BASH, which is always set by the calling BASH).
36761      if test "xNM" != xBASH; then
36762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36763$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36764      fi
36765      # Try to locate tool using the code snippet
36766      for ac_prog in nm
36767do
36768  # Extract the first word of "$ac_prog", so it can be a program name with args.
36769set dummy $ac_prog; ac_word=$2
36770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36771$as_echo_n "checking for $ac_word... " >&6; }
36772if ${ac_cv_path_NM+:} false; then :
36773  $as_echo_n "(cached) " >&6
36774else
36775  case $NM in
36776  [\\/]* | ?:[\\/]*)
36777  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36778  ;;
36779  *)
36780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36781for as_dir in $PATH
36782do
36783  IFS=$as_save_IFS
36784  test -z "$as_dir" && as_dir=.
36785    for ac_exec_ext in '' $ac_executable_extensions; do
36786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36787    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36789    break 2
36790  fi
36791done
36792  done
36793IFS=$as_save_IFS
36794
36795  ;;
36796esac
36797fi
36798NM=$ac_cv_path_NM
36799if test -n "$NM"; then
36800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36801$as_echo "$NM" >&6; }
36802else
36803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36804$as_echo "no" >&6; }
36805fi
36806
36807
36808  test -n "$NM" && break
36809done
36810
36811    else
36812      # If it succeeded, then it was overridden by the user. We will use it
36813      # for the tool.
36814
36815      # First remove it from the list of overridden variables, so we can test
36816      # for unknown variables in the end.
36817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36818
36819      # Check if we try to supply an empty value
36820      if test "x$NM" = x; then
36821        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
36822$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
36823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36824$as_echo_n "checking for NM... " >&6; }
36825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36826$as_echo "disabled" >&6; }
36827      else
36828        # Check if the provided tool contains a complete path.
36829        tool_specified="$NM"
36830        tool_basename="${tool_specified##*/}"
36831        if test "x$tool_basename" = "x$tool_specified"; then
36832          # A command without a complete path is provided, search $PATH.
36833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36834$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36835          # Extract the first word of "$tool_basename", so it can be a program name with args.
36836set dummy $tool_basename; ac_word=$2
36837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36838$as_echo_n "checking for $ac_word... " >&6; }
36839if ${ac_cv_path_NM+:} false; then :
36840  $as_echo_n "(cached) " >&6
36841else
36842  case $NM in
36843  [\\/]* | ?:[\\/]*)
36844  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36845  ;;
36846  *)
36847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36848for as_dir in $PATH
36849do
36850  IFS=$as_save_IFS
36851  test -z "$as_dir" && as_dir=.
36852    for ac_exec_ext in '' $ac_executable_extensions; do
36853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36854    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36856    break 2
36857  fi
36858done
36859  done
36860IFS=$as_save_IFS
36861
36862  ;;
36863esac
36864fi
36865NM=$ac_cv_path_NM
36866if test -n "$NM"; then
36867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36868$as_echo "$NM" >&6; }
36869else
36870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36871$as_echo "no" >&6; }
36872fi
36873
36874
36875          if test "x$NM" = x; then
36876            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36877          fi
36878        else
36879          # Otherwise we believe it is a complete path. Use it as it is.
36880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36881$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36882          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36883$as_echo_n "checking for NM... " >&6; }
36884          if test ! -x "$tool_specified"; then
36885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36886$as_echo "not found" >&6; }
36887            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36888          fi
36889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36890$as_echo "$tool_specified" >&6; }
36891        fi
36892      fi
36893    fi
36894  fi
36895
36896
36897
36898  # Only process if variable expands to non-empty
36899
36900  if test "x$NM" != x; then
36901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36902
36903  # First separate the path from the arguments. This will split at the first
36904  # space.
36905  complete="$NM"
36906  path="${complete%% *}"
36907  tmp="$complete EOL"
36908  arguments="${tmp#* }"
36909
36910  # Input might be given as Windows format, start by converting to
36911  # unix format.
36912  new_path=`$CYGPATH -u "$path"`
36913
36914  # Now try to locate executable using which
36915  new_path=`$WHICH "$new_path" 2> /dev/null`
36916  # bat and cmd files are not always considered executable in cygwin causing which
36917  # to not find them
36918  if test "x$new_path" = x \
36919      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36920      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36921    new_path=`$CYGPATH -u "$path"`
36922  fi
36923  if test "x$new_path" = x; then
36924    # Oops. Which didn't find the executable.
36925    # The splitting of arguments from the executable at a space might have been incorrect,
36926    # since paths with space are more likely in Windows. Give it another try with the whole
36927    # argument.
36928    path="$complete"
36929    arguments="EOL"
36930    new_path=`$CYGPATH -u "$path"`
36931    new_path=`$WHICH "$new_path" 2> /dev/null`
36932    # bat and cmd files are not always considered executable in cygwin causing which
36933    # to not find them
36934    if test "x$new_path" = x \
36935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36937      new_path=`$CYGPATH -u "$path"`
36938    fi
36939    if test "x$new_path" = x; then
36940      # It's still not found. Now this is an unrecoverable error.
36941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36942$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36943      has_space=`$ECHO "$complete" | $GREP " "`
36944      if test "x$has_space" != x; then
36945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36947      fi
36948      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36949    fi
36950  fi
36951
36952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36955  # "foo.exe" is OK but "foo" is an error.
36956  #
36957  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36958  # It is also a way to make sure we got the proper file name for the real test later on.
36959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36960  if test "x$test_shortpath" = x; then
36961    # Short path failed, file does not exist as specified.
36962    # Try adding .exe or .cmd
36963    if test -f "${new_path}.exe"; then
36964      input_to_shortpath="${new_path}.exe"
36965    elif test -f "${new_path}.cmd"; then
36966      input_to_shortpath="${new_path}.cmd"
36967    else
36968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36969$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36970      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36971$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36972      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36973    fi
36974  else
36975    input_to_shortpath="$new_path"
36976  fi
36977
36978  # Call helper function which possibly converts this using DOS-style short mode.
36979  # If so, the updated path is stored in $new_path.
36980  new_path="$input_to_shortpath"
36981
36982  input_path="$input_to_shortpath"
36983  # Check if we need to convert this using DOS-style short mode. If the path
36984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36985  # take no chances and rewrite it.
36986  # Note: m4 eats our [], so we need to use [ and ] instead.
36987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36988  if test "x$has_forbidden_chars" != x; then
36989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36993      # Going to short mode and back again did indeed matter. Since short mode is
36994      # case insensitive, let's make it lowercase to improve readability.
36995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36996      # Now convert it back to Unix-style (cygpath)
36997      input_path=`$CYGPATH -u "$shortmode_path"`
36998      new_path="$input_path"
36999    fi
37000  fi
37001
37002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37003  if test "x$test_cygdrive_prefix" = x; then
37004    # As a simple fix, exclude /usr/bin since it's not a real path.
37005    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37007      # a path prefixed by /cygdrive for fixpath to work.
37008      new_path="$CYGWIN_ROOT_PATH$input_path"
37009    fi
37010  fi
37011
37012  # remove trailing .exe if any
37013  new_path="${new_path/%.exe/}"
37014
37015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37016
37017  # First separate the path from the arguments. This will split at the first
37018  # space.
37019  complete="$NM"
37020  path="${complete%% *}"
37021  tmp="$complete EOL"
37022  arguments="${tmp#* }"
37023
37024  # Input might be given as Windows format, start by converting to
37025  # unix format.
37026  new_path="$path"
37027
37028  windows_path="$new_path"
37029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37030    unix_path=`$CYGPATH -u "$windows_path"`
37031    new_path="$unix_path"
37032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37034    new_path="$unix_path"
37035  fi
37036
37037
37038  # Now try to locate executable using which
37039  new_path=`$WHICH "$new_path" 2> /dev/null`
37040
37041  if test "x$new_path" = x; then
37042    # Oops. Which didn't find the executable.
37043    # The splitting of arguments from the executable at a space might have been incorrect,
37044    # since paths with space are more likely in Windows. Give it another try with the whole
37045    # argument.
37046    path="$complete"
37047    arguments="EOL"
37048    new_path="$path"
37049
37050  windows_path="$new_path"
37051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37052    unix_path=`$CYGPATH -u "$windows_path"`
37053    new_path="$unix_path"
37054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37056    new_path="$unix_path"
37057  fi
37058
37059
37060    new_path=`$WHICH "$new_path" 2> /dev/null`
37061    # bat and cmd files are not always considered executable in MSYS causing which
37062    # to not find them
37063    if test "x$new_path" = x \
37064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37066      new_path="$path"
37067
37068  windows_path="$new_path"
37069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37070    unix_path=`$CYGPATH -u "$windows_path"`
37071    new_path="$unix_path"
37072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37074    new_path="$unix_path"
37075  fi
37076
37077    fi
37078
37079    if test "x$new_path" = x; then
37080      # It's still not found. Now this is an unrecoverable error.
37081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37082$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37083      has_space=`$ECHO "$complete" | $GREP " "`
37084      if test "x$has_space" != x; then
37085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37087      fi
37088      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37089    fi
37090  fi
37091
37092  # Now new_path has a complete unix path to the binary
37093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37094    # Keep paths in /bin as-is, but remove trailing .exe if any
37095    new_path="${new_path/%.exe/}"
37096    # Do not save /bin paths to all_fixpath_prefixes!
37097  else
37098    # Not in mixed or Windows style, start by that.
37099    new_path=`cmd //c echo $new_path`
37100
37101  input_path="$new_path"
37102  # Check if we need to convert this using DOS-style short mode. If the path
37103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37104  # take no chances and rewrite it.
37105  # Note: m4 eats our [], so we need to use [ and ] instead.
37106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37107  if test "x$has_forbidden_chars" != x; then
37108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37110  fi
37111
37112    # Output is in $new_path
37113
37114  windows_path="$new_path"
37115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37116    unix_path=`$CYGPATH -u "$windows_path"`
37117    new_path="$unix_path"
37118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37120    new_path="$unix_path"
37121  fi
37122
37123    # remove trailing .exe if any
37124    new_path="${new_path/%.exe/}"
37125
37126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37128  fi
37129
37130    else
37131      # We're on a unix platform. Hooray! :)
37132      # First separate the path from the arguments. This will split at the first
37133      # space.
37134      complete="$NM"
37135      path="${complete%% *}"
37136      tmp="$complete EOL"
37137      arguments="${tmp#* }"
37138
37139      # Cannot rely on the command "which" here since it doesn't always work.
37140      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37141      if test -z "$is_absolute_path"; then
37142        # Path to executable is not absolute. Find it.
37143        IFS_save="$IFS"
37144        IFS=:
37145        for p in $PATH; do
37146          if test -f "$p/$path" && test -x "$p/$path"; then
37147            new_path="$p/$path"
37148            break
37149          fi
37150        done
37151        IFS="$IFS_save"
37152      else
37153        # This is an absolute path, we can use it without further modifications.
37154        new_path="$path"
37155      fi
37156
37157      if test "x$new_path" = x; then
37158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37159$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37160        has_space=`$ECHO "$complete" | $GREP " "`
37161        if test "x$has_space" != x; then
37162          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37164        fi
37165        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37166      fi
37167    fi
37168
37169    # Now join together the path and the arguments once again
37170    if test "x$arguments" != xEOL; then
37171      new_complete="$new_path ${arguments% *}"
37172    else
37173      new_complete="$new_path"
37174    fi
37175
37176    if test "x$complete" != "x$new_complete"; then
37177      NM="$new_complete"
37178      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37179$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37180    fi
37181  fi
37182
37183
37184
37185  # Publish this variable in the help.
37186
37187
37188  if [ -z "${GNM+x}" ]; then
37189    # The variable is not set by user, try to locate tool using the code snippet
37190    for ac_prog in gnm
37191do
37192  # Extract the first word of "$ac_prog", so it can be a program name with args.
37193set dummy $ac_prog; ac_word=$2
37194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37195$as_echo_n "checking for $ac_word... " >&6; }
37196if ${ac_cv_path_GNM+:} false; then :
37197  $as_echo_n "(cached) " >&6
37198else
37199  case $GNM in
37200  [\\/]* | ?:[\\/]*)
37201  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37202  ;;
37203  *)
37204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37205for as_dir in $PATH
37206do
37207  IFS=$as_save_IFS
37208  test -z "$as_dir" && as_dir=.
37209    for ac_exec_ext in '' $ac_executable_extensions; do
37210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37211    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37213    break 2
37214  fi
37215done
37216  done
37217IFS=$as_save_IFS
37218
37219  ;;
37220esac
37221fi
37222GNM=$ac_cv_path_GNM
37223if test -n "$GNM"; then
37224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37225$as_echo "$GNM" >&6; }
37226else
37227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37228$as_echo "no" >&6; }
37229fi
37230
37231
37232  test -n "$GNM" && break
37233done
37234
37235  else
37236    # The variable is set, but is it from the command line or the environment?
37237
37238    # Try to remove the string !GNM! from our list.
37239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
37240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37241      # If it failed, the variable was not from the command line. Ignore it,
37242      # but warn the user (except for BASH, which is always set by the calling BASH).
37243      if test "xGNM" != xBASH; then
37244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
37245$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
37246      fi
37247      # Try to locate tool using the code snippet
37248      for ac_prog in gnm
37249do
37250  # Extract the first word of "$ac_prog", so it can be a program name with args.
37251set dummy $ac_prog; ac_word=$2
37252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37253$as_echo_n "checking for $ac_word... " >&6; }
37254if ${ac_cv_path_GNM+:} false; then :
37255  $as_echo_n "(cached) " >&6
37256else
37257  case $GNM in
37258  [\\/]* | ?:[\\/]*)
37259  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37260  ;;
37261  *)
37262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37263for as_dir in $PATH
37264do
37265  IFS=$as_save_IFS
37266  test -z "$as_dir" && as_dir=.
37267    for ac_exec_ext in '' $ac_executable_extensions; do
37268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37269    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37271    break 2
37272  fi
37273done
37274  done
37275IFS=$as_save_IFS
37276
37277  ;;
37278esac
37279fi
37280GNM=$ac_cv_path_GNM
37281if test -n "$GNM"; then
37282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37283$as_echo "$GNM" >&6; }
37284else
37285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37286$as_echo "no" >&6; }
37287fi
37288
37289
37290  test -n "$GNM" && break
37291done
37292
37293    else
37294      # If it succeeded, then it was overridden by the user. We will use it
37295      # for the tool.
37296
37297      # First remove it from the list of overridden variables, so we can test
37298      # for unknown variables in the end.
37299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37300
37301      # Check if we try to supply an empty value
37302      if test "x$GNM" = x; then
37303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
37304$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
37305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37306$as_echo_n "checking for GNM... " >&6; }
37307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37308$as_echo "disabled" >&6; }
37309      else
37310        # Check if the provided tool contains a complete path.
37311        tool_specified="$GNM"
37312        tool_basename="${tool_specified##*/}"
37313        if test "x$tool_basename" = "x$tool_specified"; then
37314          # A command without a complete path is provided, search $PATH.
37315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
37316$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
37317          # Extract the first word of "$tool_basename", so it can be a program name with args.
37318set dummy $tool_basename; ac_word=$2
37319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37320$as_echo_n "checking for $ac_word... " >&6; }
37321if ${ac_cv_path_GNM+:} false; then :
37322  $as_echo_n "(cached) " >&6
37323else
37324  case $GNM in
37325  [\\/]* | ?:[\\/]*)
37326  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37327  ;;
37328  *)
37329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37330for as_dir in $PATH
37331do
37332  IFS=$as_save_IFS
37333  test -z "$as_dir" && as_dir=.
37334    for ac_exec_ext in '' $ac_executable_extensions; do
37335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37336    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37338    break 2
37339  fi
37340done
37341  done
37342IFS=$as_save_IFS
37343
37344  ;;
37345esac
37346fi
37347GNM=$ac_cv_path_GNM
37348if test -n "$GNM"; then
37349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37350$as_echo "$GNM" >&6; }
37351else
37352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37353$as_echo "no" >&6; }
37354fi
37355
37356
37357          if test "x$GNM" = x; then
37358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37359          fi
37360        else
37361          # Otherwise we believe it is a complete path. Use it as it is.
37362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
37363$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
37364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37365$as_echo_n "checking for GNM... " >&6; }
37366          if test ! -x "$tool_specified"; then
37367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37368$as_echo "not found" >&6; }
37369            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
37370          fi
37371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37372$as_echo "$tool_specified" >&6; }
37373        fi
37374      fi
37375    fi
37376  fi
37377
37378
37379
37380  # Only process if variable expands to non-empty
37381
37382  if test "x$GNM" != x; then
37383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37384
37385  # First separate the path from the arguments. This will split at the first
37386  # space.
37387  complete="$GNM"
37388  path="${complete%% *}"
37389  tmp="$complete EOL"
37390  arguments="${tmp#* }"
37391
37392  # Input might be given as Windows format, start by converting to
37393  # unix format.
37394  new_path=`$CYGPATH -u "$path"`
37395
37396  # Now try to locate executable using which
37397  new_path=`$WHICH "$new_path" 2> /dev/null`
37398  # bat and cmd files are not always considered executable in cygwin causing which
37399  # to not find them
37400  if test "x$new_path" = x \
37401      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37402      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37403    new_path=`$CYGPATH -u "$path"`
37404  fi
37405  if test "x$new_path" = x; then
37406    # Oops. Which didn't find the executable.
37407    # The splitting of arguments from the executable at a space might have been incorrect,
37408    # since paths with space are more likely in Windows. Give it another try with the whole
37409    # argument.
37410    path="$complete"
37411    arguments="EOL"
37412    new_path=`$CYGPATH -u "$path"`
37413    new_path=`$WHICH "$new_path" 2> /dev/null`
37414    # bat and cmd files are not always considered executable in cygwin causing which
37415    # to not find them
37416    if test "x$new_path" = x \
37417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37419      new_path=`$CYGPATH -u "$path"`
37420    fi
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 GNM, which resolves as \"$complete\", is not found." >&5
37424$as_echo "$as_me: The path of GNM, 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 GNM" "$LINENO" 5
37431    fi
37432  fi
37433
37434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37437  # "foo.exe" is OK but "foo" is an error.
37438  #
37439  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37440  # It is also a way to make sure we got the proper file name for the real test later on.
37441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37442  if test "x$test_shortpath" = x; then
37443    # Short path failed, file does not exist as specified.
37444    # Try adding .exe or .cmd
37445    if test -f "${new_path}.exe"; then
37446      input_to_shortpath="${new_path}.exe"
37447    elif test -f "${new_path}.cmd"; then
37448      input_to_shortpath="${new_path}.cmd"
37449    else
37450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
37451$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
37452      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37453$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37454      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37455    fi
37456  else
37457    input_to_shortpath="$new_path"
37458  fi
37459
37460  # Call helper function which possibly converts this using DOS-style short mode.
37461  # If so, the updated path is stored in $new_path.
37462  new_path="$input_to_shortpath"
37463
37464  input_path="$input_to_shortpath"
37465  # Check if we need to convert this using DOS-style short mode. If the path
37466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37467  # take no chances and rewrite it.
37468  # Note: m4 eats our [], so we need to use [ and ] instead.
37469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37470  if test "x$has_forbidden_chars" != x; then
37471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37475      # Going to short mode and back again did indeed matter. Since short mode is
37476      # case insensitive, let's make it lowercase to improve readability.
37477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37478      # Now convert it back to Unix-style (cygpath)
37479      input_path=`$CYGPATH -u "$shortmode_path"`
37480      new_path="$input_path"
37481    fi
37482  fi
37483
37484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37485  if test "x$test_cygdrive_prefix" = x; then
37486    # As a simple fix, exclude /usr/bin since it's not a real path.
37487    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37489      # a path prefixed by /cygdrive for fixpath to work.
37490      new_path="$CYGWIN_ROOT_PATH$input_path"
37491    fi
37492  fi
37493
37494  # remove trailing .exe if any
37495  new_path="${new_path/%.exe/}"
37496
37497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37498
37499  # First separate the path from the arguments. This will split at the first
37500  # space.
37501  complete="$GNM"
37502  path="${complete%% *}"
37503  tmp="$complete EOL"
37504  arguments="${tmp#* }"
37505
37506  # Input might be given as Windows format, start by converting to
37507  # unix format.
37508  new_path="$path"
37509
37510  windows_path="$new_path"
37511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37512    unix_path=`$CYGPATH -u "$windows_path"`
37513    new_path="$unix_path"
37514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37516    new_path="$unix_path"
37517  fi
37518
37519
37520  # Now try to locate executable using which
37521  new_path=`$WHICH "$new_path" 2> /dev/null`
37522
37523  if test "x$new_path" = x; then
37524    # Oops. Which didn't find the executable.
37525    # The splitting of arguments from the executable at a space might have been incorrect,
37526    # since paths with space are more likely in Windows. Give it another try with the whole
37527    # argument.
37528    path="$complete"
37529    arguments="EOL"
37530    new_path="$path"
37531
37532  windows_path="$new_path"
37533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37534    unix_path=`$CYGPATH -u "$windows_path"`
37535    new_path="$unix_path"
37536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37538    new_path="$unix_path"
37539  fi
37540
37541
37542    new_path=`$WHICH "$new_path" 2> /dev/null`
37543    # bat and cmd files are not always considered executable in MSYS causing which
37544    # to not find them
37545    if test "x$new_path" = x \
37546        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37547        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37548      new_path="$path"
37549
37550  windows_path="$new_path"
37551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37552    unix_path=`$CYGPATH -u "$windows_path"`
37553    new_path="$unix_path"
37554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37556    new_path="$unix_path"
37557  fi
37558
37559    fi
37560
37561    if test "x$new_path" = x; then
37562      # It's still not found. Now this is an unrecoverable error.
37563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37564$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37565      has_space=`$ECHO "$complete" | $GREP " "`
37566      if test "x$has_space" != x; then
37567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37569      fi
37570      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37571    fi
37572  fi
37573
37574  # Now new_path has a complete unix path to the binary
37575  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37576    # Keep paths in /bin as-is, but remove trailing .exe if any
37577    new_path="${new_path/%.exe/}"
37578    # Do not save /bin paths to all_fixpath_prefixes!
37579  else
37580    # Not in mixed or Windows style, start by that.
37581    new_path=`cmd //c echo $new_path`
37582
37583  input_path="$new_path"
37584  # Check if we need to convert this using DOS-style short mode. If the path
37585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37586  # take no chances and rewrite it.
37587  # Note: m4 eats our [], so we need to use [ and ] instead.
37588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37589  if test "x$has_forbidden_chars" != x; then
37590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37592  fi
37593
37594    # Output is in $new_path
37595
37596  windows_path="$new_path"
37597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37598    unix_path=`$CYGPATH -u "$windows_path"`
37599    new_path="$unix_path"
37600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37602    new_path="$unix_path"
37603  fi
37604
37605    # remove trailing .exe if any
37606    new_path="${new_path/%.exe/}"
37607
37608    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37609    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37610  fi
37611
37612    else
37613      # We're on a unix platform. Hooray! :)
37614      # First separate the path from the arguments. This will split at the first
37615      # space.
37616      complete="$GNM"
37617      path="${complete%% *}"
37618      tmp="$complete EOL"
37619      arguments="${tmp#* }"
37620
37621      # Cannot rely on the command "which" here since it doesn't always work.
37622      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37623      if test -z "$is_absolute_path"; then
37624        # Path to executable is not absolute. Find it.
37625        IFS_save="$IFS"
37626        IFS=:
37627        for p in $PATH; do
37628          if test -f "$p/$path" && test -x "$p/$path"; then
37629            new_path="$p/$path"
37630            break
37631          fi
37632        done
37633        IFS="$IFS_save"
37634      else
37635        # This is an absolute path, we can use it without further modifications.
37636        new_path="$path"
37637      fi
37638
37639      if test "x$new_path" = x; then
37640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37641$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37642        has_space=`$ECHO "$complete" | $GREP " "`
37643        if test "x$has_space" != x; then
37644          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37645$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37646        fi
37647        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37648      fi
37649    fi
37650
37651    # Now join together the path and the arguments once again
37652    if test "x$arguments" != xEOL; then
37653      new_complete="$new_path ${arguments% *}"
37654    else
37655      new_complete="$new_path"
37656    fi
37657
37658    if test "x$complete" != "x$new_complete"; then
37659      GNM="$new_complete"
37660      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37661$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37662    fi
37663  fi
37664
37665  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37666    # FIXME: we should unify this with the solaris case above.
37667
37668
37669  # Publish this variable in the help.
37670
37671
37672  if [ -z "${STRIP+x}" ]; then
37673    # The variable is not set by user, try to locate tool using the code snippet
37674    if test -n "$ac_tool_prefix"; then
37675  for ac_prog in strip
37676  do
37677    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37678set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37680$as_echo_n "checking for $ac_word... " >&6; }
37681if ${ac_cv_prog_STRIP+:} false; then :
37682  $as_echo_n "(cached) " >&6
37683else
37684  if test -n "$STRIP"; then
37685  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37686else
37687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37688for as_dir in $PATH
37689do
37690  IFS=$as_save_IFS
37691  test -z "$as_dir" && as_dir=.
37692    for ac_exec_ext in '' $ac_executable_extensions; do
37693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37694    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37696    break 2
37697  fi
37698done
37699  done
37700IFS=$as_save_IFS
37701
37702fi
37703fi
37704STRIP=$ac_cv_prog_STRIP
37705if test -n "$STRIP"; then
37706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37707$as_echo "$STRIP" >&6; }
37708else
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37710$as_echo "no" >&6; }
37711fi
37712
37713
37714    test -n "$STRIP" && break
37715  done
37716fi
37717if test -z "$STRIP"; then
37718  ac_ct_STRIP=$STRIP
37719  for ac_prog in strip
37720do
37721  # Extract the first word of "$ac_prog", so it can be a program name with args.
37722set dummy $ac_prog; ac_word=$2
37723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37724$as_echo_n "checking for $ac_word... " >&6; }
37725if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37726  $as_echo_n "(cached) " >&6
37727else
37728  if test -n "$ac_ct_STRIP"; then
37729  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37730else
37731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37732for as_dir in $PATH
37733do
37734  IFS=$as_save_IFS
37735  test -z "$as_dir" && as_dir=.
37736    for ac_exec_ext in '' $ac_executable_extensions; do
37737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37738    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37740    break 2
37741  fi
37742done
37743  done
37744IFS=$as_save_IFS
37745
37746fi
37747fi
37748ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37749if test -n "$ac_ct_STRIP"; then
37750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37751$as_echo "$ac_ct_STRIP" >&6; }
37752else
37753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37754$as_echo "no" >&6; }
37755fi
37756
37757
37758  test -n "$ac_ct_STRIP" && break
37759done
37760
37761  if test "x$ac_ct_STRIP" = x; then
37762    STRIP=""
37763  else
37764    case $cross_compiling:$ac_tool_warned in
37765yes:)
37766{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37767$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37768ac_tool_warned=yes ;;
37769esac
37770    STRIP=$ac_ct_STRIP
37771  fi
37772fi
37773
37774  else
37775    # The variable is set, but is it from the command line or the environment?
37776
37777    # Try to remove the string !STRIP! from our list.
37778    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37779    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37780      # If it failed, the variable was not from the command line. Ignore it,
37781      # but warn the user (except for BASH, which is always set by the calling BASH).
37782      if test "xSTRIP" != xBASH; then
37783        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37784$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37785      fi
37786      # Try to locate tool using the code snippet
37787      if test -n "$ac_tool_prefix"; then
37788  for ac_prog in strip
37789  do
37790    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37793$as_echo_n "checking for $ac_word... " >&6; }
37794if ${ac_cv_prog_STRIP+:} false; then :
37795  $as_echo_n "(cached) " >&6
37796else
37797  if test -n "$STRIP"; then
37798  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37799else
37800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37801for as_dir in $PATH
37802do
37803  IFS=$as_save_IFS
37804  test -z "$as_dir" && as_dir=.
37805    for ac_exec_ext in '' $ac_executable_extensions; do
37806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37807    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37809    break 2
37810  fi
37811done
37812  done
37813IFS=$as_save_IFS
37814
37815fi
37816fi
37817STRIP=$ac_cv_prog_STRIP
37818if test -n "$STRIP"; then
37819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37820$as_echo "$STRIP" >&6; }
37821else
37822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37823$as_echo "no" >&6; }
37824fi
37825
37826
37827    test -n "$STRIP" && break
37828  done
37829fi
37830if test -z "$STRIP"; then
37831  ac_ct_STRIP=$STRIP
37832  for ac_prog in strip
37833do
37834  # Extract the first word of "$ac_prog", so it can be a program name with args.
37835set dummy $ac_prog; ac_word=$2
37836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37837$as_echo_n "checking for $ac_word... " >&6; }
37838if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37839  $as_echo_n "(cached) " >&6
37840else
37841  if test -n "$ac_ct_STRIP"; then
37842  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37843else
37844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37845for as_dir in $PATH
37846do
37847  IFS=$as_save_IFS
37848  test -z "$as_dir" && as_dir=.
37849    for ac_exec_ext in '' $ac_executable_extensions; do
37850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37851    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37853    break 2
37854  fi
37855done
37856  done
37857IFS=$as_save_IFS
37858
37859fi
37860fi
37861ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37862if test -n "$ac_ct_STRIP"; then
37863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37864$as_echo "$ac_ct_STRIP" >&6; }
37865else
37866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37867$as_echo "no" >&6; }
37868fi
37869
37870
37871  test -n "$ac_ct_STRIP" && break
37872done
37873
37874  if test "x$ac_ct_STRIP" = x; then
37875    STRIP=""
37876  else
37877    case $cross_compiling:$ac_tool_warned in
37878yes:)
37879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37881ac_tool_warned=yes ;;
37882esac
37883    STRIP=$ac_ct_STRIP
37884  fi
37885fi
37886
37887    else
37888      # If it succeeded, then it was overridden by the user. We will use it
37889      # for the tool.
37890
37891      # First remove it from the list of overridden variables, so we can test
37892      # for unknown variables in the end.
37893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37894
37895      # Check if we try to supply an empty value
37896      if test "x$STRIP" = x; then
37897        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
37898$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
37899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37900$as_echo_n "checking for STRIP... " >&6; }
37901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37902$as_echo "disabled" >&6; }
37903      else
37904        # Check if the provided tool contains a complete path.
37905        tool_specified="$STRIP"
37906        tool_basename="${tool_specified##*/}"
37907        if test "x$tool_basename" = "x$tool_specified"; then
37908          # A command without a complete path is provided, search $PATH.
37909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37910$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37911          # Extract the first word of "$tool_basename", so it can be a program name with args.
37912set dummy $tool_basename; ac_word=$2
37913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37914$as_echo_n "checking for $ac_word... " >&6; }
37915if ${ac_cv_path_STRIP+:} false; then :
37916  $as_echo_n "(cached) " >&6
37917else
37918  case $STRIP in
37919  [\\/]* | ?:[\\/]*)
37920  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37921  ;;
37922  *)
37923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37924for as_dir in $PATH
37925do
37926  IFS=$as_save_IFS
37927  test -z "$as_dir" && as_dir=.
37928    for ac_exec_ext in '' $ac_executable_extensions; do
37929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37930    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37932    break 2
37933  fi
37934done
37935  done
37936IFS=$as_save_IFS
37937
37938  ;;
37939esac
37940fi
37941STRIP=$ac_cv_path_STRIP
37942if test -n "$STRIP"; then
37943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37944$as_echo "$STRIP" >&6; }
37945else
37946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37947$as_echo "no" >&6; }
37948fi
37949
37950
37951          if test "x$STRIP" = x; then
37952            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37953          fi
37954        else
37955          # Otherwise we believe it is a complete path. Use it as it is.
37956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37957$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37958          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37959$as_echo_n "checking for STRIP... " >&6; }
37960          if test ! -x "$tool_specified"; then
37961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37962$as_echo "not found" >&6; }
37963            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37964          fi
37965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37966$as_echo "$tool_specified" >&6; }
37967        fi
37968      fi
37969    fi
37970  fi
37971
37972
37973
37974  # Only process if variable expands to non-empty
37975
37976  if test "x$STRIP" != x; then
37977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37978
37979  # First separate the path from the arguments. This will split at the first
37980  # space.
37981  complete="$STRIP"
37982  path="${complete%% *}"
37983  tmp="$complete EOL"
37984  arguments="${tmp#* }"
37985
37986  # Input might be given as Windows format, start by converting to
37987  # unix format.
37988  new_path=`$CYGPATH -u "$path"`
37989
37990  # Now try to locate executable using which
37991  new_path=`$WHICH "$new_path" 2> /dev/null`
37992  # bat and cmd files are not always considered executable in cygwin causing which
37993  # to not find them
37994  if test "x$new_path" = x \
37995      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37996      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37997    new_path=`$CYGPATH -u "$path"`
37998  fi
37999  if test "x$new_path" = x; then
38000    # Oops. Which didn't find the executable.
38001    # The splitting of arguments from the executable at a space might have been incorrect,
38002    # since paths with space are more likely in Windows. Give it another try with the whole
38003    # argument.
38004    path="$complete"
38005    arguments="EOL"
38006    new_path=`$CYGPATH -u "$path"`
38007    new_path=`$WHICH "$new_path" 2> /dev/null`
38008    # bat and cmd files are not always considered executable in cygwin causing which
38009    # to not find them
38010    if test "x$new_path" = x \
38011        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38012        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38013      new_path=`$CYGPATH -u "$path"`
38014    fi
38015    if test "x$new_path" = x; then
38016      # It's still not found. Now this is an unrecoverable error.
38017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38018$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38019      has_space=`$ECHO "$complete" | $GREP " "`
38020      if test "x$has_space" != x; then
38021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38023      fi
38024      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38025    fi
38026  fi
38027
38028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38031  # "foo.exe" is OK but "foo" is an error.
38032  #
38033  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38034  # It is also a way to make sure we got the proper file name for the real test later on.
38035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38036  if test "x$test_shortpath" = x; then
38037    # Short path failed, file does not exist as specified.
38038    # Try adding .exe or .cmd
38039    if test -f "${new_path}.exe"; then
38040      input_to_shortpath="${new_path}.exe"
38041    elif test -f "${new_path}.cmd"; then
38042      input_to_shortpath="${new_path}.cmd"
38043    else
38044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38045$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38046      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38047$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38048      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38049    fi
38050  else
38051    input_to_shortpath="$new_path"
38052  fi
38053
38054  # Call helper function which possibly converts this using DOS-style short mode.
38055  # If so, the updated path is stored in $new_path.
38056  new_path="$input_to_shortpath"
38057
38058  input_path="$input_to_shortpath"
38059  # Check if we need to convert this using DOS-style short mode. If the path
38060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38061  # take no chances and rewrite it.
38062  # Note: m4 eats our [], so we need to use [ and ] instead.
38063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38064  if test "x$has_forbidden_chars" != x; then
38065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38069      # Going to short mode and back again did indeed matter. Since short mode is
38070      # case insensitive, let's make it lowercase to improve readability.
38071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38072      # Now convert it back to Unix-style (cygpath)
38073      input_path=`$CYGPATH -u "$shortmode_path"`
38074      new_path="$input_path"
38075    fi
38076  fi
38077
38078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38079  if test "x$test_cygdrive_prefix" = x; then
38080    # As a simple fix, exclude /usr/bin since it's not a real path.
38081    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38083      # a path prefixed by /cygdrive for fixpath to work.
38084      new_path="$CYGWIN_ROOT_PATH$input_path"
38085    fi
38086  fi
38087
38088  # remove trailing .exe if any
38089  new_path="${new_path/%.exe/}"
38090
38091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38092
38093  # First separate the path from the arguments. This will split at the first
38094  # space.
38095  complete="$STRIP"
38096  path="${complete%% *}"
38097  tmp="$complete EOL"
38098  arguments="${tmp#* }"
38099
38100  # Input might be given as Windows format, start by converting to
38101  # unix format.
38102  new_path="$path"
38103
38104  windows_path="$new_path"
38105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38106    unix_path=`$CYGPATH -u "$windows_path"`
38107    new_path="$unix_path"
38108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38110    new_path="$unix_path"
38111  fi
38112
38113
38114  # Now try to locate executable using which
38115  new_path=`$WHICH "$new_path" 2> /dev/null`
38116
38117  if test "x$new_path" = x; then
38118    # Oops. Which didn't find the executable.
38119    # The splitting of arguments from the executable at a space might have been incorrect,
38120    # since paths with space are more likely in Windows. Give it another try with the whole
38121    # argument.
38122    path="$complete"
38123    arguments="EOL"
38124    new_path="$path"
38125
38126  windows_path="$new_path"
38127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38128    unix_path=`$CYGPATH -u "$windows_path"`
38129    new_path="$unix_path"
38130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38132    new_path="$unix_path"
38133  fi
38134
38135
38136    new_path=`$WHICH "$new_path" 2> /dev/null`
38137    # bat and cmd files are not always considered executable in MSYS causing which
38138    # to not find them
38139    if test "x$new_path" = x \
38140        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38141        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38142      new_path="$path"
38143
38144  windows_path="$new_path"
38145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38146    unix_path=`$CYGPATH -u "$windows_path"`
38147    new_path="$unix_path"
38148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38150    new_path="$unix_path"
38151  fi
38152
38153    fi
38154
38155    if test "x$new_path" = x; then
38156      # It's still not found. Now this is an unrecoverable error.
38157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38158$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38159      has_space=`$ECHO "$complete" | $GREP " "`
38160      if test "x$has_space" != x; then
38161        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38162$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38163      fi
38164      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38165    fi
38166  fi
38167
38168  # Now new_path has a complete unix path to the binary
38169  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38170    # Keep paths in /bin as-is, but remove trailing .exe if any
38171    new_path="${new_path/%.exe/}"
38172    # Do not save /bin paths to all_fixpath_prefixes!
38173  else
38174    # Not in mixed or Windows style, start by that.
38175    new_path=`cmd //c echo $new_path`
38176
38177  input_path="$new_path"
38178  # Check if we need to convert this using DOS-style short mode. If the path
38179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38180  # take no chances and rewrite it.
38181  # Note: m4 eats our [], so we need to use [ and ] instead.
38182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38183  if test "x$has_forbidden_chars" != x; then
38184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38186  fi
38187
38188    # Output is in $new_path
38189
38190  windows_path="$new_path"
38191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38192    unix_path=`$CYGPATH -u "$windows_path"`
38193    new_path="$unix_path"
38194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38196    new_path="$unix_path"
38197  fi
38198
38199    # remove trailing .exe if any
38200    new_path="${new_path/%.exe/}"
38201
38202    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38203    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38204  fi
38205
38206    else
38207      # We're on a unix platform. Hooray! :)
38208      # First separate the path from the arguments. This will split at the first
38209      # space.
38210      complete="$STRIP"
38211      path="${complete%% *}"
38212      tmp="$complete EOL"
38213      arguments="${tmp#* }"
38214
38215      # Cannot rely on the command "which" here since it doesn't always work.
38216      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38217      if test -z "$is_absolute_path"; then
38218        # Path to executable is not absolute. Find it.
38219        IFS_save="$IFS"
38220        IFS=:
38221        for p in $PATH; do
38222          if test -f "$p/$path" && test -x "$p/$path"; then
38223            new_path="$p/$path"
38224            break
38225          fi
38226        done
38227        IFS="$IFS_save"
38228      else
38229        # This is an absolute path, we can use it without further modifications.
38230        new_path="$path"
38231      fi
38232
38233      if test "x$new_path" = x; then
38234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38235$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38236        has_space=`$ECHO "$complete" | $GREP " "`
38237        if test "x$has_space" != x; then
38238          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38239$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38240        fi
38241        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38242      fi
38243    fi
38244
38245    # Now join together the path and the arguments once again
38246    if test "x$arguments" != xEOL; then
38247      new_complete="$new_path ${arguments% *}"
38248    else
38249      new_complete="$new_path"
38250    fi
38251
38252    if test "x$complete" != "x$new_complete"; then
38253      STRIP="$new_complete"
38254      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38255$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38256    fi
38257  fi
38258
38259
38260
38261  # Publish this variable in the help.
38262
38263
38264  if [ -z "${NM+x}" ]; then
38265    # The variable is not set by user, try to locate tool using the code snippet
38266    if test -n "$ac_tool_prefix"; then
38267  for ac_prog in nm
38268  do
38269    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38270set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38272$as_echo_n "checking for $ac_word... " >&6; }
38273if ${ac_cv_prog_NM+:} false; then :
38274  $as_echo_n "(cached) " >&6
38275else
38276  if test -n "$NM"; then
38277  ac_cv_prog_NM="$NM" # Let the user override the test.
38278else
38279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38280for as_dir in $PATH
38281do
38282  IFS=$as_save_IFS
38283  test -z "$as_dir" && as_dir=.
38284    for ac_exec_ext in '' $ac_executable_extensions; do
38285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38286    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38288    break 2
38289  fi
38290done
38291  done
38292IFS=$as_save_IFS
38293
38294fi
38295fi
38296NM=$ac_cv_prog_NM
38297if test -n "$NM"; then
38298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38299$as_echo "$NM" >&6; }
38300else
38301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38302$as_echo "no" >&6; }
38303fi
38304
38305
38306    test -n "$NM" && break
38307  done
38308fi
38309if test -z "$NM"; then
38310  ac_ct_NM=$NM
38311  for ac_prog in nm
38312do
38313  # Extract the first word of "$ac_prog", so it can be a program name with args.
38314set dummy $ac_prog; ac_word=$2
38315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38316$as_echo_n "checking for $ac_word... " >&6; }
38317if ${ac_cv_prog_ac_ct_NM+:} false; then :
38318  $as_echo_n "(cached) " >&6
38319else
38320  if test -n "$ac_ct_NM"; then
38321  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38322else
38323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38324for as_dir in $PATH
38325do
38326  IFS=$as_save_IFS
38327  test -z "$as_dir" && as_dir=.
38328    for ac_exec_ext in '' $ac_executable_extensions; do
38329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38330    ac_cv_prog_ac_ct_NM="$ac_prog"
38331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38332    break 2
38333  fi
38334done
38335  done
38336IFS=$as_save_IFS
38337
38338fi
38339fi
38340ac_ct_NM=$ac_cv_prog_ac_ct_NM
38341if test -n "$ac_ct_NM"; then
38342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38343$as_echo "$ac_ct_NM" >&6; }
38344else
38345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38346$as_echo "no" >&6; }
38347fi
38348
38349
38350  test -n "$ac_ct_NM" && break
38351done
38352
38353  if test "x$ac_ct_NM" = x; then
38354    NM=""
38355  else
38356    case $cross_compiling:$ac_tool_warned in
38357yes:)
38358{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38359$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38360ac_tool_warned=yes ;;
38361esac
38362    NM=$ac_ct_NM
38363  fi
38364fi
38365
38366  else
38367    # The variable is set, but is it from the command line or the environment?
38368
38369    # Try to remove the string !NM! from our list.
38370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38372      # If it failed, the variable was not from the command line. Ignore it,
38373      # but warn the user (except for BASH, which is always set by the calling BASH).
38374      if test "xNM" != xBASH; then
38375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38376$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38377      fi
38378      # Try to locate tool using the code snippet
38379      if test -n "$ac_tool_prefix"; then
38380  for ac_prog in nm
38381  do
38382    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38383set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38385$as_echo_n "checking for $ac_word... " >&6; }
38386if ${ac_cv_prog_NM+:} false; then :
38387  $as_echo_n "(cached) " >&6
38388else
38389  if test -n "$NM"; then
38390  ac_cv_prog_NM="$NM" # Let the user override the test.
38391else
38392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38393for as_dir in $PATH
38394do
38395  IFS=$as_save_IFS
38396  test -z "$as_dir" && as_dir=.
38397    for ac_exec_ext in '' $ac_executable_extensions; do
38398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38399    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38401    break 2
38402  fi
38403done
38404  done
38405IFS=$as_save_IFS
38406
38407fi
38408fi
38409NM=$ac_cv_prog_NM
38410if test -n "$NM"; then
38411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38412$as_echo "$NM" >&6; }
38413else
38414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38415$as_echo "no" >&6; }
38416fi
38417
38418
38419    test -n "$NM" && break
38420  done
38421fi
38422if test -z "$NM"; then
38423  ac_ct_NM=$NM
38424  for ac_prog in nm
38425do
38426  # Extract the first word of "$ac_prog", so it can be a program name with args.
38427set dummy $ac_prog; ac_word=$2
38428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38429$as_echo_n "checking for $ac_word... " >&6; }
38430if ${ac_cv_prog_ac_ct_NM+:} false; then :
38431  $as_echo_n "(cached) " >&6
38432else
38433  if test -n "$ac_ct_NM"; then
38434  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38435else
38436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38437for as_dir in $PATH
38438do
38439  IFS=$as_save_IFS
38440  test -z "$as_dir" && as_dir=.
38441    for ac_exec_ext in '' $ac_executable_extensions; do
38442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38443    ac_cv_prog_ac_ct_NM="$ac_prog"
38444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38445    break 2
38446  fi
38447done
38448  done
38449IFS=$as_save_IFS
38450
38451fi
38452fi
38453ac_ct_NM=$ac_cv_prog_ac_ct_NM
38454if test -n "$ac_ct_NM"; then
38455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38456$as_echo "$ac_ct_NM" >&6; }
38457else
38458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38459$as_echo "no" >&6; }
38460fi
38461
38462
38463  test -n "$ac_ct_NM" && break
38464done
38465
38466  if test "x$ac_ct_NM" = x; then
38467    NM=""
38468  else
38469    case $cross_compiling:$ac_tool_warned in
38470yes:)
38471{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38472$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38473ac_tool_warned=yes ;;
38474esac
38475    NM=$ac_ct_NM
38476  fi
38477fi
38478
38479    else
38480      # If it succeeded, then it was overridden by the user. We will use it
38481      # for the tool.
38482
38483      # First remove it from the list of overridden variables, so we can test
38484      # for unknown variables in the end.
38485      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38486
38487      # Check if we try to supply an empty value
38488      if test "x$NM" = x; then
38489        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38490$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38492$as_echo_n "checking for NM... " >&6; }
38493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38494$as_echo "disabled" >&6; }
38495      else
38496        # Check if the provided tool contains a complete path.
38497        tool_specified="$NM"
38498        tool_basename="${tool_specified##*/}"
38499        if test "x$tool_basename" = "x$tool_specified"; then
38500          # A command without a complete path is provided, search $PATH.
38501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38502$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38503          # Extract the first word of "$tool_basename", so it can be a program name with args.
38504set dummy $tool_basename; ac_word=$2
38505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38506$as_echo_n "checking for $ac_word... " >&6; }
38507if ${ac_cv_path_NM+:} false; then :
38508  $as_echo_n "(cached) " >&6
38509else
38510  case $NM in
38511  [\\/]* | ?:[\\/]*)
38512  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38513  ;;
38514  *)
38515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38516for as_dir in $PATH
38517do
38518  IFS=$as_save_IFS
38519  test -z "$as_dir" && as_dir=.
38520    for ac_exec_ext in '' $ac_executable_extensions; do
38521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38522    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38524    break 2
38525  fi
38526done
38527  done
38528IFS=$as_save_IFS
38529
38530  ;;
38531esac
38532fi
38533NM=$ac_cv_path_NM
38534if test -n "$NM"; then
38535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38536$as_echo "$NM" >&6; }
38537else
38538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38539$as_echo "no" >&6; }
38540fi
38541
38542
38543          if test "x$NM" = x; then
38544            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38545          fi
38546        else
38547          # Otherwise we believe it is a complete path. Use it as it is.
38548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38549$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38550          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38551$as_echo_n "checking for NM... " >&6; }
38552          if test ! -x "$tool_specified"; then
38553            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38554$as_echo "not found" >&6; }
38555            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38556          fi
38557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38558$as_echo "$tool_specified" >&6; }
38559        fi
38560      fi
38561    fi
38562  fi
38563
38564
38565
38566  # Only process if variable expands to non-empty
38567
38568  if test "x$NM" != x; then
38569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38570
38571  # First separate the path from the arguments. This will split at the first
38572  # space.
38573  complete="$NM"
38574  path="${complete%% *}"
38575  tmp="$complete EOL"
38576  arguments="${tmp#* }"
38577
38578  # Input might be given as Windows format, start by converting to
38579  # unix format.
38580  new_path=`$CYGPATH -u "$path"`
38581
38582  # Now try to locate executable using which
38583  new_path=`$WHICH "$new_path" 2> /dev/null`
38584  # bat and cmd files are not always considered executable in cygwin causing which
38585  # to not find them
38586  if test "x$new_path" = x \
38587      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38588      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38589    new_path=`$CYGPATH -u "$path"`
38590  fi
38591  if test "x$new_path" = x; then
38592    # Oops. Which didn't find the executable.
38593    # The splitting of arguments from the executable at a space might have been incorrect,
38594    # since paths with space are more likely in Windows. Give it another try with the whole
38595    # argument.
38596    path="$complete"
38597    arguments="EOL"
38598    new_path=`$CYGPATH -u "$path"`
38599    new_path=`$WHICH "$new_path" 2> /dev/null`
38600    # bat and cmd files are not always considered executable in cygwin causing which
38601    # to not find them
38602    if test "x$new_path" = x \
38603        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38604        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38605      new_path=`$CYGPATH -u "$path"`
38606    fi
38607    if test "x$new_path" = x; then
38608      # It's still not found. Now this is an unrecoverable error.
38609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38610$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38611      has_space=`$ECHO "$complete" | $GREP " "`
38612      if test "x$has_space" != x; then
38613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38615      fi
38616      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38617    fi
38618  fi
38619
38620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38623  # "foo.exe" is OK but "foo" is an error.
38624  #
38625  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38626  # It is also a way to make sure we got the proper file name for the real test later on.
38627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38628  if test "x$test_shortpath" = x; then
38629    # Short path failed, file does not exist as specified.
38630    # Try adding .exe or .cmd
38631    if test -f "${new_path}.exe"; then
38632      input_to_shortpath="${new_path}.exe"
38633    elif test -f "${new_path}.cmd"; then
38634      input_to_shortpath="${new_path}.cmd"
38635    else
38636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38637$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38638      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38639$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38640      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38641    fi
38642  else
38643    input_to_shortpath="$new_path"
38644  fi
38645
38646  # Call helper function which possibly converts this using DOS-style short mode.
38647  # If so, the updated path is stored in $new_path.
38648  new_path="$input_to_shortpath"
38649
38650  input_path="$input_to_shortpath"
38651  # Check if we need to convert this using DOS-style short mode. If the path
38652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38653  # take no chances and rewrite it.
38654  # Note: m4 eats our [], so we need to use [ and ] instead.
38655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38656  if test "x$has_forbidden_chars" != x; then
38657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38661      # Going to short mode and back again did indeed matter. Since short mode is
38662      # case insensitive, let's make it lowercase to improve readability.
38663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38664      # Now convert it back to Unix-style (cygpath)
38665      input_path=`$CYGPATH -u "$shortmode_path"`
38666      new_path="$input_path"
38667    fi
38668  fi
38669
38670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38671  if test "x$test_cygdrive_prefix" = x; then
38672    # As a simple fix, exclude /usr/bin since it's not a real path.
38673    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38675      # a path prefixed by /cygdrive for fixpath to work.
38676      new_path="$CYGWIN_ROOT_PATH$input_path"
38677    fi
38678  fi
38679
38680  # remove trailing .exe if any
38681  new_path="${new_path/%.exe/}"
38682
38683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38684
38685  # First separate the path from the arguments. This will split at the first
38686  # space.
38687  complete="$NM"
38688  path="${complete%% *}"
38689  tmp="$complete EOL"
38690  arguments="${tmp#* }"
38691
38692  # Input might be given as Windows format, start by converting to
38693  # unix format.
38694  new_path="$path"
38695
38696  windows_path="$new_path"
38697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38698    unix_path=`$CYGPATH -u "$windows_path"`
38699    new_path="$unix_path"
38700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38702    new_path="$unix_path"
38703  fi
38704
38705
38706  # Now try to locate executable using which
38707  new_path=`$WHICH "$new_path" 2> /dev/null`
38708
38709  if test "x$new_path" = x; then
38710    # Oops. Which didn't find the executable.
38711    # The splitting of arguments from the executable at a space might have been incorrect,
38712    # since paths with space are more likely in Windows. Give it another try with the whole
38713    # argument.
38714    path="$complete"
38715    arguments="EOL"
38716    new_path="$path"
38717
38718  windows_path="$new_path"
38719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38720    unix_path=`$CYGPATH -u "$windows_path"`
38721    new_path="$unix_path"
38722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38724    new_path="$unix_path"
38725  fi
38726
38727
38728    new_path=`$WHICH "$new_path" 2> /dev/null`
38729    # bat and cmd files are not always considered executable in MSYS causing which
38730    # to not find them
38731    if test "x$new_path" = x \
38732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38734      new_path="$path"
38735
38736  windows_path="$new_path"
38737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38738    unix_path=`$CYGPATH -u "$windows_path"`
38739    new_path="$unix_path"
38740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38742    new_path="$unix_path"
38743  fi
38744
38745    fi
38746
38747    if test "x$new_path" = x; then
38748      # It's still not found. Now this is an unrecoverable error.
38749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38750$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38751      has_space=`$ECHO "$complete" | $GREP " "`
38752      if test "x$has_space" != x; then
38753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38755      fi
38756      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38757    fi
38758  fi
38759
38760  # Now new_path has a complete unix path to the binary
38761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38762    # Keep paths in /bin as-is, but remove trailing .exe if any
38763    new_path="${new_path/%.exe/}"
38764    # Do not save /bin paths to all_fixpath_prefixes!
38765  else
38766    # Not in mixed or Windows style, start by that.
38767    new_path=`cmd //c echo $new_path`
38768
38769  input_path="$new_path"
38770  # Check if we need to convert this using DOS-style short mode. If the path
38771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38772  # take no chances and rewrite it.
38773  # Note: m4 eats our [], so we need to use [ and ] instead.
38774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38775  if test "x$has_forbidden_chars" != x; then
38776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38778  fi
38779
38780    # Output is in $new_path
38781
38782  windows_path="$new_path"
38783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38784    unix_path=`$CYGPATH -u "$windows_path"`
38785    new_path="$unix_path"
38786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38788    new_path="$unix_path"
38789  fi
38790
38791    # remove trailing .exe if any
38792    new_path="${new_path/%.exe/}"
38793
38794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38796  fi
38797
38798    else
38799      # We're on a unix platform. Hooray! :)
38800      # First separate the path from the arguments. This will split at the first
38801      # space.
38802      complete="$NM"
38803      path="${complete%% *}"
38804      tmp="$complete EOL"
38805      arguments="${tmp#* }"
38806
38807      # Cannot rely on the command "which" here since it doesn't always work.
38808      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38809      if test -z "$is_absolute_path"; then
38810        # Path to executable is not absolute. Find it.
38811        IFS_save="$IFS"
38812        IFS=:
38813        for p in $PATH; do
38814          if test -f "$p/$path" && test -x "$p/$path"; then
38815            new_path="$p/$path"
38816            break
38817          fi
38818        done
38819        IFS="$IFS_save"
38820      else
38821        # This is an absolute path, we can use it without further modifications.
38822        new_path="$path"
38823      fi
38824
38825      if test "x$new_path" = x; then
38826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38827$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38828        has_space=`$ECHO "$complete" | $GREP " "`
38829        if test "x$has_space" != x; then
38830          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38831$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38832        fi
38833        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38834      fi
38835    fi
38836
38837    # Now join together the path and the arguments once again
38838    if test "x$arguments" != xEOL; then
38839      new_complete="$new_path ${arguments% *}"
38840    else
38841      new_complete="$new_path"
38842    fi
38843
38844    if test "x$complete" != "x$new_complete"; then
38845      NM="$new_complete"
38846      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38847$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38848    fi
38849  fi
38850
38851    GNM="$NM"
38852
38853  fi
38854
38855  # objcopy is used for moving debug symbols to separate files when
38856  # full debug symbols are enabled.
38857  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38858
38859
38860  # Publish this variable in the help.
38861
38862
38863  if [ -z "${OBJCOPY+x}" ]; then
38864    # The variable is not set by user, try to locate tool using the code snippet
38865    if test -n "$ac_tool_prefix"; then
38866  for ac_prog in gobjcopy objcopy
38867  do
38868    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38869set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38871$as_echo_n "checking for $ac_word... " >&6; }
38872if ${ac_cv_prog_OBJCOPY+:} false; then :
38873  $as_echo_n "(cached) " >&6
38874else
38875  if test -n "$OBJCOPY"; then
38876  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38877else
38878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38879for as_dir in $PATH
38880do
38881  IFS=$as_save_IFS
38882  test -z "$as_dir" && as_dir=.
38883    for ac_exec_ext in '' $ac_executable_extensions; do
38884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38885    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38887    break 2
38888  fi
38889done
38890  done
38891IFS=$as_save_IFS
38892
38893fi
38894fi
38895OBJCOPY=$ac_cv_prog_OBJCOPY
38896if test -n "$OBJCOPY"; then
38897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38898$as_echo "$OBJCOPY" >&6; }
38899else
38900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38901$as_echo "no" >&6; }
38902fi
38903
38904
38905    test -n "$OBJCOPY" && break
38906  done
38907fi
38908if test -z "$OBJCOPY"; then
38909  ac_ct_OBJCOPY=$OBJCOPY
38910  for ac_prog in gobjcopy objcopy
38911do
38912  # Extract the first word of "$ac_prog", so it can be a program name with args.
38913set dummy $ac_prog; ac_word=$2
38914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38915$as_echo_n "checking for $ac_word... " >&6; }
38916if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38917  $as_echo_n "(cached) " >&6
38918else
38919  if test -n "$ac_ct_OBJCOPY"; then
38920  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38921else
38922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38923for as_dir in $PATH
38924do
38925  IFS=$as_save_IFS
38926  test -z "$as_dir" && as_dir=.
38927    for ac_exec_ext in '' $ac_executable_extensions; do
38928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38929    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38931    break 2
38932  fi
38933done
38934  done
38935IFS=$as_save_IFS
38936
38937fi
38938fi
38939ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38940if test -n "$ac_ct_OBJCOPY"; then
38941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38942$as_echo "$ac_ct_OBJCOPY" >&6; }
38943else
38944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38945$as_echo "no" >&6; }
38946fi
38947
38948
38949  test -n "$ac_ct_OBJCOPY" && break
38950done
38951
38952  if test "x$ac_ct_OBJCOPY" = x; then
38953    OBJCOPY=""
38954  else
38955    case $cross_compiling:$ac_tool_warned in
38956yes:)
38957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38959ac_tool_warned=yes ;;
38960esac
38961    OBJCOPY=$ac_ct_OBJCOPY
38962  fi
38963fi
38964
38965  else
38966    # The variable is set, but is it from the command line or the environment?
38967
38968    # Try to remove the string !OBJCOPY! from our list.
38969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38971      # If it failed, the variable was not from the command line. Ignore it,
38972      # but warn the user (except for BASH, which is always set by the calling BASH).
38973      if test "xOBJCOPY" != xBASH; then
38974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38975$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38976      fi
38977      # Try to locate tool using the code snippet
38978      if test -n "$ac_tool_prefix"; then
38979  for ac_prog in gobjcopy objcopy
38980  do
38981    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38982set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38984$as_echo_n "checking for $ac_word... " >&6; }
38985if ${ac_cv_prog_OBJCOPY+:} false; then :
38986  $as_echo_n "(cached) " >&6
38987else
38988  if test -n "$OBJCOPY"; then
38989  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38990else
38991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38992for as_dir in $PATH
38993do
38994  IFS=$as_save_IFS
38995  test -z "$as_dir" && as_dir=.
38996    for ac_exec_ext in '' $ac_executable_extensions; do
38997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38998    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39000    break 2
39001  fi
39002done
39003  done
39004IFS=$as_save_IFS
39005
39006fi
39007fi
39008OBJCOPY=$ac_cv_prog_OBJCOPY
39009if test -n "$OBJCOPY"; then
39010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39011$as_echo "$OBJCOPY" >&6; }
39012else
39013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39014$as_echo "no" >&6; }
39015fi
39016
39017
39018    test -n "$OBJCOPY" && break
39019  done
39020fi
39021if test -z "$OBJCOPY"; then
39022  ac_ct_OBJCOPY=$OBJCOPY
39023  for ac_prog in gobjcopy objcopy
39024do
39025  # Extract the first word of "$ac_prog", so it can be a program name with args.
39026set dummy $ac_prog; ac_word=$2
39027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39028$as_echo_n "checking for $ac_word... " >&6; }
39029if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39030  $as_echo_n "(cached) " >&6
39031else
39032  if test -n "$ac_ct_OBJCOPY"; then
39033  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39034else
39035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39036for as_dir in $PATH
39037do
39038  IFS=$as_save_IFS
39039  test -z "$as_dir" && as_dir=.
39040    for ac_exec_ext in '' $ac_executable_extensions; do
39041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39042    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39044    break 2
39045  fi
39046done
39047  done
39048IFS=$as_save_IFS
39049
39050fi
39051fi
39052ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39053if test -n "$ac_ct_OBJCOPY"; then
39054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39055$as_echo "$ac_ct_OBJCOPY" >&6; }
39056else
39057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39058$as_echo "no" >&6; }
39059fi
39060
39061
39062  test -n "$ac_ct_OBJCOPY" && break
39063done
39064
39065  if test "x$ac_ct_OBJCOPY" = x; then
39066    OBJCOPY=""
39067  else
39068    case $cross_compiling:$ac_tool_warned in
39069yes:)
39070{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39071$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39072ac_tool_warned=yes ;;
39073esac
39074    OBJCOPY=$ac_ct_OBJCOPY
39075  fi
39076fi
39077
39078    else
39079      # If it succeeded, then it was overridden by the user. We will use it
39080      # for the tool.
39081
39082      # First remove it from the list of overridden variables, so we can test
39083      # for unknown variables in the end.
39084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39085
39086      # Check if we try to supply an empty value
39087      if test "x$OBJCOPY" = x; then
39088        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
39089$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
39090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
39091$as_echo_n "checking for OBJCOPY... " >&6; }
39092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39093$as_echo "disabled" >&6; }
39094      else
39095        # Check if the provided tool contains a complete path.
39096        tool_specified="$OBJCOPY"
39097        tool_basename="${tool_specified##*/}"
39098        if test "x$tool_basename" = "x$tool_specified"; then
39099          # A command without a complete path is provided, search $PATH.
39100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
39101$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
39102          # Extract the first word of "$tool_basename", so it can be a program name with args.
39103set dummy $tool_basename; ac_word=$2
39104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39105$as_echo_n "checking for $ac_word... " >&6; }
39106if ${ac_cv_path_OBJCOPY+:} false; then :
39107  $as_echo_n "(cached) " >&6
39108else
39109  case $OBJCOPY in
39110  [\\/]* | ?:[\\/]*)
39111  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
39112  ;;
39113  *)
39114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39115for as_dir in $PATH
39116do
39117  IFS=$as_save_IFS
39118  test -z "$as_dir" && as_dir=.
39119    for ac_exec_ext in '' $ac_executable_extensions; do
39120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39121    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
39122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39123    break 2
39124  fi
39125done
39126  done
39127IFS=$as_save_IFS
39128
39129  ;;
39130esac
39131fi
39132OBJCOPY=$ac_cv_path_OBJCOPY
39133if test -n "$OBJCOPY"; then
39134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39135$as_echo "$OBJCOPY" >&6; }
39136else
39137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39138$as_echo "no" >&6; }
39139fi
39140
39141
39142          if test "x$OBJCOPY" = x; then
39143            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39144          fi
39145        else
39146          # Otherwise we believe it is a complete path. Use it as it is.
39147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
39148$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
39149          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
39150$as_echo_n "checking for OBJCOPY... " >&6; }
39151          if test ! -x "$tool_specified"; then
39152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39153$as_echo "not found" >&6; }
39154            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
39155          fi
39156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39157$as_echo "$tool_specified" >&6; }
39158        fi
39159      fi
39160    fi
39161  fi
39162
39163
39164    # Only call fixup if objcopy was found.
39165    if test -n "$OBJCOPY"; then
39166
39167  # Only process if variable expands to non-empty
39168
39169  if test "x$OBJCOPY" != x; then
39170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39171
39172  # First separate the path from the arguments. This will split at the first
39173  # space.
39174  complete="$OBJCOPY"
39175  path="${complete%% *}"
39176  tmp="$complete EOL"
39177  arguments="${tmp#* }"
39178
39179  # Input might be given as Windows format, start by converting to
39180  # unix format.
39181  new_path=`$CYGPATH -u "$path"`
39182
39183  # Now try to locate executable using which
39184  new_path=`$WHICH "$new_path" 2> /dev/null`
39185  # bat and cmd files are not always considered executable in cygwin causing which
39186  # to not find them
39187  if test "x$new_path" = x \
39188      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39189      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39190    new_path=`$CYGPATH -u "$path"`
39191  fi
39192  if test "x$new_path" = x; then
39193    # Oops. Which didn't find the executable.
39194    # The splitting of arguments from the executable at a space might have been incorrect,
39195    # since paths with space are more likely in Windows. Give it another try with the whole
39196    # argument.
39197    path="$complete"
39198    arguments="EOL"
39199    new_path=`$CYGPATH -u "$path"`
39200    new_path=`$WHICH "$new_path" 2> /dev/null`
39201    # bat and cmd files are not always considered executable in cygwin causing which
39202    # to not find them
39203    if test "x$new_path" = x \
39204        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39205        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39206      new_path=`$CYGPATH -u "$path"`
39207    fi
39208    if test "x$new_path" = x; then
39209      # It's still not found. Now this is an unrecoverable error.
39210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39211$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39212      has_space=`$ECHO "$complete" | $GREP " "`
39213      if test "x$has_space" != x; then
39214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39216      fi
39217      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39218    fi
39219  fi
39220
39221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39224  # "foo.exe" is OK but "foo" is an error.
39225  #
39226  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39227  # It is also a way to make sure we got the proper file name for the real test later on.
39228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39229  if test "x$test_shortpath" = x; then
39230    # Short path failed, file does not exist as specified.
39231    # Try adding .exe or .cmd
39232    if test -f "${new_path}.exe"; then
39233      input_to_shortpath="${new_path}.exe"
39234    elif test -f "${new_path}.cmd"; then
39235      input_to_shortpath="${new_path}.cmd"
39236    else
39237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
39238$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
39239      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39241      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39242    fi
39243  else
39244    input_to_shortpath="$new_path"
39245  fi
39246
39247  # Call helper function which possibly converts this using DOS-style short mode.
39248  # If so, the updated path is stored in $new_path.
39249  new_path="$input_to_shortpath"
39250
39251  input_path="$input_to_shortpath"
39252  # Check if we need to convert this using DOS-style short mode. If the path
39253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39254  # take no chances and rewrite it.
39255  # Note: m4 eats our [], so we need to use [ and ] instead.
39256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39257  if test "x$has_forbidden_chars" != x; then
39258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39262      # Going to short mode and back again did indeed matter. Since short mode is
39263      # case insensitive, let's make it lowercase to improve readability.
39264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39265      # Now convert it back to Unix-style (cygpath)
39266      input_path=`$CYGPATH -u "$shortmode_path"`
39267      new_path="$input_path"
39268    fi
39269  fi
39270
39271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39272  if test "x$test_cygdrive_prefix" = x; then
39273    # As a simple fix, exclude /usr/bin since it's not a real path.
39274    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39276      # a path prefixed by /cygdrive for fixpath to work.
39277      new_path="$CYGWIN_ROOT_PATH$input_path"
39278    fi
39279  fi
39280
39281  # remove trailing .exe if any
39282  new_path="${new_path/%.exe/}"
39283
39284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39285
39286  # First separate the path from the arguments. This will split at the first
39287  # space.
39288  complete="$OBJCOPY"
39289  path="${complete%% *}"
39290  tmp="$complete EOL"
39291  arguments="${tmp#* }"
39292
39293  # Input might be given as Windows format, start by converting to
39294  # unix format.
39295  new_path="$path"
39296
39297  windows_path="$new_path"
39298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39299    unix_path=`$CYGPATH -u "$windows_path"`
39300    new_path="$unix_path"
39301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39303    new_path="$unix_path"
39304  fi
39305
39306
39307  # Now try to locate executable using which
39308  new_path=`$WHICH "$new_path" 2> /dev/null`
39309
39310  if test "x$new_path" = x; then
39311    # Oops. Which didn't find the executable.
39312    # The splitting of arguments from the executable at a space might have been incorrect,
39313    # since paths with space are more likely in Windows. Give it another try with the whole
39314    # argument.
39315    path="$complete"
39316    arguments="EOL"
39317    new_path="$path"
39318
39319  windows_path="$new_path"
39320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39321    unix_path=`$CYGPATH -u "$windows_path"`
39322    new_path="$unix_path"
39323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39325    new_path="$unix_path"
39326  fi
39327
39328
39329    new_path=`$WHICH "$new_path" 2> /dev/null`
39330    # bat and cmd files are not always considered executable in MSYS causing which
39331    # to not find them
39332    if test "x$new_path" = x \
39333        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39334        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39335      new_path="$path"
39336
39337  windows_path="$new_path"
39338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39339    unix_path=`$CYGPATH -u "$windows_path"`
39340    new_path="$unix_path"
39341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39343    new_path="$unix_path"
39344  fi
39345
39346    fi
39347
39348    if test "x$new_path" = x; then
39349      # It's still not found. Now this is an unrecoverable error.
39350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39351$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39352      has_space=`$ECHO "$complete" | $GREP " "`
39353      if test "x$has_space" != x; then
39354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39356      fi
39357      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39358    fi
39359  fi
39360
39361  # Now new_path has a complete unix path to the binary
39362  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39363    # Keep paths in /bin as-is, but remove trailing .exe if any
39364    new_path="${new_path/%.exe/}"
39365    # Do not save /bin paths to all_fixpath_prefixes!
39366  else
39367    # Not in mixed or Windows style, start by that.
39368    new_path=`cmd //c echo $new_path`
39369
39370  input_path="$new_path"
39371  # Check if we need to convert this using DOS-style short mode. If the path
39372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39373  # take no chances and rewrite it.
39374  # Note: m4 eats our [], so we need to use [ and ] instead.
39375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39376  if test "x$has_forbidden_chars" != x; then
39377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39379  fi
39380
39381    # Output is in $new_path
39382
39383  windows_path="$new_path"
39384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39385    unix_path=`$CYGPATH -u "$windows_path"`
39386    new_path="$unix_path"
39387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39389    new_path="$unix_path"
39390  fi
39391
39392    # remove trailing .exe if any
39393    new_path="${new_path/%.exe/}"
39394
39395    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39396    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39397  fi
39398
39399    else
39400      # We're on a unix platform. Hooray! :)
39401      # First separate the path from the arguments. This will split at the first
39402      # space.
39403      complete="$OBJCOPY"
39404      path="${complete%% *}"
39405      tmp="$complete EOL"
39406      arguments="${tmp#* }"
39407
39408      # Cannot rely on the command "which" here since it doesn't always work.
39409      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39410      if test -z "$is_absolute_path"; then
39411        # Path to executable is not absolute. Find it.
39412        IFS_save="$IFS"
39413        IFS=:
39414        for p in $PATH; do
39415          if test -f "$p/$path" && test -x "$p/$path"; then
39416            new_path="$p/$path"
39417            break
39418          fi
39419        done
39420        IFS="$IFS_save"
39421      else
39422        # This is an absolute path, we can use it without further modifications.
39423        new_path="$path"
39424      fi
39425
39426      if test "x$new_path" = x; then
39427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39428$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39429        has_space=`$ECHO "$complete" | $GREP " "`
39430        if test "x$has_space" != x; then
39431          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39432$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39433        fi
39434        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39435      fi
39436    fi
39437
39438    # Now join together the path and the arguments once again
39439    if test "x$arguments" != xEOL; then
39440      new_complete="$new_path ${arguments% *}"
39441    else
39442      new_complete="$new_path"
39443    fi
39444
39445    if test "x$complete" != "x$new_complete"; then
39446      OBJCOPY="$new_complete"
39447      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39448$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39449    fi
39450  fi
39451
39452      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
39453        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
39454        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
39455        # - version number is last blank separate word on first line
39456        # - version number formats that have been seen:
39457        #   - <major>.<minor>
39458        #   - <major>.<minor>.<micro>
39459        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
39460        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
39461         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
39462              -e 's/.* //' \
39463              -e '/^[01]\./b bad' \
39464              -e '/^2\./{' \
39465              -e '  s/^2\.//' \
39466              -e '  /^[0-9]$/b bad' \
39467              -e '  /^[0-9]\./b bad' \
39468              -e '  /^1[0-9]$/b bad' \
39469              -e '  /^1[0-9]\./b bad' \
39470              -e '  /^20\./b bad' \
39471              -e '  /^21\.0$/b bad' \
39472              -e '  /^21\.0\./b bad' \
39473              -e '}' \
39474              -e ':good' \
39475              -e 's/.*/VALID_VERSION/p' \
39476              -e 'q' \
39477              -e ':bad' \
39478              -e 's/.*/BAD_VERSION/p' \
39479              -e 'q'`
39480        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
39481          OBJCOPY=
39482          { $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
39483$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
39484          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
39485$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
39486          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
39487$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
39488          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
39489$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
39490          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
39491$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
39492        fi
39493      fi
39494    fi
39495  fi
39496
39497
39498
39499  # Publish this variable in the help.
39500
39501
39502  if [ -z "${OBJDUMP+x}" ]; then
39503    # The variable is not set by user, try to locate tool using the code snippet
39504    if test -n "$ac_tool_prefix"; then
39505  for ac_prog in gobjdump objdump
39506  do
39507    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39508set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39510$as_echo_n "checking for $ac_word... " >&6; }
39511if ${ac_cv_prog_OBJDUMP+:} false; then :
39512  $as_echo_n "(cached) " >&6
39513else
39514  if test -n "$OBJDUMP"; then
39515  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39516else
39517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39518for as_dir in $PATH
39519do
39520  IFS=$as_save_IFS
39521  test -z "$as_dir" && as_dir=.
39522    for ac_exec_ext in '' $ac_executable_extensions; do
39523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39524    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39526    break 2
39527  fi
39528done
39529  done
39530IFS=$as_save_IFS
39531
39532fi
39533fi
39534OBJDUMP=$ac_cv_prog_OBJDUMP
39535if test -n "$OBJDUMP"; then
39536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39537$as_echo "$OBJDUMP" >&6; }
39538else
39539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39540$as_echo "no" >&6; }
39541fi
39542
39543
39544    test -n "$OBJDUMP" && break
39545  done
39546fi
39547if test -z "$OBJDUMP"; then
39548  ac_ct_OBJDUMP=$OBJDUMP
39549  for ac_prog in gobjdump objdump
39550do
39551  # Extract the first word of "$ac_prog", so it can be a program name with args.
39552set dummy $ac_prog; ac_word=$2
39553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39554$as_echo_n "checking for $ac_word... " >&6; }
39555if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39556  $as_echo_n "(cached) " >&6
39557else
39558  if test -n "$ac_ct_OBJDUMP"; then
39559  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39560else
39561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39562for as_dir in $PATH
39563do
39564  IFS=$as_save_IFS
39565  test -z "$as_dir" && as_dir=.
39566    for ac_exec_ext in '' $ac_executable_extensions; do
39567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39568    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39570    break 2
39571  fi
39572done
39573  done
39574IFS=$as_save_IFS
39575
39576fi
39577fi
39578ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39579if test -n "$ac_ct_OBJDUMP"; then
39580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39581$as_echo "$ac_ct_OBJDUMP" >&6; }
39582else
39583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39584$as_echo "no" >&6; }
39585fi
39586
39587
39588  test -n "$ac_ct_OBJDUMP" && break
39589done
39590
39591  if test "x$ac_ct_OBJDUMP" = x; then
39592    OBJDUMP=""
39593  else
39594    case $cross_compiling:$ac_tool_warned in
39595yes:)
39596{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39597$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39598ac_tool_warned=yes ;;
39599esac
39600    OBJDUMP=$ac_ct_OBJDUMP
39601  fi
39602fi
39603
39604  else
39605    # The variable is set, but is it from the command line or the environment?
39606
39607    # Try to remove the string !OBJDUMP! from our list.
39608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39610      # If it failed, the variable was not from the command line. Ignore it,
39611      # but warn the user (except for BASH, which is always set by the calling BASH).
39612      if test "xOBJDUMP" != xBASH; then
39613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39614$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39615      fi
39616      # Try to locate tool using the code snippet
39617      if test -n "$ac_tool_prefix"; then
39618  for ac_prog in gobjdump objdump
39619  do
39620    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39621set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39623$as_echo_n "checking for $ac_word... " >&6; }
39624if ${ac_cv_prog_OBJDUMP+:} false; then :
39625  $as_echo_n "(cached) " >&6
39626else
39627  if test -n "$OBJDUMP"; then
39628  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39629else
39630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39631for as_dir in $PATH
39632do
39633  IFS=$as_save_IFS
39634  test -z "$as_dir" && as_dir=.
39635    for ac_exec_ext in '' $ac_executable_extensions; do
39636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39637    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39639    break 2
39640  fi
39641done
39642  done
39643IFS=$as_save_IFS
39644
39645fi
39646fi
39647OBJDUMP=$ac_cv_prog_OBJDUMP
39648if test -n "$OBJDUMP"; then
39649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39650$as_echo "$OBJDUMP" >&6; }
39651else
39652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39653$as_echo "no" >&6; }
39654fi
39655
39656
39657    test -n "$OBJDUMP" && break
39658  done
39659fi
39660if test -z "$OBJDUMP"; then
39661  ac_ct_OBJDUMP=$OBJDUMP
39662  for ac_prog in gobjdump objdump
39663do
39664  # Extract the first word of "$ac_prog", so it can be a program name with args.
39665set dummy $ac_prog; ac_word=$2
39666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39667$as_echo_n "checking for $ac_word... " >&6; }
39668if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39669  $as_echo_n "(cached) " >&6
39670else
39671  if test -n "$ac_ct_OBJDUMP"; then
39672  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39673else
39674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39675for as_dir in $PATH
39676do
39677  IFS=$as_save_IFS
39678  test -z "$as_dir" && as_dir=.
39679    for ac_exec_ext in '' $ac_executable_extensions; do
39680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39681    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39683    break 2
39684  fi
39685done
39686  done
39687IFS=$as_save_IFS
39688
39689fi
39690fi
39691ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39692if test -n "$ac_ct_OBJDUMP"; then
39693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39694$as_echo "$ac_ct_OBJDUMP" >&6; }
39695else
39696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39697$as_echo "no" >&6; }
39698fi
39699
39700
39701  test -n "$ac_ct_OBJDUMP" && break
39702done
39703
39704  if test "x$ac_ct_OBJDUMP" = x; then
39705    OBJDUMP=""
39706  else
39707    case $cross_compiling:$ac_tool_warned in
39708yes:)
39709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39711ac_tool_warned=yes ;;
39712esac
39713    OBJDUMP=$ac_ct_OBJDUMP
39714  fi
39715fi
39716
39717    else
39718      # If it succeeded, then it was overridden by the user. We will use it
39719      # for the tool.
39720
39721      # First remove it from the list of overridden variables, so we can test
39722      # for unknown variables in the end.
39723      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39724
39725      # Check if we try to supply an empty value
39726      if test "x$OBJDUMP" = x; then
39727        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
39728$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
39729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39730$as_echo_n "checking for OBJDUMP... " >&6; }
39731        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39732$as_echo "disabled" >&6; }
39733      else
39734        # Check if the provided tool contains a complete path.
39735        tool_specified="$OBJDUMP"
39736        tool_basename="${tool_specified##*/}"
39737        if test "x$tool_basename" = "x$tool_specified"; then
39738          # A command without a complete path is provided, search $PATH.
39739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39740$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39741          # Extract the first word of "$tool_basename", so it can be a program name with args.
39742set dummy $tool_basename; 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_path_OBJDUMP+:} false; then :
39746  $as_echo_n "(cached) " >&6
39747else
39748  case $OBJDUMP in
39749  [\\/]* | ?:[\\/]*)
39750  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39751  ;;
39752  *)
39753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39754for as_dir in $PATH
39755do
39756  IFS=$as_save_IFS
39757  test -z "$as_dir" && as_dir=.
39758    for ac_exec_ext in '' $ac_executable_extensions; do
39759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39760    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39762    break 2
39763  fi
39764done
39765  done
39766IFS=$as_save_IFS
39767
39768  ;;
39769esac
39770fi
39771OBJDUMP=$ac_cv_path_OBJDUMP
39772if test -n "$OBJDUMP"; then
39773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39774$as_echo "$OBJDUMP" >&6; }
39775else
39776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39777$as_echo "no" >&6; }
39778fi
39779
39780
39781          if test "x$OBJDUMP" = x; then
39782            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39783          fi
39784        else
39785          # Otherwise we believe it is a complete path. Use it as it is.
39786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39787$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39788          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39789$as_echo_n "checking for OBJDUMP... " >&6; }
39790          if test ! -x "$tool_specified"; then
39791            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39792$as_echo "not found" >&6; }
39793            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39794          fi
39795          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39796$as_echo "$tool_specified" >&6; }
39797        fi
39798      fi
39799    fi
39800  fi
39801
39802
39803  if test "x$OBJDUMP" != x; then
39804    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39805    # bails if argument is missing.
39806
39807  # Only process if variable expands to non-empty
39808
39809  if test "x$OBJDUMP" != x; then
39810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39811
39812  # First separate the path from the arguments. This will split at the first
39813  # space.
39814  complete="$OBJDUMP"
39815  path="${complete%% *}"
39816  tmp="$complete EOL"
39817  arguments="${tmp#* }"
39818
39819  # Input might be given as Windows format, start by converting to
39820  # unix format.
39821  new_path=`$CYGPATH -u "$path"`
39822
39823  # Now try to locate executable using which
39824  new_path=`$WHICH "$new_path" 2> /dev/null`
39825  # bat and cmd files are not always considered executable in cygwin causing which
39826  # to not find them
39827  if test "x$new_path" = x \
39828      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39829      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39830    new_path=`$CYGPATH -u "$path"`
39831  fi
39832  if test "x$new_path" = x; then
39833    # Oops. Which didn't find the executable.
39834    # The splitting of arguments from the executable at a space might have been incorrect,
39835    # since paths with space are more likely in Windows. Give it another try with the whole
39836    # argument.
39837    path="$complete"
39838    arguments="EOL"
39839    new_path=`$CYGPATH -u "$path"`
39840    new_path=`$WHICH "$new_path" 2> /dev/null`
39841    # bat and cmd files are not always considered executable in cygwin causing which
39842    # to not find them
39843    if test "x$new_path" = x \
39844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39846      new_path=`$CYGPATH -u "$path"`
39847    fi
39848    if test "x$new_path" = x; then
39849      # It's still not found. Now this is an unrecoverable error.
39850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39851$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39852      has_space=`$ECHO "$complete" | $GREP " "`
39853      if test "x$has_space" != x; then
39854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39856      fi
39857      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39858    fi
39859  fi
39860
39861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39864  # "foo.exe" is OK but "foo" is an error.
39865  #
39866  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39867  # It is also a way to make sure we got the proper file name for the real test later on.
39868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39869  if test "x$test_shortpath" = x; then
39870    # Short path failed, file does not exist as specified.
39871    # Try adding .exe or .cmd
39872    if test -f "${new_path}.exe"; then
39873      input_to_shortpath="${new_path}.exe"
39874    elif test -f "${new_path}.cmd"; then
39875      input_to_shortpath="${new_path}.cmd"
39876    else
39877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39878$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39879      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39880$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39881      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39882    fi
39883  else
39884    input_to_shortpath="$new_path"
39885  fi
39886
39887  # Call helper function which possibly converts this using DOS-style short mode.
39888  # If so, the updated path is stored in $new_path.
39889  new_path="$input_to_shortpath"
39890
39891  input_path="$input_to_shortpath"
39892  # Check if we need to convert this using DOS-style short mode. If the path
39893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39894  # take no chances and rewrite it.
39895  # Note: m4 eats our [], so we need to use [ and ] instead.
39896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39897  if test "x$has_forbidden_chars" != x; then
39898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39902      # Going to short mode and back again did indeed matter. Since short mode is
39903      # case insensitive, let's make it lowercase to improve readability.
39904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39905      # Now convert it back to Unix-style (cygpath)
39906      input_path=`$CYGPATH -u "$shortmode_path"`
39907      new_path="$input_path"
39908    fi
39909  fi
39910
39911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39912  if test "x$test_cygdrive_prefix" = x; then
39913    # As a simple fix, exclude /usr/bin since it's not a real path.
39914    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39916      # a path prefixed by /cygdrive for fixpath to work.
39917      new_path="$CYGWIN_ROOT_PATH$input_path"
39918    fi
39919  fi
39920
39921  # remove trailing .exe if any
39922  new_path="${new_path/%.exe/}"
39923
39924    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39925
39926  # First separate the path from the arguments. This will split at the first
39927  # space.
39928  complete="$OBJDUMP"
39929  path="${complete%% *}"
39930  tmp="$complete EOL"
39931  arguments="${tmp#* }"
39932
39933  # Input might be given as Windows format, start by converting to
39934  # unix format.
39935  new_path="$path"
39936
39937  windows_path="$new_path"
39938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39939    unix_path=`$CYGPATH -u "$windows_path"`
39940    new_path="$unix_path"
39941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39943    new_path="$unix_path"
39944  fi
39945
39946
39947  # Now try to locate executable using which
39948  new_path=`$WHICH "$new_path" 2> /dev/null`
39949
39950  if test "x$new_path" = x; then
39951    # Oops. Which didn't find the executable.
39952    # The splitting of arguments from the executable at a space might have been incorrect,
39953    # since paths with space are more likely in Windows. Give it another try with the whole
39954    # argument.
39955    path="$complete"
39956    arguments="EOL"
39957    new_path="$path"
39958
39959  windows_path="$new_path"
39960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39961    unix_path=`$CYGPATH -u "$windows_path"`
39962    new_path="$unix_path"
39963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39965    new_path="$unix_path"
39966  fi
39967
39968
39969    new_path=`$WHICH "$new_path" 2> /dev/null`
39970    # bat and cmd files are not always considered executable in MSYS causing which
39971    # to not find them
39972    if test "x$new_path" = x \
39973        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39974        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39975      new_path="$path"
39976
39977  windows_path="$new_path"
39978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39979    unix_path=`$CYGPATH -u "$windows_path"`
39980    new_path="$unix_path"
39981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39983    new_path="$unix_path"
39984  fi
39985
39986    fi
39987
39988    if test "x$new_path" = x; then
39989      # It's still not found. Now this is an unrecoverable error.
39990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39991$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39992      has_space=`$ECHO "$complete" | $GREP " "`
39993      if test "x$has_space" != x; then
39994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39996      fi
39997      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39998    fi
39999  fi
40000
40001  # Now new_path has a complete unix path to the binary
40002  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40003    # Keep paths in /bin as-is, but remove trailing .exe if any
40004    new_path="${new_path/%.exe/}"
40005    # Do not save /bin paths to all_fixpath_prefixes!
40006  else
40007    # Not in mixed or Windows style, start by that.
40008    new_path=`cmd //c echo $new_path`
40009
40010  input_path="$new_path"
40011  # Check if we need to convert this using DOS-style short mode. If the path
40012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40013  # take no chances and rewrite it.
40014  # Note: m4 eats our [], so we need to use [ and ] instead.
40015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40016  if test "x$has_forbidden_chars" != x; then
40017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40019  fi
40020
40021    # Output is in $new_path
40022
40023  windows_path="$new_path"
40024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40025    unix_path=`$CYGPATH -u "$windows_path"`
40026    new_path="$unix_path"
40027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40029    new_path="$unix_path"
40030  fi
40031
40032    # remove trailing .exe if any
40033    new_path="${new_path/%.exe/}"
40034
40035    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40036    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40037  fi
40038
40039    else
40040      # We're on a unix platform. Hooray! :)
40041      # First separate the path from the arguments. This will split at the first
40042      # space.
40043      complete="$OBJDUMP"
40044      path="${complete%% *}"
40045      tmp="$complete EOL"
40046      arguments="${tmp#* }"
40047
40048      # Cannot rely on the command "which" here since it doesn't always work.
40049      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40050      if test -z "$is_absolute_path"; then
40051        # Path to executable is not absolute. Find it.
40052        IFS_save="$IFS"
40053        IFS=:
40054        for p in $PATH; do
40055          if test -f "$p/$path" && test -x "$p/$path"; then
40056            new_path="$p/$path"
40057            break
40058          fi
40059        done
40060        IFS="$IFS_save"
40061      else
40062        # This is an absolute path, we can use it without further modifications.
40063        new_path="$path"
40064      fi
40065
40066      if test "x$new_path" = x; then
40067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40068$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40069        has_space=`$ECHO "$complete" | $GREP " "`
40070        if test "x$has_space" != x; then
40071          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40072$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40073        fi
40074        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40075      fi
40076    fi
40077
40078    # Now join together the path and the arguments once again
40079    if test "x$arguments" != xEOL; then
40080      new_complete="$new_path ${arguments% *}"
40081    else
40082      new_complete="$new_path"
40083    fi
40084
40085    if test "x$complete" != "x$new_complete"; then
40086      OBJDUMP="$new_complete"
40087      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
40088$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
40089    fi
40090  fi
40091
40092  fi
40093
40094
40095  # Restore old path.
40096  PATH="$OLD_PATH"
40097
40098  # Restore the flags to the user specified values.
40099  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
40100  CFLAGS="$ORG_CFLAGS"
40101  CXXFLAGS="$ORG_CXXFLAGS"
40102
40103
40104# Finally do some processing after the detection phase
40105
40106  if test "x$COMPILE_TYPE" = "xcross"; then
40107    # Now we need to find a C/C++ compiler that can build executables for the
40108    # build platform. We can't use the AC_PROG_CC macro, since it can only be
40109    # used once. Also, we need to do this without adding a tools dir to the
40110    # path, otherwise we might pick up cross-compilers which don't use standard
40111    # naming.
40112
40113    OLDPATH="$PATH"
40114
40115
40116# Check whether --with-build-devkit was given.
40117if test "${with_build_devkit+set}" = set; then :
40118  withval=$with_build_devkit;
40119fi
40120
40121    if test "x$with_build_devkit" = "xyes"; then
40122      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
40123    elif test -n "$with_build_devkit"; then
40124      if test ! -d "$with_build_devkit"; then
40125        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
40126      else
40127
40128  # Only process if variable expands to non-empty
40129
40130  if test "x$with_build_devkit" != x; then
40131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40132
40133  # Input might be given as Windows format, start by converting to
40134  # unix format.
40135  path="$with_build_devkit"
40136  new_path=`$CYGPATH -u "$path"`
40137
40138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40141  # "foo.exe" is OK but "foo" is an error.
40142  #
40143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40144  # It is also a way to make sure we got the proper file name for the real test later on.
40145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40146  if test "x$test_shortpath" = x; then
40147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
40148$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
40149    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
40150  fi
40151
40152  # Call helper function which possibly converts this using DOS-style short mode.
40153  # If so, the updated path is stored in $new_path.
40154
40155  input_path="$new_path"
40156  # Check if we need to convert this using DOS-style short mode. If the path
40157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40158  # take no chances and rewrite it.
40159  # Note: m4 eats our [], so we need to use [ and ] instead.
40160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40161  if test "x$has_forbidden_chars" != x; then
40162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40166      # Going to short mode and back again did indeed matter. Since short mode is
40167      # case insensitive, let's make it lowercase to improve readability.
40168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40169      # Now convert it back to Unix-style (cygpath)
40170      input_path=`$CYGPATH -u "$shortmode_path"`
40171      new_path="$input_path"
40172    fi
40173  fi
40174
40175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40176  if test "x$test_cygdrive_prefix" = x; then
40177    # As a simple fix, exclude /usr/bin since it's not a real path.
40178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40180      # a path prefixed by /cygdrive for fixpath to work.
40181      new_path="$CYGWIN_ROOT_PATH$input_path"
40182    fi
40183  fi
40184
40185
40186  if test "x$path" != "x$new_path"; then
40187    with_build_devkit="$new_path"
40188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
40189$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
40190  fi
40191
40192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40193
40194  path="$with_build_devkit"
40195  has_colon=`$ECHO $path | $GREP ^.:`
40196  new_path="$path"
40197  if test "x$has_colon" = x; then
40198    # Not in mixed or Windows style, start by that.
40199    new_path=`cmd //c echo $path`
40200  fi
40201
40202
40203  input_path="$new_path"
40204  # Check if we need to convert this using DOS-style short mode. If the path
40205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40206  # take no chances and rewrite it.
40207  # Note: m4 eats our [], so we need to use [ and ] instead.
40208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40209  if test "x$has_forbidden_chars" != x; then
40210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40212  fi
40213
40214
40215  windows_path="$new_path"
40216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40217    unix_path=`$CYGPATH -u "$windows_path"`
40218    new_path="$unix_path"
40219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40221    new_path="$unix_path"
40222  fi
40223
40224  if test "x$path" != "x$new_path"; then
40225    with_build_devkit="$new_path"
40226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
40227$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
40228  fi
40229
40230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40232
40233    else
40234      # We're on a unix platform. Hooray! :)
40235      path="$with_build_devkit"
40236      has_space=`$ECHO "$path" | $GREP " "`
40237      if test "x$has_space" != x; then
40238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
40239$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
40240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40241      fi
40242
40243      # Use eval to expand a potential ~
40244      eval path="$path"
40245      if test ! -f "$path" && test ! -d "$path"; then
40246        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
40247      fi
40248
40249      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
40250    fi
40251  fi
40252
40253        BUILD_DEVKIT_ROOT="$with_build_devkit"
40254        # Check for a meta data info file in the root of the devkit
40255        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
40256          # Process devkit.info so that existing devkit variables are not
40257          # modified by this
40258          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
40259              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
40260              -e "s/\$host/\$build/g" \
40261              $BUILD_DEVKIT_ROOT/devkit.info \
40262              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
40263          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
40264          # This potentially sets the following:
40265          # A descriptive name of the devkit
40266
40267  if test "x$BUILD_DEVKIT_NAME" = x; then
40268    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
40269  fi
40270
40271          # Corresponds to --with-extra-path
40272
40273  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
40274    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
40275  fi
40276
40277          # Corresponds to --with-toolchain-path
40278
40279  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
40280    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
40281  fi
40282
40283          # Corresponds to --with-sysroot
40284
40285  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
40286    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
40287  fi
40288
40289          # Skip the Window specific parts
40290        fi
40291
40292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
40293$as_echo_n "checking for build platform devkit... " >&6; }
40294        if test "x$BUILD_DEVKIT_NAME" != x; then
40295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
40296$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
40297        else
40298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
40299$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
40300        fi
40301
40302        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
40303
40304  if test "x$BUILD_SYSROOT" != "x"; then
40305    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40306      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40307        # Solaris Studio does not have a concept of sysroot. Instead we must
40308        # make sure the default include and lib dirs are appended to each
40309        # compile and link command line.
40310        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
40311        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40312            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40313            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40314      fi
40315    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40316      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
40317      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
40318    elif test "x$TOOLCHAIN_TYPE" = xclang; then
40319      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
40320      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
40321    fi
40322    # Propagate the sysroot args to hotspot
40323    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
40324    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
40325    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
40326    # The global CFLAGS and LDFLAGS variables need these for configure to function
40327    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
40328    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
40329    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
40330    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
40331  fi
40332
40333  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40334    # We also need -iframework<path>/System/Library/Frameworks
40335    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
40336    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
40337    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
40338    # set this here so it doesn't have to be peppered throughout the forest
40339    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
40340    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
40341  fi
40342
40343
40344
40345
40346
40347         # Fallback default of just /bin if DEVKIT_PATH is not defined
40348        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
40349          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
40350        fi
40351        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
40352      fi
40353    fi
40354
40355    # FIXME: we should list the discovered compilers as an exclude pattern!
40356    # If we do that, we can do this detection before POST_DETECTION, and still
40357    # find the build compilers in the tools dir, if needed.
40358
40359
40360
40361  # Publish this variable in the help.
40362
40363
40364  if [ -z "${BUILD_CC+x}" ]; then
40365    # The variable is not set by user, try to locate tool using the code snippet
40366    for ac_prog in cl cc gcc
40367do
40368  # Extract the first word of "$ac_prog", so it can be a program name with args.
40369set dummy $ac_prog; ac_word=$2
40370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40371$as_echo_n "checking for $ac_word... " >&6; }
40372if ${ac_cv_path_BUILD_CC+:} false; then :
40373  $as_echo_n "(cached) " >&6
40374else
40375  case $BUILD_CC in
40376  [\\/]* | ?:[\\/]*)
40377  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40378  ;;
40379  *)
40380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40381for as_dir in $PATH
40382do
40383  IFS=$as_save_IFS
40384  test -z "$as_dir" && as_dir=.
40385    for ac_exec_ext in '' $ac_executable_extensions; do
40386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40387    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40389    break 2
40390  fi
40391done
40392  done
40393IFS=$as_save_IFS
40394
40395  ;;
40396esac
40397fi
40398BUILD_CC=$ac_cv_path_BUILD_CC
40399if test -n "$BUILD_CC"; then
40400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40401$as_echo "$BUILD_CC" >&6; }
40402else
40403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40404$as_echo "no" >&6; }
40405fi
40406
40407
40408  test -n "$BUILD_CC" && break
40409done
40410
40411  else
40412    # The variable is set, but is it from the command line or the environment?
40413
40414    # Try to remove the string !BUILD_CC! from our list.
40415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
40416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40417      # If it failed, the variable was not from the command line. Ignore it,
40418      # but warn the user (except for BASH, which is always set by the calling BASH).
40419      if test "xBUILD_CC" != xBASH; then
40420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
40421$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
40422      fi
40423      # Try to locate tool using the code snippet
40424      for ac_prog in cl cc gcc
40425do
40426  # Extract the first word of "$ac_prog", so it can be a program name with args.
40427set dummy $ac_prog; ac_word=$2
40428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40429$as_echo_n "checking for $ac_word... " >&6; }
40430if ${ac_cv_path_BUILD_CC+:} false; then :
40431  $as_echo_n "(cached) " >&6
40432else
40433  case $BUILD_CC in
40434  [\\/]* | ?:[\\/]*)
40435  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40436  ;;
40437  *)
40438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40439for as_dir in $PATH
40440do
40441  IFS=$as_save_IFS
40442  test -z "$as_dir" && as_dir=.
40443    for ac_exec_ext in '' $ac_executable_extensions; do
40444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40445    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40447    break 2
40448  fi
40449done
40450  done
40451IFS=$as_save_IFS
40452
40453  ;;
40454esac
40455fi
40456BUILD_CC=$ac_cv_path_BUILD_CC
40457if test -n "$BUILD_CC"; then
40458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40459$as_echo "$BUILD_CC" >&6; }
40460else
40461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40462$as_echo "no" >&6; }
40463fi
40464
40465
40466  test -n "$BUILD_CC" && break
40467done
40468
40469    else
40470      # If it succeeded, then it was overridden by the user. We will use it
40471      # for the tool.
40472
40473      # First remove it from the list of overridden variables, so we can test
40474      # for unknown variables in the end.
40475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40476
40477      # Check if we try to supply an empty value
40478      if test "x$BUILD_CC" = x; then
40479        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
40480$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
40481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
40482$as_echo_n "checking for BUILD_CC... " >&6; }
40483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40484$as_echo "disabled" >&6; }
40485      else
40486        # Check if the provided tool contains a complete path.
40487        tool_specified="$BUILD_CC"
40488        tool_basename="${tool_specified##*/}"
40489        if test "x$tool_basename" = "x$tool_specified"; then
40490          # A command without a complete path is provided, search $PATH.
40491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
40492$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
40493          # Extract the first word of "$tool_basename", so it can be a program name with args.
40494set dummy $tool_basename; ac_word=$2
40495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40496$as_echo_n "checking for $ac_word... " >&6; }
40497if ${ac_cv_path_BUILD_CC+:} false; then :
40498  $as_echo_n "(cached) " >&6
40499else
40500  case $BUILD_CC in
40501  [\\/]* | ?:[\\/]*)
40502  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40503  ;;
40504  *)
40505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40506for as_dir in $PATH
40507do
40508  IFS=$as_save_IFS
40509  test -z "$as_dir" && as_dir=.
40510    for ac_exec_ext in '' $ac_executable_extensions; do
40511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40512    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40514    break 2
40515  fi
40516done
40517  done
40518IFS=$as_save_IFS
40519
40520  ;;
40521esac
40522fi
40523BUILD_CC=$ac_cv_path_BUILD_CC
40524if test -n "$BUILD_CC"; then
40525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40526$as_echo "$BUILD_CC" >&6; }
40527else
40528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40529$as_echo "no" >&6; }
40530fi
40531
40532
40533          if test "x$BUILD_CC" = x; then
40534            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40535          fi
40536        else
40537          # Otherwise we believe it is a complete path. Use it as it is.
40538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
40539$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
40540          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
40541$as_echo_n "checking for BUILD_CC... " >&6; }
40542          if test ! -x "$tool_specified"; then
40543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40544$as_echo "not found" >&6; }
40545            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
40546          fi
40547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40548$as_echo "$tool_specified" >&6; }
40549        fi
40550      fi
40551    fi
40552  fi
40553
40554
40555
40556  if test "x$BUILD_CC" = x; then
40557    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
40558  fi
40559
40560
40561
40562  # Only process if variable expands to non-empty
40563
40564  if test "x$BUILD_CC" != x; then
40565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40566
40567  # First separate the path from the arguments. This will split at the first
40568  # space.
40569  complete="$BUILD_CC"
40570  path="${complete%% *}"
40571  tmp="$complete EOL"
40572  arguments="${tmp#* }"
40573
40574  # Input might be given as Windows format, start by converting to
40575  # unix format.
40576  new_path=`$CYGPATH -u "$path"`
40577
40578  # Now try to locate executable using which
40579  new_path=`$WHICH "$new_path" 2> /dev/null`
40580  # bat and cmd files are not always considered executable in cygwin causing which
40581  # to not find them
40582  if test "x$new_path" = x \
40583      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40584      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40585    new_path=`$CYGPATH -u "$path"`
40586  fi
40587  if test "x$new_path" = x; then
40588    # Oops. Which didn't find the executable.
40589    # The splitting of arguments from the executable at a space might have been incorrect,
40590    # since paths with space are more likely in Windows. Give it another try with the whole
40591    # argument.
40592    path="$complete"
40593    arguments="EOL"
40594    new_path=`$CYGPATH -u "$path"`
40595    new_path=`$WHICH "$new_path" 2> /dev/null`
40596    # bat and cmd files are not always considered executable in cygwin causing which
40597    # to not find them
40598    if test "x$new_path" = x \
40599        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40600        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40601      new_path=`$CYGPATH -u "$path"`
40602    fi
40603    if test "x$new_path" = x; then
40604      # It's still not found. Now this is an unrecoverable error.
40605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40606$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40607      has_space=`$ECHO "$complete" | $GREP " "`
40608      if test "x$has_space" != x; then
40609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40611      fi
40612      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40613    fi
40614  fi
40615
40616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40619  # "foo.exe" is OK but "foo" is an error.
40620  #
40621  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40622  # It is also a way to make sure we got the proper file name for the real test later on.
40623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40624  if test "x$test_shortpath" = x; then
40625    # Short path failed, file does not exist as specified.
40626    # Try adding .exe or .cmd
40627    if test -f "${new_path}.exe"; then
40628      input_to_shortpath="${new_path}.exe"
40629    elif test -f "${new_path}.cmd"; then
40630      input_to_shortpath="${new_path}.cmd"
40631    else
40632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
40633$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
40634      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40635$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40636      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40637    fi
40638  else
40639    input_to_shortpath="$new_path"
40640  fi
40641
40642  # Call helper function which possibly converts this using DOS-style short mode.
40643  # If so, the updated path is stored in $new_path.
40644  new_path="$input_to_shortpath"
40645
40646  input_path="$input_to_shortpath"
40647  # Check if we need to convert this using DOS-style short mode. If the path
40648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40649  # take no chances and rewrite it.
40650  # Note: m4 eats our [], so we need to use [ and ] instead.
40651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40652  if test "x$has_forbidden_chars" != x; then
40653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40657      # Going to short mode and back again did indeed matter. Since short mode is
40658      # case insensitive, let's make it lowercase to improve readability.
40659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40660      # Now convert it back to Unix-style (cygpath)
40661      input_path=`$CYGPATH -u "$shortmode_path"`
40662      new_path="$input_path"
40663    fi
40664  fi
40665
40666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40667  if test "x$test_cygdrive_prefix" = x; then
40668    # As a simple fix, exclude /usr/bin since it's not a real path.
40669    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40671      # a path prefixed by /cygdrive for fixpath to work.
40672      new_path="$CYGWIN_ROOT_PATH$input_path"
40673    fi
40674  fi
40675
40676  # remove trailing .exe if any
40677  new_path="${new_path/%.exe/}"
40678
40679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40680
40681  # First separate the path from the arguments. This will split at the first
40682  # space.
40683  complete="$BUILD_CC"
40684  path="${complete%% *}"
40685  tmp="$complete EOL"
40686  arguments="${tmp#* }"
40687
40688  # Input might be given as Windows format, start by converting to
40689  # unix format.
40690  new_path="$path"
40691
40692  windows_path="$new_path"
40693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40694    unix_path=`$CYGPATH -u "$windows_path"`
40695    new_path="$unix_path"
40696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40698    new_path="$unix_path"
40699  fi
40700
40701
40702  # Now try to locate executable using which
40703  new_path=`$WHICH "$new_path" 2> /dev/null`
40704
40705  if test "x$new_path" = x; then
40706    # Oops. Which didn't find the executable.
40707    # The splitting of arguments from the executable at a space might have been incorrect,
40708    # since paths with space are more likely in Windows. Give it another try with the whole
40709    # argument.
40710    path="$complete"
40711    arguments="EOL"
40712    new_path="$path"
40713
40714  windows_path="$new_path"
40715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40716    unix_path=`$CYGPATH -u "$windows_path"`
40717    new_path="$unix_path"
40718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40720    new_path="$unix_path"
40721  fi
40722
40723
40724    new_path=`$WHICH "$new_path" 2> /dev/null`
40725    # bat and cmd files are not always considered executable in MSYS causing which
40726    # to not find them
40727    if test "x$new_path" = x \
40728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40730      new_path="$path"
40731
40732  windows_path="$new_path"
40733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40734    unix_path=`$CYGPATH -u "$windows_path"`
40735    new_path="$unix_path"
40736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40738    new_path="$unix_path"
40739  fi
40740
40741    fi
40742
40743    if test "x$new_path" = x; then
40744      # It's still not found. Now this is an unrecoverable error.
40745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40746$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40747      has_space=`$ECHO "$complete" | $GREP " "`
40748      if test "x$has_space" != x; then
40749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40751      fi
40752      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40753    fi
40754  fi
40755
40756  # Now new_path has a complete unix path to the binary
40757  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40758    # Keep paths in /bin as-is, but remove trailing .exe if any
40759    new_path="${new_path/%.exe/}"
40760    # Do not save /bin paths to all_fixpath_prefixes!
40761  else
40762    # Not in mixed or Windows style, start by that.
40763    new_path=`cmd //c echo $new_path`
40764
40765  input_path="$new_path"
40766  # Check if we need to convert this using DOS-style short mode. If the path
40767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40768  # take no chances and rewrite it.
40769  # Note: m4 eats our [], so we need to use [ and ] instead.
40770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40771  if test "x$has_forbidden_chars" != x; then
40772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40774  fi
40775
40776    # Output is in $new_path
40777
40778  windows_path="$new_path"
40779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40780    unix_path=`$CYGPATH -u "$windows_path"`
40781    new_path="$unix_path"
40782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40784    new_path="$unix_path"
40785  fi
40786
40787    # remove trailing .exe if any
40788    new_path="${new_path/%.exe/}"
40789
40790    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40791    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40792  fi
40793
40794    else
40795      # We're on a unix platform. Hooray! :)
40796      # First separate the path from the arguments. This will split at the first
40797      # space.
40798      complete="$BUILD_CC"
40799      path="${complete%% *}"
40800      tmp="$complete EOL"
40801      arguments="${tmp#* }"
40802
40803      # Cannot rely on the command "which" here since it doesn't always work.
40804      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40805      if test -z "$is_absolute_path"; then
40806        # Path to executable is not absolute. Find it.
40807        IFS_save="$IFS"
40808        IFS=:
40809        for p in $PATH; do
40810          if test -f "$p/$path" && test -x "$p/$path"; then
40811            new_path="$p/$path"
40812            break
40813          fi
40814        done
40815        IFS="$IFS_save"
40816      else
40817        # This is an absolute path, we can use it without further modifications.
40818        new_path="$path"
40819      fi
40820
40821      if test "x$new_path" = x; then
40822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40823$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40824        has_space=`$ECHO "$complete" | $GREP " "`
40825        if test "x$has_space" != x; then
40826          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40827$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40828        fi
40829        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40830      fi
40831    fi
40832
40833    # Now join together the path and the arguments once again
40834    if test "x$arguments" != xEOL; then
40835      new_complete="$new_path ${arguments% *}"
40836    else
40837      new_complete="$new_path"
40838    fi
40839
40840    if test "x$complete" != "x$new_complete"; then
40841      BUILD_CC="$new_complete"
40842      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40843$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40844    fi
40845  fi
40846
40847
40848
40849
40850  # Publish this variable in the help.
40851
40852
40853  if [ -z "${BUILD_CXX+x}" ]; then
40854    # The variable is not set by user, try to locate tool using the code snippet
40855    for ac_prog in cl CC g++
40856do
40857  # Extract the first word of "$ac_prog", so it can be a program name with args.
40858set dummy $ac_prog; ac_word=$2
40859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40860$as_echo_n "checking for $ac_word... " >&6; }
40861if ${ac_cv_path_BUILD_CXX+:} false; then :
40862  $as_echo_n "(cached) " >&6
40863else
40864  case $BUILD_CXX in
40865  [\\/]* | ?:[\\/]*)
40866  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40867  ;;
40868  *)
40869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40870for as_dir in $PATH
40871do
40872  IFS=$as_save_IFS
40873  test -z "$as_dir" && as_dir=.
40874    for ac_exec_ext in '' $ac_executable_extensions; do
40875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40876    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40878    break 2
40879  fi
40880done
40881  done
40882IFS=$as_save_IFS
40883
40884  ;;
40885esac
40886fi
40887BUILD_CXX=$ac_cv_path_BUILD_CXX
40888if test -n "$BUILD_CXX"; then
40889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40890$as_echo "$BUILD_CXX" >&6; }
40891else
40892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40893$as_echo "no" >&6; }
40894fi
40895
40896
40897  test -n "$BUILD_CXX" && break
40898done
40899
40900  else
40901    # The variable is set, but is it from the command line or the environment?
40902
40903    # Try to remove the string !BUILD_CXX! from our list.
40904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40906      # If it failed, the variable was not from the command line. Ignore it,
40907      # but warn the user (except for BASH, which is always set by the calling BASH).
40908      if test "xBUILD_CXX" != xBASH; then
40909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40910$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40911      fi
40912      # Try to locate tool using the code snippet
40913      for ac_prog in cl CC g++
40914do
40915  # Extract the first word of "$ac_prog", so it can be a program name with args.
40916set dummy $ac_prog; ac_word=$2
40917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40918$as_echo_n "checking for $ac_word... " >&6; }
40919if ${ac_cv_path_BUILD_CXX+:} false; then :
40920  $as_echo_n "(cached) " >&6
40921else
40922  case $BUILD_CXX in
40923  [\\/]* | ?:[\\/]*)
40924  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40925  ;;
40926  *)
40927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40928for as_dir in $PATH
40929do
40930  IFS=$as_save_IFS
40931  test -z "$as_dir" && as_dir=.
40932    for ac_exec_ext in '' $ac_executable_extensions; do
40933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40934    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40936    break 2
40937  fi
40938done
40939  done
40940IFS=$as_save_IFS
40941
40942  ;;
40943esac
40944fi
40945BUILD_CXX=$ac_cv_path_BUILD_CXX
40946if test -n "$BUILD_CXX"; then
40947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40948$as_echo "$BUILD_CXX" >&6; }
40949else
40950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40951$as_echo "no" >&6; }
40952fi
40953
40954
40955  test -n "$BUILD_CXX" && break
40956done
40957
40958    else
40959      # If it succeeded, then it was overridden by the user. We will use it
40960      # for the tool.
40961
40962      # First remove it from the list of overridden variables, so we can test
40963      # for unknown variables in the end.
40964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40965
40966      # Check if we try to supply an empty value
40967      if test "x$BUILD_CXX" = x; then
40968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
40969$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
40970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40971$as_echo_n "checking for BUILD_CXX... " >&6; }
40972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40973$as_echo "disabled" >&6; }
40974      else
40975        # Check if the provided tool contains a complete path.
40976        tool_specified="$BUILD_CXX"
40977        tool_basename="${tool_specified##*/}"
40978        if test "x$tool_basename" = "x$tool_specified"; then
40979          # A command without a complete path is provided, search $PATH.
40980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40981$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40982          # Extract the first word of "$tool_basename", so it can be a program name with args.
40983set dummy $tool_basename; ac_word=$2
40984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40985$as_echo_n "checking for $ac_word... " >&6; }
40986if ${ac_cv_path_BUILD_CXX+:} false; then :
40987  $as_echo_n "(cached) " >&6
40988else
40989  case $BUILD_CXX in
40990  [\\/]* | ?:[\\/]*)
40991  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40992  ;;
40993  *)
40994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40995for as_dir in $PATH
40996do
40997  IFS=$as_save_IFS
40998  test -z "$as_dir" && as_dir=.
40999    for ac_exec_ext in '' $ac_executable_extensions; do
41000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41001    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
41002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41003    break 2
41004  fi
41005done
41006  done
41007IFS=$as_save_IFS
41008
41009  ;;
41010esac
41011fi
41012BUILD_CXX=$ac_cv_path_BUILD_CXX
41013if test -n "$BUILD_CXX"; then
41014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
41015$as_echo "$BUILD_CXX" >&6; }
41016else
41017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41018$as_echo "no" >&6; }
41019fi
41020
41021
41022          if test "x$BUILD_CXX" = x; then
41023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41024          fi
41025        else
41026          # Otherwise we believe it is a complete path. Use it as it is.
41027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
41028$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
41029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
41030$as_echo_n "checking for BUILD_CXX... " >&6; }
41031          if test ! -x "$tool_specified"; then
41032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41033$as_echo "not found" >&6; }
41034            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
41035          fi
41036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41037$as_echo "$tool_specified" >&6; }
41038        fi
41039      fi
41040    fi
41041  fi
41042
41043
41044
41045  if test "x$BUILD_CXX" = x; then
41046    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
41047  fi
41048
41049
41050
41051  # Only process if variable expands to non-empty
41052
41053  if test "x$BUILD_CXX" != x; then
41054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41055
41056  # First separate the path from the arguments. This will split at the first
41057  # space.
41058  complete="$BUILD_CXX"
41059  path="${complete%% *}"
41060  tmp="$complete EOL"
41061  arguments="${tmp#* }"
41062
41063  # Input might be given as Windows format, start by converting to
41064  # unix format.
41065  new_path=`$CYGPATH -u "$path"`
41066
41067  # Now try to locate executable using which
41068  new_path=`$WHICH "$new_path" 2> /dev/null`
41069  # bat and cmd files are not always considered executable in cygwin causing which
41070  # to not find them
41071  if test "x$new_path" = x \
41072      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41073      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41074    new_path=`$CYGPATH -u "$path"`
41075  fi
41076  if test "x$new_path" = x; then
41077    # Oops. Which didn't find the executable.
41078    # The splitting of arguments from the executable at a space might have been incorrect,
41079    # since paths with space are more likely in Windows. Give it another try with the whole
41080    # argument.
41081    path="$complete"
41082    arguments="EOL"
41083    new_path=`$CYGPATH -u "$path"`
41084    new_path=`$WHICH "$new_path" 2> /dev/null`
41085    # bat and cmd files are not always considered executable in cygwin causing which
41086    # to not find them
41087    if test "x$new_path" = x \
41088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41090      new_path=`$CYGPATH -u "$path"`
41091    fi
41092    if test "x$new_path" = x; then
41093      # It's still not found. Now this is an unrecoverable error.
41094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
41095$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
41096      has_space=`$ECHO "$complete" | $GREP " "`
41097      if test "x$has_space" != x; then
41098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41100      fi
41101      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
41102    fi
41103  fi
41104
41105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41108  # "foo.exe" is OK but "foo" is an error.
41109  #
41110  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41111  # It is also a way to make sure we got the proper file name for the real test later on.
41112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41113  if test "x$test_shortpath" = x; then
41114    # Short path failed, file does not exist as specified.
41115    # Try adding .exe or .cmd
41116    if test -f "${new_path}.exe"; then
41117      input_to_shortpath="${new_path}.exe"
41118    elif test -f "${new_path}.cmd"; then
41119      input_to_shortpath="${new_path}.cmd"
41120    else
41121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
41122$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
41123      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41124$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41125      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
41126    fi
41127  else
41128    input_to_shortpath="$new_path"
41129  fi
41130
41131  # Call helper function which possibly converts this using DOS-style short mode.
41132  # If so, the updated path is stored in $new_path.
41133  new_path="$input_to_shortpath"
41134
41135  input_path="$input_to_shortpath"
41136  # Check if we need to convert this using DOS-style short mode. If the path
41137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41138  # take no chances and rewrite it.
41139  # Note: m4 eats our [], so we need to use [ and ] instead.
41140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41141  if test "x$has_forbidden_chars" != x; then
41142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41146      # Going to short mode and back again did indeed matter. Since short mode is
41147      # case insensitive, let's make it lowercase to improve readability.
41148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41149      # Now convert it back to Unix-style (cygpath)
41150      input_path=`$CYGPATH -u "$shortmode_path"`
41151      new_path="$input_path"
41152    fi
41153  fi
41154
41155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41156  if test "x$test_cygdrive_prefix" = x; then
41157    # As a simple fix, exclude /usr/bin since it's not a real path.
41158    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41160      # a path prefixed by /cygdrive for fixpath to work.
41161      new_path="$CYGWIN_ROOT_PATH$input_path"
41162    fi
41163  fi
41164
41165  # remove trailing .exe if any
41166  new_path="${new_path/%.exe/}"
41167
41168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41169
41170  # First separate the path from the arguments. This will split at the first
41171  # space.
41172  complete="$BUILD_CXX"
41173  path="${complete%% *}"
41174  tmp="$complete EOL"
41175  arguments="${tmp#* }"
41176
41177  # Input might be given as Windows format, start by converting to
41178  # unix format.
41179  new_path="$path"
41180
41181  windows_path="$new_path"
41182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41183    unix_path=`$CYGPATH -u "$windows_path"`
41184    new_path="$unix_path"
41185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41187    new_path="$unix_path"
41188  fi
41189
41190
41191  # Now try to locate executable using which
41192  new_path=`$WHICH "$new_path" 2> /dev/null`
41193
41194  if test "x$new_path" = x; then
41195    # Oops. Which didn't find the executable.
41196    # The splitting of arguments from the executable at a space might have been incorrect,
41197    # since paths with space are more likely in Windows. Give it another try with the whole
41198    # argument.
41199    path="$complete"
41200    arguments="EOL"
41201    new_path="$path"
41202
41203  windows_path="$new_path"
41204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41205    unix_path=`$CYGPATH -u "$windows_path"`
41206    new_path="$unix_path"
41207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41209    new_path="$unix_path"
41210  fi
41211
41212
41213    new_path=`$WHICH "$new_path" 2> /dev/null`
41214    # bat and cmd files are not always considered executable in MSYS causing which
41215    # to not find them
41216    if test "x$new_path" = x \
41217        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41218        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41219      new_path="$path"
41220
41221  windows_path="$new_path"
41222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41223    unix_path=`$CYGPATH -u "$windows_path"`
41224    new_path="$unix_path"
41225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41227    new_path="$unix_path"
41228  fi
41229
41230    fi
41231
41232    if test "x$new_path" = x; then
41233      # It's still not found. Now this is an unrecoverable error.
41234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
41235$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
41236      has_space=`$ECHO "$complete" | $GREP " "`
41237      if test "x$has_space" != x; then
41238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41240      fi
41241      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
41242    fi
41243  fi
41244
41245  # Now new_path has a complete unix path to the binary
41246  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41247    # Keep paths in /bin as-is, but remove trailing .exe if any
41248    new_path="${new_path/%.exe/}"
41249    # Do not save /bin paths to all_fixpath_prefixes!
41250  else
41251    # Not in mixed or Windows style, start by that.
41252    new_path=`cmd //c echo $new_path`
41253
41254  input_path="$new_path"
41255  # Check if we need to convert this using DOS-style short mode. If the path
41256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41257  # take no chances and rewrite it.
41258  # Note: m4 eats our [], so we need to use [ and ] instead.
41259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41260  if test "x$has_forbidden_chars" != x; then
41261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41263  fi
41264
41265    # Output is in $new_path
41266
41267  windows_path="$new_path"
41268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41269    unix_path=`$CYGPATH -u "$windows_path"`
41270    new_path="$unix_path"
41271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41273    new_path="$unix_path"
41274  fi
41275
41276    # remove trailing .exe if any
41277    new_path="${new_path/%.exe/}"
41278
41279    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41280    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41281  fi
41282
41283    else
41284      # We're on a unix platform. Hooray! :)
41285      # First separate the path from the arguments. This will split at the first
41286      # space.
41287      complete="$BUILD_CXX"
41288      path="${complete%% *}"
41289      tmp="$complete EOL"
41290      arguments="${tmp#* }"
41291
41292      # Cannot rely on the command "which" here since it doesn't always work.
41293      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41294      if test -z "$is_absolute_path"; then
41295        # Path to executable is not absolute. Find it.
41296        IFS_save="$IFS"
41297        IFS=:
41298        for p in $PATH; do
41299          if test -f "$p/$path" && test -x "$p/$path"; then
41300            new_path="$p/$path"
41301            break
41302          fi
41303        done
41304        IFS="$IFS_save"
41305      else
41306        # This is an absolute path, we can use it without further modifications.
41307        new_path="$path"
41308      fi
41309
41310      if test "x$new_path" = x; then
41311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
41312$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
41313        has_space=`$ECHO "$complete" | $GREP " "`
41314        if test "x$has_space" != x; then
41315          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41316$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41317        fi
41318        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
41319      fi
41320    fi
41321
41322    # Now join together the path and the arguments once again
41323    if test "x$arguments" != xEOL; then
41324      new_complete="$new_path ${arguments% *}"
41325    else
41326      new_complete="$new_path"
41327    fi
41328
41329    if test "x$complete" != "x$new_complete"; then
41330      BUILD_CXX="$new_complete"
41331      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
41332$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
41333    fi
41334  fi
41335
41336    BUILD_LD="$BUILD_CC"
41337
41338    PATH="$OLDPATH"
41339  else
41340    # If we are not cross compiling, use the normal target compilers for
41341    # building the build platform executables.
41342    BUILD_CC="$CC"
41343    BUILD_CXX="$CXX"
41344    BUILD_LD="$LD"
41345    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
41346    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
41347  fi
41348
41349
41350
41351
41352
41353
41354
41355
41356  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41357    # For hotspot, we need these in Windows mixed path,
41358    # so rewrite them all. Need added .exe suffix.
41359    HOTSPOT_CXX="$CXX.exe"
41360    HOTSPOT_LD="$LD.exe"
41361    HOTSPOT_MT="$MT.exe"
41362    HOTSPOT_RC="$RC.exe"
41363
41364  unix_path="$HOTSPOT_CXX"
41365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41366    windows_path=`$CYGPATH -m "$unix_path"`
41367    HOTSPOT_CXX="$windows_path"
41368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41369    windows_path=`cmd //c echo $unix_path`
41370    HOTSPOT_CXX="$windows_path"
41371  fi
41372
41373
41374  unix_path="$HOTSPOT_LD"
41375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41376    windows_path=`$CYGPATH -m "$unix_path"`
41377    HOTSPOT_LD="$windows_path"
41378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41379    windows_path=`cmd //c echo $unix_path`
41380    HOTSPOT_LD="$windows_path"
41381  fi
41382
41383
41384  unix_path="$HOTSPOT_MT"
41385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41386    windows_path=`$CYGPATH -m "$unix_path"`
41387    HOTSPOT_MT="$windows_path"
41388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41389    windows_path=`cmd //c echo $unix_path`
41390    HOTSPOT_MT="$windows_path"
41391  fi
41392
41393
41394  unix_path="$HOTSPOT_RC"
41395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41396    windows_path=`$CYGPATH -m "$unix_path"`
41397    HOTSPOT_RC="$windows_path"
41398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41399    windows_path=`cmd //c echo $unix_path`
41400    HOTSPOT_RC="$windows_path"
41401  fi
41402
41403
41404
41405  else
41406    HOTSPOT_CXX="$CXX"
41407    HOTSPOT_LD="$LD"
41408  fi
41409
41410
41411
41412  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41413    USE_CLANG=true
41414  fi
41415
41416
41417
41418
41419
41420  # The package path is used only on macosx?
41421  # FIXME: clean this up, and/or move it elsewhere.
41422  PACKAGE_PATH=/opt/local
41423
41424
41425  # Check for extra potential brokenness.
41426  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41427    # On Windows, double-check that we got the right compiler.
41428    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41429    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41430    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41431      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41432        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
41433      fi
41434    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41435      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41436        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41437      fi
41438    fi
41439  fi
41440
41441  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41442    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41443    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41444    # This is later checked when setting flags.
41445
41446    # "-Og" suppported for GCC 4.8 and later
41447    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41448
41449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41450$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41451  supports=yes
41452
41453  saved_cflags="$CFLAGS"
41454  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41455  ac_ext=c
41456ac_cpp='$CPP $CPPFLAGS'
41457ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41458ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41459ac_compiler_gnu=$ac_cv_c_compiler_gnu
41460
41461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41462/* end confdefs.h.  */
41463int i;
41464_ACEOF
41465if ac_fn_c_try_compile "$LINENO"; then :
41466
41467else
41468  supports=no
41469fi
41470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41471  ac_ext=cpp
41472ac_cpp='$CXXCPP $CPPFLAGS'
41473ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41474ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41475ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41476
41477  CFLAGS="$saved_cflags"
41478
41479  saved_cxxflags="$CXXFLAGS"
41480  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41481  ac_ext=cpp
41482ac_cpp='$CXXCPP $CPPFLAGS'
41483ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41484ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41485ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41486
41487  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41488/* end confdefs.h.  */
41489int i;
41490_ACEOF
41491if ac_fn_cxx_try_compile "$LINENO"; then :
41492
41493else
41494  supports=no
41495fi
41496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41497  ac_ext=cpp
41498ac_cpp='$CXXCPP $CPPFLAGS'
41499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41502
41503  CXXFLAGS="$saved_cxxflags"
41504
41505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41506$as_echo "$supports" >&6; }
41507  if test "x$supports" = "xyes" ; then
41508    HAS_CFLAG_OPTIMIZE_DEBUG=true
41509  else
41510    HAS_CFLAG_OPTIMIZE_DEBUG=false
41511  fi
41512
41513
41514    # "-z relro" supported in GNU binutils 2.17 and later
41515    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41516
41517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41518$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41519  supports=yes
41520
41521  saved_ldflags="$LDFLAGS"
41522  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41523  ac_ext=c
41524ac_cpp='$CPP $CPPFLAGS'
41525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41527ac_compiler_gnu=$ac_cv_c_compiler_gnu
41528
41529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41530/* end confdefs.h.  */
41531
41532int
41533main ()
41534{
41535
41536  ;
41537  return 0;
41538}
41539_ACEOF
41540if ac_fn_c_try_link "$LINENO"; then :
41541
41542else
41543  supports=no
41544fi
41545rm -f core conftest.err conftest.$ac_objext \
41546    conftest$ac_exeext conftest.$ac_ext
41547  ac_ext=cpp
41548ac_cpp='$CXXCPP $CPPFLAGS'
41549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41552
41553  LDFLAGS="$saved_ldflags"
41554
41555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41556$as_echo "$supports" >&6; }
41557  if test "x$supports" = "xyes" ; then
41558    HAS_LINKER_RELRO=true
41559  else
41560    HAS_LINKER_RELRO=false
41561  fi
41562
41563
41564    # "-z now" supported in GNU binutils 2.11 and later
41565    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41566
41567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41568$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41569  supports=yes
41570
41571  saved_ldflags="$LDFLAGS"
41572  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41573  ac_ext=c
41574ac_cpp='$CPP $CPPFLAGS'
41575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41577ac_compiler_gnu=$ac_cv_c_compiler_gnu
41578
41579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41580/* end confdefs.h.  */
41581
41582int
41583main ()
41584{
41585
41586  ;
41587  return 0;
41588}
41589_ACEOF
41590if ac_fn_c_try_link "$LINENO"; then :
41591
41592else
41593  supports=no
41594fi
41595rm -f core conftest.err conftest.$ac_objext \
41596    conftest$ac_exeext conftest.$ac_ext
41597  ac_ext=cpp
41598ac_cpp='$CXXCPP $CPPFLAGS'
41599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41602
41603  LDFLAGS="$saved_ldflags"
41604
41605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41606$as_echo "$supports" >&6; }
41607  if test "x$supports" = "xyes" ; then
41608    HAS_LINKER_NOW=true
41609  else
41610    HAS_LINKER_NOW=false
41611  fi
41612
41613  fi
41614
41615  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41616  # in executable.'
41617  USING_BROKEN_SUSE_LD=no
41618  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41620$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41621    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41622    $ECHO "int main() { }" > main.c
41623    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41625$as_echo "no" >&6; }
41626      USING_BROKEN_SUSE_LD=no
41627    else
41628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41629$as_echo "yes" >&6; }
41630      USING_BROKEN_SUSE_LD=yes
41631    fi
41632    rm -rf version-script.map main.c a.out
41633  fi
41634
41635
41636
41637# Setup the JTReg Regression Test Harness.
41638
41639
41640# Check whether --with-jtreg was given.
41641if test "${with_jtreg+set}" = set; then :
41642  withval=$with_jtreg;
41643else
41644  with_jtreg=no
41645fi
41646
41647
41648  if test "x$with_jtreg" = xno; then
41649    # jtreg disabled
41650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41651$as_echo_n "checking for jtreg... " >&6; }
41652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41653$as_echo "no" >&6; }
41654  else
41655    if test "x$with_jtreg" != xyes; then
41656      # with path specified.
41657      JT_HOME="$with_jtreg"
41658    fi
41659
41660    if test "x$JT_HOME" != x; then
41661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41662$as_echo_n "checking for jtreg... " >&6; }
41663
41664      # use JT_HOME enviroment var.
41665
41666  # Only process if variable expands to non-empty
41667
41668  if test "x$JT_HOME" != x; then
41669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41670
41671  # Input might be given as Windows format, start by converting to
41672  # unix format.
41673  path="$JT_HOME"
41674  new_path=`$CYGPATH -u "$path"`
41675
41676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41679  # "foo.exe" is OK but "foo" is an error.
41680  #
41681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41682  # It is also a way to make sure we got the proper file name for the real test later on.
41683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41684  if test "x$test_shortpath" = x; then
41685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41686$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41687    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41688  fi
41689
41690  # Call helper function which possibly converts this using DOS-style short mode.
41691  # If so, the updated path is stored in $new_path.
41692
41693  input_path="$new_path"
41694  # Check if we need to convert this using DOS-style short mode. If the path
41695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41696  # take no chances and rewrite it.
41697  # Note: m4 eats our [], so we need to use [ and ] instead.
41698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41699  if test "x$has_forbidden_chars" != x; then
41700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41704      # Going to short mode and back again did indeed matter. Since short mode is
41705      # case insensitive, let's make it lowercase to improve readability.
41706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41707      # Now convert it back to Unix-style (cygpath)
41708      input_path=`$CYGPATH -u "$shortmode_path"`
41709      new_path="$input_path"
41710    fi
41711  fi
41712
41713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41714  if test "x$test_cygdrive_prefix" = x; then
41715    # As a simple fix, exclude /usr/bin since it's not a real path.
41716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41718      # a path prefixed by /cygdrive for fixpath to work.
41719      new_path="$CYGWIN_ROOT_PATH$input_path"
41720    fi
41721  fi
41722
41723
41724  if test "x$path" != "x$new_path"; then
41725    JT_HOME="$new_path"
41726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41727$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41728  fi
41729
41730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41731
41732  path="$JT_HOME"
41733  has_colon=`$ECHO $path | $GREP ^.:`
41734  new_path="$path"
41735  if test "x$has_colon" = x; then
41736    # Not in mixed or Windows style, start by that.
41737    new_path=`cmd //c echo $path`
41738  fi
41739
41740
41741  input_path="$new_path"
41742  # Check if we need to convert this using DOS-style short mode. If the path
41743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41744  # take no chances and rewrite it.
41745  # Note: m4 eats our [], so we need to use [ and ] instead.
41746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41747  if test "x$has_forbidden_chars" != x; then
41748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41750  fi
41751
41752
41753  windows_path="$new_path"
41754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41755    unix_path=`$CYGPATH -u "$windows_path"`
41756    new_path="$unix_path"
41757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41759    new_path="$unix_path"
41760  fi
41761
41762  if test "x$path" != "x$new_path"; then
41763    JT_HOME="$new_path"
41764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41765$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41766  fi
41767
41768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41770
41771    else
41772      # We're on a unix platform. Hooray! :)
41773      path="$JT_HOME"
41774      has_space=`$ECHO "$path" | $GREP " "`
41775      if test "x$has_space" != x; then
41776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41777$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41778        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41779      fi
41780
41781      # Use eval to expand a potential ~
41782      eval path="$path"
41783      if test ! -f "$path" && test ! -d "$path"; then
41784        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41785      fi
41786
41787      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41788    fi
41789  fi
41790
41791
41792      # jtreg win32 script works for everybody
41793      JTREGEXE="$JT_HOME/bin/jtreg"
41794
41795      if test ! -f "$JTREGEXE"; then
41796        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41797      fi
41798
41799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41800$as_echo "$JTREGEXE" >&6; }
41801    else
41802      # try to find jtreg on path
41803
41804
41805
41806  # Publish this variable in the help.
41807
41808
41809  if [ -z "${JTREGEXE+x}" ]; then
41810    # The variable is not set by user, try to locate tool using the code snippet
41811    for ac_prog in jtreg
41812do
41813  # Extract the first word of "$ac_prog", so it can be a program name with args.
41814set dummy $ac_prog; ac_word=$2
41815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41816$as_echo_n "checking for $ac_word... " >&6; }
41817if ${ac_cv_path_JTREGEXE+:} false; then :
41818  $as_echo_n "(cached) " >&6
41819else
41820  case $JTREGEXE in
41821  [\\/]* | ?:[\\/]*)
41822  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41823  ;;
41824  *)
41825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41826for as_dir in $PATH
41827do
41828  IFS=$as_save_IFS
41829  test -z "$as_dir" && as_dir=.
41830    for ac_exec_ext in '' $ac_executable_extensions; do
41831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41832    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41834    break 2
41835  fi
41836done
41837  done
41838IFS=$as_save_IFS
41839
41840  ;;
41841esac
41842fi
41843JTREGEXE=$ac_cv_path_JTREGEXE
41844if test -n "$JTREGEXE"; then
41845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41846$as_echo "$JTREGEXE" >&6; }
41847else
41848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41849$as_echo "no" >&6; }
41850fi
41851
41852
41853  test -n "$JTREGEXE" && break
41854done
41855
41856  else
41857    # The variable is set, but is it from the command line or the environment?
41858
41859    # Try to remove the string !JTREGEXE! from our list.
41860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41862      # If it failed, the variable was not from the command line. Ignore it,
41863      # but warn the user (except for BASH, which is always set by the calling BASH).
41864      if test "xJTREGEXE" != xBASH; then
41865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41866$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41867      fi
41868      # Try to locate tool using the code snippet
41869      for ac_prog in jtreg
41870do
41871  # Extract the first word of "$ac_prog", so it can be a program name with args.
41872set dummy $ac_prog; ac_word=$2
41873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41874$as_echo_n "checking for $ac_word... " >&6; }
41875if ${ac_cv_path_JTREGEXE+:} false; then :
41876  $as_echo_n "(cached) " >&6
41877else
41878  case $JTREGEXE in
41879  [\\/]* | ?:[\\/]*)
41880  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41881  ;;
41882  *)
41883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41884for as_dir in $PATH
41885do
41886  IFS=$as_save_IFS
41887  test -z "$as_dir" && as_dir=.
41888    for ac_exec_ext in '' $ac_executable_extensions; do
41889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41890    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41892    break 2
41893  fi
41894done
41895  done
41896IFS=$as_save_IFS
41897
41898  ;;
41899esac
41900fi
41901JTREGEXE=$ac_cv_path_JTREGEXE
41902if test -n "$JTREGEXE"; then
41903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41904$as_echo "$JTREGEXE" >&6; }
41905else
41906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41907$as_echo "no" >&6; }
41908fi
41909
41910
41911  test -n "$JTREGEXE" && break
41912done
41913
41914    else
41915      # If it succeeded, then it was overridden by the user. We will use it
41916      # for the tool.
41917
41918      # First remove it from the list of overridden variables, so we can test
41919      # for unknown variables in the end.
41920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41921
41922      # Check if we try to supply an empty value
41923      if test "x$JTREGEXE" = x; then
41924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
41925$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
41926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41927$as_echo_n "checking for JTREGEXE... " >&6; }
41928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41929$as_echo "disabled" >&6; }
41930      else
41931        # Check if the provided tool contains a complete path.
41932        tool_specified="$JTREGEXE"
41933        tool_basename="${tool_specified##*/}"
41934        if test "x$tool_basename" = "x$tool_specified"; then
41935          # A command without a complete path is provided, search $PATH.
41936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41937$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41938          # Extract the first word of "$tool_basename", so it can be a program name with args.
41939set dummy $tool_basename; ac_word=$2
41940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41941$as_echo_n "checking for $ac_word... " >&6; }
41942if ${ac_cv_path_JTREGEXE+:} false; then :
41943  $as_echo_n "(cached) " >&6
41944else
41945  case $JTREGEXE in
41946  [\\/]* | ?:[\\/]*)
41947  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41948  ;;
41949  *)
41950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41951for as_dir in $PATH
41952do
41953  IFS=$as_save_IFS
41954  test -z "$as_dir" && as_dir=.
41955    for ac_exec_ext in '' $ac_executable_extensions; do
41956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41957    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41959    break 2
41960  fi
41961done
41962  done
41963IFS=$as_save_IFS
41964
41965  ;;
41966esac
41967fi
41968JTREGEXE=$ac_cv_path_JTREGEXE
41969if test -n "$JTREGEXE"; then
41970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41971$as_echo "$JTREGEXE" >&6; }
41972else
41973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41974$as_echo "no" >&6; }
41975fi
41976
41977
41978          if test "x$JTREGEXE" = x; then
41979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41980          fi
41981        else
41982          # Otherwise we believe it is a complete path. Use it as it is.
41983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41984$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41986$as_echo_n "checking for JTREGEXE... " >&6; }
41987          if test ! -x "$tool_specified"; then
41988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41989$as_echo "not found" >&6; }
41990            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41991          fi
41992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41993$as_echo "$tool_specified" >&6; }
41994        fi
41995      fi
41996    fi
41997  fi
41998
41999
42000
42001  if test "x$JTREGEXE" = x; then
42002    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
42003  fi
42004
42005
42006      JT_HOME="`$DIRNAME $JTREGEXE`"
42007    fi
42008  fi
42009
42010
42011
42012
42013
42014
42015  # Option used to tell the compiler whether to create 32- or 64-bit executables
42016  if test "x$TOOLCHAIN_TYPE" = xxlc; then
42017    COMPILER_TARGET_BITS_FLAG="-q"
42018  else
42019    COMPILER_TARGET_BITS_FLAG="-m"
42020  fi
42021
42022
42023  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
42024  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42025    ARFLAGS="-r"
42026  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42027    ARFLAGS="-X64"
42028  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
42029    # lib.exe is used as AR to create static libraries.
42030    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
42031  else
42032    ARFLAGS=""
42033  fi
42034
42035
42036  ## Setup strip.
42037  # FIXME: should this really be per platform, or should it be per toolchain type?
42038  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
42039  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
42040  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42041    STRIPFLAGS="-g"
42042  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
42043    STRIPFLAGS="-x"
42044  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
42045    STRIPFLAGS="-S"
42046  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42047    STRIPFLAGS="-X32_64"
42048  fi
42049
42050
42051
42052  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42053    CC_OUT_OPTION=-Fo
42054    EXE_OUT_OPTION=-out:
42055    LD_OUT_OPTION=-out:
42056    AR_OUT_OPTION=-out:
42057  else
42058    # The option used to specify the target .o,.a or .so file.
42059    # When compiling, how to specify the to be created object file.
42060    CC_OUT_OPTION='-o$(SPACE)'
42061    # When linking, how to specify the to be created executable.
42062    EXE_OUT_OPTION='-o$(SPACE)'
42063    # When linking, how to specify the to be created dynamically linkable library.
42064    LD_OUT_OPTION='-o$(SPACE)'
42065    # When archiving, how to specify the to be create static archive for object files.
42066    AR_OUT_OPTION='rcs$(SPACE)'
42067  fi
42068
42069
42070
42071
42072
42073  # On Windows, we need to set RC flags.
42074  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42075    RC_FLAGS="-nologo -l0x409"
42076    if test "x$VARIANT" = xOPT; then
42077      RC_FLAGS="$RC_FLAGS -DNDEBUG"
42078    fi
42079
42080    # The version variables used to create RC_FLAGS may be overridden
42081    # in a custom configure script, or possibly the command line.
42082    # Let those variables be expanded at make time in spec.gmk.
42083    # The \$ are escaped to the shell, and the $(...) variables
42084    # are evaluated by make.
42085    RC_FLAGS="$RC_FLAGS \
42086        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
42087        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
42088        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
42089        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
42090        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
42091        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
42092        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
42093  fi
42094
42095
42096  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42097    # silence copyright notice and other headers.
42098    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
42099  fi
42100
42101
42102# FIXME: Currently we must test this after toolchain but before flags. Fix!
42103
42104# Now we can test some aspects on the target using configure macros.
42105
42106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
42107$as_echo_n "checking for ANSI C header files... " >&6; }
42108if ${ac_cv_header_stdc+:} false; then :
42109  $as_echo_n "(cached) " >&6
42110else
42111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42112/* end confdefs.h.  */
42113#include <stdlib.h>
42114#include <stdarg.h>
42115#include <string.h>
42116#include <float.h>
42117
42118int
42119main ()
42120{
42121
42122  ;
42123  return 0;
42124}
42125_ACEOF
42126if ac_fn_cxx_try_compile "$LINENO"; then :
42127  ac_cv_header_stdc=yes
42128else
42129  ac_cv_header_stdc=no
42130fi
42131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42132
42133if test $ac_cv_header_stdc = yes; then
42134  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
42135  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42136/* end confdefs.h.  */
42137#include <string.h>
42138
42139_ACEOF
42140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42141  $EGREP "memchr" >/dev/null 2>&1; then :
42142
42143else
42144  ac_cv_header_stdc=no
42145fi
42146rm -f conftest*
42147
42148fi
42149
42150if test $ac_cv_header_stdc = yes; then
42151  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
42152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42153/* end confdefs.h.  */
42154#include <stdlib.h>
42155
42156_ACEOF
42157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42158  $EGREP "free" >/dev/null 2>&1; then :
42159
42160else
42161  ac_cv_header_stdc=no
42162fi
42163rm -f conftest*
42164
42165fi
42166
42167if test $ac_cv_header_stdc = yes; then
42168  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
42169  if test "$cross_compiling" = yes; then :
42170  :
42171else
42172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42173/* end confdefs.h.  */
42174#include <ctype.h>
42175#include <stdlib.h>
42176#if ((' ' & 0x0FF) == 0x020)
42177# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
42178# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
42179#else
42180# define ISLOWER(c) \
42181		   (('a' <= (c) && (c) <= 'i') \
42182		     || ('j' <= (c) && (c) <= 'r') \
42183		     || ('s' <= (c) && (c) <= 'z'))
42184# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
42185#endif
42186
42187#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
42188int
42189main ()
42190{
42191  int i;
42192  for (i = 0; i < 256; i++)
42193    if (XOR (islower (i), ISLOWER (i))
42194	|| toupper (i) != TOUPPER (i))
42195      return 2;
42196  return 0;
42197}
42198_ACEOF
42199if ac_fn_cxx_try_run "$LINENO"; then :
42200
42201else
42202  ac_cv_header_stdc=no
42203fi
42204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42205  conftest.$ac_objext conftest.beam conftest.$ac_ext
42206fi
42207
42208fi
42209fi
42210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
42211$as_echo "$ac_cv_header_stdc" >&6; }
42212if test $ac_cv_header_stdc = yes; then
42213
42214$as_echo "#define STDC_HEADERS 1" >>confdefs.h
42215
42216fi
42217
42218# On IRIX 5.3, sys/types and inttypes.h are conflicting.
42219for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
42220		  inttypes.h stdint.h unistd.h
42221do :
42222  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42223ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
42224"
42225if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42226  cat >>confdefs.h <<_ACEOF
42227#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42228_ACEOF
42229
42230fi
42231
42232done
42233
42234
42235
42236  ###############################################################################
42237  #
42238  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
42239  # (The JVM can use 32 or 64 bit Java pointers but that decision
42240  # is made at runtime.)
42241  #
42242
42243  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
42244    # Always specify -m flag on Solaris
42245    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
42246
42247  # When we add flags to the "official" CFLAGS etc, we need to
42248  # keep track of these additions in ADDED_CFLAGS etc. These
42249  # will later be checked to make sure only controlled additions
42250  # have been made to CFLAGS etc.
42251  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42252  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42253  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42254
42255  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42256  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42257  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42258
42259  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42260  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42261  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42262
42263  elif test "x$COMPILE_TYPE" = xreduced; then
42264    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
42265      # Specify -m if running reduced on unix platforms
42266
42267  # When we add flags to the "official" CFLAGS etc, we need to
42268  # keep track of these additions in ADDED_CFLAGS etc. These
42269  # will later be checked to make sure only controlled additions
42270  # have been made to CFLAGS etc.
42271  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42272  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42273  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42274
42275  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42276  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42277  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42278
42279  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42280  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42281  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42282
42283    fi
42284  fi
42285
42286  # Make compilation sanity check
42287  for ac_header in stdio.h
42288do :
42289  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
42290if test "x$ac_cv_header_stdio_h" = xyes; then :
42291  cat >>confdefs.h <<_ACEOF
42292#define HAVE_STDIO_H 1
42293_ACEOF
42294
42295else
42296
42297    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
42298$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
42299    if test "x$COMPILE_TYPE" = xreduced; then
42300
42301  # Print a helpful message on how to acquire the necessary build dependency.
42302  # reduced is the help tag: freetype, cups, alsa etc
42303  MISSING_DEPENDENCY=reduced
42304
42305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42306    cygwin_help $MISSING_DEPENDENCY
42307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42308    msys_help $MISSING_DEPENDENCY
42309  else
42310    PKGHANDLER_COMMAND=
42311
42312    case $PKGHANDLER in
42313      apt-get)
42314        apt_help     $MISSING_DEPENDENCY ;;
42315      yum)
42316        yum_help     $MISSING_DEPENDENCY ;;
42317      port)
42318        port_help    $MISSING_DEPENDENCY ;;
42319      pkgutil)
42320        pkgutil_help $MISSING_DEPENDENCY ;;
42321      pkgadd)
42322        pkgadd_help  $MISSING_DEPENDENCY ;;
42323    esac
42324
42325    if test "x$PKGHANDLER_COMMAND" != x; then
42326      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42327    fi
42328  fi
42329
42330      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
42331$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
42332    elif test "x$COMPILE_TYPE" = xcross; then
42333      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42334$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42335    fi
42336    as_fn_error $? "Cannot continue." "$LINENO" 5
42337
42338fi
42339
42340done
42341
42342
42343  # The cast to long int works around a bug in the HP C Compiler
42344# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42345# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42346# This bug is HP SR number 8606223364.
42347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42348$as_echo_n "checking size of int *... " >&6; }
42349if ${ac_cv_sizeof_int_p+:} false; then :
42350  $as_echo_n "(cached) " >&6
42351else
42352  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42353
42354else
42355  if test "$ac_cv_type_int_p" = yes; then
42356     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42358as_fn_error 77 "cannot compute sizeof (int *)
42359See \`config.log' for more details" "$LINENO" 5; }
42360   else
42361     ac_cv_sizeof_int_p=0
42362   fi
42363fi
42364
42365fi
42366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42367$as_echo "$ac_cv_sizeof_int_p" >&6; }
42368
42369
42370
42371cat >>confdefs.h <<_ACEOF
42372#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42373_ACEOF
42374
42375
42376
42377  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42378  if test "x$ac_cv_sizeof_int_p" = x; then
42379    # The test failed, lets stick to the assumed value.
42380    { $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
42381$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42382  else
42383    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42384
42385    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42386      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42387      # Let's try to implicitely set the compilers target architecture and retry the test
42388      { $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
42389$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;}
42390      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
42391$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
42392
42393  # When we add flags to the "official" CFLAGS etc, we need to
42394  # keep track of these additions in ADDED_CFLAGS etc. These
42395  # will later be checked to make sure only controlled additions
42396  # have been made to CFLAGS etc.
42397  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42398  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42399  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42400
42401  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42402  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42403  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42404
42405  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42406  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42407  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42408
42409
42410      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42411      unset ac_cv_sizeof_int_p
42412      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42413      cat >>confdefs.h <<_ACEOF
42414#undef SIZEOF_INT_P
42415_ACEOF
42416
42417      # The cast to long int works around a bug in the HP C Compiler
42418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42420# This bug is HP SR number 8606223364.
42421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42422$as_echo_n "checking size of int *... " >&6; }
42423if ${ac_cv_sizeof_int_p+:} false; then :
42424  $as_echo_n "(cached) " >&6
42425else
42426  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42427
42428else
42429  if test "$ac_cv_type_int_p" = yes; then
42430     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42432as_fn_error 77 "cannot compute sizeof (int *)
42433See \`config.log' for more details" "$LINENO" 5; }
42434   else
42435     ac_cv_sizeof_int_p=0
42436   fi
42437fi
42438
42439fi
42440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42441$as_echo "$ac_cv_sizeof_int_p" >&6; }
42442
42443
42444
42445cat >>confdefs.h <<_ACEOF
42446#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42447_ACEOF
42448
42449
42450
42451      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42452
42453      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42454        { $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
42455$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;}
42456        if test "x$COMPILE_TYPE" = xreduced; then
42457
42458  # Print a helpful message on how to acquire the necessary build dependency.
42459  # reduced is the help tag: freetype, cups, alsa etc
42460  MISSING_DEPENDENCY=reduced
42461
42462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42463    cygwin_help $MISSING_DEPENDENCY
42464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42465    msys_help $MISSING_DEPENDENCY
42466  else
42467    PKGHANDLER_COMMAND=
42468
42469    case $PKGHANDLER in
42470      apt-get)
42471        apt_help     $MISSING_DEPENDENCY ;;
42472      yum)
42473        yum_help     $MISSING_DEPENDENCY ;;
42474      port)
42475        port_help    $MISSING_DEPENDENCY ;;
42476      pkgutil)
42477        pkgutil_help $MISSING_DEPENDENCY ;;
42478      pkgadd)
42479        pkgadd_help  $MISSING_DEPENDENCY ;;
42480    esac
42481
42482    if test "x$PKGHANDLER_COMMAND" != x; then
42483      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42484    fi
42485  fi
42486
42487          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
42488$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
42489        elif test "x$COMPILE_TYPE" = xcross; then
42490          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42491$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42492        fi
42493        as_fn_error $? "Cannot continue." "$LINENO" 5
42494      fi
42495    fi
42496  fi
42497
42498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42499$as_echo_n "checking for target address size... " >&6; }
42500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42501$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42502
42503
42504  ###############################################################################
42505  #
42506  # Is the target little of big endian?
42507  #
42508   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42509$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42510if ${ac_cv_c_bigendian+:} false; then :
42511  $as_echo_n "(cached) " >&6
42512else
42513  ac_cv_c_bigendian=unknown
42514    # See if we're dealing with a universal compiler.
42515    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42516/* end confdefs.h.  */
42517#ifndef __APPLE_CC__
42518	       not a universal capable compiler
42519	     #endif
42520	     typedef int dummy;
42521
42522_ACEOF
42523if ac_fn_cxx_try_compile "$LINENO"; then :
42524
42525	# Check for potential -arch flags.  It is not universal unless
42526	# there are at least two -arch flags with different values.
42527	ac_arch=
42528	ac_prev=
42529	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42530	 if test -n "$ac_prev"; then
42531	   case $ac_word in
42532	     i?86 | x86_64 | ppc | ppc64)
42533	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42534		 ac_arch=$ac_word
42535	       else
42536		 ac_cv_c_bigendian=universal
42537		 break
42538	       fi
42539	       ;;
42540	   esac
42541	   ac_prev=
42542	 elif test "x$ac_word" = "x-arch"; then
42543	   ac_prev=arch
42544	 fi
42545       done
42546fi
42547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42548    if test $ac_cv_c_bigendian = unknown; then
42549      # See if sys/param.h defines the BYTE_ORDER macro.
42550      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42551/* end confdefs.h.  */
42552#include <sys/types.h>
42553	     #include <sys/param.h>
42554
42555int
42556main ()
42557{
42558#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42559		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42560		     && LITTLE_ENDIAN)
42561	      bogus endian macros
42562	     #endif
42563
42564  ;
42565  return 0;
42566}
42567_ACEOF
42568if ac_fn_cxx_try_compile "$LINENO"; then :
42569  # It does; now see whether it defined to BIG_ENDIAN or not.
42570	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42571/* end confdefs.h.  */
42572#include <sys/types.h>
42573		#include <sys/param.h>
42574
42575int
42576main ()
42577{
42578#if BYTE_ORDER != BIG_ENDIAN
42579		 not big endian
42580		#endif
42581
42582  ;
42583  return 0;
42584}
42585_ACEOF
42586if ac_fn_cxx_try_compile "$LINENO"; then :
42587  ac_cv_c_bigendian=yes
42588else
42589  ac_cv_c_bigendian=no
42590fi
42591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42592fi
42593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42594    fi
42595    if test $ac_cv_c_bigendian = unknown; then
42596      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42597      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42598/* end confdefs.h.  */
42599#include <limits.h>
42600
42601int
42602main ()
42603{
42604#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42605	      bogus endian macros
42606	     #endif
42607
42608  ;
42609  return 0;
42610}
42611_ACEOF
42612if ac_fn_cxx_try_compile "$LINENO"; then :
42613  # It does; now see whether it defined to _BIG_ENDIAN or not.
42614	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42615/* end confdefs.h.  */
42616#include <limits.h>
42617
42618int
42619main ()
42620{
42621#ifndef _BIG_ENDIAN
42622		 not big endian
42623		#endif
42624
42625  ;
42626  return 0;
42627}
42628_ACEOF
42629if ac_fn_cxx_try_compile "$LINENO"; then :
42630  ac_cv_c_bigendian=yes
42631else
42632  ac_cv_c_bigendian=no
42633fi
42634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42635fi
42636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42637    fi
42638    if test $ac_cv_c_bigendian = unknown; then
42639      # Compile a test program.
42640      if test "$cross_compiling" = yes; then :
42641  # Try to guess by grepping values from an object file.
42642	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42643/* end confdefs.h.  */
42644short int ascii_mm[] =
42645		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42646		short int ascii_ii[] =
42647		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42648		int use_ascii (int i) {
42649		  return ascii_mm[i] + ascii_ii[i];
42650		}
42651		short int ebcdic_ii[] =
42652		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42653		short int ebcdic_mm[] =
42654		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42655		int use_ebcdic (int i) {
42656		  return ebcdic_mm[i] + ebcdic_ii[i];
42657		}
42658		extern int foo;
42659
42660int
42661main ()
42662{
42663return use_ascii (foo) == use_ebcdic (foo);
42664  ;
42665  return 0;
42666}
42667_ACEOF
42668if ac_fn_cxx_try_compile "$LINENO"; then :
42669  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42670	      ac_cv_c_bigendian=yes
42671	    fi
42672	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42673	      if test "$ac_cv_c_bigendian" = unknown; then
42674		ac_cv_c_bigendian=no
42675	      else
42676		# finding both strings is unlikely to happen, but who knows?
42677		ac_cv_c_bigendian=unknown
42678	      fi
42679	    fi
42680fi
42681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42682else
42683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42684/* end confdefs.h.  */
42685$ac_includes_default
42686int
42687main ()
42688{
42689
42690	     /* Are we little or big endian?  From Harbison&Steele.  */
42691	     union
42692	     {
42693	       long int l;
42694	       char c[sizeof (long int)];
42695	     } u;
42696	     u.l = 1;
42697	     return u.c[sizeof (long int) - 1] == 1;
42698
42699  ;
42700  return 0;
42701}
42702_ACEOF
42703if ac_fn_cxx_try_run "$LINENO"; then :
42704  ac_cv_c_bigendian=no
42705else
42706  ac_cv_c_bigendian=yes
42707fi
42708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42709  conftest.$ac_objext conftest.beam conftest.$ac_ext
42710fi
42711
42712    fi
42713fi
42714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42715$as_echo "$ac_cv_c_bigendian" >&6; }
42716 case $ac_cv_c_bigendian in #(
42717   yes)
42718     ENDIAN="big";; #(
42719   no)
42720     ENDIAN="little" ;; #(
42721   universal)
42722     ENDIAN="universal_endianness"
42723     ;; #(
42724   *)
42725     ENDIAN="unknown" ;;
42726 esac
42727
42728
42729  if test "x$ENDIAN" = xuniversal_endianness; then
42730    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42731  fi
42732  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42733    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
42734  fi
42735
42736
42737# Configure flags for the tools
42738
42739  ###############################################################################
42740  #
42741  # How to compile shared libraries.
42742  #
42743
42744  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42745    PICFLAG="-fPIC"
42746    C_FLAG_REORDER=''
42747    CXX_FLAG_REORDER=''
42748
42749    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42750      # Linking is different on MacOSX
42751      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42752      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42753      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42754      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42755      SET_SHARED_LIBRARY_MAPFILE=''
42756    else
42757      # Default works for linux, might work on other platforms as well.
42758      SHARED_LIBRARY_FLAGS='-shared'
42759      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42760      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42761      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42762      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42763    fi
42764  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42765    PICFLAG=''
42766    C_FLAG_REORDER=''
42767    CXX_FLAG_REORDER=''
42768
42769    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42770      # Linking is different on MacOSX
42771      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42772      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42773      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42774      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42775      SET_SHARED_LIBRARY_MAPFILE=''
42776    else
42777      # Default works for linux, might work on other platforms as well.
42778      SHARED_LIBRARY_FLAGS='-shared'
42779      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42780      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42781      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42782      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42783    fi
42784  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42785    PICFLAG="-KPIC"
42786    C_FLAG_REORDER='-xF'
42787    CXX_FLAG_REORDER='-xF'
42788    SHARED_LIBRARY_FLAGS="-G"
42789    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42790    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42791    SET_SHARED_LIBRARY_NAME=''
42792    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42793  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42794    PICFLAG="-qpic=large"
42795    C_FLAG_REORDER=''
42796    CXX_FLAG_REORDER=''
42797    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42798    SET_EXECUTABLE_ORIGIN=""
42799    SET_SHARED_LIBRARY_ORIGIN=''
42800    SET_SHARED_LIBRARY_NAME=''
42801    SET_SHARED_LIBRARY_MAPFILE=''
42802  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42803    PICFLAG=""
42804    C_FLAG_REORDER=''
42805    CXX_FLAG_REORDER=''
42806    SHARED_LIBRARY_FLAGS="-LD"
42807    SET_EXECUTABLE_ORIGIN=''
42808    SET_SHARED_LIBRARY_ORIGIN=''
42809    SET_SHARED_LIBRARY_NAME=''
42810    SET_SHARED_LIBRARY_MAPFILE=''
42811  fi
42812
42813
42814
42815
42816
42817
42818
42819
42820  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42821    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42822    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42823    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42824  fi
42825  # The (cross) compiler is now configured, we can now test capabilities
42826  # of the target platform.
42827
42828
42829
42830  ###############################################################################
42831  #
42832  # Setup the opt flags for different compilers
42833  # and different operating systems.
42834  #
42835
42836  # FIXME: this was indirectly the old default, but just inherited.
42837  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42838  #   C_FLAG_DEPS="-MMD -MF"
42839  # fi
42840
42841  # Generate make dependency files
42842  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42843    C_FLAG_DEPS="-MMD -MF"
42844  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42845    C_FLAG_DEPS="-MMD -MF"
42846  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42847    C_FLAG_DEPS="-xMMD -xMF"
42848  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42849    C_FLAG_DEPS="-qmakedep=gcc -MF"
42850  fi
42851  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42852
42853
42854
42855  # Debug symbols
42856  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42857    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42858      # reduce from default "-g2" option to save space
42859      CFLAGS_DEBUG_SYMBOLS="-g1"
42860      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42861    else
42862      CFLAGS_DEBUG_SYMBOLS="-g"
42863      CXXFLAGS_DEBUG_SYMBOLS="-g"
42864    fi
42865  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42866    CFLAGS_DEBUG_SYMBOLS="-g"
42867    CXXFLAGS_DEBUG_SYMBOLS="-g"
42868  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42869    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42870    # FIXME: likely a bug, this disables debug symbols rather than enables them
42871    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42872  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42873    CFLAGS_DEBUG_SYMBOLS="-g"
42874    CXXFLAGS_DEBUG_SYMBOLS="-g"
42875  fi
42876
42877
42878
42879  # bounds, memory and behavior checking options
42880  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42881    case $DEBUG_LEVEL in
42882    release )
42883      # no adjustment
42884      ;;
42885    fastdebug )
42886      # no adjustment
42887      ;;
42888    slowdebug )
42889      # Add runtime stack smashing and undefined behavior checks.
42890      # Not all versions of gcc support -fstack-protector
42891      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42892
42893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42894$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42895  supports=yes
42896
42897  saved_cflags="$CFLAGS"
42898  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42899  ac_ext=c
42900ac_cpp='$CPP $CPPFLAGS'
42901ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42902ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42903ac_compiler_gnu=$ac_cv_c_compiler_gnu
42904
42905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42906/* end confdefs.h.  */
42907int i;
42908_ACEOF
42909if ac_fn_c_try_compile "$LINENO"; then :
42910
42911else
42912  supports=no
42913fi
42914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42915  ac_ext=cpp
42916ac_cpp='$CXXCPP $CPPFLAGS'
42917ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42918ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42919ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42920
42921  CFLAGS="$saved_cflags"
42922
42923  saved_cxxflags="$CXXFLAGS"
42924  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42925  ac_ext=cpp
42926ac_cpp='$CXXCPP $CPPFLAGS'
42927ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42928ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42929ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42930
42931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42932/* end confdefs.h.  */
42933int i;
42934_ACEOF
42935if ac_fn_cxx_try_compile "$LINENO"; then :
42936
42937else
42938  supports=no
42939fi
42940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42941  ac_ext=cpp
42942ac_cpp='$CXXCPP $CPPFLAGS'
42943ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42944ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42945ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42946
42947  CXXFLAGS="$saved_cxxflags"
42948
42949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42950$as_echo "$supports" >&6; }
42951  if test "x$supports" = "xyes" ; then
42952    :
42953  else
42954    STACK_PROTECTOR_CFLAG=""
42955  fi
42956
42957
42958      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42959      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42960      ;;
42961    esac
42962  fi
42963
42964  # Optimization levels
42965  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42966    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42967
42968    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42969      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42970      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42971      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42972      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42973      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42974      C_O_FLAG_NONE="-xregs=no%frameptr"
42975      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42976      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42977      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42978      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42979      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42980      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42981        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42982        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42983      fi
42984    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42985      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42986      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42987      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42988      C_O_FLAG_DEBUG=""
42989      C_O_FLAG_NONE=""
42990      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42991      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42992      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42993      C_O_FLAG_DEBUG=""
42994      CXX_O_FLAG_NONE=""
42995    fi
42996  else
42997    # The remaining toolchains share opt flags between CC and CXX;
42998    # setup for C and duplicate afterwards.
42999    if test "x$TOOLCHAIN_TYPE" = xgcc; then
43000      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43001        # On MacOSX we optimize for size, something
43002        # we should do for all platforms?
43003        C_O_FLAG_HIGHEST="-Os"
43004        C_O_FLAG_HI="-Os"
43005        C_O_FLAG_NORM="-Os"
43006      else
43007        C_O_FLAG_HIGHEST="-O3"
43008        C_O_FLAG_HI="-O3"
43009        C_O_FLAG_NORM="-O2"
43010      fi
43011      C_O_FLAG_DEBUG="-O0"
43012      C_O_FLAG_NONE="-O0"
43013    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43014      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43015        # On MacOSX we optimize for size, something
43016        # we should do for all platforms?
43017        C_O_FLAG_HIGHEST="-Os"
43018        C_O_FLAG_HI="-Os"
43019        C_O_FLAG_NORM="-Os"
43020      else
43021        C_O_FLAG_HIGHEST="-O3"
43022        C_O_FLAG_HI="-O3"
43023        C_O_FLAG_NORM="-O2"
43024      fi
43025      C_O_FLAG_DEBUG="-O0"
43026      C_O_FLAG_NONE="-O0"
43027    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43028      C_O_FLAG_HIGHEST="-O3"
43029      C_O_FLAG_HI="-O3 -qstrict"
43030      C_O_FLAG_NORM="-O2"
43031      C_O_FLAG_DEBUG="-qnoopt"
43032      C_O_FLAG_NONE="-qnoop"
43033    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43034      C_O_FLAG_HIGHEST="-O2"
43035      C_O_FLAG_HI="-O1"
43036      C_O_FLAG_NORM="-O1"
43037      C_O_FLAG_DEBUG="-Od"
43038      C_O_FLAG_NONE="-Od"
43039    fi
43040    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
43041    CXX_O_FLAG_HI="$C_O_FLAG_HI"
43042    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
43043    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
43044    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
43045  fi
43046
43047  # Adjust optimization flags according to debug level.
43048  case $DEBUG_LEVEL in
43049    release )
43050      # no adjustment
43051      ;;
43052    fastdebug )
43053      # Not quite so much optimization
43054      C_O_FLAG_HI="$C_O_FLAG_NORM"
43055      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
43056      ;;
43057    slowdebug )
43058      # Disable optimization
43059      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
43060      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
43061      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
43062      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
43063      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
43064      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
43065      ;;
43066  esac
43067
43068
43069
43070
43071
43072
43073
43074
43075
43076
43077
43078
43079
43080  # Special extras...
43081  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43082    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
43083      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
43084      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
43085    fi
43086    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
43087    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
43088  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43089    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
43090    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
43091  fi
43092
43093  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
43094  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
43095  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
43096
43097  ###############################################################################
43098  #
43099  # Now setup the CFLAGS and LDFLAGS for the JDK build.
43100  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
43101  #
43102
43103  # Setup compiler/platform specific flags into
43104  #    CFLAGS_JDK    - C Compiler flags
43105  #    CXXFLAGS_JDK  - C++ Compiler flags
43106  #    COMMON_CCXXFLAGS_JDK - common to C and C++
43107  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43108    if test "x$OPENJDK_TARGET_CPU" = xx86; then
43109      # Force compatibility with i586 on 32 bit intel platforms.
43110      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
43111    fi
43112    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
43113        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
43114    case $OPENJDK_TARGET_CPU_ARCH in
43115      arm )
43116        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43117        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43118        ;;
43119      ppc )
43120        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43121        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43122        ;;
43123      * )
43124        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
43125        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43126        ;;
43127    esac
43128  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43129    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
43130    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
43131      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
43132    fi
43133
43134    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
43135    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
43136  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43137    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43138    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43139  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43140    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
43141        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
43142        -DWIN32_LEAN_AND_MEAN \
43143        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
43144        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
43145        -DWIN32 -DIAL"
43146    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43147      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
43148    else
43149      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
43150    fi
43151    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
43152    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
43153    # studio.
43154    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
43155      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43156          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
43157    fi
43158  fi
43159
43160  ###############################################################################
43161
43162  # Adjust flags according to debug level.
43163  case $DEBUG_LEVEL in
43164    fastdebug | slowdebug )
43165      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
43166      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
43167      JAVAC_FLAGS="$JAVAC_FLAGS -g"
43168      ;;
43169    release )
43170      ;;
43171    * )
43172      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43173      ;;
43174  esac
43175
43176  # Setup LP64
43177  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
43178
43179  # Set some common defines. These works for all compilers, but assume
43180  # -D is universally accepted.
43181
43182  # Setup endianness
43183  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
43184    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
43185    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
43186    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
43187    #   Note: -Dmacro         is the same as    #define macro 1
43188    #         -Dmacro=        is the same as    #define macro
43189    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43190      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
43191    else
43192      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
43193    fi
43194  else
43195    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
43196    # are defined in the system?
43197    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43198      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
43199    else
43200      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
43201    fi
43202  fi
43203
43204  # Setup target OS define. Use OS target name but in upper case.
43205  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
43206  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
43207
43208  # Setup target CPU
43209  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
43210
43211  # Setup debug/release defines
43212  if test "x$DEBUG_LEVEL" = xrelease; then
43213    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
43214    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43215      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
43216    fi
43217  else
43218    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
43219  fi
43220
43221  # Setup release name
43222  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
43223
43224
43225  # Set some additional per-OS defines.
43226  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43227    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
43228  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43229    # FIXME: PPC64 should not be here.
43230    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
43231  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
43232    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
43233  fi
43234
43235  # Additional macosx handling
43236  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43237    # Setting these parameters makes it an error to link to macosx APIs that are
43238    # newer than the given OS version and makes the linked binaries compatible
43239    # even if built on a newer version of the OS.
43240    # The expected format is X.Y.Z
43241    MACOSX_VERSION_MIN=10.7.0
43242
43243
43244    # The macro takes the version with no dots, ex: 1070
43245    # Let the flags variables get resolved in make for easier override on make
43246    # command line.
43247    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43248    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43249  fi
43250
43251  # Setup some hard coded includes
43252  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43253      -I${JDK_TOPDIR}/src/java.base/share/native/include \
43254      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
43255      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
43256
43257  # The shared libraries are compiled using the picflag.
43258  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43259  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43260
43261  # Executable flags
43262  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43263  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43264
43265
43266
43267
43268
43269
43270  # Flags for compiling test libraries
43271  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43272  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43273
43274  # Flags for compiling test executables
43275  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43276  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43277
43278
43279
43280
43281
43282
43283  # Setup LDFLAGS et al.
43284  #
43285
43286  # Now this is odd. The JDK native libraries have to link against libjvm.so
43287  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
43288  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
43289  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
43290  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
43291  # libraries will link to whatever is in memory. Yuck.
43292  #
43293  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
43294  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43295    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
43296    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
43297      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
43298    fi
43299    # TODO: make -debug optional "--disable-full-debug-symbols"
43300    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
43301  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43302    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43303    # We have previously set HAS_GNU_HASH if this is the case
43304    if test -n "$HAS_GNU_HASH"; then
43305      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
43306    fi
43307    if test "x$OPENJDK_TARGET_OS" = xlinux; then
43308      # And since we now know that the linker is gnu, then add -z defs, to forbid
43309      # undefined symbols in object files.
43310      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
43311      case $DEBUG_LEVEL in
43312        release )
43313          # tell linker to optimize libraries.
43314          # Should this be supplied to the OSS linker as well?
43315          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
43316          ;;
43317        slowdebug )
43318          if test "x$HAS_LINKER_NOW" = "xtrue"; then
43319            # do relocations at load
43320            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
43321            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
43322          fi
43323          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43324            # mark relocations read only
43325            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43326            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43327          fi
43328          ;;
43329        fastdebug )
43330          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43331            # mark relocations read only
43332            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43333            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43334          fi
43335          ;;
43336        * )
43337          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43338          ;;
43339        esac
43340    fi
43341  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43342    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
43343    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
43344  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43345    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
43346  fi
43347
43348  # Customize LDFLAGS for executables
43349
43350  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
43351
43352  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43353    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
43354      LDFLAGS_STACK_SIZE=1048576
43355    else
43356      LDFLAGS_STACK_SIZE=327680
43357    fi
43358    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
43359  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
43360    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
43361  fi
43362
43363  # Customize LDFLAGS for libs
43364  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
43365
43366  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43367    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
43368    JDKLIB_LIBS=""
43369  else
43370    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
43371        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
43372
43373    # On some platforms (mac) the linker warns about non existing -L dirs.
43374    # Add server first if available. Linking aginst client does not always produce the same results.
43375    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
43376    # Default to server for other variants.
43377    if test "x$JVM_VARIANT_SERVER" = xtrue; then
43378      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43379    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
43380      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
43381    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
43382      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
43383    else
43384      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43385    fi
43386
43387    JDKLIB_LIBS="-ljava -ljvm"
43388    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43389      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
43390    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43391      JDKLIB_LIBS="$JDKLIB_LIBS -liconv"
43392    fi
43393  fi
43394
43395
43396
43397
43398
43399
43400
43401  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
43402  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
43403
43404
43405
43406
43407
43408  # Some Zero and Shark settings.
43409  # ZERO_ARCHFLAG tells the compiler which mode to build for
43410  case "${OPENJDK_TARGET_CPU}" in
43411    s390)
43412      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43413      ;;
43414    *)
43415      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43416  esac
43417
43418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43419$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43420  supports=yes
43421
43422  saved_cflags="$CFLAGS"
43423  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43424  ac_ext=c
43425ac_cpp='$CPP $CPPFLAGS'
43426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43428ac_compiler_gnu=$ac_cv_c_compiler_gnu
43429
43430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43431/* end confdefs.h.  */
43432int i;
43433_ACEOF
43434if ac_fn_c_try_compile "$LINENO"; then :
43435
43436else
43437  supports=no
43438fi
43439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43440  ac_ext=cpp
43441ac_cpp='$CXXCPP $CPPFLAGS'
43442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43445
43446  CFLAGS="$saved_cflags"
43447
43448  saved_cxxflags="$CXXFLAGS"
43449  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43450  ac_ext=cpp
43451ac_cpp='$CXXCPP $CPPFLAGS'
43452ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43453ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43454ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43455
43456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43457/* end confdefs.h.  */
43458int i;
43459_ACEOF
43460if ac_fn_cxx_try_compile "$LINENO"; then :
43461
43462else
43463  supports=no
43464fi
43465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43466  ac_ext=cpp
43467ac_cpp='$CXXCPP $CPPFLAGS'
43468ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43469ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43470ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43471
43472  CXXFLAGS="$saved_cxxflags"
43473
43474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43475$as_echo "$supports" >&6; }
43476  if test "x$supports" = "xyes" ; then
43477    :
43478  else
43479    ZERO_ARCHFLAG=""
43480  fi
43481
43482
43483
43484  # Check that the compiler supports -mX (or -qX on AIX) flags
43485  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43486
43487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43488$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43489  supports=yes
43490
43491  saved_cflags="$CFLAGS"
43492  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43493  ac_ext=c
43494ac_cpp='$CPP $CPPFLAGS'
43495ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43496ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43497ac_compiler_gnu=$ac_cv_c_compiler_gnu
43498
43499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43500/* end confdefs.h.  */
43501int i;
43502_ACEOF
43503if ac_fn_c_try_compile "$LINENO"; then :
43504
43505else
43506  supports=no
43507fi
43508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43509  ac_ext=cpp
43510ac_cpp='$CXXCPP $CPPFLAGS'
43511ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43512ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43513ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43514
43515  CFLAGS="$saved_cflags"
43516
43517  saved_cxxflags="$CXXFLAGS"
43518  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43519  ac_ext=cpp
43520ac_cpp='$CXXCPP $CPPFLAGS'
43521ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43522ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43523ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43524
43525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43526/* end confdefs.h.  */
43527int i;
43528_ACEOF
43529if ac_fn_cxx_try_compile "$LINENO"; then :
43530
43531else
43532  supports=no
43533fi
43534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43535  ac_ext=cpp
43536ac_cpp='$CXXCPP $CPPFLAGS'
43537ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43538ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43539ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43540
43541  CXXFLAGS="$saved_cxxflags"
43542
43543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43544$as_echo "$supports" >&6; }
43545  if test "x$supports" = "xyes" ; then
43546    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43547  else
43548    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43549  fi
43550
43551
43552
43553  # Check whether --enable-warnings-as-errors was given.
43554if test "${enable_warnings_as_errors+set}" = set; then :
43555  enableval=$enable_warnings_as_errors;
43556fi
43557
43558
43559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
43560$as_echo_n "checking if native warnings are errors... " >&6; }
43561  if test "x$enable_warnings_as_errors" = "xyes"; then
43562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
43563$as_echo "yes (explicitely set)" >&6; }
43564    WARNINGS_AS_ERRORS=true
43565  elif test "x$enable_warnings_as_errors" = "xno"; then
43566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43567$as_echo "no" >&6; }
43568    WARNINGS_AS_ERRORS=false
43569  elif test "x$enable_warnings_as_errors" = "x"; then
43570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43571$as_echo "yes (default)" >&6; }
43572    WARNINGS_AS_ERRORS=true
43573  else
43574    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43575  fi
43576
43577
43578  case "${TOOLCHAIN_TYPE}" in
43579    microsoft)
43580      DISABLE_WARNING_PREFIX="-wd"
43581      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43582      ;;
43583    solstudio)
43584      DISABLE_WARNING_PREFIX="-erroff="
43585      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43586      ;;
43587    gcc)
43588      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43589
43590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43591$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43592  supports=yes
43593
43594  saved_cflags="$CFLAGS"
43595  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43596  ac_ext=c
43597ac_cpp='$CPP $CPPFLAGS'
43598ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43599ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43600ac_compiler_gnu=$ac_cv_c_compiler_gnu
43601
43602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43603/* end confdefs.h.  */
43604int i;
43605_ACEOF
43606if ac_fn_c_try_compile "$LINENO"; then :
43607
43608else
43609  supports=no
43610fi
43611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43612  ac_ext=cpp
43613ac_cpp='$CXXCPP $CPPFLAGS'
43614ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43615ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43616ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43617
43618  CFLAGS="$saved_cflags"
43619
43620  saved_cxxflags="$CXXFLAGS"
43621  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43622  ac_ext=cpp
43623ac_cpp='$CXXCPP $CPPFLAGS'
43624ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43625ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43626ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43627
43628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43629/* end confdefs.h.  */
43630int i;
43631_ACEOF
43632if ac_fn_cxx_try_compile "$LINENO"; then :
43633
43634else
43635  supports=no
43636fi
43637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43638  ac_ext=cpp
43639ac_cpp='$CXXCPP $CPPFLAGS'
43640ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43641ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43642ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43643
43644  CXXFLAGS="$saved_cxxflags"
43645
43646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43647$as_echo "$supports" >&6; }
43648  if test "x$supports" = "xyes" ; then
43649    GCC_CAN_DISABLE_WARNINGS=true
43650  else
43651    GCC_CAN_DISABLE_WARNINGS=false
43652
43653  fi
43654
43655      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43656        DISABLE_WARNING_PREFIX="-Wno-"
43657      else
43658        DISABLE_WARNING_PREFIX=
43659      fi
43660      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43661      ;;
43662    clang)
43663      DISABLE_WARNING_PREFIX="-Wno-"
43664      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43665      ;;
43666  esac
43667
43668
43669
43670
43671# Setup debug symbols (need objcopy from the toolchain for that)
43672
43673  #
43674  # ENABLE_DEBUG_SYMBOLS
43675  # This must be done after the toolchain is setup, since we're looking at objcopy.
43676  #
43677  # Check whether --enable-debug-symbols was given.
43678if test "${enable_debug_symbols+set}" = set; then :
43679  enableval=$enable_debug_symbols;
43680fi
43681
43682
43683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43684$as_echo_n "checking if we should generate debug symbols... " >&6; }
43685
43686  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43687    # explicit enabling of enable-debug-symbols and can't find objcopy
43688    #   this is an error
43689    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43690  fi
43691
43692  if test "x$enable_debug_symbols" = "xyes"; then
43693    ENABLE_DEBUG_SYMBOLS=true
43694  elif test "x$enable_debug_symbols" = "xno"; then
43695    ENABLE_DEBUG_SYMBOLS=false
43696  else
43697    # Default is on if objcopy is found
43698    if test "x$OBJCOPY" != x; then
43699      ENABLE_DEBUG_SYMBOLS=true
43700    # MacOS X and Windows don't use objcopy but default is on for those OSes
43701    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43702      ENABLE_DEBUG_SYMBOLS=true
43703    else
43704      ENABLE_DEBUG_SYMBOLS=false
43705    fi
43706  fi
43707
43708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43709$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43710
43711  #
43712  # ZIP_DEBUGINFO_FILES
43713  #
43714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43715$as_echo_n "checking if we should zip debug-info files... " >&6; }
43716  # Check whether --enable-zip-debug-info was given.
43717if test "${enable_zip_debug_info+set}" = set; then :
43718  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43719else
43720  enable_zip_debug_info="yes"
43721fi
43722
43723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43724$as_echo "${enable_zip_debug_info}" >&6; }
43725
43726  if test "x${enable_zip_debug_info}" = "xno"; then
43727    ZIP_DEBUGINFO_FILES=false
43728  else
43729    ZIP_DEBUGINFO_FILES=true
43730  fi
43731
43732
43733
43734
43735
43736  # Check whether --enable-native-coverage was given.
43737if test "${enable_native_coverage+set}" = set; then :
43738  enableval=$enable_native_coverage;
43739fi
43740
43741  GCOV_ENABLED="false"
43742  if test "x$enable_native_coverage" = "xyes"; then
43743    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43744      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43745$as_echo_n "checking if native coverage is enabled... " >&6; }
43746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43747$as_echo "yes" >&6; }
43748      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43749      GCOV_LDFLAGS="-fprofile-arcs"
43750      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43751      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43752      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43753      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43754      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43755      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43756      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43757      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43758      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43759      GCOV_ENABLED="true"
43760    else
43761      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43762    fi
43763  elif test "x$enable_native_coverage" = "xno"; then
43764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43765$as_echo_n "checking if native coverage is enabled... " >&6; }
43766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43767$as_echo "no" >&6; }
43768  elif test "x$enable_native_coverage" != "x"; then
43769    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43770  fi
43771
43772
43773
43774
43775###############################################################################
43776#
43777# Check dependencies for external and internal libraries.
43778#
43779###############################################################################
43780
43781# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43782
43783  # When using cygwin or msys, we need a wrapper binary that renames
43784  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43785  # @files and rewrites these too! This wrapper binary is
43786  # called fixpath.
43787  FIXPATH=
43788  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43790$as_echo_n "checking if fixpath can be created... " >&6; }
43791    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43792    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43793    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43794    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43795      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43796      FIXPATH="$FIXPATH_BIN -c"
43797    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43798      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43799      # @ was chosen as separator to minimize risk of other tools messing around with it
43800      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43801          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43802      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43803      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43804    fi
43805    FIXPATH_SRC_W="$FIXPATH_SRC"
43806    FIXPATH_BIN_W="$FIXPATH_BIN"
43807
43808  unix_path="$FIXPATH_SRC_W"
43809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43810    windows_path=`$CYGPATH -m "$unix_path"`
43811    FIXPATH_SRC_W="$windows_path"
43812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43813    windows_path=`cmd //c echo $unix_path`
43814    FIXPATH_SRC_W="$windows_path"
43815  fi
43816
43817
43818  unix_path="$FIXPATH_BIN_W"
43819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43820    windows_path=`$CYGPATH -m "$unix_path"`
43821    FIXPATH_BIN_W="$windows_path"
43822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43823    windows_path=`cmd //c echo $unix_path`
43824    FIXPATH_BIN_W="$windows_path"
43825  fi
43826
43827    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43828    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43829    cd $FIXPATH_DIR
43830    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43831    cd $CURDIR
43832
43833    if test ! -x $FIXPATH_BIN; then
43834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43835$as_echo "no" >&6; }
43836      cat $FIXPATH_DIR/fixpath1.log
43837      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43838    fi
43839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43840$as_echo "yes" >&6; }
43841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43842$as_echo_n "checking if fixpath.exe works... " >&6; }
43843    cd $FIXPATH_DIR
43844    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43845        > $FIXPATH_DIR/fixpath2.log 2>&1
43846    cd $CURDIR
43847    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43849$as_echo "no" >&6; }
43850      cat $FIXPATH_DIR/fixpath2.log
43851      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43852    fi
43853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43854$as_echo "yes" >&6; }
43855  fi
43856
43857
43858
43859
43860
43861  # Check if X11 is needed
43862  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
43863    # No X11 support on windows or macosx
43864    NEEDS_LIB_X11=false
43865  else
43866    if test "x$SUPPORT_HEADFUL" = xno; then
43867      # No X11 support if building headless-only
43868      NEEDS_LIB_X11=false
43869    else
43870      # All other instances need X11
43871      NEEDS_LIB_X11=true
43872    fi
43873  fi
43874
43875  # Check if cups is needed
43876  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43877    # Windows have a separate print system
43878    NEEDS_LIB_CUPS=false
43879  else
43880    NEEDS_LIB_CUPS=true
43881  fi
43882
43883  # Check if freetype is needed
43884  if test "x$OPENJDK" = "xtrue"; then
43885    NEEDS_LIB_FREETYPE=true
43886  else
43887    NEEDS_LIB_FREETYPE=false
43888  fi
43889
43890  # Check if alsa is needed
43891  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43892    NEEDS_LIB_ALSA=true
43893  else
43894    NEEDS_LIB_ALSA=false
43895  fi
43896
43897  # Check if ffi is needed
43898  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
43899    NEEDS_LIB_FFI=true
43900  else
43901    NEEDS_LIB_FFI=false
43902  fi
43903
43904
43905  # statically link libstdc++ before C++ ABI is stablized on Linux unless
43906  # dynamic build is configured on command line.
43907
43908# Check whether --with-stdc++lib was given.
43909if test "${with_stdc__lib+set}" = set; then :
43910  withval=$with_stdc__lib;
43911        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
43912                && test "x$with_stdc__lib" != xdefault; then
43913          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
43914        fi
43915
43916else
43917  with_stdc__lib=default
43918
43919fi
43920
43921
43922  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43923    # Test if -lstdc++ works.
43924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
43925$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
43926    ac_ext=cpp
43927ac_cpp='$CXXCPP $CPPFLAGS'
43928ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43929ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43930ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43931
43932    OLD_CXXFLAGS="$CXXFLAGS"
43933    CXXFLAGS="$CXXFLAGS -lstdc++"
43934    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43935/* end confdefs.h.  */
43936
43937int
43938main ()
43939{
43940return 0;
43941  ;
43942  return 0;
43943}
43944_ACEOF
43945if ac_fn_cxx_try_link "$LINENO"; then :
43946  has_dynamic_libstdcxx=yes
43947else
43948  has_dynamic_libstdcxx=no
43949fi
43950rm -f core conftest.err conftest.$ac_objext \
43951    conftest$ac_exeext conftest.$ac_ext
43952    CXXFLAGS="$OLD_CXXFLAGS"
43953    ac_ext=cpp
43954ac_cpp='$CXXCPP $CPPFLAGS'
43955ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43956ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43957ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43958
43959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
43960$as_echo "$has_dynamic_libstdcxx" >&6; }
43961
43962    # Test if stdc++ can be linked statically.
43963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
43964$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
43965    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
43966    ac_ext=cpp
43967ac_cpp='$CXXCPP $CPPFLAGS'
43968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43971
43972    OLD_LIBS="$LIBS"
43973    OLD_CXX="$CXX"
43974    LIBS="$STATIC_STDCXX_FLAGS"
43975    CXX="$CC"
43976    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43977/* end confdefs.h.  */
43978
43979int
43980main ()
43981{
43982return 0;
43983  ;
43984  return 0;
43985}
43986_ACEOF
43987if ac_fn_cxx_try_link "$LINENO"; then :
43988  has_static_libstdcxx=yes
43989else
43990  has_static_libstdcxx=no
43991fi
43992rm -f core conftest.err conftest.$ac_objext \
43993    conftest$ac_exeext conftest.$ac_ext
43994    LIBS="$OLD_LIBS"
43995    CXX="$OLD_CXX"
43996    ac_ext=cpp
43997ac_cpp='$CXXCPP $CPPFLAGS'
43998ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43999ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44000ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44001
44002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
44003$as_echo "$has_static_libstdcxx" >&6; }
44004
44005    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
44006      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
44007    fi
44008
44009    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
44010      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
44011    fi
44012
44013    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
44014      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
44015    fi
44016
44017    # If dynamic was requested, it's available since it would fail above otherwise.
44018    # If dynamic wasn't requested, go with static unless it isn't available.
44019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
44020$as_echo_n "checking how to link with libstdc++... " >&6; }
44021    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
44022      LIBCXX="$LIBCXX -lstdc++"
44023      LDCXX="$CXX"
44024      STATIC_CXX_SETTING="STATIC_CXX=false"
44025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
44026$as_echo "dynamic" >&6; }
44027    else
44028      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
44029      LDCXX="$CC"
44030      STATIC_CXX_SETTING="STATIC_CXX=true"
44031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
44032$as_echo "static" >&6; }
44033    fi
44034  fi
44035
44036
44037  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
44038  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
44039    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
44040  fi
44041
44042  # TODO better (platform agnostic) test
44043  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
44044    LIBCXX="-lstdc++"
44045  fi
44046
44047
44048  # Setup Windows runtime dlls
44049  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
44050
44051
44052# Check whether --with-msvcr-dll was given.
44053if test "${with_msvcr_dll+set}" = set; then :
44054  withval=$with_msvcr_dll;
44055fi
44056
44057
44058  if test "x$with_msvcr_dll" != x; then
44059    # If given explicitely by user, do not probe. If not present, fail directly.
44060
44061  DLL_NAME="$MSVCR_NAME"
44062  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
44063  METHOD="--with-msvcr-dll"
44064  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44065    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44066$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44067
44068    # Need to check if the found msvcr is correct architecture
44069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44070$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44071    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44073      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44074      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44075      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44076        CORRECT_MSVCR_ARCH="PE32 executable"
44077      else
44078        CORRECT_MSVCR_ARCH="PE32+ executable"
44079      fi
44080    else
44081      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44082        CORRECT_MSVCR_ARCH=386
44083      else
44084        CORRECT_MSVCR_ARCH=x86-64
44085      fi
44086    fi
44087    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44088      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44089$as_echo "ok" >&6; }
44090      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44091
44092  # Only process if variable expands to non-empty
44093
44094  if test "x$MSVC_DLL" != x; then
44095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44096
44097  # Input might be given as Windows format, start by converting to
44098  # unix format.
44099  path="$MSVC_DLL"
44100  new_path=`$CYGPATH -u "$path"`
44101
44102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44105  # "foo.exe" is OK but "foo" is an error.
44106  #
44107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44108  # It is also a way to make sure we got the proper file name for the real test later on.
44109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44110  if test "x$test_shortpath" = x; then
44111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44112$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44113    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44114  fi
44115
44116  # Call helper function which possibly converts this using DOS-style short mode.
44117  # If so, the updated path is stored in $new_path.
44118
44119  input_path="$new_path"
44120  # Check if we need to convert this using DOS-style short mode. If the path
44121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44122  # take no chances and rewrite it.
44123  # Note: m4 eats our [], so we need to use [ and ] instead.
44124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44125  if test "x$has_forbidden_chars" != x; then
44126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44130      # Going to short mode and back again did indeed matter. Since short mode is
44131      # case insensitive, let's make it lowercase to improve readability.
44132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44133      # Now convert it back to Unix-style (cygpath)
44134      input_path=`$CYGPATH -u "$shortmode_path"`
44135      new_path="$input_path"
44136    fi
44137  fi
44138
44139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44140  if test "x$test_cygdrive_prefix" = x; then
44141    # As a simple fix, exclude /usr/bin since it's not a real path.
44142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44144      # a path prefixed by /cygdrive for fixpath to work.
44145      new_path="$CYGWIN_ROOT_PATH$input_path"
44146    fi
44147  fi
44148
44149
44150  if test "x$path" != "x$new_path"; then
44151    MSVC_DLL="$new_path"
44152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44153$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44154  fi
44155
44156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44157
44158  path="$MSVC_DLL"
44159  has_colon=`$ECHO $path | $GREP ^.:`
44160  new_path="$path"
44161  if test "x$has_colon" = x; then
44162    # Not in mixed or Windows style, start by that.
44163    new_path=`cmd //c echo $path`
44164  fi
44165
44166
44167  input_path="$new_path"
44168  # Check if we need to convert this using DOS-style short mode. If the path
44169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44170  # take no chances and rewrite it.
44171  # Note: m4 eats our [], so we need to use [ and ] instead.
44172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44173  if test "x$has_forbidden_chars" != x; then
44174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44176  fi
44177
44178
44179  windows_path="$new_path"
44180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44181    unix_path=`$CYGPATH -u "$windows_path"`
44182    new_path="$unix_path"
44183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44185    new_path="$unix_path"
44186  fi
44187
44188  if test "x$path" != "x$new_path"; then
44189    MSVC_DLL="$new_path"
44190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44191$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44192  fi
44193
44194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44196
44197    else
44198      # We're on a unix platform. Hooray! :)
44199      path="$MSVC_DLL"
44200      has_space=`$ECHO "$path" | $GREP " "`
44201      if test "x$has_space" != x; then
44202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44203$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44205      fi
44206
44207      # Use eval to expand a potential ~
44208      eval path="$path"
44209      if test ! -f "$path" && test ! -d "$path"; then
44210        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44211      fi
44212
44213      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44214    fi
44215  fi
44216
44217      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44218$as_echo_n "checking for $DLL_NAME... " >&6; }
44219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44220$as_echo "$MSVC_DLL" >&6; }
44221    else
44222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44223$as_echo "incorrect, ignoring" >&6; }
44224      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44225$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44226    fi
44227  fi
44228
44229    if test "x$MSVC_DLL" = x; then
44230      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
44231    fi
44232    MSVCR_DLL="$MSVC_DLL"
44233  elif test "x$DEVKIT_MSVCR_DLL" != x; then
44234
44235  DLL_NAME="$MSVCR_NAME"
44236  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
44237  METHOD="devkit"
44238  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44239    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44240$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44241
44242    # Need to check if the found msvcr is correct architecture
44243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44244$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44245    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44247      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44248      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44249      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44250        CORRECT_MSVCR_ARCH="PE32 executable"
44251      else
44252        CORRECT_MSVCR_ARCH="PE32+ executable"
44253      fi
44254    else
44255      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44256        CORRECT_MSVCR_ARCH=386
44257      else
44258        CORRECT_MSVCR_ARCH=x86-64
44259      fi
44260    fi
44261    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44263$as_echo "ok" >&6; }
44264      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44265
44266  # Only process if variable expands to non-empty
44267
44268  if test "x$MSVC_DLL" != x; then
44269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44270
44271  # Input might be given as Windows format, start by converting to
44272  # unix format.
44273  path="$MSVC_DLL"
44274  new_path=`$CYGPATH -u "$path"`
44275
44276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44279  # "foo.exe" is OK but "foo" is an error.
44280  #
44281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44282  # It is also a way to make sure we got the proper file name for the real test later on.
44283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44284  if test "x$test_shortpath" = x; then
44285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44286$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44287    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44288  fi
44289
44290  # Call helper function which possibly converts this using DOS-style short mode.
44291  # If so, the updated path is stored in $new_path.
44292
44293  input_path="$new_path"
44294  # Check if we need to convert this using DOS-style short mode. If the path
44295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44296  # take no chances and rewrite it.
44297  # Note: m4 eats our [], so we need to use [ and ] instead.
44298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44299  if test "x$has_forbidden_chars" != x; then
44300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44304      # Going to short mode and back again did indeed matter. Since short mode is
44305      # case insensitive, let's make it lowercase to improve readability.
44306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44307      # Now convert it back to Unix-style (cygpath)
44308      input_path=`$CYGPATH -u "$shortmode_path"`
44309      new_path="$input_path"
44310    fi
44311  fi
44312
44313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44314  if test "x$test_cygdrive_prefix" = x; then
44315    # As a simple fix, exclude /usr/bin since it's not a real path.
44316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44318      # a path prefixed by /cygdrive for fixpath to work.
44319      new_path="$CYGWIN_ROOT_PATH$input_path"
44320    fi
44321  fi
44322
44323
44324  if test "x$path" != "x$new_path"; then
44325    MSVC_DLL="$new_path"
44326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44327$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44328  fi
44329
44330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44331
44332  path="$MSVC_DLL"
44333  has_colon=`$ECHO $path | $GREP ^.:`
44334  new_path="$path"
44335  if test "x$has_colon" = x; then
44336    # Not in mixed or Windows style, start by that.
44337    new_path=`cmd //c echo $path`
44338  fi
44339
44340
44341  input_path="$new_path"
44342  # Check if we need to convert this using DOS-style short mode. If the path
44343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44344  # take no chances and rewrite it.
44345  # Note: m4 eats our [], so we need to use [ and ] instead.
44346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44347  if test "x$has_forbidden_chars" != x; then
44348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44350  fi
44351
44352
44353  windows_path="$new_path"
44354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44355    unix_path=`$CYGPATH -u "$windows_path"`
44356    new_path="$unix_path"
44357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44359    new_path="$unix_path"
44360  fi
44361
44362  if test "x$path" != "x$new_path"; then
44363    MSVC_DLL="$new_path"
44364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44365$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44366  fi
44367
44368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44370
44371    else
44372      # We're on a unix platform. Hooray! :)
44373      path="$MSVC_DLL"
44374      has_space=`$ECHO "$path" | $GREP " "`
44375      if test "x$has_space" != x; then
44376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44377$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44379      fi
44380
44381      # Use eval to expand a potential ~
44382      eval path="$path"
44383      if test ! -f "$path" && test ! -d "$path"; then
44384        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44385      fi
44386
44387      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44388    fi
44389  fi
44390
44391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44392$as_echo_n "checking for $DLL_NAME... " >&6; }
44393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44394$as_echo "$MSVC_DLL" >&6; }
44395    else
44396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44397$as_echo "incorrect, ignoring" >&6; }
44398      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44399$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44400    fi
44401  fi
44402
44403    if test "x$MSVC_DLL" = x; then
44404      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
44405    fi
44406    MSVCR_DLL="$MSVC_DLL"
44407  else
44408
44409  DLL_NAME="${MSVCR_NAME}"
44410  MSVC_DLL=
44411
44412  if test "x$MSVC_DLL" = x; then
44413    # Probe: Using well-known location from Visual Studio 10.0
44414    if test "x$VCINSTALLDIR" != x; then
44415      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
44416
44417  windows_path="$CYGWIN_VC_INSTALL_DIR"
44418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44419    unix_path=`$CYGPATH -u "$windows_path"`
44420    CYGWIN_VC_INSTALL_DIR="$unix_path"
44421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44423    CYGWIN_VC_INSTALL_DIR="$unix_path"
44424  fi
44425
44426      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44427        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
44428      else
44429        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
44430      fi
44431      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
44432
44433  DLL_NAME="$DLL_NAME"
44434  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44435  METHOD="well-known location in VCINSTALLDIR"
44436  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44437    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44438$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44439
44440    # Need to check if the found msvcr is correct architecture
44441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44442$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44443    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44445      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44446      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44447      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44448        CORRECT_MSVCR_ARCH="PE32 executable"
44449      else
44450        CORRECT_MSVCR_ARCH="PE32+ executable"
44451      fi
44452    else
44453      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44454        CORRECT_MSVCR_ARCH=386
44455      else
44456        CORRECT_MSVCR_ARCH=x86-64
44457      fi
44458    fi
44459    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44461$as_echo "ok" >&6; }
44462      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44463
44464  # Only process if variable expands to non-empty
44465
44466  if test "x$MSVC_DLL" != x; then
44467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44468
44469  # Input might be given as Windows format, start by converting to
44470  # unix format.
44471  path="$MSVC_DLL"
44472  new_path=`$CYGPATH -u "$path"`
44473
44474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44477  # "foo.exe" is OK but "foo" is an error.
44478  #
44479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44480  # It is also a way to make sure we got the proper file name for the real test later on.
44481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44482  if test "x$test_shortpath" = x; then
44483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44484$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44485    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44486  fi
44487
44488  # Call helper function which possibly converts this using DOS-style short mode.
44489  # If so, the updated path is stored in $new_path.
44490
44491  input_path="$new_path"
44492  # Check if we need to convert this using DOS-style short mode. If the path
44493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44494  # take no chances and rewrite it.
44495  # Note: m4 eats our [], so we need to use [ and ] instead.
44496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44497  if test "x$has_forbidden_chars" != x; then
44498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44502      # Going to short mode and back again did indeed matter. Since short mode is
44503      # case insensitive, let's make it lowercase to improve readability.
44504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44505      # Now convert it back to Unix-style (cygpath)
44506      input_path=`$CYGPATH -u "$shortmode_path"`
44507      new_path="$input_path"
44508    fi
44509  fi
44510
44511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44512  if test "x$test_cygdrive_prefix" = x; then
44513    # As a simple fix, exclude /usr/bin since it's not a real path.
44514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44516      # a path prefixed by /cygdrive for fixpath to work.
44517      new_path="$CYGWIN_ROOT_PATH$input_path"
44518    fi
44519  fi
44520
44521
44522  if test "x$path" != "x$new_path"; then
44523    MSVC_DLL="$new_path"
44524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44525$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44526  fi
44527
44528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44529
44530  path="$MSVC_DLL"
44531  has_colon=`$ECHO $path | $GREP ^.:`
44532  new_path="$path"
44533  if test "x$has_colon" = x; then
44534    # Not in mixed or Windows style, start by that.
44535    new_path=`cmd //c echo $path`
44536  fi
44537
44538
44539  input_path="$new_path"
44540  # Check if we need to convert this using DOS-style short mode. If the path
44541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44542  # take no chances and rewrite it.
44543  # Note: m4 eats our [], so we need to use [ and ] instead.
44544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44545  if test "x$has_forbidden_chars" != x; then
44546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44548  fi
44549
44550
44551  windows_path="$new_path"
44552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44553    unix_path=`$CYGPATH -u "$windows_path"`
44554    new_path="$unix_path"
44555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44557    new_path="$unix_path"
44558  fi
44559
44560  if test "x$path" != "x$new_path"; then
44561    MSVC_DLL="$new_path"
44562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44564  fi
44565
44566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44568
44569    else
44570      # We're on a unix platform. Hooray! :)
44571      path="$MSVC_DLL"
44572      has_space=`$ECHO "$path" | $GREP " "`
44573      if test "x$has_space" != x; then
44574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44575$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44577      fi
44578
44579      # Use eval to expand a potential ~
44580      eval path="$path"
44581      if test ! -f "$path" && test ! -d "$path"; then
44582        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44583      fi
44584
44585      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44586    fi
44587  fi
44588
44589      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44590$as_echo_n "checking for $DLL_NAME... " >&6; }
44591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44592$as_echo "$MSVC_DLL" >&6; }
44593    else
44594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44595$as_echo "incorrect, ignoring" >&6; }
44596      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44597$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44598    fi
44599  fi
44600
44601    fi
44602  fi
44603
44604  if test "x$MSVC_DLL" = x; then
44605    # Probe: Check in the Boot JDK directory.
44606    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
44607
44608  DLL_NAME="$DLL_NAME"
44609  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44610  METHOD="well-known location in Boot JDK"
44611  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44612    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44613$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44614
44615    # Need to check if the found msvcr is correct architecture
44616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44617$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44618    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44620      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44621      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44622      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44623        CORRECT_MSVCR_ARCH="PE32 executable"
44624      else
44625        CORRECT_MSVCR_ARCH="PE32+ executable"
44626      fi
44627    else
44628      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44629        CORRECT_MSVCR_ARCH=386
44630      else
44631        CORRECT_MSVCR_ARCH=x86-64
44632      fi
44633    fi
44634    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44636$as_echo "ok" >&6; }
44637      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44638
44639  # Only process if variable expands to non-empty
44640
44641  if test "x$MSVC_DLL" != x; then
44642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44643
44644  # Input might be given as Windows format, start by converting to
44645  # unix format.
44646  path="$MSVC_DLL"
44647  new_path=`$CYGPATH -u "$path"`
44648
44649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44652  # "foo.exe" is OK but "foo" is an error.
44653  #
44654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44655  # It is also a way to make sure we got the proper file name for the real test later on.
44656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44657  if test "x$test_shortpath" = x; then
44658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44659$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44660    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44661  fi
44662
44663  # Call helper function which possibly converts this using DOS-style short mode.
44664  # If so, the updated path is stored in $new_path.
44665
44666  input_path="$new_path"
44667  # Check if we need to convert this using DOS-style short mode. If the path
44668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44669  # take no chances and rewrite it.
44670  # Note: m4 eats our [], so we need to use [ and ] instead.
44671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44672  if test "x$has_forbidden_chars" != x; then
44673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44677      # Going to short mode and back again did indeed matter. Since short mode is
44678      # case insensitive, let's make it lowercase to improve readability.
44679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44680      # Now convert it back to Unix-style (cygpath)
44681      input_path=`$CYGPATH -u "$shortmode_path"`
44682      new_path="$input_path"
44683    fi
44684  fi
44685
44686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44687  if test "x$test_cygdrive_prefix" = x; then
44688    # As a simple fix, exclude /usr/bin since it's not a real path.
44689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44691      # a path prefixed by /cygdrive for fixpath to work.
44692      new_path="$CYGWIN_ROOT_PATH$input_path"
44693    fi
44694  fi
44695
44696
44697  if test "x$path" != "x$new_path"; then
44698    MSVC_DLL="$new_path"
44699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44700$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44701  fi
44702
44703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44704
44705  path="$MSVC_DLL"
44706  has_colon=`$ECHO $path | $GREP ^.:`
44707  new_path="$path"
44708  if test "x$has_colon" = x; then
44709    # Not in mixed or Windows style, start by that.
44710    new_path=`cmd //c echo $path`
44711  fi
44712
44713
44714  input_path="$new_path"
44715  # Check if we need to convert this using DOS-style short mode. If the path
44716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44717  # take no chances and rewrite it.
44718  # Note: m4 eats our [], so we need to use [ and ] instead.
44719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44720  if test "x$has_forbidden_chars" != x; then
44721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44723  fi
44724
44725
44726  windows_path="$new_path"
44727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44728    unix_path=`$CYGPATH -u "$windows_path"`
44729    new_path="$unix_path"
44730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44732    new_path="$unix_path"
44733  fi
44734
44735  if test "x$path" != "x$new_path"; then
44736    MSVC_DLL="$new_path"
44737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44738$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44739  fi
44740
44741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44743
44744    else
44745      # We're on a unix platform. Hooray! :)
44746      path="$MSVC_DLL"
44747      has_space=`$ECHO "$path" | $GREP " "`
44748      if test "x$has_space" != x; then
44749        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44750$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44751        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44752      fi
44753
44754      # Use eval to expand a potential ~
44755      eval path="$path"
44756      if test ! -f "$path" && test ! -d "$path"; then
44757        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44758      fi
44759
44760      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44761    fi
44762  fi
44763
44764      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44765$as_echo_n "checking for $DLL_NAME... " >&6; }
44766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44767$as_echo "$MSVC_DLL" >&6; }
44768    else
44769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44770$as_echo "incorrect, ignoring" >&6; }
44771      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44772$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44773    fi
44774  fi
44775
44776  fi
44777
44778  if test "x$MSVC_DLL" = x; then
44779    # Probe: Look in the Windows system32 directory
44780    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
44781
44782  windows_path="$CYGWIN_SYSTEMROOT"
44783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44784    unix_path=`$CYGPATH -u "$windows_path"`
44785    CYGWIN_SYSTEMROOT="$unix_path"
44786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44788    CYGWIN_SYSTEMROOT="$unix_path"
44789  fi
44790
44791    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
44792
44793  DLL_NAME="$DLL_NAME"
44794  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44795  METHOD="well-known location in SYSTEMROOT"
44796  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44797    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44798$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44799
44800    # Need to check if the found msvcr is correct architecture
44801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44802$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44803    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44805      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44806      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44807      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44808        CORRECT_MSVCR_ARCH="PE32 executable"
44809      else
44810        CORRECT_MSVCR_ARCH="PE32+ executable"
44811      fi
44812    else
44813      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44814        CORRECT_MSVCR_ARCH=386
44815      else
44816        CORRECT_MSVCR_ARCH=x86-64
44817      fi
44818    fi
44819    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44821$as_echo "ok" >&6; }
44822      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44823
44824  # Only process if variable expands to non-empty
44825
44826  if test "x$MSVC_DLL" != x; then
44827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44828
44829  # Input might be given as Windows format, start by converting to
44830  # unix format.
44831  path="$MSVC_DLL"
44832  new_path=`$CYGPATH -u "$path"`
44833
44834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44837  # "foo.exe" is OK but "foo" is an error.
44838  #
44839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44840  # It is also a way to make sure we got the proper file name for the real test later on.
44841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44842  if test "x$test_shortpath" = x; then
44843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44844$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44845    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44846  fi
44847
44848  # Call helper function which possibly converts this using DOS-style short mode.
44849  # If so, the updated path is stored in $new_path.
44850
44851  input_path="$new_path"
44852  # Check if we need to convert this using DOS-style short mode. If the path
44853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44854  # take no chances and rewrite it.
44855  # Note: m4 eats our [], so we need to use [ and ] instead.
44856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44857  if test "x$has_forbidden_chars" != x; then
44858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44862      # Going to short mode and back again did indeed matter. Since short mode is
44863      # case insensitive, let's make it lowercase to improve readability.
44864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44865      # Now convert it back to Unix-style (cygpath)
44866      input_path=`$CYGPATH -u "$shortmode_path"`
44867      new_path="$input_path"
44868    fi
44869  fi
44870
44871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44872  if test "x$test_cygdrive_prefix" = x; then
44873    # As a simple fix, exclude /usr/bin since it's not a real path.
44874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44876      # a path prefixed by /cygdrive for fixpath to work.
44877      new_path="$CYGWIN_ROOT_PATH$input_path"
44878    fi
44879  fi
44880
44881
44882  if test "x$path" != "x$new_path"; then
44883    MSVC_DLL="$new_path"
44884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44885$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44886  fi
44887
44888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44889
44890  path="$MSVC_DLL"
44891  has_colon=`$ECHO $path | $GREP ^.:`
44892  new_path="$path"
44893  if test "x$has_colon" = x; then
44894    # Not in mixed or Windows style, start by that.
44895    new_path=`cmd //c echo $path`
44896  fi
44897
44898
44899  input_path="$new_path"
44900  # Check if we need to convert this using DOS-style short mode. If the path
44901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44902  # take no chances and rewrite it.
44903  # Note: m4 eats our [], so we need to use [ and ] instead.
44904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44905  if test "x$has_forbidden_chars" != x; then
44906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44908  fi
44909
44910
44911  windows_path="$new_path"
44912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44913    unix_path=`$CYGPATH -u "$windows_path"`
44914    new_path="$unix_path"
44915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44917    new_path="$unix_path"
44918  fi
44919
44920  if test "x$path" != "x$new_path"; then
44921    MSVC_DLL="$new_path"
44922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44923$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44924  fi
44925
44926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44928
44929    else
44930      # We're on a unix platform. Hooray! :)
44931      path="$MSVC_DLL"
44932      has_space=`$ECHO "$path" | $GREP " "`
44933      if test "x$has_space" != x; then
44934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44935$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44937      fi
44938
44939      # Use eval to expand a potential ~
44940      eval path="$path"
44941      if test ! -f "$path" && test ! -d "$path"; then
44942        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44943      fi
44944
44945      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44946    fi
44947  fi
44948
44949      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44950$as_echo_n "checking for $DLL_NAME... " >&6; }
44951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44952$as_echo "$MSVC_DLL" >&6; }
44953    else
44954      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44955$as_echo "incorrect, ignoring" >&6; }
44956      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44957$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44958    fi
44959  fi
44960
44961  fi
44962
44963  if test "x$MSVC_DLL" = x; then
44964    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
44965    if test "x$VS100COMNTOOLS" != x; then
44966      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
44967
44968  windows_path="$CYGWIN_VS_TOOLS_DIR"
44969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44970    unix_path=`$CYGPATH -u "$windows_path"`
44971    CYGWIN_VS_TOOLS_DIR="$unix_path"
44972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44974    CYGWIN_VS_TOOLS_DIR="$unix_path"
44975  fi
44976
44977      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44978        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
44979	    | $GREP -i /x64/ | $HEAD --lines 1`
44980      else
44981        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
44982	    | $GREP -i /x86/ | $HEAD --lines 1`
44983      fi
44984
44985  DLL_NAME="$DLL_NAME"
44986  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44987  METHOD="search of VS100COMNTOOLS"
44988  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44990$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44991
44992    # Need to check if the found msvcr is correct architecture
44993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44994$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44995    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44997      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44998      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44999      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45000        CORRECT_MSVCR_ARCH="PE32 executable"
45001      else
45002        CORRECT_MSVCR_ARCH="PE32+ executable"
45003      fi
45004    else
45005      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45006        CORRECT_MSVCR_ARCH=386
45007      else
45008        CORRECT_MSVCR_ARCH=x86-64
45009      fi
45010    fi
45011    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45012      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45013$as_echo "ok" >&6; }
45014      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45015
45016  # Only process if variable expands to non-empty
45017
45018  if test "x$MSVC_DLL" != x; then
45019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45020
45021  # Input might be given as Windows format, start by converting to
45022  # unix format.
45023  path="$MSVC_DLL"
45024  new_path=`$CYGPATH -u "$path"`
45025
45026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45029  # "foo.exe" is OK but "foo" is an error.
45030  #
45031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45032  # It is also a way to make sure we got the proper file name for the real test later on.
45033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45034  if test "x$test_shortpath" = x; then
45035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45036$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45037    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45038  fi
45039
45040  # Call helper function which possibly converts this using DOS-style short mode.
45041  # If so, the updated path is stored in $new_path.
45042
45043  input_path="$new_path"
45044  # Check if we need to convert this using DOS-style short mode. If the path
45045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45046  # take no chances and rewrite it.
45047  # Note: m4 eats our [], so we need to use [ and ] instead.
45048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45049  if test "x$has_forbidden_chars" != x; then
45050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45054      # Going to short mode and back again did indeed matter. Since short mode is
45055      # case insensitive, let's make it lowercase to improve readability.
45056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45057      # Now convert it back to Unix-style (cygpath)
45058      input_path=`$CYGPATH -u "$shortmode_path"`
45059      new_path="$input_path"
45060    fi
45061  fi
45062
45063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45064  if test "x$test_cygdrive_prefix" = x; then
45065    # As a simple fix, exclude /usr/bin since it's not a real path.
45066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45068      # a path prefixed by /cygdrive for fixpath to work.
45069      new_path="$CYGWIN_ROOT_PATH$input_path"
45070    fi
45071  fi
45072
45073
45074  if test "x$path" != "x$new_path"; then
45075    MSVC_DLL="$new_path"
45076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45077$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45078  fi
45079
45080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45081
45082  path="$MSVC_DLL"
45083  has_colon=`$ECHO $path | $GREP ^.:`
45084  new_path="$path"
45085  if test "x$has_colon" = x; then
45086    # Not in mixed or Windows style, start by that.
45087    new_path=`cmd //c echo $path`
45088  fi
45089
45090
45091  input_path="$new_path"
45092  # Check if we need to convert this using DOS-style short mode. If the path
45093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45094  # take no chances and rewrite it.
45095  # Note: m4 eats our [], so we need to use [ and ] instead.
45096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45097  if test "x$has_forbidden_chars" != x; then
45098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45100  fi
45101
45102
45103  windows_path="$new_path"
45104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45105    unix_path=`$CYGPATH -u "$windows_path"`
45106    new_path="$unix_path"
45107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45109    new_path="$unix_path"
45110  fi
45111
45112  if test "x$path" != "x$new_path"; then
45113    MSVC_DLL="$new_path"
45114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45115$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45116  fi
45117
45118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45120
45121    else
45122      # We're on a unix platform. Hooray! :)
45123      path="$MSVC_DLL"
45124      has_space=`$ECHO "$path" | $GREP " "`
45125      if test "x$has_space" != x; then
45126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45127$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45129      fi
45130
45131      # Use eval to expand a potential ~
45132      eval path="$path"
45133      if test ! -f "$path" && test ! -d "$path"; then
45134        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45135      fi
45136
45137      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45138    fi
45139  fi
45140
45141      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45142$as_echo_n "checking for $DLL_NAME... " >&6; }
45143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45144$as_echo "$MSVC_DLL" >&6; }
45145    else
45146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45147$as_echo "incorrect, ignoring" >&6; }
45148      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45149$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45150    fi
45151  fi
45152
45153    fi
45154  fi
45155
45156  if test "x$MSVC_DLL" = x; then
45157    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
45158    # (This was the original behaviour; kept since it might turn something up)
45159    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
45160      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45161        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45162	    | $GREP x64 | $HEAD --lines 1`
45163      else
45164        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45165	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
45166        if test "x$POSSIBLE_MSVC_DLL" = x; then
45167          # We're grasping at straws now...
45168          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45169	      | $HEAD --lines 1`
45170        fi
45171      fi
45172
45173
45174  DLL_NAME="$DLL_NAME"
45175  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45176  METHOD="search of VCINSTALLDIR"
45177  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45178    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45179$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45180
45181    # Need to check if the found msvcr is correct architecture
45182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45183$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45184    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45186      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45187      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45188      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45189        CORRECT_MSVCR_ARCH="PE32 executable"
45190      else
45191        CORRECT_MSVCR_ARCH="PE32+ executable"
45192      fi
45193    else
45194      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45195        CORRECT_MSVCR_ARCH=386
45196      else
45197        CORRECT_MSVCR_ARCH=x86-64
45198      fi
45199    fi
45200    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45202$as_echo "ok" >&6; }
45203      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45204
45205  # Only process if variable expands to non-empty
45206
45207  if test "x$MSVC_DLL" != x; then
45208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45209
45210  # Input might be given as Windows format, start by converting to
45211  # unix format.
45212  path="$MSVC_DLL"
45213  new_path=`$CYGPATH -u "$path"`
45214
45215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45218  # "foo.exe" is OK but "foo" is an error.
45219  #
45220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45221  # It is also a way to make sure we got the proper file name for the real test later on.
45222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45223  if test "x$test_shortpath" = x; then
45224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45225$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45226    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45227  fi
45228
45229  # Call helper function which possibly converts this using DOS-style short mode.
45230  # If so, the updated path is stored in $new_path.
45231
45232  input_path="$new_path"
45233  # Check if we need to convert this using DOS-style short mode. If the path
45234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45235  # take no chances and rewrite it.
45236  # Note: m4 eats our [], so we need to use [ and ] instead.
45237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45238  if test "x$has_forbidden_chars" != x; then
45239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45243      # Going to short mode and back again did indeed matter. Since short mode is
45244      # case insensitive, let's make it lowercase to improve readability.
45245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45246      # Now convert it back to Unix-style (cygpath)
45247      input_path=`$CYGPATH -u "$shortmode_path"`
45248      new_path="$input_path"
45249    fi
45250  fi
45251
45252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45253  if test "x$test_cygdrive_prefix" = x; then
45254    # As a simple fix, exclude /usr/bin since it's not a real path.
45255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45257      # a path prefixed by /cygdrive for fixpath to work.
45258      new_path="$CYGWIN_ROOT_PATH$input_path"
45259    fi
45260  fi
45261
45262
45263  if test "x$path" != "x$new_path"; then
45264    MSVC_DLL="$new_path"
45265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45266$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45267  fi
45268
45269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45270
45271  path="$MSVC_DLL"
45272  has_colon=`$ECHO $path | $GREP ^.:`
45273  new_path="$path"
45274  if test "x$has_colon" = x; then
45275    # Not in mixed or Windows style, start by that.
45276    new_path=`cmd //c echo $path`
45277  fi
45278
45279
45280  input_path="$new_path"
45281  # Check if we need to convert this using DOS-style short mode. If the path
45282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45283  # take no chances and rewrite it.
45284  # Note: m4 eats our [], so we need to use [ and ] instead.
45285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45286  if test "x$has_forbidden_chars" != x; then
45287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45289  fi
45290
45291
45292  windows_path="$new_path"
45293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45294    unix_path=`$CYGPATH -u "$windows_path"`
45295    new_path="$unix_path"
45296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45298    new_path="$unix_path"
45299  fi
45300
45301  if test "x$path" != "x$new_path"; then
45302    MSVC_DLL="$new_path"
45303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45304$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45305  fi
45306
45307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45309
45310    else
45311      # We're on a unix platform. Hooray! :)
45312      path="$MSVC_DLL"
45313      has_space=`$ECHO "$path" | $GREP " "`
45314      if test "x$has_space" != x; then
45315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45316$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45317        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45318      fi
45319
45320      # Use eval to expand a potential ~
45321      eval path="$path"
45322      if test ! -f "$path" && test ! -d "$path"; then
45323        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45324      fi
45325
45326      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45327    fi
45328  fi
45329
45330      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45331$as_echo_n "checking for $DLL_NAME... " >&6; }
45332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45333$as_echo "$MSVC_DLL" >&6; }
45334    else
45335      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45336$as_echo "incorrect, ignoring" >&6; }
45337      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45338$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45339    fi
45340  fi
45341
45342    fi
45343  fi
45344
45345  if test "x$MSVC_DLL" = x; then
45346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45347$as_echo_n "checking for $DLL_NAME... " >&6; }
45348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45349$as_echo "no" >&6; }
45350    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
45351  fi
45352
45353    MSVCR_DLL="$MSVC_DLL"
45354  fi
45355
45356
45357
45358# Check whether --with-msvcp-dll was given.
45359if test "${with_msvcp_dll+set}" = set; then :
45360  withval=$with_msvcp_dll;
45361fi
45362
45363
45364  if test "x$MSVCP_NAME" != "x"; then
45365    if test "x$with_msvcp_dll" != x; then
45366      # If given explicitely by user, do not probe. If not present, fail directly.
45367
45368  DLL_NAME="$MSVCP_NAME"
45369  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
45370  METHOD="--with-msvcp-dll"
45371  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45372    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45373$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45374
45375    # Need to check if the found msvcr is correct architecture
45376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45377$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45378    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45380      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45381      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45382      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45383        CORRECT_MSVCR_ARCH="PE32 executable"
45384      else
45385        CORRECT_MSVCR_ARCH="PE32+ executable"
45386      fi
45387    else
45388      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45389        CORRECT_MSVCR_ARCH=386
45390      else
45391        CORRECT_MSVCR_ARCH=x86-64
45392      fi
45393    fi
45394    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45396$as_echo "ok" >&6; }
45397      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45398
45399  # Only process if variable expands to non-empty
45400
45401  if test "x$MSVC_DLL" != x; then
45402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45403
45404  # Input might be given as Windows format, start by converting to
45405  # unix format.
45406  path="$MSVC_DLL"
45407  new_path=`$CYGPATH -u "$path"`
45408
45409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45412  # "foo.exe" is OK but "foo" is an error.
45413  #
45414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45415  # It is also a way to make sure we got the proper file name for the real test later on.
45416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45417  if test "x$test_shortpath" = x; then
45418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45419$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45420    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45421  fi
45422
45423  # Call helper function which possibly converts this using DOS-style short mode.
45424  # If so, the updated path is stored in $new_path.
45425
45426  input_path="$new_path"
45427  # Check if we need to convert this using DOS-style short mode. If the path
45428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45429  # take no chances and rewrite it.
45430  # Note: m4 eats our [], so we need to use [ and ] instead.
45431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45432  if test "x$has_forbidden_chars" != x; then
45433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45437      # Going to short mode and back again did indeed matter. Since short mode is
45438      # case insensitive, let's make it lowercase to improve readability.
45439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45440      # Now convert it back to Unix-style (cygpath)
45441      input_path=`$CYGPATH -u "$shortmode_path"`
45442      new_path="$input_path"
45443    fi
45444  fi
45445
45446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45447  if test "x$test_cygdrive_prefix" = x; then
45448    # As a simple fix, exclude /usr/bin since it's not a real path.
45449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45451      # a path prefixed by /cygdrive for fixpath to work.
45452      new_path="$CYGWIN_ROOT_PATH$input_path"
45453    fi
45454  fi
45455
45456
45457  if test "x$path" != "x$new_path"; then
45458    MSVC_DLL="$new_path"
45459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45460$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45461  fi
45462
45463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45464
45465  path="$MSVC_DLL"
45466  has_colon=`$ECHO $path | $GREP ^.:`
45467  new_path="$path"
45468  if test "x$has_colon" = x; then
45469    # Not in mixed or Windows style, start by that.
45470    new_path=`cmd //c echo $path`
45471  fi
45472
45473
45474  input_path="$new_path"
45475  # Check if we need to convert this using DOS-style short mode. If the path
45476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45477  # take no chances and rewrite it.
45478  # Note: m4 eats our [], so we need to use [ and ] instead.
45479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45480  if test "x$has_forbidden_chars" != x; then
45481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45483  fi
45484
45485
45486  windows_path="$new_path"
45487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45488    unix_path=`$CYGPATH -u "$windows_path"`
45489    new_path="$unix_path"
45490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45492    new_path="$unix_path"
45493  fi
45494
45495  if test "x$path" != "x$new_path"; then
45496    MSVC_DLL="$new_path"
45497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45498$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45499  fi
45500
45501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45503
45504    else
45505      # We're on a unix platform. Hooray! :)
45506      path="$MSVC_DLL"
45507      has_space=`$ECHO "$path" | $GREP " "`
45508      if test "x$has_space" != x; then
45509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45510$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45512      fi
45513
45514      # Use eval to expand a potential ~
45515      eval path="$path"
45516      if test ! -f "$path" && test ! -d "$path"; then
45517        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45518      fi
45519
45520      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45521    fi
45522  fi
45523
45524      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45525$as_echo_n "checking for $DLL_NAME... " >&6; }
45526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45527$as_echo "$MSVC_DLL" >&6; }
45528    else
45529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45530$as_echo "incorrect, ignoring" >&6; }
45531      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45532$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45533    fi
45534  fi
45535
45536      if test "x$MSVC_DLL" = x; then
45537        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
45538      fi
45539      MSVCP_DLL="$MSVC_DLL"
45540    elif test "x$DEVKIT_MSVCP_DLL" != x; then
45541
45542  DLL_NAME="$MSVCP_NAME"
45543  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
45544  METHOD="devkit"
45545  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45546    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45547$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45548
45549    # Need to check if the found msvcr is correct architecture
45550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45551$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45552    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45554      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45555      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45556      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45557        CORRECT_MSVCR_ARCH="PE32 executable"
45558      else
45559        CORRECT_MSVCR_ARCH="PE32+ executable"
45560      fi
45561    else
45562      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45563        CORRECT_MSVCR_ARCH=386
45564      else
45565        CORRECT_MSVCR_ARCH=x86-64
45566      fi
45567    fi
45568    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45570$as_echo "ok" >&6; }
45571      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45572
45573  # Only process if variable expands to non-empty
45574
45575  if test "x$MSVC_DLL" != x; then
45576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45577
45578  # Input might be given as Windows format, start by converting to
45579  # unix format.
45580  path="$MSVC_DLL"
45581  new_path=`$CYGPATH -u "$path"`
45582
45583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45586  # "foo.exe" is OK but "foo" is an error.
45587  #
45588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45589  # It is also a way to make sure we got the proper file name for the real test later on.
45590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45591  if test "x$test_shortpath" = x; then
45592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45593$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45594    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45595  fi
45596
45597  # Call helper function which possibly converts this using DOS-style short mode.
45598  # If so, the updated path is stored in $new_path.
45599
45600  input_path="$new_path"
45601  # Check if we need to convert this using DOS-style short mode. If the path
45602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45603  # take no chances and rewrite it.
45604  # Note: m4 eats our [], so we need to use [ and ] instead.
45605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45606  if test "x$has_forbidden_chars" != x; then
45607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45611      # Going to short mode and back again did indeed matter. Since short mode is
45612      # case insensitive, let's make it lowercase to improve readability.
45613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45614      # Now convert it back to Unix-style (cygpath)
45615      input_path=`$CYGPATH -u "$shortmode_path"`
45616      new_path="$input_path"
45617    fi
45618  fi
45619
45620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45621  if test "x$test_cygdrive_prefix" = x; then
45622    # As a simple fix, exclude /usr/bin since it's not a real path.
45623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45625      # a path prefixed by /cygdrive for fixpath to work.
45626      new_path="$CYGWIN_ROOT_PATH$input_path"
45627    fi
45628  fi
45629
45630
45631  if test "x$path" != "x$new_path"; then
45632    MSVC_DLL="$new_path"
45633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45634$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45635  fi
45636
45637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45638
45639  path="$MSVC_DLL"
45640  has_colon=`$ECHO $path | $GREP ^.:`
45641  new_path="$path"
45642  if test "x$has_colon" = x; then
45643    # Not in mixed or Windows style, start by that.
45644    new_path=`cmd //c echo $path`
45645  fi
45646
45647
45648  input_path="$new_path"
45649  # Check if we need to convert this using DOS-style short mode. If the path
45650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45651  # take no chances and rewrite it.
45652  # Note: m4 eats our [], so we need to use [ and ] instead.
45653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45654  if test "x$has_forbidden_chars" != x; then
45655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45657  fi
45658
45659
45660  windows_path="$new_path"
45661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45662    unix_path=`$CYGPATH -u "$windows_path"`
45663    new_path="$unix_path"
45664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45666    new_path="$unix_path"
45667  fi
45668
45669  if test "x$path" != "x$new_path"; then
45670    MSVC_DLL="$new_path"
45671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45672$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45673  fi
45674
45675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45677
45678    else
45679      # We're on a unix platform. Hooray! :)
45680      path="$MSVC_DLL"
45681      has_space=`$ECHO "$path" | $GREP " "`
45682      if test "x$has_space" != x; then
45683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45684$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45685        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45686      fi
45687
45688      # Use eval to expand a potential ~
45689      eval path="$path"
45690      if test ! -f "$path" && test ! -d "$path"; then
45691        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45692      fi
45693
45694      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45695    fi
45696  fi
45697
45698      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45699$as_echo_n "checking for $DLL_NAME... " >&6; }
45700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45701$as_echo "$MSVC_DLL" >&6; }
45702    else
45703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45704$as_echo "incorrect, ignoring" >&6; }
45705      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45706$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45707    fi
45708  fi
45709
45710      if test "x$MSVC_DLL" = x; then
45711        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
45712      fi
45713      MSVCP_DLL="$MSVC_DLL"
45714    else
45715
45716  DLL_NAME="${MSVCP_NAME}"
45717  MSVC_DLL=
45718
45719  if test "x$MSVC_DLL" = x; then
45720    # Probe: Using well-known location from Visual Studio 10.0
45721    if test "x$VCINSTALLDIR" != x; then
45722      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
45723
45724  windows_path="$CYGWIN_VC_INSTALL_DIR"
45725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45726    unix_path=`$CYGPATH -u "$windows_path"`
45727    CYGWIN_VC_INSTALL_DIR="$unix_path"
45728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45730    CYGWIN_VC_INSTALL_DIR="$unix_path"
45731  fi
45732
45733      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45734        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
45735      else
45736        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
45737      fi
45738      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
45739
45740  DLL_NAME="$DLL_NAME"
45741  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45742  METHOD="well-known location in VCINSTALLDIR"
45743  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45744    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45745$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45746
45747    # Need to check if the found msvcr is correct architecture
45748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45749$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45750    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45752      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45753      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45754      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45755        CORRECT_MSVCR_ARCH="PE32 executable"
45756      else
45757        CORRECT_MSVCR_ARCH="PE32+ executable"
45758      fi
45759    else
45760      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45761        CORRECT_MSVCR_ARCH=386
45762      else
45763        CORRECT_MSVCR_ARCH=x86-64
45764      fi
45765    fi
45766    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45768$as_echo "ok" >&6; }
45769      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45770
45771  # Only process if variable expands to non-empty
45772
45773  if test "x$MSVC_DLL" != x; then
45774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45775
45776  # Input might be given as Windows format, start by converting to
45777  # unix format.
45778  path="$MSVC_DLL"
45779  new_path=`$CYGPATH -u "$path"`
45780
45781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45784  # "foo.exe" is OK but "foo" is an error.
45785  #
45786  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45787  # It is also a way to make sure we got the proper file name for the real test later on.
45788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45789  if test "x$test_shortpath" = x; then
45790    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45791$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45792    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45793  fi
45794
45795  # Call helper function which possibly converts this using DOS-style short mode.
45796  # If so, the updated path is stored in $new_path.
45797
45798  input_path="$new_path"
45799  # Check if we need to convert this using DOS-style short mode. If the path
45800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45801  # take no chances and rewrite it.
45802  # Note: m4 eats our [], so we need to use [ and ] instead.
45803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45804  if test "x$has_forbidden_chars" != x; then
45805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45809      # Going to short mode and back again did indeed matter. Since short mode is
45810      # case insensitive, let's make it lowercase to improve readability.
45811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45812      # Now convert it back to Unix-style (cygpath)
45813      input_path=`$CYGPATH -u "$shortmode_path"`
45814      new_path="$input_path"
45815    fi
45816  fi
45817
45818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45819  if test "x$test_cygdrive_prefix" = x; then
45820    # As a simple fix, exclude /usr/bin since it's not a real path.
45821    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45823      # a path prefixed by /cygdrive for fixpath to work.
45824      new_path="$CYGWIN_ROOT_PATH$input_path"
45825    fi
45826  fi
45827
45828
45829  if test "x$path" != "x$new_path"; then
45830    MSVC_DLL="$new_path"
45831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45832$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45833  fi
45834
45835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45836
45837  path="$MSVC_DLL"
45838  has_colon=`$ECHO $path | $GREP ^.:`
45839  new_path="$path"
45840  if test "x$has_colon" = x; then
45841    # Not in mixed or Windows style, start by that.
45842    new_path=`cmd //c echo $path`
45843  fi
45844
45845
45846  input_path="$new_path"
45847  # Check if we need to convert this using DOS-style short mode. If the path
45848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45849  # take no chances and rewrite it.
45850  # Note: m4 eats our [], so we need to use [ and ] instead.
45851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45852  if test "x$has_forbidden_chars" != x; then
45853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45855  fi
45856
45857
45858  windows_path="$new_path"
45859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45860    unix_path=`$CYGPATH -u "$windows_path"`
45861    new_path="$unix_path"
45862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45864    new_path="$unix_path"
45865  fi
45866
45867  if test "x$path" != "x$new_path"; then
45868    MSVC_DLL="$new_path"
45869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45870$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45871  fi
45872
45873  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45874  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45875
45876    else
45877      # We're on a unix platform. Hooray! :)
45878      path="$MSVC_DLL"
45879      has_space=`$ECHO "$path" | $GREP " "`
45880      if test "x$has_space" != x; then
45881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45882$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45883        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45884      fi
45885
45886      # Use eval to expand a potential ~
45887      eval path="$path"
45888      if test ! -f "$path" && test ! -d "$path"; then
45889        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45890      fi
45891
45892      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45893    fi
45894  fi
45895
45896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45897$as_echo_n "checking for $DLL_NAME... " >&6; }
45898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45899$as_echo "$MSVC_DLL" >&6; }
45900    else
45901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45902$as_echo "incorrect, ignoring" >&6; }
45903      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45904$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45905    fi
45906  fi
45907
45908    fi
45909  fi
45910
45911  if test "x$MSVC_DLL" = x; then
45912    # Probe: Check in the Boot JDK directory.
45913    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
45914
45915  DLL_NAME="$DLL_NAME"
45916  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45917  METHOD="well-known location in Boot JDK"
45918  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45919    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45920$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45921
45922    # Need to check if the found msvcr is correct architecture
45923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45924$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45925    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45927      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45928      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45929      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45930        CORRECT_MSVCR_ARCH="PE32 executable"
45931      else
45932        CORRECT_MSVCR_ARCH="PE32+ executable"
45933      fi
45934    else
45935      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45936        CORRECT_MSVCR_ARCH=386
45937      else
45938        CORRECT_MSVCR_ARCH=x86-64
45939      fi
45940    fi
45941    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45943$as_echo "ok" >&6; }
45944      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45945
45946  # Only process if variable expands to non-empty
45947
45948  if test "x$MSVC_DLL" != x; then
45949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45950
45951  # Input might be given as Windows format, start by converting to
45952  # unix format.
45953  path="$MSVC_DLL"
45954  new_path=`$CYGPATH -u "$path"`
45955
45956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45959  # "foo.exe" is OK but "foo" is an error.
45960  #
45961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45962  # It is also a way to make sure we got the proper file name for the real test later on.
45963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45964  if test "x$test_shortpath" = x; then
45965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45966$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45967    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45968  fi
45969
45970  # Call helper function which possibly converts this using DOS-style short mode.
45971  # If so, the updated path is stored in $new_path.
45972
45973  input_path="$new_path"
45974  # Check if we need to convert this using DOS-style short mode. If the path
45975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45976  # take no chances and rewrite it.
45977  # Note: m4 eats our [], so we need to use [ and ] instead.
45978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45979  if test "x$has_forbidden_chars" != x; then
45980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45984      # Going to short mode and back again did indeed matter. Since short mode is
45985      # case insensitive, let's make it lowercase to improve readability.
45986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45987      # Now convert it back to Unix-style (cygpath)
45988      input_path=`$CYGPATH -u "$shortmode_path"`
45989      new_path="$input_path"
45990    fi
45991  fi
45992
45993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45994  if test "x$test_cygdrive_prefix" = x; then
45995    # As a simple fix, exclude /usr/bin since it's not a real path.
45996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45998      # a path prefixed by /cygdrive for fixpath to work.
45999      new_path="$CYGWIN_ROOT_PATH$input_path"
46000    fi
46001  fi
46002
46003
46004  if test "x$path" != "x$new_path"; then
46005    MSVC_DLL="$new_path"
46006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46007$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46008  fi
46009
46010    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46011
46012  path="$MSVC_DLL"
46013  has_colon=`$ECHO $path | $GREP ^.:`
46014  new_path="$path"
46015  if test "x$has_colon" = x; then
46016    # Not in mixed or Windows style, start by that.
46017    new_path=`cmd //c echo $path`
46018  fi
46019
46020
46021  input_path="$new_path"
46022  # Check if we need to convert this using DOS-style short mode. If the path
46023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46024  # take no chances and rewrite it.
46025  # Note: m4 eats our [], so we need to use [ and ] instead.
46026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46027  if test "x$has_forbidden_chars" != x; then
46028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46030  fi
46031
46032
46033  windows_path="$new_path"
46034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46035    unix_path=`$CYGPATH -u "$windows_path"`
46036    new_path="$unix_path"
46037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46039    new_path="$unix_path"
46040  fi
46041
46042  if test "x$path" != "x$new_path"; then
46043    MSVC_DLL="$new_path"
46044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46045$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46046  fi
46047
46048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46050
46051    else
46052      # We're on a unix platform. Hooray! :)
46053      path="$MSVC_DLL"
46054      has_space=`$ECHO "$path" | $GREP " "`
46055      if test "x$has_space" != x; then
46056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46057$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46058        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46059      fi
46060
46061      # Use eval to expand a potential ~
46062      eval path="$path"
46063      if test ! -f "$path" && test ! -d "$path"; then
46064        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46065      fi
46066
46067      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46068    fi
46069  fi
46070
46071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46072$as_echo_n "checking for $DLL_NAME... " >&6; }
46073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46074$as_echo "$MSVC_DLL" >&6; }
46075    else
46076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46077$as_echo "incorrect, ignoring" >&6; }
46078      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46079$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46080    fi
46081  fi
46082
46083  fi
46084
46085  if test "x$MSVC_DLL" = x; then
46086    # Probe: Look in the Windows system32 directory
46087    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46088
46089  windows_path="$CYGWIN_SYSTEMROOT"
46090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46091    unix_path=`$CYGPATH -u "$windows_path"`
46092    CYGWIN_SYSTEMROOT="$unix_path"
46093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46095    CYGWIN_SYSTEMROOT="$unix_path"
46096  fi
46097
46098    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46099
46100  DLL_NAME="$DLL_NAME"
46101  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46102  METHOD="well-known location in SYSTEMROOT"
46103  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46104    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46105$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46106
46107    # Need to check if the found msvcr is correct architecture
46108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46109$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46110    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46112      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46113      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46114      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46115        CORRECT_MSVCR_ARCH="PE32 executable"
46116      else
46117        CORRECT_MSVCR_ARCH="PE32+ executable"
46118      fi
46119    else
46120      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46121        CORRECT_MSVCR_ARCH=386
46122      else
46123        CORRECT_MSVCR_ARCH=x86-64
46124      fi
46125    fi
46126    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46128$as_echo "ok" >&6; }
46129      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46130
46131  # Only process if variable expands to non-empty
46132
46133  if test "x$MSVC_DLL" != x; then
46134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46135
46136  # Input might be given as Windows format, start by converting to
46137  # unix format.
46138  path="$MSVC_DLL"
46139  new_path=`$CYGPATH -u "$path"`
46140
46141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46144  # "foo.exe" is OK but "foo" is an error.
46145  #
46146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46147  # It is also a way to make sure we got the proper file name for the real test later on.
46148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46149  if test "x$test_shortpath" = x; then
46150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46151$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46152    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46153  fi
46154
46155  # Call helper function which possibly converts this using DOS-style short mode.
46156  # If so, the updated path is stored in $new_path.
46157
46158  input_path="$new_path"
46159  # Check if we need to convert this using DOS-style short mode. If the path
46160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46161  # take no chances and rewrite it.
46162  # Note: m4 eats our [], so we need to use [ and ] instead.
46163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46164  if test "x$has_forbidden_chars" != x; then
46165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46169      # Going to short mode and back again did indeed matter. Since short mode is
46170      # case insensitive, let's make it lowercase to improve readability.
46171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46172      # Now convert it back to Unix-style (cygpath)
46173      input_path=`$CYGPATH -u "$shortmode_path"`
46174      new_path="$input_path"
46175    fi
46176  fi
46177
46178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46179  if test "x$test_cygdrive_prefix" = x; then
46180    # As a simple fix, exclude /usr/bin since it's not a real path.
46181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46183      # a path prefixed by /cygdrive for fixpath to work.
46184      new_path="$CYGWIN_ROOT_PATH$input_path"
46185    fi
46186  fi
46187
46188
46189  if test "x$path" != "x$new_path"; then
46190    MSVC_DLL="$new_path"
46191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46192$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46193  fi
46194
46195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46196
46197  path="$MSVC_DLL"
46198  has_colon=`$ECHO $path | $GREP ^.:`
46199  new_path="$path"
46200  if test "x$has_colon" = x; then
46201    # Not in mixed or Windows style, start by that.
46202    new_path=`cmd //c echo $path`
46203  fi
46204
46205
46206  input_path="$new_path"
46207  # Check if we need to convert this using DOS-style short mode. If the path
46208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46209  # take no chances and rewrite it.
46210  # Note: m4 eats our [], so we need to use [ and ] instead.
46211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46212  if test "x$has_forbidden_chars" != x; then
46213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46215  fi
46216
46217
46218  windows_path="$new_path"
46219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46220    unix_path=`$CYGPATH -u "$windows_path"`
46221    new_path="$unix_path"
46222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46224    new_path="$unix_path"
46225  fi
46226
46227  if test "x$path" != "x$new_path"; then
46228    MSVC_DLL="$new_path"
46229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46230$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46231  fi
46232
46233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46235
46236    else
46237      # We're on a unix platform. Hooray! :)
46238      path="$MSVC_DLL"
46239      has_space=`$ECHO "$path" | $GREP " "`
46240      if test "x$has_space" != x; then
46241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46242$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46244      fi
46245
46246      # Use eval to expand a potential ~
46247      eval path="$path"
46248      if test ! -f "$path" && test ! -d "$path"; then
46249        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46250      fi
46251
46252      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46253    fi
46254  fi
46255
46256      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46257$as_echo_n "checking for $DLL_NAME... " >&6; }
46258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46259$as_echo "$MSVC_DLL" >&6; }
46260    else
46261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46262$as_echo "incorrect, ignoring" >&6; }
46263      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46264$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46265    fi
46266  fi
46267
46268  fi
46269
46270  if test "x$MSVC_DLL" = x; then
46271    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46272    if test "x$VS100COMNTOOLS" != x; then
46273      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46274
46275  windows_path="$CYGWIN_VS_TOOLS_DIR"
46276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46277    unix_path=`$CYGPATH -u "$windows_path"`
46278    CYGWIN_VS_TOOLS_DIR="$unix_path"
46279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46281    CYGWIN_VS_TOOLS_DIR="$unix_path"
46282  fi
46283
46284      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46285        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46286	    | $GREP -i /x64/ | $HEAD --lines 1`
46287      else
46288        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46289	    | $GREP -i /x86/ | $HEAD --lines 1`
46290      fi
46291
46292  DLL_NAME="$DLL_NAME"
46293  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46294  METHOD="search of VS100COMNTOOLS"
46295  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46296    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46297$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46298
46299    # Need to check if the found msvcr is correct architecture
46300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46301$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46302    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46304      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46305      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46306      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46307        CORRECT_MSVCR_ARCH="PE32 executable"
46308      else
46309        CORRECT_MSVCR_ARCH="PE32+ executable"
46310      fi
46311    else
46312      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46313        CORRECT_MSVCR_ARCH=386
46314      else
46315        CORRECT_MSVCR_ARCH=x86-64
46316      fi
46317    fi
46318    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46320$as_echo "ok" >&6; }
46321      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46322
46323  # Only process if variable expands to non-empty
46324
46325  if test "x$MSVC_DLL" != x; then
46326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46327
46328  # Input might be given as Windows format, start by converting to
46329  # unix format.
46330  path="$MSVC_DLL"
46331  new_path=`$CYGPATH -u "$path"`
46332
46333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46336  # "foo.exe" is OK but "foo" is an error.
46337  #
46338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46339  # It is also a way to make sure we got the proper file name for the real test later on.
46340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46341  if test "x$test_shortpath" = x; then
46342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46343$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46344    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46345  fi
46346
46347  # Call helper function which possibly converts this using DOS-style short mode.
46348  # If so, the updated path is stored in $new_path.
46349
46350  input_path="$new_path"
46351  # Check if we need to convert this using DOS-style short mode. If the path
46352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46353  # take no chances and rewrite it.
46354  # Note: m4 eats our [], so we need to use [ and ] instead.
46355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46356  if test "x$has_forbidden_chars" != x; then
46357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46361      # Going to short mode and back again did indeed matter. Since short mode is
46362      # case insensitive, let's make it lowercase to improve readability.
46363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46364      # Now convert it back to Unix-style (cygpath)
46365      input_path=`$CYGPATH -u "$shortmode_path"`
46366      new_path="$input_path"
46367    fi
46368  fi
46369
46370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46371  if test "x$test_cygdrive_prefix" = x; then
46372    # As a simple fix, exclude /usr/bin since it's not a real path.
46373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46375      # a path prefixed by /cygdrive for fixpath to work.
46376      new_path="$CYGWIN_ROOT_PATH$input_path"
46377    fi
46378  fi
46379
46380
46381  if test "x$path" != "x$new_path"; then
46382    MSVC_DLL="$new_path"
46383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46384$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46385  fi
46386
46387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46388
46389  path="$MSVC_DLL"
46390  has_colon=`$ECHO $path | $GREP ^.:`
46391  new_path="$path"
46392  if test "x$has_colon" = x; then
46393    # Not in mixed or Windows style, start by that.
46394    new_path=`cmd //c echo $path`
46395  fi
46396
46397
46398  input_path="$new_path"
46399  # Check if we need to convert this using DOS-style short mode. If the path
46400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46401  # take no chances and rewrite it.
46402  # Note: m4 eats our [], so we need to use [ and ] instead.
46403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46404  if test "x$has_forbidden_chars" != x; then
46405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46407  fi
46408
46409
46410  windows_path="$new_path"
46411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46412    unix_path=`$CYGPATH -u "$windows_path"`
46413    new_path="$unix_path"
46414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46416    new_path="$unix_path"
46417  fi
46418
46419  if test "x$path" != "x$new_path"; then
46420    MSVC_DLL="$new_path"
46421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46422$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46423  fi
46424
46425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46427
46428    else
46429      # We're on a unix platform. Hooray! :)
46430      path="$MSVC_DLL"
46431      has_space=`$ECHO "$path" | $GREP " "`
46432      if test "x$has_space" != x; then
46433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46434$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46435        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46436      fi
46437
46438      # Use eval to expand a potential ~
46439      eval path="$path"
46440      if test ! -f "$path" && test ! -d "$path"; then
46441        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46442      fi
46443
46444      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46445    fi
46446  fi
46447
46448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46449$as_echo_n "checking for $DLL_NAME... " >&6; }
46450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46451$as_echo "$MSVC_DLL" >&6; }
46452    else
46453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46454$as_echo "incorrect, ignoring" >&6; }
46455      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46456$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46457    fi
46458  fi
46459
46460    fi
46461  fi
46462
46463  if test "x$MSVC_DLL" = x; then
46464    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46465    # (This was the original behaviour; kept since it might turn something up)
46466    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46467      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46468        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46469	    | $GREP x64 | $HEAD --lines 1`
46470      else
46471        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46472	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46473        if test "x$POSSIBLE_MSVC_DLL" = x; then
46474          # We're grasping at straws now...
46475          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46476	      | $HEAD --lines 1`
46477        fi
46478      fi
46479
46480
46481  DLL_NAME="$DLL_NAME"
46482  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46483  METHOD="search of VCINSTALLDIR"
46484  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46485    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46486$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46487
46488    # Need to check if the found msvcr is correct architecture
46489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46490$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46491    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46492    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46493      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46494      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46495      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46496        CORRECT_MSVCR_ARCH="PE32 executable"
46497      else
46498        CORRECT_MSVCR_ARCH="PE32+ executable"
46499      fi
46500    else
46501      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46502        CORRECT_MSVCR_ARCH=386
46503      else
46504        CORRECT_MSVCR_ARCH=x86-64
46505      fi
46506    fi
46507    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46509$as_echo "ok" >&6; }
46510      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46511
46512  # Only process if variable expands to non-empty
46513
46514  if test "x$MSVC_DLL" != x; then
46515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46516
46517  # Input might be given as Windows format, start by converting to
46518  # unix format.
46519  path="$MSVC_DLL"
46520  new_path=`$CYGPATH -u "$path"`
46521
46522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46525  # "foo.exe" is OK but "foo" is an error.
46526  #
46527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46528  # It is also a way to make sure we got the proper file name for the real test later on.
46529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46530  if test "x$test_shortpath" = x; then
46531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46532$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46533    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46534  fi
46535
46536  # Call helper function which possibly converts this using DOS-style short mode.
46537  # If so, the updated path is stored in $new_path.
46538
46539  input_path="$new_path"
46540  # Check if we need to convert this using DOS-style short mode. If the path
46541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46542  # take no chances and rewrite it.
46543  # Note: m4 eats our [], so we need to use [ and ] instead.
46544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46545  if test "x$has_forbidden_chars" != x; then
46546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46550      # Going to short mode and back again did indeed matter. Since short mode is
46551      # case insensitive, let's make it lowercase to improve readability.
46552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46553      # Now convert it back to Unix-style (cygpath)
46554      input_path=`$CYGPATH -u "$shortmode_path"`
46555      new_path="$input_path"
46556    fi
46557  fi
46558
46559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46560  if test "x$test_cygdrive_prefix" = x; then
46561    # As a simple fix, exclude /usr/bin since it's not a real path.
46562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46564      # a path prefixed by /cygdrive for fixpath to work.
46565      new_path="$CYGWIN_ROOT_PATH$input_path"
46566    fi
46567  fi
46568
46569
46570  if test "x$path" != "x$new_path"; then
46571    MSVC_DLL="$new_path"
46572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46573$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46574  fi
46575
46576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46577
46578  path="$MSVC_DLL"
46579  has_colon=`$ECHO $path | $GREP ^.:`
46580  new_path="$path"
46581  if test "x$has_colon" = x; then
46582    # Not in mixed or Windows style, start by that.
46583    new_path=`cmd //c echo $path`
46584  fi
46585
46586
46587  input_path="$new_path"
46588  # Check if we need to convert this using DOS-style short mode. If the path
46589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46590  # take no chances and rewrite it.
46591  # Note: m4 eats our [], so we need to use [ and ] instead.
46592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46593  if test "x$has_forbidden_chars" != x; then
46594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46596  fi
46597
46598
46599  windows_path="$new_path"
46600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46601    unix_path=`$CYGPATH -u "$windows_path"`
46602    new_path="$unix_path"
46603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46605    new_path="$unix_path"
46606  fi
46607
46608  if test "x$path" != "x$new_path"; then
46609    MSVC_DLL="$new_path"
46610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46611$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46612  fi
46613
46614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46616
46617    else
46618      # We're on a unix platform. Hooray! :)
46619      path="$MSVC_DLL"
46620      has_space=`$ECHO "$path" | $GREP " "`
46621      if test "x$has_space" != x; then
46622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46623$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46625      fi
46626
46627      # Use eval to expand a potential ~
46628      eval path="$path"
46629      if test ! -f "$path" && test ! -d "$path"; then
46630        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46631      fi
46632
46633      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46634    fi
46635  fi
46636
46637      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46638$as_echo_n "checking for $DLL_NAME... " >&6; }
46639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46640$as_echo "$MSVC_DLL" >&6; }
46641    else
46642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46643$as_echo "incorrect, ignoring" >&6; }
46644      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46645$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46646    fi
46647  fi
46648
46649    fi
46650  fi
46651
46652  if test "x$MSVC_DLL" = x; then
46653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46654$as_echo_n "checking for $DLL_NAME... " >&6; }
46655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46656$as_echo "no" >&6; }
46657    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
46658  fi
46659
46660      MSVCP_DLL="$MSVC_DLL"
46661    fi
46662
46663  fi
46664
46665  fi
46666
46667
46668  if test "x$NEEDS_LIB_X11" = xfalse; then
46669    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
46670      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
46671$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
46672    fi
46673    X_CFLAGS=
46674    X_LIBS=
46675  else
46676
46677    if test "x${with_x}" = xno; then
46678      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
46679    fi
46680
46681    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
46682      # The user has specified a X11 base directory. Use it for includes and
46683      # libraries, unless explicitely overridden.
46684      if test "x$x_includes" = xNONE; then
46685        x_includes="${with_x}/include"
46686      fi
46687      if test "x$x_libraries" = xNONE; then
46688        x_libraries="${with_x}/lib"
46689      fi
46690    else
46691      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
46692      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
46693      # --x-libraries for the sysroot, if that seems to be correct.
46694      if test "x$SYSROOT" != "x"; then
46695        if test "x$x_includes" = xNONE; then
46696          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
46697            x_includes="$SYSROOT/usr/X11R6/include"
46698          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
46699            x_includes="$SYSROOT/usr/include"
46700          fi
46701        fi
46702        if test "x$x_libraries" = xNONE; then
46703          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
46704            x_libraries="$SYSROOT/usr/X11R6/lib"
46705          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46706            x_libraries="$SYSROOT/usr/lib64"
46707          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
46708            x_libraries="$SYSROOT/usr/lib"
46709          fi
46710        fi
46711      fi
46712    fi
46713
46714    # Now let autoconf do it's magic
46715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
46716$as_echo_n "checking for X... " >&6; }
46717
46718
46719# Check whether --with-x was given.
46720if test "${with_x+set}" = set; then :
46721  withval=$with_x;
46722fi
46723
46724# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
46725if test "x$with_x" = xno; then
46726  # The user explicitly disabled X.
46727  have_x=disabled
46728else
46729  case $x_includes,$x_libraries in #(
46730    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
46731    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
46732  $as_echo_n "(cached) " >&6
46733else
46734  # One or both of the vars are not set, and there is no cached value.
46735ac_x_includes=no ac_x_libraries=no
46736rm -f -r conftest.dir
46737if mkdir conftest.dir; then
46738  cd conftest.dir
46739  cat >Imakefile <<'_ACEOF'
46740incroot:
46741	@echo incroot='${INCROOT}'
46742usrlibdir:
46743	@echo usrlibdir='${USRLIBDIR}'
46744libdir:
46745	@echo libdir='${LIBDIR}'
46746_ACEOF
46747  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
46748    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
46749    for ac_var in incroot usrlibdir libdir; do
46750      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
46751    done
46752    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
46753    for ac_extension in a so sl dylib la dll; do
46754      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
46755	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
46756	ac_im_usrlibdir=$ac_im_libdir; break
46757      fi
46758    done
46759    # Screen out bogus values from the imake configuration.  They are
46760    # bogus both because they are the default anyway, and because
46761    # using them would break gcc on systems where it needs fixed includes.
46762    case $ac_im_incroot in
46763	/usr/include) ac_x_includes= ;;
46764	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
46765    esac
46766    case $ac_im_usrlibdir in
46767	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
46768	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
46769    esac
46770  fi
46771  cd ..
46772  rm -f -r conftest.dir
46773fi
46774
46775# Standard set of common directories for X headers.
46776# Check X11 before X11Rn because it is often a symlink to the current release.
46777ac_x_header_dirs='
46778/usr/X11/include
46779/usr/X11R7/include
46780/usr/X11R6/include
46781/usr/X11R5/include
46782/usr/X11R4/include
46783
46784/usr/include/X11
46785/usr/include/X11R7
46786/usr/include/X11R6
46787/usr/include/X11R5
46788/usr/include/X11R4
46789
46790/usr/local/X11/include
46791/usr/local/X11R7/include
46792/usr/local/X11R6/include
46793/usr/local/X11R5/include
46794/usr/local/X11R4/include
46795
46796/usr/local/include/X11
46797/usr/local/include/X11R7
46798/usr/local/include/X11R6
46799/usr/local/include/X11R5
46800/usr/local/include/X11R4
46801
46802/usr/X386/include
46803/usr/x386/include
46804/usr/XFree86/include/X11
46805
46806/usr/include
46807/usr/local/include
46808/usr/unsupported/include
46809/usr/athena/include
46810/usr/local/x11r5/include
46811/usr/lpp/Xamples/include
46812
46813/usr/openwin/include
46814/usr/openwin/share/include'
46815
46816if test "$ac_x_includes" = no; then
46817  # Guess where to find include files, by looking for Xlib.h.
46818  # First, try using that file with no special directory specified.
46819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46820/* end confdefs.h.  */
46821#include <X11/Xlib.h>
46822_ACEOF
46823if ac_fn_cxx_try_cpp "$LINENO"; then :
46824  # We can compile using X headers with no special include directory.
46825ac_x_includes=
46826else
46827  for ac_dir in $ac_x_header_dirs; do
46828  if test -r "$ac_dir/X11/Xlib.h"; then
46829    ac_x_includes=$ac_dir
46830    break
46831  fi
46832done
46833fi
46834rm -f conftest.err conftest.i conftest.$ac_ext
46835fi # $ac_x_includes = no
46836
46837if test "$ac_x_libraries" = no; then
46838  # Check for the libraries.
46839  # See if we find them without any special options.
46840  # Don't add to $LIBS permanently.
46841  ac_save_LIBS=$LIBS
46842  LIBS="-lX11 $LIBS"
46843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46844/* end confdefs.h.  */
46845#include <X11/Xlib.h>
46846int
46847main ()
46848{
46849XrmInitialize ()
46850  ;
46851  return 0;
46852}
46853_ACEOF
46854if ac_fn_cxx_try_link "$LINENO"; then :
46855  LIBS=$ac_save_LIBS
46856# We can link X programs with no special library path.
46857ac_x_libraries=
46858else
46859  LIBS=$ac_save_LIBS
46860for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
46861do
46862  # Don't even attempt the hair of trying to link an X program!
46863  for ac_extension in a so sl dylib la dll; do
46864    if test -r "$ac_dir/libX11.$ac_extension"; then
46865      ac_x_libraries=$ac_dir
46866      break 2
46867    fi
46868  done
46869done
46870fi
46871rm -f core conftest.err conftest.$ac_objext \
46872    conftest$ac_exeext conftest.$ac_ext
46873fi # $ac_x_libraries = no
46874
46875case $ac_x_includes,$ac_x_libraries in #(
46876  no,* | *,no | *\'*)
46877    # Didn't find X, or a directory has "'" in its name.
46878    ac_cv_have_x="have_x=no";; #(
46879  *)
46880    # Record where we found X for the cache.
46881    ac_cv_have_x="have_x=yes\
46882	ac_x_includes='$ac_x_includes'\
46883	ac_x_libraries='$ac_x_libraries'"
46884esac
46885fi
46886;; #(
46887    *) have_x=yes;;
46888  esac
46889  eval "$ac_cv_have_x"
46890fi # $with_x != no
46891
46892if test "$have_x" != yes; then
46893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
46894$as_echo "$have_x" >&6; }
46895  no_x=yes
46896else
46897  # If each of the values was on the command line, it overrides each guess.
46898  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
46899  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
46900  # Update the cache value to reflect the command line values.
46901  ac_cv_have_x="have_x=yes\
46902	ac_x_includes='$x_includes'\
46903	ac_x_libraries='$x_libraries'"
46904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
46905$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
46906fi
46907
46908    if test "$no_x" = yes; then
46909  # Not all programs may use this symbol, but it does not hurt to define it.
46910
46911$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
46912
46913  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
46914else
46915  if test -n "$x_includes"; then
46916    X_CFLAGS="$X_CFLAGS -I$x_includes"
46917  fi
46918
46919  # It would also be nice to do this for all -L options, not just this one.
46920  if test -n "$x_libraries"; then
46921    X_LIBS="$X_LIBS -L$x_libraries"
46922    # For Solaris; some versions of Sun CC require a space after -R and
46923    # others require no space.  Words are not sufficient . . . .
46924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
46925$as_echo_n "checking whether -R must be followed by a space... " >&6; }
46926    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
46927    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
46928    ac_cxx_werror_flag=yes
46929    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46930/* end confdefs.h.  */
46931
46932int
46933main ()
46934{
46935
46936  ;
46937  return 0;
46938}
46939_ACEOF
46940if ac_fn_cxx_try_link "$LINENO"; then :
46941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46942$as_echo "no" >&6; }
46943       X_LIBS="$X_LIBS -R$x_libraries"
46944else
46945  LIBS="$ac_xsave_LIBS -R $x_libraries"
46946       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46947/* end confdefs.h.  */
46948
46949int
46950main ()
46951{
46952
46953  ;
46954  return 0;
46955}
46956_ACEOF
46957if ac_fn_cxx_try_link "$LINENO"; then :
46958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46959$as_echo "yes" >&6; }
46960	  X_LIBS="$X_LIBS -R $x_libraries"
46961else
46962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
46963$as_echo "neither works" >&6; }
46964fi
46965rm -f core conftest.err conftest.$ac_objext \
46966    conftest$ac_exeext conftest.$ac_ext
46967fi
46968rm -f core conftest.err conftest.$ac_objext \
46969    conftest$ac_exeext conftest.$ac_ext
46970    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
46971    LIBS=$ac_xsave_LIBS
46972  fi
46973
46974  # Check for system-dependent libraries X programs must link with.
46975  # Do this before checking for the system-independent R6 libraries
46976  # (-lICE), since we may need -lsocket or whatever for X linking.
46977
46978  if test "$ISC" = yes; then
46979    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
46980  else
46981    # Martyn Johnson says this is needed for Ultrix, if the X
46982    # libraries were built with DECnet support.  And Karl Berry says
46983    # the Alpha needs dnet_stub (dnet does not exist).
46984    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
46985    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46986/* end confdefs.h.  */
46987
46988/* Override any GCC internal prototype to avoid an error.
46989   Use char because int might match the return type of a GCC
46990   builtin and then its argument prototype would still apply.  */
46991#ifdef __cplusplus
46992extern "C"
46993#endif
46994char XOpenDisplay ();
46995int
46996main ()
46997{
46998return XOpenDisplay ();
46999  ;
47000  return 0;
47001}
47002_ACEOF
47003if ac_fn_cxx_try_link "$LINENO"; then :
47004
47005else
47006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
47007$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
47008if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
47009  $as_echo_n "(cached) " >&6
47010else
47011  ac_check_lib_save_LIBS=$LIBS
47012LIBS="-ldnet  $LIBS"
47013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47014/* end confdefs.h.  */
47015
47016/* Override any GCC internal prototype to avoid an error.
47017   Use char because int might match the return type of a GCC
47018   builtin and then its argument prototype would still apply.  */
47019#ifdef __cplusplus
47020extern "C"
47021#endif
47022char dnet_ntoa ();
47023int
47024main ()
47025{
47026return dnet_ntoa ();
47027  ;
47028  return 0;
47029}
47030_ACEOF
47031if ac_fn_cxx_try_link "$LINENO"; then :
47032  ac_cv_lib_dnet_dnet_ntoa=yes
47033else
47034  ac_cv_lib_dnet_dnet_ntoa=no
47035fi
47036rm -f core conftest.err conftest.$ac_objext \
47037    conftest$ac_exeext conftest.$ac_ext
47038LIBS=$ac_check_lib_save_LIBS
47039fi
47040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
47041$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
47042if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
47043  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
47044fi
47045
47046    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
47047      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
47048$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
47049if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
47050  $as_echo_n "(cached) " >&6
47051else
47052  ac_check_lib_save_LIBS=$LIBS
47053LIBS="-ldnet_stub  $LIBS"
47054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47055/* end confdefs.h.  */
47056
47057/* Override any GCC internal prototype to avoid an error.
47058   Use char because int might match the return type of a GCC
47059   builtin and then its argument prototype would still apply.  */
47060#ifdef __cplusplus
47061extern "C"
47062#endif
47063char dnet_ntoa ();
47064int
47065main ()
47066{
47067return dnet_ntoa ();
47068  ;
47069  return 0;
47070}
47071_ACEOF
47072if ac_fn_cxx_try_link "$LINENO"; then :
47073  ac_cv_lib_dnet_stub_dnet_ntoa=yes
47074else
47075  ac_cv_lib_dnet_stub_dnet_ntoa=no
47076fi
47077rm -f core conftest.err conftest.$ac_objext \
47078    conftest$ac_exeext conftest.$ac_ext
47079LIBS=$ac_check_lib_save_LIBS
47080fi
47081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
47082$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
47083if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
47084  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
47085fi
47086
47087    fi
47088fi
47089rm -f core conftest.err conftest.$ac_objext \
47090    conftest$ac_exeext conftest.$ac_ext
47091    LIBS="$ac_xsave_LIBS"
47092
47093    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
47094    # to get the SysV transport functions.
47095    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
47096    # needs -lnsl.
47097    # The nsl library prevents programs from opening the X display
47098    # on Irix 5.2, according to T.E. Dickey.
47099    # The functions gethostbyname, getservbyname, and inet_addr are
47100    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
47101    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
47102if test "x$ac_cv_func_gethostbyname" = xyes; then :
47103
47104fi
47105
47106    if test $ac_cv_func_gethostbyname = no; then
47107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
47108$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
47109if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
47110  $as_echo_n "(cached) " >&6
47111else
47112  ac_check_lib_save_LIBS=$LIBS
47113LIBS="-lnsl  $LIBS"
47114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47115/* end confdefs.h.  */
47116
47117/* Override any GCC internal prototype to avoid an error.
47118   Use char because int might match the return type of a GCC
47119   builtin and then its argument prototype would still apply.  */
47120#ifdef __cplusplus
47121extern "C"
47122#endif
47123char gethostbyname ();
47124int
47125main ()
47126{
47127return gethostbyname ();
47128  ;
47129  return 0;
47130}
47131_ACEOF
47132if ac_fn_cxx_try_link "$LINENO"; then :
47133  ac_cv_lib_nsl_gethostbyname=yes
47134else
47135  ac_cv_lib_nsl_gethostbyname=no
47136fi
47137rm -f core conftest.err conftest.$ac_objext \
47138    conftest$ac_exeext conftest.$ac_ext
47139LIBS=$ac_check_lib_save_LIBS
47140fi
47141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
47142$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
47143if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
47144  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
47145fi
47146
47147      if test $ac_cv_lib_nsl_gethostbyname = no; then
47148	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
47149$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
47150if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
47151  $as_echo_n "(cached) " >&6
47152else
47153  ac_check_lib_save_LIBS=$LIBS
47154LIBS="-lbsd  $LIBS"
47155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47156/* end confdefs.h.  */
47157
47158/* Override any GCC internal prototype to avoid an error.
47159   Use char because int might match the return type of a GCC
47160   builtin and then its argument prototype would still apply.  */
47161#ifdef __cplusplus
47162extern "C"
47163#endif
47164char gethostbyname ();
47165int
47166main ()
47167{
47168return gethostbyname ();
47169  ;
47170  return 0;
47171}
47172_ACEOF
47173if ac_fn_cxx_try_link "$LINENO"; then :
47174  ac_cv_lib_bsd_gethostbyname=yes
47175else
47176  ac_cv_lib_bsd_gethostbyname=no
47177fi
47178rm -f core conftest.err conftest.$ac_objext \
47179    conftest$ac_exeext conftest.$ac_ext
47180LIBS=$ac_check_lib_save_LIBS
47181fi
47182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
47183$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
47184if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
47185  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
47186fi
47187
47188      fi
47189    fi
47190
47191    # lieder@skyler.mavd.honeywell.com says without -lsocket,
47192    # socket/setsockopt and other routines are undefined under SCO ODT
47193    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
47194    # on later versions), says Simon Leinen: it contains gethostby*
47195    # variants that don't use the name server (or something).  -lsocket
47196    # must be given before -lnsl if both are needed.  We assume that
47197    # if connect needs -lnsl, so does gethostbyname.
47198    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
47199if test "x$ac_cv_func_connect" = xyes; then :
47200
47201fi
47202
47203    if test $ac_cv_func_connect = no; then
47204      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
47205$as_echo_n "checking for connect in -lsocket... " >&6; }
47206if ${ac_cv_lib_socket_connect+:} false; then :
47207  $as_echo_n "(cached) " >&6
47208else
47209  ac_check_lib_save_LIBS=$LIBS
47210LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
47211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47212/* end confdefs.h.  */
47213
47214/* Override any GCC internal prototype to avoid an error.
47215   Use char because int might match the return type of a GCC
47216   builtin and then its argument prototype would still apply.  */
47217#ifdef __cplusplus
47218extern "C"
47219#endif
47220char connect ();
47221int
47222main ()
47223{
47224return connect ();
47225  ;
47226  return 0;
47227}
47228_ACEOF
47229if ac_fn_cxx_try_link "$LINENO"; then :
47230  ac_cv_lib_socket_connect=yes
47231else
47232  ac_cv_lib_socket_connect=no
47233fi
47234rm -f core conftest.err conftest.$ac_objext \
47235    conftest$ac_exeext conftest.$ac_ext
47236LIBS=$ac_check_lib_save_LIBS
47237fi
47238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
47239$as_echo "$ac_cv_lib_socket_connect" >&6; }
47240if test "x$ac_cv_lib_socket_connect" = xyes; then :
47241  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
47242fi
47243
47244    fi
47245
47246    # Guillermo Gomez says -lposix is necessary on A/UX.
47247    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
47248if test "x$ac_cv_func_remove" = xyes; then :
47249
47250fi
47251
47252    if test $ac_cv_func_remove = no; then
47253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
47254$as_echo_n "checking for remove in -lposix... " >&6; }
47255if ${ac_cv_lib_posix_remove+:} false; then :
47256  $as_echo_n "(cached) " >&6
47257else
47258  ac_check_lib_save_LIBS=$LIBS
47259LIBS="-lposix  $LIBS"
47260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47261/* end confdefs.h.  */
47262
47263/* Override any GCC internal prototype to avoid an error.
47264   Use char because int might match the return type of a GCC
47265   builtin and then its argument prototype would still apply.  */
47266#ifdef __cplusplus
47267extern "C"
47268#endif
47269char remove ();
47270int
47271main ()
47272{
47273return remove ();
47274  ;
47275  return 0;
47276}
47277_ACEOF
47278if ac_fn_cxx_try_link "$LINENO"; then :
47279  ac_cv_lib_posix_remove=yes
47280else
47281  ac_cv_lib_posix_remove=no
47282fi
47283rm -f core conftest.err conftest.$ac_objext \
47284    conftest$ac_exeext conftest.$ac_ext
47285LIBS=$ac_check_lib_save_LIBS
47286fi
47287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
47288$as_echo "$ac_cv_lib_posix_remove" >&6; }
47289if test "x$ac_cv_lib_posix_remove" = xyes; then :
47290  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
47291fi
47292
47293    fi
47294
47295    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
47296    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
47297if test "x$ac_cv_func_shmat" = xyes; then :
47298
47299fi
47300
47301    if test $ac_cv_func_shmat = no; then
47302      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
47303$as_echo_n "checking for shmat in -lipc... " >&6; }
47304if ${ac_cv_lib_ipc_shmat+:} false; then :
47305  $as_echo_n "(cached) " >&6
47306else
47307  ac_check_lib_save_LIBS=$LIBS
47308LIBS="-lipc  $LIBS"
47309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47310/* end confdefs.h.  */
47311
47312/* Override any GCC internal prototype to avoid an error.
47313   Use char because int might match the return type of a GCC
47314   builtin and then its argument prototype would still apply.  */
47315#ifdef __cplusplus
47316extern "C"
47317#endif
47318char shmat ();
47319int
47320main ()
47321{
47322return shmat ();
47323  ;
47324  return 0;
47325}
47326_ACEOF
47327if ac_fn_cxx_try_link "$LINENO"; then :
47328  ac_cv_lib_ipc_shmat=yes
47329else
47330  ac_cv_lib_ipc_shmat=no
47331fi
47332rm -f core conftest.err conftest.$ac_objext \
47333    conftest$ac_exeext conftest.$ac_ext
47334LIBS=$ac_check_lib_save_LIBS
47335fi
47336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
47337$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
47338if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
47339  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
47340fi
47341
47342    fi
47343  fi
47344
47345  # Check for libraries that X11R6 Xt/Xaw programs need.
47346  ac_save_LDFLAGS=$LDFLAGS
47347  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
47348  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
47349  # check for ICE first), but we must link in the order -lSM -lICE or
47350  # we get undefined symbols.  So assume we have SM if we have ICE.
47351  # These have to be linked with before -lX11, unlike the other
47352  # libraries we check for below, so use a different variable.
47353  # John Interrante, Karl Berry
47354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
47355$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
47356if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
47357  $as_echo_n "(cached) " >&6
47358else
47359  ac_check_lib_save_LIBS=$LIBS
47360LIBS="-lICE $X_EXTRA_LIBS $LIBS"
47361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47362/* end confdefs.h.  */
47363
47364/* Override any GCC internal prototype to avoid an error.
47365   Use char because int might match the return type of a GCC
47366   builtin and then its argument prototype would still apply.  */
47367#ifdef __cplusplus
47368extern "C"
47369#endif
47370char IceConnectionNumber ();
47371int
47372main ()
47373{
47374return IceConnectionNumber ();
47375  ;
47376  return 0;
47377}
47378_ACEOF
47379if ac_fn_cxx_try_link "$LINENO"; then :
47380  ac_cv_lib_ICE_IceConnectionNumber=yes
47381else
47382  ac_cv_lib_ICE_IceConnectionNumber=no
47383fi
47384rm -f core conftest.err conftest.$ac_objext \
47385    conftest$ac_exeext conftest.$ac_ext
47386LIBS=$ac_check_lib_save_LIBS
47387fi
47388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
47389$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
47390if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
47391  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
47392fi
47393
47394  LDFLAGS=$ac_save_LDFLAGS
47395
47396fi
47397
47398
47399    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
47400    # this doesn't make sense so we remove it.
47401    if test "x$COMPILE_TYPE" = xcross; then
47402      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
47403    fi
47404
47405    if test "x$no_x" = xyes; then
47406
47407  # Print a helpful message on how to acquire the necessary build dependency.
47408  # x11 is the help tag: freetype, cups, alsa etc
47409  MISSING_DEPENDENCY=x11
47410
47411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47412    cygwin_help $MISSING_DEPENDENCY
47413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47414    msys_help $MISSING_DEPENDENCY
47415  else
47416    PKGHANDLER_COMMAND=
47417
47418    case $PKGHANDLER in
47419      apt-get)
47420        apt_help     $MISSING_DEPENDENCY ;;
47421      yum)
47422        yum_help     $MISSING_DEPENDENCY ;;
47423      port)
47424        port_help    $MISSING_DEPENDENCY ;;
47425      pkgutil)
47426        pkgutil_help $MISSING_DEPENDENCY ;;
47427      pkgadd)
47428        pkgadd_help  $MISSING_DEPENDENCY ;;
47429    esac
47430
47431    if test "x$PKGHANDLER_COMMAND" != x; then
47432      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47433    fi
47434  fi
47435
47436      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
47437    fi
47438
47439    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47440      OPENWIN_HOME="/usr/openwin"
47441      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
47442      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
47443          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
47444          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
47445          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
47446    fi
47447
47448    ac_ext=c
47449ac_cpp='$CPP $CPPFLAGS'
47450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47452ac_compiler_gnu=$ac_cv_c_compiler_gnu
47453
47454    OLD_CFLAGS="$CFLAGS"
47455    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
47456
47457    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
47458    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
47459do :
47460  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47461ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
47462          # include <X11/Xlib.h>
47463          # include <X11/Xutil.h>
47464
47465
47466"
47467if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47468  cat >>confdefs.h <<_ACEOF
47469#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47470_ACEOF
47471 X11_HEADERS_OK=yes
47472else
47473  X11_HEADERS_OK=no; break
47474fi
47475
47476done
47477
47478
47479    if test "x$X11_HEADERS_OK" = xno; then
47480
47481  # Print a helpful message on how to acquire the necessary build dependency.
47482  # x11 is the help tag: freetype, cups, alsa etc
47483  MISSING_DEPENDENCY=x11
47484
47485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47486    cygwin_help $MISSING_DEPENDENCY
47487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47488    msys_help $MISSING_DEPENDENCY
47489  else
47490    PKGHANDLER_COMMAND=
47491
47492    case $PKGHANDLER in
47493      apt-get)
47494        apt_help     $MISSING_DEPENDENCY ;;
47495      yum)
47496        yum_help     $MISSING_DEPENDENCY ;;
47497      port)
47498        port_help    $MISSING_DEPENDENCY ;;
47499      pkgutil)
47500        pkgutil_help $MISSING_DEPENDENCY ;;
47501      pkgadd)
47502        pkgadd_help  $MISSING_DEPENDENCY ;;
47503    esac
47504
47505    if test "x$PKGHANDLER_COMMAND" != x; then
47506      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47507    fi
47508  fi
47509
47510      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
47511    fi
47512
47513    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
47514    # defined in libawt_xawt.
47515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
47516$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
47517    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47518/* end confdefs.h.  */
47519#include <X11/extensions/Xrender.h>
47520int
47521main ()
47522{
47523XLinearGradient x;
47524  ;
47525  return 0;
47526}
47527_ACEOF
47528if ac_fn_c_try_compile "$LINENO"; then :
47529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47530$as_echo "yes" >&6; }
47531else
47532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47533$as_echo "no" >&6; }
47534         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
47535fi
47536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47537
47538    CFLAGS="$OLD_CFLAGS"
47539    ac_ext=cpp
47540ac_cpp='$CXXCPP $CPPFLAGS'
47541ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47542ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47543ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47544
47545  fi # NEEDS_LIB_X11
47546
47547
47548
47549
47550
47551
47552# Check whether --with-cups was given.
47553if test "${with_cups+set}" = set; then :
47554  withval=$with_cups;
47555fi
47556
47557
47558# Check whether --with-cups-include was given.
47559if test "${with_cups_include+set}" = set; then :
47560  withval=$with_cups_include;
47561fi
47562
47563
47564  if test "x$NEEDS_LIB_CUPS" = xfalse; then
47565    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
47566        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
47567      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
47568$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
47569    fi
47570    CUPS_CFLAGS=
47571  else
47572    CUPS_FOUND=no
47573
47574    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
47575      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
47576    fi
47577
47578    if test "x${with_cups}" != x; then
47579      CUPS_CFLAGS="-I${with_cups}/include"
47580      CUPS_FOUND=yes
47581    fi
47582    if test "x${with_cups_include}" != x; then
47583      CUPS_CFLAGS="-I${with_cups_include}"
47584      CUPS_FOUND=yes
47585    fi
47586    if test "x$CUPS_FOUND" = xno; then
47587      # Are the cups headers installed in the default /usr/include location?
47588      for ac_header in cups/cups.h cups/ppd.h
47589do :
47590  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47591ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
47592if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47593  cat >>confdefs.h <<_ACEOF
47594#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47595_ACEOF
47596
47597          CUPS_FOUND=yes
47598          CUPS_CFLAGS=
47599          DEFAULT_CUPS=yes
47600
47601fi
47602
47603done
47604
47605    fi
47606    if test "x$CUPS_FOUND" = xno; then
47607      # Getting nervous now? Lets poke around for standard Solaris third-party
47608      # package installation locations.
47609      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
47610$as_echo_n "checking for cups headers... " >&6; }
47611      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
47612        # An SFW package seems to be installed!
47613        CUPS_FOUND=yes
47614        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
47615      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
47616        # A CSW package seems to be installed!
47617        CUPS_FOUND=yes
47618        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
47619      fi
47620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
47621$as_echo "$CUPS_FOUND" >&6; }
47622    fi
47623    if test "x$CUPS_FOUND" = xno; then
47624
47625  # Print a helpful message on how to acquire the necessary build dependency.
47626  # cups is the help tag: freetype, cups, alsa etc
47627  MISSING_DEPENDENCY=cups
47628
47629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47630    cygwin_help $MISSING_DEPENDENCY
47631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47632    msys_help $MISSING_DEPENDENCY
47633  else
47634    PKGHANDLER_COMMAND=
47635
47636    case $PKGHANDLER in
47637      apt-get)
47638        apt_help     $MISSING_DEPENDENCY ;;
47639      yum)
47640        yum_help     $MISSING_DEPENDENCY ;;
47641      port)
47642        port_help    $MISSING_DEPENDENCY ;;
47643      pkgutil)
47644        pkgutil_help $MISSING_DEPENDENCY ;;
47645      pkgadd)
47646        pkgadd_help  $MISSING_DEPENDENCY ;;
47647    esac
47648
47649    if test "x$PKGHANDLER_COMMAND" != x; then
47650      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47651    fi
47652  fi
47653
47654      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
47655    fi
47656  fi
47657
47658
47659
47660
47661
47662# Check whether --with-freetype was given.
47663if test "${with_freetype+set}" = set; then :
47664  withval=$with_freetype;
47665fi
47666
47667
47668# Check whether --with-freetype-include was given.
47669if test "${with_freetype_include+set}" = set; then :
47670  withval=$with_freetype_include;
47671fi
47672
47673
47674# Check whether --with-freetype-lib was given.
47675if test "${with_freetype_lib+set}" = set; then :
47676  withval=$with_freetype_lib;
47677fi
47678
47679
47680# Check whether --with-freetype-src was given.
47681if test "${with_freetype_src+set}" = set; then :
47682  withval=$with_freetype_src;
47683fi
47684
47685  # Check whether --enable-freetype-bundling was given.
47686if test "${enable_freetype_bundling+set}" = set; then :
47687  enableval=$enable_freetype_bundling;
47688fi
47689
47690
47691  # Need to specify explicitly since it needs to be overridden on some versions of macosx
47692  FREETYPE_BASE_NAME=freetype
47693  FREETYPE_CFLAGS=
47694  FREETYPE_LIBS=
47695  FREETYPE_BUNDLE_LIB_PATH=
47696
47697  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
47698    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
47699        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
47700        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
47701        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
47702      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
47703$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
47704    fi
47705    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
47706      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
47707$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
47708    fi
47709  else
47710    # freetype is needed to build; go get it!
47711
47712    BUNDLE_FREETYPE="$enable_freetype_bundling"
47713
47714    if  test "x$with_freetype_src" != x; then
47715      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47716        # Try to build freetype if --with-freetype-src was given on Windows
47717
47718  FREETYPE_SRC_PATH="$with_freetype_src"
47719  BUILD_FREETYPE=yes
47720
47721  # Check if the freetype sources are acessible..
47722  if ! test -d $FREETYPE_SRC_PATH; then
47723    { $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
47724$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
47725    BUILD_FREETYPE=no
47726  fi
47727  # ..and contain a vc2010 project file
47728  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
47729  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
47730    { $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
47731$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
47732    BUILD_FREETYPE=no
47733  fi
47734  # Now check if configure found a version of 'msbuild.exe'
47735  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
47736    { $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
47737$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;}
47738    BUILD_FREETYPE=no
47739  fi
47740
47741  # Ready to go..
47742  if test "x$BUILD_FREETYPE" = xyes; then
47743    # msbuild requires trailing slashes for output directories
47744    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
47745    freetype_lib_path_unix="$freetype_lib_path"
47746    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
47747
47748  unix_path="$vcxproj_path"
47749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47750    windows_path=`$CYGPATH -m "$unix_path"`
47751    vcxproj_path="$windows_path"
47752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47753    windows_path=`cmd //c echo $unix_path`
47754    vcxproj_path="$windows_path"
47755  fi
47756
47757
47758  unix_path="$freetype_lib_path"
47759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47760    windows_path=`$CYGPATH -m "$unix_path"`
47761    freetype_lib_path="$windows_path"
47762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47763    windows_path=`cmd //c echo $unix_path`
47764    freetype_lib_path="$windows_path"
47765  fi
47766
47767
47768  unix_path="$freetype_obj_path"
47769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47770    windows_path=`$CYGPATH -m "$unix_path"`
47771    freetype_obj_path="$windows_path"
47772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47773    windows_path=`cmd //c echo $unix_path`
47774    freetype_obj_path="$windows_path"
47775  fi
47776
47777    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47778      freetype_platform=x64
47779    else
47780      freetype_platform=win32
47781    fi
47782
47783    # The original freetype project file is for VS 2010 (i.e. 'v100'),
47784    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
47785    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
47786    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
47787    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
47788$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
47789
47790    # First we try to build the freetype.dll
47791    $ECHO -e "@echo off\n"\
47792        "$MSBUILD $vcxproj_path "\
47793        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
47794        "/p:Configuration=\"Release Multithreaded\" "\
47795        "/p:Platform=$freetype_platform "\
47796        "/p:ConfigurationType=DynamicLibrary "\
47797        "/p:TargetName=freetype "\
47798        "/p:OutDir=\"$freetype_lib_path\" "\
47799        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
47800    cmd /c freetype.bat
47801
47802    if test -s "$freetype_lib_path_unix/freetype.dll"; then
47803      # If that succeeds we also build freetype.lib
47804      $ECHO -e "@echo off\n"\
47805          "$MSBUILD $vcxproj_path "\
47806          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
47807          "/p:Configuration=\"Release Multithreaded\" "\
47808          "/p:Platform=$freetype_platform "\
47809          "/p:ConfigurationType=StaticLibrary "\
47810          "/p:TargetName=freetype "\
47811          "/p:OutDir=\"$freetype_lib_path\" "\
47812          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
47813      cmd /c freetype.bat
47814
47815      if test -s "$freetype_lib_path_unix/freetype.lib"; then
47816        # Once we build both, lib and dll, set freetype lib and include path appropriately
47817        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
47818        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
47819        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
47820$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
47821      else
47822        BUILD_FREETYPE=no
47823      fi
47824    else
47825      BUILD_FREETYPE=no
47826    fi
47827  fi
47828
47829        if test "x$BUILD_FREETYPE" = xyes; then
47830          # Okay, we built it. Check that it works.
47831
47832  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47833  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47834  METHOD="--with-freetype-src"
47835
47836  # Let's start with an optimistic view of the world :-)
47837  FOUND_FREETYPE=yes
47838
47839  # First look for the canonical freetype main include file ft2build.h.
47840  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47841    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47842    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47843    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47844      # Fail.
47845      FOUND_FREETYPE=no
47846    fi
47847  fi
47848
47849  if test "x$FOUND_FREETYPE" = xyes; then
47850    # Include file found, let's continue the sanity check.
47851    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47852$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47853
47854    # Reset to default value
47855    FREETYPE_BASE_NAME=freetype
47856    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47857    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47858      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47859          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47860        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47861        # for the .6 version explicitly.
47862        FREETYPE_BASE_NAME=freetype.6
47863        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47864        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47865$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47866      else
47867        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47868$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47869        FOUND_FREETYPE=no
47870      fi
47871    else
47872      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47873        # On Windows, we will need both .lib and .dll file.
47874        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47875          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47876$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47877          FOUND_FREETYPE=no
47878        fi
47879      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47880          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47881        # Found lib in isa dir, use that instead.
47882        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47883        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47884$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47885      fi
47886    fi
47887  fi
47888
47889  if test "x$FOUND_FREETYPE" = xyes; then
47890
47891  # Only process if variable expands to non-empty
47892
47893  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47895
47896  # Input might be given as Windows format, start by converting to
47897  # unix format.
47898  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47899  new_path=`$CYGPATH -u "$path"`
47900
47901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47904  # "foo.exe" is OK but "foo" is an error.
47905  #
47906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47907  # It is also a way to make sure we got the proper file name for the real test later on.
47908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47909  if test "x$test_shortpath" = x; then
47910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47911$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47912    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47913  fi
47914
47915  # Call helper function which possibly converts this using DOS-style short mode.
47916  # If so, the updated path is stored in $new_path.
47917
47918  input_path="$new_path"
47919  # Check if we need to convert this using DOS-style short mode. If the path
47920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47921  # take no chances and rewrite it.
47922  # Note: m4 eats our [], so we need to use [ and ] instead.
47923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47924  if test "x$has_forbidden_chars" != x; then
47925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47929      # Going to short mode and back again did indeed matter. Since short mode is
47930      # case insensitive, let's make it lowercase to improve readability.
47931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47932      # Now convert it back to Unix-style (cygpath)
47933      input_path=`$CYGPATH -u "$shortmode_path"`
47934      new_path="$input_path"
47935    fi
47936  fi
47937
47938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47939  if test "x$test_cygdrive_prefix" = x; then
47940    # As a simple fix, exclude /usr/bin since it's not a real path.
47941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47943      # a path prefixed by /cygdrive for fixpath to work.
47944      new_path="$CYGWIN_ROOT_PATH$input_path"
47945    fi
47946  fi
47947
47948
47949  if test "x$path" != "x$new_path"; then
47950    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47953  fi
47954
47955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47956
47957  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47958  has_colon=`$ECHO $path | $GREP ^.:`
47959  new_path="$path"
47960  if test "x$has_colon" = x; then
47961    # Not in mixed or Windows style, start by that.
47962    new_path=`cmd //c echo $path`
47963  fi
47964
47965
47966  input_path="$new_path"
47967  # Check if we need to convert this using DOS-style short mode. If the path
47968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47969  # take no chances and rewrite it.
47970  # Note: m4 eats our [], so we need to use [ and ] instead.
47971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47972  if test "x$has_forbidden_chars" != x; then
47973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47975  fi
47976
47977
47978  windows_path="$new_path"
47979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47980    unix_path=`$CYGPATH -u "$windows_path"`
47981    new_path="$unix_path"
47982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47984    new_path="$unix_path"
47985  fi
47986
47987  if test "x$path" != "x$new_path"; then
47988    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47990$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47991  fi
47992
47993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47995
47996    else
47997      # We're on a unix platform. Hooray! :)
47998      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47999      has_space=`$ECHO "$path" | $GREP " "`
48000      if test "x$has_space" != x; then
48001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48002$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48003        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48004      fi
48005
48006      # Use eval to expand a potential ~
48007      eval path="$path"
48008      if test ! -f "$path" && test ! -d "$path"; then
48009        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48010      fi
48011
48012      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48013    fi
48014  fi
48015
48016
48017  # Only process if variable expands to non-empty
48018
48019  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48021
48022  # Input might be given as Windows format, start by converting to
48023  # unix format.
48024  path="$POTENTIAL_FREETYPE_LIB_PATH"
48025  new_path=`$CYGPATH -u "$path"`
48026
48027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48030  # "foo.exe" is OK but "foo" is an error.
48031  #
48032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48033  # It is also a way to make sure we got the proper file name for the real test later on.
48034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48035  if test "x$test_shortpath" = x; then
48036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48037$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48038    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48039  fi
48040
48041  # Call helper function which possibly converts this using DOS-style short mode.
48042  # If so, the updated path is stored in $new_path.
48043
48044  input_path="$new_path"
48045  # Check if we need to convert this using DOS-style short mode. If the path
48046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48047  # take no chances and rewrite it.
48048  # Note: m4 eats our [], so we need to use [ and ] instead.
48049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48050  if test "x$has_forbidden_chars" != x; then
48051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48055      # Going to short mode and back again did indeed matter. Since short mode is
48056      # case insensitive, let's make it lowercase to improve readability.
48057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48058      # Now convert it back to Unix-style (cygpath)
48059      input_path=`$CYGPATH -u "$shortmode_path"`
48060      new_path="$input_path"
48061    fi
48062  fi
48063
48064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48065  if test "x$test_cygdrive_prefix" = x; then
48066    # As a simple fix, exclude /usr/bin since it's not a real path.
48067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48069      # a path prefixed by /cygdrive for fixpath to work.
48070      new_path="$CYGWIN_ROOT_PATH$input_path"
48071    fi
48072  fi
48073
48074
48075  if test "x$path" != "x$new_path"; then
48076    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48078$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48079  fi
48080
48081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48082
48083  path="$POTENTIAL_FREETYPE_LIB_PATH"
48084  has_colon=`$ECHO $path | $GREP ^.:`
48085  new_path="$path"
48086  if test "x$has_colon" = x; then
48087    # Not in mixed or Windows style, start by that.
48088    new_path=`cmd //c echo $path`
48089  fi
48090
48091
48092  input_path="$new_path"
48093  # Check if we need to convert this using DOS-style short mode. If the path
48094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48095  # take no chances and rewrite it.
48096  # Note: m4 eats our [], so we need to use [ and ] instead.
48097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48098  if test "x$has_forbidden_chars" != x; then
48099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48101  fi
48102
48103
48104  windows_path="$new_path"
48105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48106    unix_path=`$CYGPATH -u "$windows_path"`
48107    new_path="$unix_path"
48108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48110    new_path="$unix_path"
48111  fi
48112
48113  if test "x$path" != "x$new_path"; then
48114    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48116$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48117  fi
48118
48119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48121
48122    else
48123      # We're on a unix platform. Hooray! :)
48124      path="$POTENTIAL_FREETYPE_LIB_PATH"
48125      has_space=`$ECHO "$path" | $GREP " "`
48126      if test "x$has_space" != x; then
48127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48130      fi
48131
48132      # Use eval to expand a potential ~
48133      eval path="$path"
48134      if test ! -f "$path" && test ! -d "$path"; then
48135        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48136      fi
48137
48138      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48139    fi
48140  fi
48141
48142
48143    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48145$as_echo_n "checking for freetype includes... " >&6; }
48146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48147$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48148    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48150$as_echo_n "checking for freetype libraries... " >&6; }
48151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48152$as_echo "$FREETYPE_LIB_PATH" >&6; }
48153  fi
48154
48155          if test "x$FOUND_FREETYPE" != xyes; then
48156            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
48157          fi
48158        else
48159          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
48160$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
48161          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
48162        fi
48163      else
48164        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
48165$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
48166      fi
48167    fi
48168
48169    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
48170      # User has specified settings
48171
48172      if test "x$BUNDLE_FREETYPE" = x; then
48173        # If not specified, default is to bundle freetype
48174        BUNDLE_FREETYPE=yes
48175      fi
48176
48177      if test "x$with_freetype" != x; then
48178        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
48179        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
48180      fi
48181
48182      # Allow --with-freetype-lib and --with-freetype-include to override
48183      if test "x$with_freetype_include" != x; then
48184        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
48185      fi
48186      if test "x$with_freetype_lib" != x; then
48187        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
48188      fi
48189
48190      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48191        # Okay, we got it. Check that it works.
48192
48193  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48194  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48195  METHOD="--with-freetype"
48196
48197  # Let's start with an optimistic view of the world :-)
48198  FOUND_FREETYPE=yes
48199
48200  # First look for the canonical freetype main include file ft2build.h.
48201  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48202    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48203    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48204    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48205      # Fail.
48206      FOUND_FREETYPE=no
48207    fi
48208  fi
48209
48210  if test "x$FOUND_FREETYPE" = xyes; then
48211    # Include file found, let's continue the sanity check.
48212    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48213$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48214
48215    # Reset to default value
48216    FREETYPE_BASE_NAME=freetype
48217    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48218    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48219      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48220          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48221        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48222        # for the .6 version explicitly.
48223        FREETYPE_BASE_NAME=freetype.6
48224        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48225        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48226$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48227      else
48228        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48229$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48230        FOUND_FREETYPE=no
48231      fi
48232    else
48233      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48234        # On Windows, we will need both .lib and .dll file.
48235        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48236          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48237$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48238          FOUND_FREETYPE=no
48239        fi
48240      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48241          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48242        # Found lib in isa dir, use that instead.
48243        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48244        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48245$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48246      fi
48247    fi
48248  fi
48249
48250  if test "x$FOUND_FREETYPE" = xyes; then
48251
48252  # Only process if variable expands to non-empty
48253
48254  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48256
48257  # Input might be given as Windows format, start by converting to
48258  # unix format.
48259  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48260  new_path=`$CYGPATH -u "$path"`
48261
48262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48265  # "foo.exe" is OK but "foo" is an error.
48266  #
48267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48268  # It is also a way to make sure we got the proper file name for the real test later on.
48269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48270  if test "x$test_shortpath" = x; then
48271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48272$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48273    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48274  fi
48275
48276  # Call helper function which possibly converts this using DOS-style short mode.
48277  # If so, the updated path is stored in $new_path.
48278
48279  input_path="$new_path"
48280  # Check if we need to convert this using DOS-style short mode. If the path
48281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48282  # take no chances and rewrite it.
48283  # Note: m4 eats our [], so we need to use [ and ] instead.
48284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48285  if test "x$has_forbidden_chars" != x; then
48286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48290      # Going to short mode and back again did indeed matter. Since short mode is
48291      # case insensitive, let's make it lowercase to improve readability.
48292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48293      # Now convert it back to Unix-style (cygpath)
48294      input_path=`$CYGPATH -u "$shortmode_path"`
48295      new_path="$input_path"
48296    fi
48297  fi
48298
48299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48300  if test "x$test_cygdrive_prefix" = x; then
48301    # As a simple fix, exclude /usr/bin since it's not a real path.
48302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48304      # a path prefixed by /cygdrive for fixpath to work.
48305      new_path="$CYGWIN_ROOT_PATH$input_path"
48306    fi
48307  fi
48308
48309
48310  if test "x$path" != "x$new_path"; then
48311    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48314  fi
48315
48316    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48317
48318  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48319  has_colon=`$ECHO $path | $GREP ^.:`
48320  new_path="$path"
48321  if test "x$has_colon" = x; then
48322    # Not in mixed or Windows style, start by that.
48323    new_path=`cmd //c echo $path`
48324  fi
48325
48326
48327  input_path="$new_path"
48328  # Check if we need to convert this using DOS-style short mode. If the path
48329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48330  # take no chances and rewrite it.
48331  # Note: m4 eats our [], so we need to use [ and ] instead.
48332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48333  if test "x$has_forbidden_chars" != x; then
48334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48336  fi
48337
48338
48339  windows_path="$new_path"
48340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48341    unix_path=`$CYGPATH -u "$windows_path"`
48342    new_path="$unix_path"
48343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48345    new_path="$unix_path"
48346  fi
48347
48348  if test "x$path" != "x$new_path"; then
48349    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48351$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48352  fi
48353
48354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48356
48357    else
48358      # We're on a unix platform. Hooray! :)
48359      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48360      has_space=`$ECHO "$path" | $GREP " "`
48361      if test "x$has_space" != x; then
48362        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48363$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48364        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48365      fi
48366
48367      # Use eval to expand a potential ~
48368      eval path="$path"
48369      if test ! -f "$path" && test ! -d "$path"; then
48370        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48371      fi
48372
48373      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48374    fi
48375  fi
48376
48377
48378  # Only process if variable expands to non-empty
48379
48380  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48381    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48382
48383  # Input might be given as Windows format, start by converting to
48384  # unix format.
48385  path="$POTENTIAL_FREETYPE_LIB_PATH"
48386  new_path=`$CYGPATH -u "$path"`
48387
48388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48391  # "foo.exe" is OK but "foo" is an error.
48392  #
48393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48394  # It is also a way to make sure we got the proper file name for the real test later on.
48395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48396  if test "x$test_shortpath" = x; then
48397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48398$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48399    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48400  fi
48401
48402  # Call helper function which possibly converts this using DOS-style short mode.
48403  # If so, the updated path is stored in $new_path.
48404
48405  input_path="$new_path"
48406  # Check if we need to convert this using DOS-style short mode. If the path
48407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48408  # take no chances and rewrite it.
48409  # Note: m4 eats our [], so we need to use [ and ] instead.
48410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48411  if test "x$has_forbidden_chars" != x; then
48412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48416      # Going to short mode and back again did indeed matter. Since short mode is
48417      # case insensitive, let's make it lowercase to improve readability.
48418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48419      # Now convert it back to Unix-style (cygpath)
48420      input_path=`$CYGPATH -u "$shortmode_path"`
48421      new_path="$input_path"
48422    fi
48423  fi
48424
48425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48426  if test "x$test_cygdrive_prefix" = x; then
48427    # As a simple fix, exclude /usr/bin since it's not a real path.
48428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48430      # a path prefixed by /cygdrive for fixpath to work.
48431      new_path="$CYGWIN_ROOT_PATH$input_path"
48432    fi
48433  fi
48434
48435
48436  if test "x$path" != "x$new_path"; then
48437    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48440  fi
48441
48442    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48443
48444  path="$POTENTIAL_FREETYPE_LIB_PATH"
48445  has_colon=`$ECHO $path | $GREP ^.:`
48446  new_path="$path"
48447  if test "x$has_colon" = x; then
48448    # Not in mixed or Windows style, start by that.
48449    new_path=`cmd //c echo $path`
48450  fi
48451
48452
48453  input_path="$new_path"
48454  # Check if we need to convert this using DOS-style short mode. If the path
48455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48456  # take no chances and rewrite it.
48457  # Note: m4 eats our [], so we need to use [ and ] instead.
48458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48459  if test "x$has_forbidden_chars" != x; then
48460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48462  fi
48463
48464
48465  windows_path="$new_path"
48466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48467    unix_path=`$CYGPATH -u "$windows_path"`
48468    new_path="$unix_path"
48469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48471    new_path="$unix_path"
48472  fi
48473
48474  if test "x$path" != "x$new_path"; then
48475    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48477$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48478  fi
48479
48480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48482
48483    else
48484      # We're on a unix platform. Hooray! :)
48485      path="$POTENTIAL_FREETYPE_LIB_PATH"
48486      has_space=`$ECHO "$path" | $GREP " "`
48487      if test "x$has_space" != x; then
48488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48490        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48491      fi
48492
48493      # Use eval to expand a potential ~
48494      eval path="$path"
48495      if test ! -f "$path" && test ! -d "$path"; then
48496        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48497      fi
48498
48499      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48500    fi
48501  fi
48502
48503
48504    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48505    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48506$as_echo_n "checking for freetype includes... " >&6; }
48507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48508$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48509    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48511$as_echo_n "checking for freetype libraries... " >&6; }
48512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48513$as_echo "$FREETYPE_LIB_PATH" >&6; }
48514  fi
48515
48516        if test "x$FOUND_FREETYPE" != xyes; then
48517          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
48518        fi
48519      else
48520        # User specified only one of lib or include. This is an error.
48521        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
48522          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
48523$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
48524          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
48525        else
48526          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
48527$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
48528          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
48529        fi
48530      fi
48531    else
48532      # User did not specify settings, but we need freetype. Try to locate it.
48533
48534      if test "x$BUNDLE_FREETYPE" = x; then
48535        # If not specified, default is to bundle freetype only on windows
48536        if test "x$OPENJDK_TARGET_OS" = xwindows; then
48537          BUNDLE_FREETYPE=yes
48538        else
48539          BUNDLE_FREETYPE=no
48540        fi
48541      fi
48542
48543      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
48544      if test "x$SYSROOT" = x; then
48545        if test "x$FOUND_FREETYPE" != xyes; then
48546          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
48547          if test "x$PKG_CONFIG" != x; then
48548
48549pkg_failed=no
48550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
48551$as_echo_n "checking for FREETYPE... " >&6; }
48552
48553if test -n "$FREETYPE_CFLAGS"; then
48554    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
48555 elif test -n "$PKG_CONFIG"; then
48556    if test -n "$PKG_CONFIG" && \
48557    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
48558  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
48559  ac_status=$?
48560  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48561  test $ac_status = 0; }; then
48562  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
48563else
48564  pkg_failed=yes
48565fi
48566 else
48567    pkg_failed=untried
48568fi
48569if test -n "$FREETYPE_LIBS"; then
48570    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
48571 elif test -n "$PKG_CONFIG"; then
48572    if test -n "$PKG_CONFIG" && \
48573    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
48574  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
48575  ac_status=$?
48576  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48577  test $ac_status = 0; }; then
48578  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
48579else
48580  pkg_failed=yes
48581fi
48582 else
48583    pkg_failed=untried
48584fi
48585
48586
48587
48588if test $pkg_failed = yes; then
48589
48590if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48591        _pkg_short_errors_supported=yes
48592else
48593        _pkg_short_errors_supported=no
48594fi
48595        if test $_pkg_short_errors_supported = yes; then
48596	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
48597        else
48598	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
48599        fi
48600	# Put the nasty error message in config.log where it belongs
48601	echo "$FREETYPE_PKG_ERRORS" >&5
48602
48603	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48604$as_echo "no" >&6; }
48605                FOUND_FREETYPE=no
48606elif test $pkg_failed = untried; then
48607	FOUND_FREETYPE=no
48608else
48609	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
48610	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
48611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48612$as_echo "yes" >&6; }
48613	FOUND_FREETYPE=yes
48614fi
48615            if test "x$FOUND_FREETYPE" = xyes; then
48616              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
48617              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
48618              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
48619              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48620                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
48621              fi
48622              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
48623              if test "x$BUNDLE_FREETYPE" = xyes; then
48624                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
48625$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
48626                FOUND_FREETYPE=no
48627              else
48628                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
48629$as_echo_n "checking for freetype... " >&6; }
48630                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
48631$as_echo "yes (using pkg-config)" >&6; }
48632              fi
48633            fi
48634          fi
48635        fi
48636      fi
48637
48638      if test "x$FOUND_FREETYPE" != xyes; then
48639        # Check in well-known locations
48640        if test "x$OPENJDK_TARGET_OS" = xwindows; then
48641          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
48642
48643  windows_path="$FREETYPE_BASE_DIR"
48644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48645    unix_path=`$CYGPATH -u "$windows_path"`
48646    FREETYPE_BASE_DIR="$unix_path"
48647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48649    FREETYPE_BASE_DIR="$unix_path"
48650  fi
48651
48652
48653  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48654  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
48655  METHOD="well-known location"
48656
48657  # Let's start with an optimistic view of the world :-)
48658  FOUND_FREETYPE=yes
48659
48660  # First look for the canonical freetype main include file ft2build.h.
48661  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48662    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48663    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48664    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48665      # Fail.
48666      FOUND_FREETYPE=no
48667    fi
48668  fi
48669
48670  if test "x$FOUND_FREETYPE" = xyes; then
48671    # Include file found, let's continue the sanity check.
48672    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48673$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48674
48675    # Reset to default value
48676    FREETYPE_BASE_NAME=freetype
48677    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48678    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48679      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48680          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48681        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48682        # for the .6 version explicitly.
48683        FREETYPE_BASE_NAME=freetype.6
48684        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48685        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48686$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48687      else
48688        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48689$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48690        FOUND_FREETYPE=no
48691      fi
48692    else
48693      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48694        # On Windows, we will need both .lib and .dll file.
48695        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48696          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48697$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48698          FOUND_FREETYPE=no
48699        fi
48700      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48701          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48702        # Found lib in isa dir, use that instead.
48703        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48704        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48705$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48706      fi
48707    fi
48708  fi
48709
48710  if test "x$FOUND_FREETYPE" = xyes; then
48711
48712  # Only process if variable expands to non-empty
48713
48714  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48716
48717  # Input might be given as Windows format, start by converting to
48718  # unix format.
48719  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48720  new_path=`$CYGPATH -u "$path"`
48721
48722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48725  # "foo.exe" is OK but "foo" is an error.
48726  #
48727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48728  # It is also a way to make sure we got the proper file name for the real test later on.
48729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48730  if test "x$test_shortpath" = x; then
48731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48732$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48733    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48734  fi
48735
48736  # Call helper function which possibly converts this using DOS-style short mode.
48737  # If so, the updated path is stored in $new_path.
48738
48739  input_path="$new_path"
48740  # Check if we need to convert this using DOS-style short mode. If the path
48741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48742  # take no chances and rewrite it.
48743  # Note: m4 eats our [], so we need to use [ and ] instead.
48744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48745  if test "x$has_forbidden_chars" != x; then
48746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48750      # Going to short mode and back again did indeed matter. Since short mode is
48751      # case insensitive, let's make it lowercase to improve readability.
48752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48753      # Now convert it back to Unix-style (cygpath)
48754      input_path=`$CYGPATH -u "$shortmode_path"`
48755      new_path="$input_path"
48756    fi
48757  fi
48758
48759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48760  if test "x$test_cygdrive_prefix" = x; then
48761    # As a simple fix, exclude /usr/bin since it's not a real path.
48762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48764      # a path prefixed by /cygdrive for fixpath to work.
48765      new_path="$CYGWIN_ROOT_PATH$input_path"
48766    fi
48767  fi
48768
48769
48770  if test "x$path" != "x$new_path"; then
48771    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48773$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48774  fi
48775
48776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48777
48778  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48779  has_colon=`$ECHO $path | $GREP ^.:`
48780  new_path="$path"
48781  if test "x$has_colon" = x; then
48782    # Not in mixed or Windows style, start by that.
48783    new_path=`cmd //c echo $path`
48784  fi
48785
48786
48787  input_path="$new_path"
48788  # Check if we need to convert this using DOS-style short mode. If the path
48789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48790  # take no chances and rewrite it.
48791  # Note: m4 eats our [], so we need to use [ and ] instead.
48792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48793  if test "x$has_forbidden_chars" != x; then
48794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48796  fi
48797
48798
48799  windows_path="$new_path"
48800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48801    unix_path=`$CYGPATH -u "$windows_path"`
48802    new_path="$unix_path"
48803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48805    new_path="$unix_path"
48806  fi
48807
48808  if test "x$path" != "x$new_path"; then
48809    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48811$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48812  fi
48813
48814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48816
48817    else
48818      # We're on a unix platform. Hooray! :)
48819      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48820      has_space=`$ECHO "$path" | $GREP " "`
48821      if test "x$has_space" != x; then
48822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48823$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48824        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48825      fi
48826
48827      # Use eval to expand a potential ~
48828      eval path="$path"
48829      if test ! -f "$path" && test ! -d "$path"; then
48830        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48831      fi
48832
48833      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48834    fi
48835  fi
48836
48837
48838  # Only process if variable expands to non-empty
48839
48840  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48842
48843  # Input might be given as Windows format, start by converting to
48844  # unix format.
48845  path="$POTENTIAL_FREETYPE_LIB_PATH"
48846  new_path=`$CYGPATH -u "$path"`
48847
48848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48851  # "foo.exe" is OK but "foo" is an error.
48852  #
48853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48854  # It is also a way to make sure we got the proper file name for the real test later on.
48855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48856  if test "x$test_shortpath" = x; then
48857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48859    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48860  fi
48861
48862  # Call helper function which possibly converts this using DOS-style short mode.
48863  # If so, the updated path is stored in $new_path.
48864
48865  input_path="$new_path"
48866  # Check if we need to convert this using DOS-style short mode. If the path
48867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48868  # take no chances and rewrite it.
48869  # Note: m4 eats our [], so we need to use [ and ] instead.
48870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48871  if test "x$has_forbidden_chars" != x; then
48872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48876      # Going to short mode and back again did indeed matter. Since short mode is
48877      # case insensitive, let's make it lowercase to improve readability.
48878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48879      # Now convert it back to Unix-style (cygpath)
48880      input_path=`$CYGPATH -u "$shortmode_path"`
48881      new_path="$input_path"
48882    fi
48883  fi
48884
48885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48886  if test "x$test_cygdrive_prefix" = x; then
48887    # As a simple fix, exclude /usr/bin since it's not a real path.
48888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48890      # a path prefixed by /cygdrive for fixpath to work.
48891      new_path="$CYGWIN_ROOT_PATH$input_path"
48892    fi
48893  fi
48894
48895
48896  if test "x$path" != "x$new_path"; then
48897    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48899$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48900  fi
48901
48902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48903
48904  path="$POTENTIAL_FREETYPE_LIB_PATH"
48905  has_colon=`$ECHO $path | $GREP ^.:`
48906  new_path="$path"
48907  if test "x$has_colon" = x; then
48908    # Not in mixed or Windows style, start by that.
48909    new_path=`cmd //c echo $path`
48910  fi
48911
48912
48913  input_path="$new_path"
48914  # Check if we need to convert this using DOS-style short mode. If the path
48915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48916  # take no chances and rewrite it.
48917  # Note: m4 eats our [], so we need to use [ and ] instead.
48918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48919  if test "x$has_forbidden_chars" != x; then
48920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48922  fi
48923
48924
48925  windows_path="$new_path"
48926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48927    unix_path=`$CYGPATH -u "$windows_path"`
48928    new_path="$unix_path"
48929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48931    new_path="$unix_path"
48932  fi
48933
48934  if test "x$path" != "x$new_path"; then
48935    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48938  fi
48939
48940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48942
48943    else
48944      # We're on a unix platform. Hooray! :)
48945      path="$POTENTIAL_FREETYPE_LIB_PATH"
48946      has_space=`$ECHO "$path" | $GREP " "`
48947      if test "x$has_space" != x; then
48948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48951      fi
48952
48953      # Use eval to expand a potential ~
48954      eval path="$path"
48955      if test ! -f "$path" && test ! -d "$path"; then
48956        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48957      fi
48958
48959      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48960    fi
48961  fi
48962
48963
48964    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48966$as_echo_n "checking for freetype includes... " >&6; }
48967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48968$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48969    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48971$as_echo_n "checking for freetype libraries... " >&6; }
48972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48973$as_echo "$FREETYPE_LIB_PATH" >&6; }
48974  fi
48975
48976          if test "x$FOUND_FREETYPE" != xyes; then
48977            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
48978
48979  windows_path="$FREETYPE_BASE_DIR"
48980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48981    unix_path=`$CYGPATH -u "$windows_path"`
48982    FREETYPE_BASE_DIR="$unix_path"
48983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48985    FREETYPE_BASE_DIR="$unix_path"
48986  fi
48987
48988
48989  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48990  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
48991  METHOD="well-known location"
48992
48993  # Let's start with an optimistic view of the world :-)
48994  FOUND_FREETYPE=yes
48995
48996  # First look for the canonical freetype main include file ft2build.h.
48997  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48998    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48999    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49000    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49001      # Fail.
49002      FOUND_FREETYPE=no
49003    fi
49004  fi
49005
49006  if test "x$FOUND_FREETYPE" = xyes; then
49007    # Include file found, let's continue the sanity check.
49008    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49009$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49010
49011    # Reset to default value
49012    FREETYPE_BASE_NAME=freetype
49013    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49014    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49015      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49016          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49017        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49018        # for the .6 version explicitly.
49019        FREETYPE_BASE_NAME=freetype.6
49020        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49021        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49022$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49023      else
49024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49025$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49026        FOUND_FREETYPE=no
49027      fi
49028    else
49029      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49030        # On Windows, we will need both .lib and .dll file.
49031        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49032          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49033$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49034          FOUND_FREETYPE=no
49035        fi
49036      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49037          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49038        # Found lib in isa dir, use that instead.
49039        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49040        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49041$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49042      fi
49043    fi
49044  fi
49045
49046  if test "x$FOUND_FREETYPE" = xyes; then
49047
49048  # Only process if variable expands to non-empty
49049
49050  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49052
49053  # Input might be given as Windows format, start by converting to
49054  # unix format.
49055  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49056  new_path=`$CYGPATH -u "$path"`
49057
49058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49061  # "foo.exe" is OK but "foo" is an error.
49062  #
49063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49064  # It is also a way to make sure we got the proper file name for the real test later on.
49065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49066  if test "x$test_shortpath" = x; then
49067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49069    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49070  fi
49071
49072  # Call helper function which possibly converts this using DOS-style short mode.
49073  # If so, the updated path is stored in $new_path.
49074
49075  input_path="$new_path"
49076  # Check if we need to convert this using DOS-style short mode. If the path
49077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49078  # take no chances and rewrite it.
49079  # Note: m4 eats our [], so we need to use [ and ] instead.
49080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49081  if test "x$has_forbidden_chars" != x; then
49082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49086      # Going to short mode and back again did indeed matter. Since short mode is
49087      # case insensitive, let's make it lowercase to improve readability.
49088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49089      # Now convert it back to Unix-style (cygpath)
49090      input_path=`$CYGPATH -u "$shortmode_path"`
49091      new_path="$input_path"
49092    fi
49093  fi
49094
49095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49096  if test "x$test_cygdrive_prefix" = x; then
49097    # As a simple fix, exclude /usr/bin since it's not a real path.
49098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49100      # a path prefixed by /cygdrive for fixpath to work.
49101      new_path="$CYGWIN_ROOT_PATH$input_path"
49102    fi
49103  fi
49104
49105
49106  if test "x$path" != "x$new_path"; then
49107    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49110  fi
49111
49112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49113
49114  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49115  has_colon=`$ECHO $path | $GREP ^.:`
49116  new_path="$path"
49117  if test "x$has_colon" = x; then
49118    # Not in mixed or Windows style, start by that.
49119    new_path=`cmd //c echo $path`
49120  fi
49121
49122
49123  input_path="$new_path"
49124  # Check if we need to convert this using DOS-style short mode. If the path
49125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49126  # take no chances and rewrite it.
49127  # Note: m4 eats our [], so we need to use [ and ] instead.
49128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49129  if test "x$has_forbidden_chars" != x; then
49130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49132  fi
49133
49134
49135  windows_path="$new_path"
49136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49137    unix_path=`$CYGPATH -u "$windows_path"`
49138    new_path="$unix_path"
49139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49141    new_path="$unix_path"
49142  fi
49143
49144  if test "x$path" != "x$new_path"; then
49145    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49147$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49148  fi
49149
49150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49152
49153    else
49154      # We're on a unix platform. Hooray! :)
49155      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49156      has_space=`$ECHO "$path" | $GREP " "`
49157      if test "x$has_space" != x; then
49158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49159$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49161      fi
49162
49163      # Use eval to expand a potential ~
49164      eval path="$path"
49165      if test ! -f "$path" && test ! -d "$path"; then
49166        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49167      fi
49168
49169      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49170    fi
49171  fi
49172
49173
49174  # Only process if variable expands to non-empty
49175
49176  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49178
49179  # Input might be given as Windows format, start by converting to
49180  # unix format.
49181  path="$POTENTIAL_FREETYPE_LIB_PATH"
49182  new_path=`$CYGPATH -u "$path"`
49183
49184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49187  # "foo.exe" is OK but "foo" is an error.
49188  #
49189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49190  # It is also a way to make sure we got the proper file name for the real test later on.
49191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49192  if test "x$test_shortpath" = x; then
49193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49194$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49195    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49196  fi
49197
49198  # Call helper function which possibly converts this using DOS-style short mode.
49199  # If so, the updated path is stored in $new_path.
49200
49201  input_path="$new_path"
49202  # Check if we need to convert this using DOS-style short mode. If the path
49203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49204  # take no chances and rewrite it.
49205  # Note: m4 eats our [], so we need to use [ and ] instead.
49206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49207  if test "x$has_forbidden_chars" != x; then
49208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49212      # Going to short mode and back again did indeed matter. Since short mode is
49213      # case insensitive, let's make it lowercase to improve readability.
49214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49215      # Now convert it back to Unix-style (cygpath)
49216      input_path=`$CYGPATH -u "$shortmode_path"`
49217      new_path="$input_path"
49218    fi
49219  fi
49220
49221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49222  if test "x$test_cygdrive_prefix" = x; then
49223    # As a simple fix, exclude /usr/bin since it's not a real path.
49224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49226      # a path prefixed by /cygdrive for fixpath to work.
49227      new_path="$CYGWIN_ROOT_PATH$input_path"
49228    fi
49229  fi
49230
49231
49232  if test "x$path" != "x$new_path"; then
49233    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49235$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49236  fi
49237
49238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49239
49240  path="$POTENTIAL_FREETYPE_LIB_PATH"
49241  has_colon=`$ECHO $path | $GREP ^.:`
49242  new_path="$path"
49243  if test "x$has_colon" = x; then
49244    # Not in mixed or Windows style, start by that.
49245    new_path=`cmd //c echo $path`
49246  fi
49247
49248
49249  input_path="$new_path"
49250  # Check if we need to convert this using DOS-style short mode. If the path
49251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49252  # take no chances and rewrite it.
49253  # Note: m4 eats our [], so we need to use [ and ] instead.
49254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49255  if test "x$has_forbidden_chars" != x; then
49256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49258  fi
49259
49260
49261  windows_path="$new_path"
49262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49263    unix_path=`$CYGPATH -u "$windows_path"`
49264    new_path="$unix_path"
49265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49267    new_path="$unix_path"
49268  fi
49269
49270  if test "x$path" != "x$new_path"; then
49271    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49274  fi
49275
49276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49278
49279    else
49280      # We're on a unix platform. Hooray! :)
49281      path="$POTENTIAL_FREETYPE_LIB_PATH"
49282      has_space=`$ECHO "$path" | $GREP " "`
49283      if test "x$has_space" != x; then
49284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49285$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49287      fi
49288
49289      # Use eval to expand a potential ~
49290      eval path="$path"
49291      if test ! -f "$path" && test ! -d "$path"; then
49292        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49293      fi
49294
49295      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49296    fi
49297  fi
49298
49299
49300    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49302$as_echo_n "checking for freetype includes... " >&6; }
49303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49304$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49305    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49307$as_echo_n "checking for freetype libraries... " >&6; }
49308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49309$as_echo "$FREETYPE_LIB_PATH" >&6; }
49310  fi
49311
49312          fi
49313        else
49314          FREETYPE_BASE_DIR="$SYSROOT/usr"
49315
49316  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49317  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49318  METHOD="well-known location"
49319
49320  # Let's start with an optimistic view of the world :-)
49321  FOUND_FREETYPE=yes
49322
49323  # First look for the canonical freetype main include file ft2build.h.
49324  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49325    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49326    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49327    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49328      # Fail.
49329      FOUND_FREETYPE=no
49330    fi
49331  fi
49332
49333  if test "x$FOUND_FREETYPE" = xyes; then
49334    # Include file found, let's continue the sanity check.
49335    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49336$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49337
49338    # Reset to default value
49339    FREETYPE_BASE_NAME=freetype
49340    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49341    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49342      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49343          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49344        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49345        # for the .6 version explicitly.
49346        FREETYPE_BASE_NAME=freetype.6
49347        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49348        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49349$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49350      else
49351        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49352$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49353        FOUND_FREETYPE=no
49354      fi
49355    else
49356      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49357        # On Windows, we will need both .lib and .dll file.
49358        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49359          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49360$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49361          FOUND_FREETYPE=no
49362        fi
49363      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49364          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49365        # Found lib in isa dir, use that instead.
49366        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49367        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49368$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49369      fi
49370    fi
49371  fi
49372
49373  if test "x$FOUND_FREETYPE" = xyes; then
49374
49375  # Only process if variable expands to non-empty
49376
49377  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49378    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49379
49380  # Input might be given as Windows format, start by converting to
49381  # unix format.
49382  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49383  new_path=`$CYGPATH -u "$path"`
49384
49385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49388  # "foo.exe" is OK but "foo" is an error.
49389  #
49390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49391  # It is also a way to make sure we got the proper file name for the real test later on.
49392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49393  if test "x$test_shortpath" = x; then
49394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49395$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49396    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49397  fi
49398
49399  # Call helper function which possibly converts this using DOS-style short mode.
49400  # If so, the updated path is stored in $new_path.
49401
49402  input_path="$new_path"
49403  # Check if we need to convert this using DOS-style short mode. If the path
49404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49405  # take no chances and rewrite it.
49406  # Note: m4 eats our [], so we need to use [ and ] instead.
49407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49408  if test "x$has_forbidden_chars" != x; then
49409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49413      # Going to short mode and back again did indeed matter. Since short mode is
49414      # case insensitive, let's make it lowercase to improve readability.
49415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49416      # Now convert it back to Unix-style (cygpath)
49417      input_path=`$CYGPATH -u "$shortmode_path"`
49418      new_path="$input_path"
49419    fi
49420  fi
49421
49422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49423  if test "x$test_cygdrive_prefix" = x; then
49424    # As a simple fix, exclude /usr/bin since it's not a real path.
49425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49427      # a path prefixed by /cygdrive for fixpath to work.
49428      new_path="$CYGWIN_ROOT_PATH$input_path"
49429    fi
49430  fi
49431
49432
49433  if test "x$path" != "x$new_path"; then
49434    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49436$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49437  fi
49438
49439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49440
49441  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49442  has_colon=`$ECHO $path | $GREP ^.:`
49443  new_path="$path"
49444  if test "x$has_colon" = x; then
49445    # Not in mixed or Windows style, start by that.
49446    new_path=`cmd //c echo $path`
49447  fi
49448
49449
49450  input_path="$new_path"
49451  # Check if we need to convert this using DOS-style short mode. If the path
49452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49453  # take no chances and rewrite it.
49454  # Note: m4 eats our [], so we need to use [ and ] instead.
49455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49456  if test "x$has_forbidden_chars" != x; then
49457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49459  fi
49460
49461
49462  windows_path="$new_path"
49463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49464    unix_path=`$CYGPATH -u "$windows_path"`
49465    new_path="$unix_path"
49466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49468    new_path="$unix_path"
49469  fi
49470
49471  if test "x$path" != "x$new_path"; then
49472    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49474$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49475  fi
49476
49477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49479
49480    else
49481      # We're on a unix platform. Hooray! :)
49482      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49483      has_space=`$ECHO "$path" | $GREP " "`
49484      if test "x$has_space" != x; then
49485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49486$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49487        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49488      fi
49489
49490      # Use eval to expand a potential ~
49491      eval path="$path"
49492      if test ! -f "$path" && test ! -d "$path"; then
49493        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49494      fi
49495
49496      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49497    fi
49498  fi
49499
49500
49501  # Only process if variable expands to non-empty
49502
49503  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49505
49506  # Input might be given as Windows format, start by converting to
49507  # unix format.
49508  path="$POTENTIAL_FREETYPE_LIB_PATH"
49509  new_path=`$CYGPATH -u "$path"`
49510
49511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49514  # "foo.exe" is OK but "foo" is an error.
49515  #
49516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49517  # It is also a way to make sure we got the proper file name for the real test later on.
49518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49519  if test "x$test_shortpath" = x; then
49520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49521$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49522    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49523  fi
49524
49525  # Call helper function which possibly converts this using DOS-style short mode.
49526  # If so, the updated path is stored in $new_path.
49527
49528  input_path="$new_path"
49529  # Check if we need to convert this using DOS-style short mode. If the path
49530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49531  # take no chances and rewrite it.
49532  # Note: m4 eats our [], so we need to use [ and ] instead.
49533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49534  if test "x$has_forbidden_chars" != x; then
49535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49539      # Going to short mode and back again did indeed matter. Since short mode is
49540      # case insensitive, let's make it lowercase to improve readability.
49541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49542      # Now convert it back to Unix-style (cygpath)
49543      input_path=`$CYGPATH -u "$shortmode_path"`
49544      new_path="$input_path"
49545    fi
49546  fi
49547
49548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49549  if test "x$test_cygdrive_prefix" = x; then
49550    # As a simple fix, exclude /usr/bin since it's not a real path.
49551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49553      # a path prefixed by /cygdrive for fixpath to work.
49554      new_path="$CYGWIN_ROOT_PATH$input_path"
49555    fi
49556  fi
49557
49558
49559  if test "x$path" != "x$new_path"; then
49560    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49562$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49563  fi
49564
49565    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49566
49567  path="$POTENTIAL_FREETYPE_LIB_PATH"
49568  has_colon=`$ECHO $path | $GREP ^.:`
49569  new_path="$path"
49570  if test "x$has_colon" = x; then
49571    # Not in mixed or Windows style, start by that.
49572    new_path=`cmd //c echo $path`
49573  fi
49574
49575
49576  input_path="$new_path"
49577  # Check if we need to convert this using DOS-style short mode. If the path
49578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49579  # take no chances and rewrite it.
49580  # Note: m4 eats our [], so we need to use [ and ] instead.
49581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49582  if test "x$has_forbidden_chars" != x; then
49583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49585  fi
49586
49587
49588  windows_path="$new_path"
49589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49590    unix_path=`$CYGPATH -u "$windows_path"`
49591    new_path="$unix_path"
49592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49594    new_path="$unix_path"
49595  fi
49596
49597  if test "x$path" != "x$new_path"; then
49598    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49600$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49601  fi
49602
49603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49605
49606    else
49607      # We're on a unix platform. Hooray! :)
49608      path="$POTENTIAL_FREETYPE_LIB_PATH"
49609      has_space=`$ECHO "$path" | $GREP " "`
49610      if test "x$has_space" != x; then
49611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49612$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49613        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49614      fi
49615
49616      # Use eval to expand a potential ~
49617      eval path="$path"
49618      if test ! -f "$path" && test ! -d "$path"; then
49619        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49620      fi
49621
49622      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49623    fi
49624  fi
49625
49626
49627    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49629$as_echo_n "checking for freetype includes... " >&6; }
49630    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49631$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49632    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49634$as_echo_n "checking for freetype libraries... " >&6; }
49635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49636$as_echo "$FREETYPE_LIB_PATH" >&6; }
49637  fi
49638
49639
49640          if test "x$FOUND_FREETYPE" != xyes; then
49641            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
49642
49643  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49644  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49645  METHOD="well-known location"
49646
49647  # Let's start with an optimistic view of the world :-)
49648  FOUND_FREETYPE=yes
49649
49650  # First look for the canonical freetype main include file ft2build.h.
49651  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49652    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49653    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49654    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49655      # Fail.
49656      FOUND_FREETYPE=no
49657    fi
49658  fi
49659
49660  if test "x$FOUND_FREETYPE" = xyes; then
49661    # Include file found, let's continue the sanity check.
49662    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49663$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49664
49665    # Reset to default value
49666    FREETYPE_BASE_NAME=freetype
49667    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49668    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49669      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49670          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49671        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49672        # for the .6 version explicitly.
49673        FREETYPE_BASE_NAME=freetype.6
49674        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49675        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49676$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49677      else
49678        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49679$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49680        FOUND_FREETYPE=no
49681      fi
49682    else
49683      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49684        # On Windows, we will need both .lib and .dll file.
49685        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49686          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49687$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49688          FOUND_FREETYPE=no
49689        fi
49690      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49691          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49692        # Found lib in isa dir, use that instead.
49693        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49694        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49695$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49696      fi
49697    fi
49698  fi
49699
49700  if test "x$FOUND_FREETYPE" = xyes; then
49701
49702  # Only process if variable expands to non-empty
49703
49704  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49706
49707  # Input might be given as Windows format, start by converting to
49708  # unix format.
49709  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49710  new_path=`$CYGPATH -u "$path"`
49711
49712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49715  # "foo.exe" is OK but "foo" is an error.
49716  #
49717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49718  # It is also a way to make sure we got the proper file name for the real test later on.
49719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49720  if test "x$test_shortpath" = x; then
49721    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49722$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49723    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49724  fi
49725
49726  # Call helper function which possibly converts this using DOS-style short mode.
49727  # If so, the updated path is stored in $new_path.
49728
49729  input_path="$new_path"
49730  # Check if we need to convert this using DOS-style short mode. If the path
49731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49732  # take no chances and rewrite it.
49733  # Note: m4 eats our [], so we need to use [ and ] instead.
49734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49735  if test "x$has_forbidden_chars" != x; then
49736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49740      # Going to short mode and back again did indeed matter. Since short mode is
49741      # case insensitive, let's make it lowercase to improve readability.
49742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49743      # Now convert it back to Unix-style (cygpath)
49744      input_path=`$CYGPATH -u "$shortmode_path"`
49745      new_path="$input_path"
49746    fi
49747  fi
49748
49749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49750  if test "x$test_cygdrive_prefix" = x; then
49751    # As a simple fix, exclude /usr/bin since it's not a real path.
49752    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49754      # a path prefixed by /cygdrive for fixpath to work.
49755      new_path="$CYGWIN_ROOT_PATH$input_path"
49756    fi
49757  fi
49758
49759
49760  if test "x$path" != "x$new_path"; then
49761    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49764  fi
49765
49766    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49767
49768  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49769  has_colon=`$ECHO $path | $GREP ^.:`
49770  new_path="$path"
49771  if test "x$has_colon" = x; then
49772    # Not in mixed or Windows style, start by that.
49773    new_path=`cmd //c echo $path`
49774  fi
49775
49776
49777  input_path="$new_path"
49778  # Check if we need to convert this using DOS-style short mode. If the path
49779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49780  # take no chances and rewrite it.
49781  # Note: m4 eats our [], so we need to use [ and ] instead.
49782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49783  if test "x$has_forbidden_chars" != x; then
49784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49786  fi
49787
49788
49789  windows_path="$new_path"
49790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49791    unix_path=`$CYGPATH -u "$windows_path"`
49792    new_path="$unix_path"
49793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49795    new_path="$unix_path"
49796  fi
49797
49798  if test "x$path" != "x$new_path"; then
49799    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49801$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49802  fi
49803
49804  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49805  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49806
49807    else
49808      # We're on a unix platform. Hooray! :)
49809      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49810      has_space=`$ECHO "$path" | $GREP " "`
49811      if test "x$has_space" != x; then
49812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49813$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49814        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49815      fi
49816
49817      # Use eval to expand a potential ~
49818      eval path="$path"
49819      if test ! -f "$path" && test ! -d "$path"; then
49820        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49821      fi
49822
49823      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49824    fi
49825  fi
49826
49827
49828  # Only process if variable expands to non-empty
49829
49830  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49832
49833  # Input might be given as Windows format, start by converting to
49834  # unix format.
49835  path="$POTENTIAL_FREETYPE_LIB_PATH"
49836  new_path=`$CYGPATH -u "$path"`
49837
49838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49841  # "foo.exe" is OK but "foo" is an error.
49842  #
49843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49844  # It is also a way to make sure we got the proper file name for the real test later on.
49845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49846  if test "x$test_shortpath" = x; then
49847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49849    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49850  fi
49851
49852  # Call helper function which possibly converts this using DOS-style short mode.
49853  # If so, the updated path is stored in $new_path.
49854
49855  input_path="$new_path"
49856  # Check if we need to convert this using DOS-style short mode. If the path
49857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49858  # take no chances and rewrite it.
49859  # Note: m4 eats our [], so we need to use [ and ] instead.
49860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49861  if test "x$has_forbidden_chars" != x; then
49862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49866      # Going to short mode and back again did indeed matter. Since short mode is
49867      # case insensitive, let's make it lowercase to improve readability.
49868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49869      # Now convert it back to Unix-style (cygpath)
49870      input_path=`$CYGPATH -u "$shortmode_path"`
49871      new_path="$input_path"
49872    fi
49873  fi
49874
49875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49876  if test "x$test_cygdrive_prefix" = x; then
49877    # As a simple fix, exclude /usr/bin since it's not a real path.
49878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49880      # a path prefixed by /cygdrive for fixpath to work.
49881      new_path="$CYGWIN_ROOT_PATH$input_path"
49882    fi
49883  fi
49884
49885
49886  if test "x$path" != "x$new_path"; then
49887    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49890  fi
49891
49892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49893
49894  path="$POTENTIAL_FREETYPE_LIB_PATH"
49895  has_colon=`$ECHO $path | $GREP ^.:`
49896  new_path="$path"
49897  if test "x$has_colon" = x; then
49898    # Not in mixed or Windows style, start by that.
49899    new_path=`cmd //c echo $path`
49900  fi
49901
49902
49903  input_path="$new_path"
49904  # Check if we need to convert this using DOS-style short mode. If the path
49905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49906  # take no chances and rewrite it.
49907  # Note: m4 eats our [], so we need to use [ and ] instead.
49908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49909  if test "x$has_forbidden_chars" != x; then
49910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49912  fi
49913
49914
49915  windows_path="$new_path"
49916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49917    unix_path=`$CYGPATH -u "$windows_path"`
49918    new_path="$unix_path"
49919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49921    new_path="$unix_path"
49922  fi
49923
49924  if test "x$path" != "x$new_path"; then
49925    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49928  fi
49929
49930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49932
49933    else
49934      # We're on a unix platform. Hooray! :)
49935      path="$POTENTIAL_FREETYPE_LIB_PATH"
49936      has_space=`$ECHO "$path" | $GREP " "`
49937      if test "x$has_space" != x; then
49938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49941      fi
49942
49943      # Use eval to expand a potential ~
49944      eval path="$path"
49945      if test ! -f "$path" && test ! -d "$path"; then
49946        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49947      fi
49948
49949      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49950    fi
49951  fi
49952
49953
49954    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49956$as_echo_n "checking for freetype includes... " >&6; }
49957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49958$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49959    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49961$as_echo_n "checking for freetype libraries... " >&6; }
49962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49963$as_echo "$FREETYPE_LIB_PATH" >&6; }
49964  fi
49965
49966          fi
49967
49968          if test "x$FOUND_FREETYPE" != xyes; then
49969            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
49970
49971  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49972  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49973  METHOD="well-known location"
49974
49975  # Let's start with an optimistic view of the world :-)
49976  FOUND_FREETYPE=yes
49977
49978  # First look for the canonical freetype main include file ft2build.h.
49979  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49980    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49981    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49982    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49983      # Fail.
49984      FOUND_FREETYPE=no
49985    fi
49986  fi
49987
49988  if test "x$FOUND_FREETYPE" = xyes; then
49989    # Include file found, let's continue the sanity check.
49990    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49991$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49992
49993    # Reset to default value
49994    FREETYPE_BASE_NAME=freetype
49995    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49996    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49997      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49998          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49999        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50000        # for the .6 version explicitly.
50001        FREETYPE_BASE_NAME=freetype.6
50002        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50003        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50004$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50005      else
50006        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50007$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50008        FOUND_FREETYPE=no
50009      fi
50010    else
50011      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50012        # On Windows, we will need both .lib and .dll file.
50013        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50014          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50015$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50016          FOUND_FREETYPE=no
50017        fi
50018      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50019          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50020        # Found lib in isa dir, use that instead.
50021        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50022        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50023$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50024      fi
50025    fi
50026  fi
50027
50028  if test "x$FOUND_FREETYPE" = xyes; then
50029
50030  # Only process if variable expands to non-empty
50031
50032  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50033    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50034
50035  # Input might be given as Windows format, start by converting to
50036  # unix format.
50037  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50038  new_path=`$CYGPATH -u "$path"`
50039
50040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50043  # "foo.exe" is OK but "foo" is an error.
50044  #
50045  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50046  # It is also a way to make sure we got the proper file name for the real test later on.
50047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50048  if test "x$test_shortpath" = x; then
50049    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50050$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50051    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50052  fi
50053
50054  # Call helper function which possibly converts this using DOS-style short mode.
50055  # If so, the updated path is stored in $new_path.
50056
50057  input_path="$new_path"
50058  # Check if we need to convert this using DOS-style short mode. If the path
50059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50060  # take no chances and rewrite it.
50061  # Note: m4 eats our [], so we need to use [ and ] instead.
50062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50063  if test "x$has_forbidden_chars" != x; then
50064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50068      # Going to short mode and back again did indeed matter. Since short mode is
50069      # case insensitive, let's make it lowercase to improve readability.
50070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50071      # Now convert it back to Unix-style (cygpath)
50072      input_path=`$CYGPATH -u "$shortmode_path"`
50073      new_path="$input_path"
50074    fi
50075  fi
50076
50077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50078  if test "x$test_cygdrive_prefix" = x; then
50079    # As a simple fix, exclude /usr/bin since it's not a real path.
50080    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50082      # a path prefixed by /cygdrive for fixpath to work.
50083      new_path="$CYGWIN_ROOT_PATH$input_path"
50084    fi
50085  fi
50086
50087
50088  if test "x$path" != "x$new_path"; then
50089    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50091$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50092  fi
50093
50094    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50095
50096  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50097  has_colon=`$ECHO $path | $GREP ^.:`
50098  new_path="$path"
50099  if test "x$has_colon" = x; then
50100    # Not in mixed or Windows style, start by that.
50101    new_path=`cmd //c echo $path`
50102  fi
50103
50104
50105  input_path="$new_path"
50106  # Check if we need to convert this using DOS-style short mode. If the path
50107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50108  # take no chances and rewrite it.
50109  # Note: m4 eats our [], so we need to use [ and ] instead.
50110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50111  if test "x$has_forbidden_chars" != x; then
50112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50114  fi
50115
50116
50117  windows_path="$new_path"
50118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50119    unix_path=`$CYGPATH -u "$windows_path"`
50120    new_path="$unix_path"
50121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50123    new_path="$unix_path"
50124  fi
50125
50126  if test "x$path" != "x$new_path"; then
50127    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50129$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50130  fi
50131
50132  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50133  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50134
50135    else
50136      # We're on a unix platform. Hooray! :)
50137      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50138      has_space=`$ECHO "$path" | $GREP " "`
50139      if test "x$has_space" != x; then
50140        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50141$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50142        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50143      fi
50144
50145      # Use eval to expand a potential ~
50146      eval path="$path"
50147      if test ! -f "$path" && test ! -d "$path"; then
50148        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50149      fi
50150
50151      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50152    fi
50153  fi
50154
50155
50156  # Only process if variable expands to non-empty
50157
50158  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50160
50161  # Input might be given as Windows format, start by converting to
50162  # unix format.
50163  path="$POTENTIAL_FREETYPE_LIB_PATH"
50164  new_path=`$CYGPATH -u "$path"`
50165
50166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50169  # "foo.exe" is OK but "foo" is an error.
50170  #
50171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50172  # It is also a way to make sure we got the proper file name for the real test later on.
50173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50174  if test "x$test_shortpath" = x; then
50175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50176$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50177    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50178  fi
50179
50180  # Call helper function which possibly converts this using DOS-style short mode.
50181  # If so, the updated path is stored in $new_path.
50182
50183  input_path="$new_path"
50184  # Check if we need to convert this using DOS-style short mode. If the path
50185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50186  # take no chances and rewrite it.
50187  # Note: m4 eats our [], so we need to use [ and ] instead.
50188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50189  if test "x$has_forbidden_chars" != x; then
50190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50194      # Going to short mode and back again did indeed matter. Since short mode is
50195      # case insensitive, let's make it lowercase to improve readability.
50196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50197      # Now convert it back to Unix-style (cygpath)
50198      input_path=`$CYGPATH -u "$shortmode_path"`
50199      new_path="$input_path"
50200    fi
50201  fi
50202
50203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50204  if test "x$test_cygdrive_prefix" = x; then
50205    # As a simple fix, exclude /usr/bin since it's not a real path.
50206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50208      # a path prefixed by /cygdrive for fixpath to work.
50209      new_path="$CYGWIN_ROOT_PATH$input_path"
50210    fi
50211  fi
50212
50213
50214  if test "x$path" != "x$new_path"; then
50215    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50217$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50218  fi
50219
50220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50221
50222  path="$POTENTIAL_FREETYPE_LIB_PATH"
50223  has_colon=`$ECHO $path | $GREP ^.:`
50224  new_path="$path"
50225  if test "x$has_colon" = x; then
50226    # Not in mixed or Windows style, start by that.
50227    new_path=`cmd //c echo $path`
50228  fi
50229
50230
50231  input_path="$new_path"
50232  # Check if we need to convert this using DOS-style short mode. If the path
50233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50234  # take no chances and rewrite it.
50235  # Note: m4 eats our [], so we need to use [ and ] instead.
50236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50237  if test "x$has_forbidden_chars" != x; then
50238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50240  fi
50241
50242
50243  windows_path="$new_path"
50244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50245    unix_path=`$CYGPATH -u "$windows_path"`
50246    new_path="$unix_path"
50247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50249    new_path="$unix_path"
50250  fi
50251
50252  if test "x$path" != "x$new_path"; then
50253    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50255$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50256  fi
50257
50258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50260
50261    else
50262      # We're on a unix platform. Hooray! :)
50263      path="$POTENTIAL_FREETYPE_LIB_PATH"
50264      has_space=`$ECHO "$path" | $GREP " "`
50265      if test "x$has_space" != x; then
50266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50267$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50268        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50269      fi
50270
50271      # Use eval to expand a potential ~
50272      eval path="$path"
50273      if test ! -f "$path" && test ! -d "$path"; then
50274        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50275      fi
50276
50277      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50278    fi
50279  fi
50280
50281
50282    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50284$as_echo_n "checking for freetype includes... " >&6; }
50285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50286$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50287    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50289$as_echo_n "checking for freetype libraries... " >&6; }
50290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50291$as_echo "$FREETYPE_LIB_PATH" >&6; }
50292  fi
50293
50294          fi
50295
50296          if test "x$FOUND_FREETYPE" != xyes; then
50297            FREETYPE_BASE_DIR="$SYSROOT/usr"
50298            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50299
50300  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50301  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
50302  METHOD="well-known location"
50303
50304  # Let's start with an optimistic view of the world :-)
50305  FOUND_FREETYPE=yes
50306
50307  # First look for the canonical freetype main include file ft2build.h.
50308  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50309    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50310    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50311    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50312      # Fail.
50313      FOUND_FREETYPE=no
50314    fi
50315  fi
50316
50317  if test "x$FOUND_FREETYPE" = xyes; then
50318    # Include file found, let's continue the sanity check.
50319    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50320$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50321
50322    # Reset to default value
50323    FREETYPE_BASE_NAME=freetype
50324    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50325    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50326      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50327          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50328        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50329        # for the .6 version explicitly.
50330        FREETYPE_BASE_NAME=freetype.6
50331        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50332        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50333$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50334      else
50335        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50336$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50337        FOUND_FREETYPE=no
50338      fi
50339    else
50340      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50341        # On Windows, we will need both .lib and .dll file.
50342        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50343          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50344$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50345          FOUND_FREETYPE=no
50346        fi
50347      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50348          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50349        # Found lib in isa dir, use that instead.
50350        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50351        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50352$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50353      fi
50354    fi
50355  fi
50356
50357  if test "x$FOUND_FREETYPE" = xyes; then
50358
50359  # Only process if variable expands to non-empty
50360
50361  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50363
50364  # Input might be given as Windows format, start by converting to
50365  # unix format.
50366  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50367  new_path=`$CYGPATH -u "$path"`
50368
50369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50372  # "foo.exe" is OK but "foo" is an error.
50373  #
50374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50375  # It is also a way to make sure we got the proper file name for the real test later on.
50376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50377  if test "x$test_shortpath" = x; then
50378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50380    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50381  fi
50382
50383  # Call helper function which possibly converts this using DOS-style short mode.
50384  # If so, the updated path is stored in $new_path.
50385
50386  input_path="$new_path"
50387  # Check if we need to convert this using DOS-style short mode. If the path
50388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50389  # take no chances and rewrite it.
50390  # Note: m4 eats our [], so we need to use [ and ] instead.
50391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50392  if test "x$has_forbidden_chars" != x; then
50393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50397      # Going to short mode and back again did indeed matter. Since short mode is
50398      # case insensitive, let's make it lowercase to improve readability.
50399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50400      # Now convert it back to Unix-style (cygpath)
50401      input_path=`$CYGPATH -u "$shortmode_path"`
50402      new_path="$input_path"
50403    fi
50404  fi
50405
50406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50407  if test "x$test_cygdrive_prefix" = x; then
50408    # As a simple fix, exclude /usr/bin since it's not a real path.
50409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50411      # a path prefixed by /cygdrive for fixpath to work.
50412      new_path="$CYGWIN_ROOT_PATH$input_path"
50413    fi
50414  fi
50415
50416
50417  if test "x$path" != "x$new_path"; then
50418    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50421  fi
50422
50423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50424
50425  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50426  has_colon=`$ECHO $path | $GREP ^.:`
50427  new_path="$path"
50428  if test "x$has_colon" = x; then
50429    # Not in mixed or Windows style, start by that.
50430    new_path=`cmd //c echo $path`
50431  fi
50432
50433
50434  input_path="$new_path"
50435  # Check if we need to convert this using DOS-style short mode. If the path
50436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50437  # take no chances and rewrite it.
50438  # Note: m4 eats our [], so we need to use [ and ] instead.
50439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50440  if test "x$has_forbidden_chars" != x; then
50441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50443  fi
50444
50445
50446  windows_path="$new_path"
50447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50448    unix_path=`$CYGPATH -u "$windows_path"`
50449    new_path="$unix_path"
50450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50452    new_path="$unix_path"
50453  fi
50454
50455  if test "x$path" != "x$new_path"; then
50456    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50458$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50459  fi
50460
50461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50463
50464    else
50465      # We're on a unix platform. Hooray! :)
50466      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50467      has_space=`$ECHO "$path" | $GREP " "`
50468      if test "x$has_space" != x; then
50469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50470$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50472      fi
50473
50474      # Use eval to expand a potential ~
50475      eval path="$path"
50476      if test ! -f "$path" && test ! -d "$path"; then
50477        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50478      fi
50479
50480      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50481    fi
50482  fi
50483
50484
50485  # Only process if variable expands to non-empty
50486
50487  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50489
50490  # Input might be given as Windows format, start by converting to
50491  # unix format.
50492  path="$POTENTIAL_FREETYPE_LIB_PATH"
50493  new_path=`$CYGPATH -u "$path"`
50494
50495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50498  # "foo.exe" is OK but "foo" is an error.
50499  #
50500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50501  # It is also a way to make sure we got the proper file name for the real test later on.
50502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50503  if test "x$test_shortpath" = x; then
50504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50505$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50506    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50507  fi
50508
50509  # Call helper function which possibly converts this using DOS-style short mode.
50510  # If so, the updated path is stored in $new_path.
50511
50512  input_path="$new_path"
50513  # Check if we need to convert this using DOS-style short mode. If the path
50514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50515  # take no chances and rewrite it.
50516  # Note: m4 eats our [], so we need to use [ and ] instead.
50517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50518  if test "x$has_forbidden_chars" != x; then
50519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50523      # Going to short mode and back again did indeed matter. Since short mode is
50524      # case insensitive, let's make it lowercase to improve readability.
50525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50526      # Now convert it back to Unix-style (cygpath)
50527      input_path=`$CYGPATH -u "$shortmode_path"`
50528      new_path="$input_path"
50529    fi
50530  fi
50531
50532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50533  if test "x$test_cygdrive_prefix" = x; then
50534    # As a simple fix, exclude /usr/bin since it's not a real path.
50535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50537      # a path prefixed by /cygdrive for fixpath to work.
50538      new_path="$CYGWIN_ROOT_PATH$input_path"
50539    fi
50540  fi
50541
50542
50543  if test "x$path" != "x$new_path"; then
50544    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50546$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50547  fi
50548
50549    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50550
50551  path="$POTENTIAL_FREETYPE_LIB_PATH"
50552  has_colon=`$ECHO $path | $GREP ^.:`
50553  new_path="$path"
50554  if test "x$has_colon" = x; then
50555    # Not in mixed or Windows style, start by that.
50556    new_path=`cmd //c echo $path`
50557  fi
50558
50559
50560  input_path="$new_path"
50561  # Check if we need to convert this using DOS-style short mode. If the path
50562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50563  # take no chances and rewrite it.
50564  # Note: m4 eats our [], so we need to use [ and ] instead.
50565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50566  if test "x$has_forbidden_chars" != x; then
50567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50569  fi
50570
50571
50572  windows_path="$new_path"
50573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50574    unix_path=`$CYGPATH -u "$windows_path"`
50575    new_path="$unix_path"
50576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50578    new_path="$unix_path"
50579  fi
50580
50581  if test "x$path" != "x$new_path"; then
50582    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50585  fi
50586
50587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50589
50590    else
50591      # We're on a unix platform. Hooray! :)
50592      path="$POTENTIAL_FREETYPE_LIB_PATH"
50593      has_space=`$ECHO "$path" | $GREP " "`
50594      if test "x$has_space" != x; then
50595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50597        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50598      fi
50599
50600      # Use eval to expand a potential ~
50601      eval path="$path"
50602      if test ! -f "$path" && test ! -d "$path"; then
50603        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50604      fi
50605
50606      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50607    fi
50608  fi
50609
50610
50611    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50613$as_echo_n "checking for freetype includes... " >&6; }
50614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50615$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50616    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50618$as_echo_n "checking for freetype libraries... " >&6; }
50619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50620$as_echo "$FREETYPE_LIB_PATH" >&6; }
50621  fi
50622
50623            else
50624
50625  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50626  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
50627  METHOD="well-known location"
50628
50629  # Let's start with an optimistic view of the world :-)
50630  FOUND_FREETYPE=yes
50631
50632  # First look for the canonical freetype main include file ft2build.h.
50633  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50634    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50635    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50636    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50637      # Fail.
50638      FOUND_FREETYPE=no
50639    fi
50640  fi
50641
50642  if test "x$FOUND_FREETYPE" = xyes; then
50643    # Include file found, let's continue the sanity check.
50644    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50645$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50646
50647    # Reset to default value
50648    FREETYPE_BASE_NAME=freetype
50649    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50650    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50651      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50652          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50653        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50654        # for the .6 version explicitly.
50655        FREETYPE_BASE_NAME=freetype.6
50656        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50657        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50658$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50659      else
50660        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50661$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50662        FOUND_FREETYPE=no
50663      fi
50664    else
50665      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50666        # On Windows, we will need both .lib and .dll file.
50667        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50668          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50669$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50670          FOUND_FREETYPE=no
50671        fi
50672      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50673          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50674        # Found lib in isa dir, use that instead.
50675        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50676        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50677$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50678      fi
50679    fi
50680  fi
50681
50682  if test "x$FOUND_FREETYPE" = xyes; then
50683
50684  # Only process if variable expands to non-empty
50685
50686  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50688
50689  # Input might be given as Windows format, start by converting to
50690  # unix format.
50691  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50692  new_path=`$CYGPATH -u "$path"`
50693
50694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50697  # "foo.exe" is OK but "foo" is an error.
50698  #
50699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50700  # It is also a way to make sure we got the proper file name for the real test later on.
50701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50702  if test "x$test_shortpath" = x; then
50703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50705    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50706  fi
50707
50708  # Call helper function which possibly converts this using DOS-style short mode.
50709  # If so, the updated path is stored in $new_path.
50710
50711  input_path="$new_path"
50712  # Check if we need to convert this using DOS-style short mode. If the path
50713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50714  # take no chances and rewrite it.
50715  # Note: m4 eats our [], so we need to use [ and ] instead.
50716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50717  if test "x$has_forbidden_chars" != x; then
50718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50722      # Going to short mode and back again did indeed matter. Since short mode is
50723      # case insensitive, let's make it lowercase to improve readability.
50724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50725      # Now convert it back to Unix-style (cygpath)
50726      input_path=`$CYGPATH -u "$shortmode_path"`
50727      new_path="$input_path"
50728    fi
50729  fi
50730
50731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50732  if test "x$test_cygdrive_prefix" = x; then
50733    # As a simple fix, exclude /usr/bin since it's not a real path.
50734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50736      # a path prefixed by /cygdrive for fixpath to work.
50737      new_path="$CYGWIN_ROOT_PATH$input_path"
50738    fi
50739  fi
50740
50741
50742  if test "x$path" != "x$new_path"; then
50743    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50745$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50746  fi
50747
50748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50749
50750  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50751  has_colon=`$ECHO $path | $GREP ^.:`
50752  new_path="$path"
50753  if test "x$has_colon" = x; then
50754    # Not in mixed or Windows style, start by that.
50755    new_path=`cmd //c echo $path`
50756  fi
50757
50758
50759  input_path="$new_path"
50760  # Check if we need to convert this using DOS-style short mode. If the path
50761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50762  # take no chances and rewrite it.
50763  # Note: m4 eats our [], so we need to use [ and ] instead.
50764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50765  if test "x$has_forbidden_chars" != x; then
50766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50768  fi
50769
50770
50771  windows_path="$new_path"
50772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50773    unix_path=`$CYGPATH -u "$windows_path"`
50774    new_path="$unix_path"
50775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50777    new_path="$unix_path"
50778  fi
50779
50780  if test "x$path" != "x$new_path"; then
50781    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50783$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50784  fi
50785
50786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50788
50789    else
50790      # We're on a unix platform. Hooray! :)
50791      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50792      has_space=`$ECHO "$path" | $GREP " "`
50793      if test "x$has_space" != x; then
50794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50795$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50796        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50797      fi
50798
50799      # Use eval to expand a potential ~
50800      eval path="$path"
50801      if test ! -f "$path" && test ! -d "$path"; then
50802        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50803      fi
50804
50805      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50806    fi
50807  fi
50808
50809
50810  # Only process if variable expands to non-empty
50811
50812  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50814
50815  # Input might be given as Windows format, start by converting to
50816  # unix format.
50817  path="$POTENTIAL_FREETYPE_LIB_PATH"
50818  new_path=`$CYGPATH -u "$path"`
50819
50820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50823  # "foo.exe" is OK but "foo" is an error.
50824  #
50825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50826  # It is also a way to make sure we got the proper file name for the real test later on.
50827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50828  if test "x$test_shortpath" = x; then
50829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50830$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50831    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50832  fi
50833
50834  # Call helper function which possibly converts this using DOS-style short mode.
50835  # If so, the updated path is stored in $new_path.
50836
50837  input_path="$new_path"
50838  # Check if we need to convert this using DOS-style short mode. If the path
50839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50840  # take no chances and rewrite it.
50841  # Note: m4 eats our [], so we need to use [ and ] instead.
50842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50843  if test "x$has_forbidden_chars" != x; then
50844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50848      # Going to short mode and back again did indeed matter. Since short mode is
50849      # case insensitive, let's make it lowercase to improve readability.
50850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50851      # Now convert it back to Unix-style (cygpath)
50852      input_path=`$CYGPATH -u "$shortmode_path"`
50853      new_path="$input_path"
50854    fi
50855  fi
50856
50857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50858  if test "x$test_cygdrive_prefix" = x; then
50859    # As a simple fix, exclude /usr/bin since it's not a real path.
50860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50862      # a path prefixed by /cygdrive for fixpath to work.
50863      new_path="$CYGWIN_ROOT_PATH$input_path"
50864    fi
50865  fi
50866
50867
50868  if test "x$path" != "x$new_path"; then
50869    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50871$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50872  fi
50873
50874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50875
50876  path="$POTENTIAL_FREETYPE_LIB_PATH"
50877  has_colon=`$ECHO $path | $GREP ^.:`
50878  new_path="$path"
50879  if test "x$has_colon" = x; then
50880    # Not in mixed or Windows style, start by that.
50881    new_path=`cmd //c echo $path`
50882  fi
50883
50884
50885  input_path="$new_path"
50886  # Check if we need to convert this using DOS-style short mode. If the path
50887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50888  # take no chances and rewrite it.
50889  # Note: m4 eats our [], so we need to use [ and ] instead.
50890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50891  if test "x$has_forbidden_chars" != x; then
50892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50894  fi
50895
50896
50897  windows_path="$new_path"
50898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50899    unix_path=`$CYGPATH -u "$windows_path"`
50900    new_path="$unix_path"
50901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50903    new_path="$unix_path"
50904  fi
50905
50906  if test "x$path" != "x$new_path"; then
50907    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50910  fi
50911
50912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50914
50915    else
50916      # We're on a unix platform. Hooray! :)
50917      path="$POTENTIAL_FREETYPE_LIB_PATH"
50918      has_space=`$ECHO "$path" | $GREP " "`
50919      if test "x$has_space" != x; then
50920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50921$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50923      fi
50924
50925      # Use eval to expand a potential ~
50926      eval path="$path"
50927      if test ! -f "$path" && test ! -d "$path"; then
50928        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50929      fi
50930
50931      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50932    fi
50933  fi
50934
50935
50936    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50938$as_echo_n "checking for freetype includes... " >&6; }
50939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50940$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50941    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50943$as_echo_n "checking for freetype libraries... " >&6; }
50944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50945$as_echo "$FREETYPE_LIB_PATH" >&6; }
50946  fi
50947
50948              if test "x$FOUND_FREETYPE" != xyes; then
50949
50950  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50951  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
50952  METHOD="well-known location"
50953
50954  # Let's start with an optimistic view of the world :-)
50955  FOUND_FREETYPE=yes
50956
50957  # First look for the canonical freetype main include file ft2build.h.
50958  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50959    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50960    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50961    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50962      # Fail.
50963      FOUND_FREETYPE=no
50964    fi
50965  fi
50966
50967  if test "x$FOUND_FREETYPE" = xyes; then
50968    # Include file found, let's continue the sanity check.
50969    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50970$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50971
50972    # Reset to default value
50973    FREETYPE_BASE_NAME=freetype
50974    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50975    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50976      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50977          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50978        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50979        # for the .6 version explicitly.
50980        FREETYPE_BASE_NAME=freetype.6
50981        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50982        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50983$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50984      else
50985        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50986$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50987        FOUND_FREETYPE=no
50988      fi
50989    else
50990      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50991        # On Windows, we will need both .lib and .dll file.
50992        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50993          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50994$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50995          FOUND_FREETYPE=no
50996        fi
50997      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50998          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50999        # Found lib in isa dir, use that instead.
51000        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51001        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51002$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51003      fi
51004    fi
51005  fi
51006
51007  if test "x$FOUND_FREETYPE" = xyes; then
51008
51009  # Only process if variable expands to non-empty
51010
51011  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51013
51014  # Input might be given as Windows format, start by converting to
51015  # unix format.
51016  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51017  new_path=`$CYGPATH -u "$path"`
51018
51019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51022  # "foo.exe" is OK but "foo" is an error.
51023  #
51024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51025  # It is also a way to make sure we got the proper file name for the real test later on.
51026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51027  if test "x$test_shortpath" = x; then
51028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51029$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51030    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51031  fi
51032
51033  # Call helper function which possibly converts this using DOS-style short mode.
51034  # If so, the updated path is stored in $new_path.
51035
51036  input_path="$new_path"
51037  # Check if we need to convert this using DOS-style short mode. If the path
51038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51039  # take no chances and rewrite it.
51040  # Note: m4 eats our [], so we need to use [ and ] instead.
51041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51042  if test "x$has_forbidden_chars" != x; then
51043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51047      # Going to short mode and back again did indeed matter. Since short mode is
51048      # case insensitive, let's make it lowercase to improve readability.
51049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51050      # Now convert it back to Unix-style (cygpath)
51051      input_path=`$CYGPATH -u "$shortmode_path"`
51052      new_path="$input_path"
51053    fi
51054  fi
51055
51056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51057  if test "x$test_cygdrive_prefix" = x; then
51058    # As a simple fix, exclude /usr/bin since it's not a real path.
51059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51061      # a path prefixed by /cygdrive for fixpath to work.
51062      new_path="$CYGWIN_ROOT_PATH$input_path"
51063    fi
51064  fi
51065
51066
51067  if test "x$path" != "x$new_path"; then
51068    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51070$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51071  fi
51072
51073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51074
51075  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51076  has_colon=`$ECHO $path | $GREP ^.:`
51077  new_path="$path"
51078  if test "x$has_colon" = x; then
51079    # Not in mixed or Windows style, start by that.
51080    new_path=`cmd //c echo $path`
51081  fi
51082
51083
51084  input_path="$new_path"
51085  # Check if we need to convert this using DOS-style short mode. If the path
51086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51087  # take no chances and rewrite it.
51088  # Note: m4 eats our [], so we need to use [ and ] instead.
51089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51090  if test "x$has_forbidden_chars" != x; then
51091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51093  fi
51094
51095
51096  windows_path="$new_path"
51097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51098    unix_path=`$CYGPATH -u "$windows_path"`
51099    new_path="$unix_path"
51100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51102    new_path="$unix_path"
51103  fi
51104
51105  if test "x$path" != "x$new_path"; then
51106    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51108$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51109  fi
51110
51111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51113
51114    else
51115      # We're on a unix platform. Hooray! :)
51116      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51117      has_space=`$ECHO "$path" | $GREP " "`
51118      if test "x$has_space" != x; then
51119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51120$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51122      fi
51123
51124      # Use eval to expand a potential ~
51125      eval path="$path"
51126      if test ! -f "$path" && test ! -d "$path"; then
51127        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51128      fi
51129
51130      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51131    fi
51132  fi
51133
51134
51135  # Only process if variable expands to non-empty
51136
51137  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51138    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51139
51140  # Input might be given as Windows format, start by converting to
51141  # unix format.
51142  path="$POTENTIAL_FREETYPE_LIB_PATH"
51143  new_path=`$CYGPATH -u "$path"`
51144
51145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51148  # "foo.exe" is OK but "foo" is an error.
51149  #
51150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51151  # It is also a way to make sure we got the proper file name for the real test later on.
51152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51153  if test "x$test_shortpath" = x; then
51154    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51155$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51156    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51157  fi
51158
51159  # Call helper function which possibly converts this using DOS-style short mode.
51160  # If so, the updated path is stored in $new_path.
51161
51162  input_path="$new_path"
51163  # Check if we need to convert this using DOS-style short mode. If the path
51164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51165  # take no chances and rewrite it.
51166  # Note: m4 eats our [], so we need to use [ and ] instead.
51167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51168  if test "x$has_forbidden_chars" != x; then
51169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51173      # Going to short mode and back again did indeed matter. Since short mode is
51174      # case insensitive, let's make it lowercase to improve readability.
51175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51176      # Now convert it back to Unix-style (cygpath)
51177      input_path=`$CYGPATH -u "$shortmode_path"`
51178      new_path="$input_path"
51179    fi
51180  fi
51181
51182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51183  if test "x$test_cygdrive_prefix" = x; then
51184    # As a simple fix, exclude /usr/bin since it's not a real path.
51185    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51187      # a path prefixed by /cygdrive for fixpath to work.
51188      new_path="$CYGWIN_ROOT_PATH$input_path"
51189    fi
51190  fi
51191
51192
51193  if test "x$path" != "x$new_path"; then
51194    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51196$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51197  fi
51198
51199    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51200
51201  path="$POTENTIAL_FREETYPE_LIB_PATH"
51202  has_colon=`$ECHO $path | $GREP ^.:`
51203  new_path="$path"
51204  if test "x$has_colon" = x; then
51205    # Not in mixed or Windows style, start by that.
51206    new_path=`cmd //c echo $path`
51207  fi
51208
51209
51210  input_path="$new_path"
51211  # Check if we need to convert this using DOS-style short mode. If the path
51212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51213  # take no chances and rewrite it.
51214  # Note: m4 eats our [], so we need to use [ and ] instead.
51215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51216  if test "x$has_forbidden_chars" != x; then
51217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51219  fi
51220
51221
51222  windows_path="$new_path"
51223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51224    unix_path=`$CYGPATH -u "$windows_path"`
51225    new_path="$unix_path"
51226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51228    new_path="$unix_path"
51229  fi
51230
51231  if test "x$path" != "x$new_path"; then
51232    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51234$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51235  fi
51236
51237  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51238  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51239
51240    else
51241      # We're on a unix platform. Hooray! :)
51242      path="$POTENTIAL_FREETYPE_LIB_PATH"
51243      has_space=`$ECHO "$path" | $GREP " "`
51244      if test "x$has_space" != x; then
51245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51246$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51247        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51248      fi
51249
51250      # Use eval to expand a potential ~
51251      eval path="$path"
51252      if test ! -f "$path" && test ! -d "$path"; then
51253        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51254      fi
51255
51256      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51257    fi
51258  fi
51259
51260
51261    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51263$as_echo_n "checking for freetype includes... " >&6; }
51264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51265$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51266    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51268$as_echo_n "checking for freetype libraries... " >&6; }
51269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51270$as_echo "$FREETYPE_LIB_PATH" >&6; }
51271  fi
51272
51273              fi
51274            fi
51275          fi
51276        fi
51277      fi # end check in well-known locations
51278
51279      if test "x$FOUND_FREETYPE" != xyes; then
51280
51281  # Print a helpful message on how to acquire the necessary build dependency.
51282  # freetype is the help tag: freetype, cups, alsa etc
51283  MISSING_DEPENDENCY=freetype
51284
51285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51286    cygwin_help $MISSING_DEPENDENCY
51287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51288    msys_help $MISSING_DEPENDENCY
51289  else
51290    PKGHANDLER_COMMAND=
51291
51292    case $PKGHANDLER in
51293      apt-get)
51294        apt_help     $MISSING_DEPENDENCY ;;
51295      yum)
51296        yum_help     $MISSING_DEPENDENCY ;;
51297      port)
51298        port_help    $MISSING_DEPENDENCY ;;
51299      pkgutil)
51300        pkgutil_help $MISSING_DEPENDENCY ;;
51301      pkgadd)
51302        pkgadd_help  $MISSING_DEPENDENCY ;;
51303    esac
51304
51305    if test "x$PKGHANDLER_COMMAND" != x; then
51306      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51307    fi
51308  fi
51309
51310        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
51311      fi
51312    fi # end user specified settings
51313
51314    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
51315    if test "x$FREETYPE_CFLAGS" = x; then
51316
51317  # Only process if variable expands to non-empty
51318
51319  if test "x$FREETYPE_INCLUDE_PATH" != x; then
51320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51321
51322  # Input might be given as Windows format, start by converting to
51323  # unix format.
51324  path="$FREETYPE_INCLUDE_PATH"
51325  new_path=`$CYGPATH -u "$path"`
51326
51327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51330  # "foo.exe" is OK but "foo" is an error.
51331  #
51332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51333  # It is also a way to make sure we got the proper file name for the real test later on.
51334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51335  if test "x$test_shortpath" = x; then
51336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51337$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51338    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
51339  fi
51340
51341  # Call helper function which possibly converts this using DOS-style short mode.
51342  # If so, the updated path is stored in $new_path.
51343
51344  input_path="$new_path"
51345  # Check if we need to convert this using DOS-style short mode. If the path
51346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51347  # take no chances and rewrite it.
51348  # Note: m4 eats our [], so we need to use [ and ] instead.
51349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51350  if test "x$has_forbidden_chars" != x; then
51351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51355      # Going to short mode and back again did indeed matter. Since short mode is
51356      # case insensitive, let's make it lowercase to improve readability.
51357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51358      # Now convert it back to Unix-style (cygpath)
51359      input_path=`$CYGPATH -u "$shortmode_path"`
51360      new_path="$input_path"
51361    fi
51362  fi
51363
51364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51365  if test "x$test_cygdrive_prefix" = x; then
51366    # As a simple fix, exclude /usr/bin since it's not a real path.
51367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51369      # a path prefixed by /cygdrive for fixpath to work.
51370      new_path="$CYGWIN_ROOT_PATH$input_path"
51371    fi
51372  fi
51373
51374
51375  if test "x$path" != "x$new_path"; then
51376    FREETYPE_INCLUDE_PATH="$new_path"
51377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51378$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51379  fi
51380
51381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51382
51383  path="$FREETYPE_INCLUDE_PATH"
51384  has_colon=`$ECHO $path | $GREP ^.:`
51385  new_path="$path"
51386  if test "x$has_colon" = x; then
51387    # Not in mixed or Windows style, start by that.
51388    new_path=`cmd //c echo $path`
51389  fi
51390
51391
51392  input_path="$new_path"
51393  # Check if we need to convert this using DOS-style short mode. If the path
51394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51395  # take no chances and rewrite it.
51396  # Note: m4 eats our [], so we need to use [ and ] instead.
51397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51398  if test "x$has_forbidden_chars" != x; then
51399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51401  fi
51402
51403
51404  windows_path="$new_path"
51405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51406    unix_path=`$CYGPATH -u "$windows_path"`
51407    new_path="$unix_path"
51408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51410    new_path="$unix_path"
51411  fi
51412
51413  if test "x$path" != "x$new_path"; then
51414    FREETYPE_INCLUDE_PATH="$new_path"
51415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51416$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51417  fi
51418
51419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51421
51422    else
51423      # We're on a unix platform. Hooray! :)
51424      path="$FREETYPE_INCLUDE_PATH"
51425      has_space=`$ECHO "$path" | $GREP " "`
51426      if test "x$has_space" != x; then
51427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51428$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51430      fi
51431
51432      # Use eval to expand a potential ~
51433      eval path="$path"
51434      if test ! -f "$path" && test ! -d "$path"; then
51435        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51436      fi
51437
51438      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51439    fi
51440  fi
51441
51442      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
51443        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
51444      else
51445        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
51446      fi
51447    fi
51448
51449    if test "x$FREETYPE_LIBS" = x; then
51450
51451  # Only process if variable expands to non-empty
51452
51453  if test "x$FREETYPE_LIB_PATH" != x; then
51454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51455
51456  # Input might be given as Windows format, start by converting to
51457  # unix format.
51458  path="$FREETYPE_LIB_PATH"
51459  new_path=`$CYGPATH -u "$path"`
51460
51461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51464  # "foo.exe" is OK but "foo" is an error.
51465  #
51466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51467  # It is also a way to make sure we got the proper file name for the real test later on.
51468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51469  if test "x$test_shortpath" = x; then
51470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51471$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51472    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
51473  fi
51474
51475  # Call helper function which possibly converts this using DOS-style short mode.
51476  # If so, the updated path is stored in $new_path.
51477
51478  input_path="$new_path"
51479  # Check if we need to convert this using DOS-style short mode. If the path
51480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51481  # take no chances and rewrite it.
51482  # Note: m4 eats our [], so we need to use [ and ] instead.
51483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51484  if test "x$has_forbidden_chars" != x; then
51485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51489      # Going to short mode and back again did indeed matter. Since short mode is
51490      # case insensitive, let's make it lowercase to improve readability.
51491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51492      # Now convert it back to Unix-style (cygpath)
51493      input_path=`$CYGPATH -u "$shortmode_path"`
51494      new_path="$input_path"
51495    fi
51496  fi
51497
51498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51499  if test "x$test_cygdrive_prefix" = x; then
51500    # As a simple fix, exclude /usr/bin since it's not a real path.
51501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51503      # a path prefixed by /cygdrive for fixpath to work.
51504      new_path="$CYGWIN_ROOT_PATH$input_path"
51505    fi
51506  fi
51507
51508
51509  if test "x$path" != "x$new_path"; then
51510    FREETYPE_LIB_PATH="$new_path"
51511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
51512$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51513  fi
51514
51515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51516
51517  path="$FREETYPE_LIB_PATH"
51518  has_colon=`$ECHO $path | $GREP ^.:`
51519  new_path="$path"
51520  if test "x$has_colon" = x; then
51521    # Not in mixed or Windows style, start by that.
51522    new_path=`cmd //c echo $path`
51523  fi
51524
51525
51526  input_path="$new_path"
51527  # Check if we need to convert this using DOS-style short mode. If the path
51528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51529  # take no chances and rewrite it.
51530  # Note: m4 eats our [], so we need to use [ and ] instead.
51531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51532  if test "x$has_forbidden_chars" != x; then
51533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51535  fi
51536
51537
51538  windows_path="$new_path"
51539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51540    unix_path=`$CYGPATH -u "$windows_path"`
51541    new_path="$unix_path"
51542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51544    new_path="$unix_path"
51545  fi
51546
51547  if test "x$path" != "x$new_path"; then
51548    FREETYPE_LIB_PATH="$new_path"
51549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
51550$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51551  fi
51552
51553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51555
51556    else
51557      # We're on a unix platform. Hooray! :)
51558      path="$FREETYPE_LIB_PATH"
51559      has_space=`$ECHO "$path" | $GREP " "`
51560      if test "x$has_space" != x; then
51561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51562$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51564      fi
51565
51566      # Use eval to expand a potential ~
51567      eval path="$path"
51568      if test ! -f "$path" && test ! -d "$path"; then
51569        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51570      fi
51571
51572      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51573    fi
51574  fi
51575
51576      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51577        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
51578      else
51579        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
51580      fi
51581    fi
51582
51583    # Try to compile it
51584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
51585$as_echo_n "checking if we can compile and link with freetype... " >&6; }
51586    ac_ext=cpp
51587ac_cpp='$CXXCPP $CPPFLAGS'
51588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51591
51592    PREV_CXXCFLAGS="$CXXFLAGS"
51593    PREV_LIBS="$LIBS"
51594    PREV_CXX="$CXX"
51595    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
51596    LIBS="$LIBS $FREETYPE_LIBS"
51597    CXX="$FIXPATH $CXX"
51598    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51599/* end confdefs.h.  */
51600
51601          #include<ft2build.h>
51602          #include FT_FREETYPE_H
51603          int main () {
51604            FT_Init_FreeType(NULL);
51605            return 0;
51606          }
51607
51608_ACEOF
51609if ac_fn_cxx_try_link "$LINENO"; then :
51610
51611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51612$as_echo "yes" >&6; }
51613
51614else
51615
51616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51617$as_echo "no" >&6; }
51618          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
51619$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
51620          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
51621$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
51622
51623
51624  # Print a helpful message on how to acquire the necessary build dependency.
51625  # freetype is the help tag: freetype, cups, alsa etc
51626  MISSING_DEPENDENCY=freetype
51627
51628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51629    cygwin_help $MISSING_DEPENDENCY
51630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51631    msys_help $MISSING_DEPENDENCY
51632  else
51633    PKGHANDLER_COMMAND=
51634
51635    case $PKGHANDLER in
51636      apt-get)
51637        apt_help     $MISSING_DEPENDENCY ;;
51638      yum)
51639        yum_help     $MISSING_DEPENDENCY ;;
51640      port)
51641        port_help    $MISSING_DEPENDENCY ;;
51642      pkgutil)
51643        pkgutil_help $MISSING_DEPENDENCY ;;
51644      pkgadd)
51645        pkgadd_help  $MISSING_DEPENDENCY ;;
51646    esac
51647
51648    if test "x$PKGHANDLER_COMMAND" != x; then
51649      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51650    fi
51651  fi
51652
51653
51654          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
51655
51656
51657fi
51658rm -f core conftest.err conftest.$ac_objext \
51659    conftest$ac_exeext conftest.$ac_ext
51660    CXXCFLAGS="$PREV_CXXFLAGS"
51661    LIBS="$PREV_LIBS"
51662    CXX="$PREV_CXX"
51663    ac_ext=cpp
51664ac_cpp='$CXXCPP $CPPFLAGS'
51665ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51666ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51667ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51668
51669
51670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
51671$as_echo_n "checking if we should bundle freetype... " >&6; }
51672    if test "x$BUNDLE_FREETYPE" = xyes; then
51673      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
51674    fi
51675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
51676$as_echo "$BUNDLE_FREETYPE" >&6; }
51677
51678  fi # end freetype needed
51679
51680
51681
51682
51683
51684
51685
51686# Check whether --with-alsa was given.
51687if test "${with_alsa+set}" = set; then :
51688  withval=$with_alsa;
51689fi
51690
51691
51692# Check whether --with-alsa-include was given.
51693if test "${with_alsa_include+set}" = set; then :
51694  withval=$with_alsa_include;
51695fi
51696
51697
51698# Check whether --with-alsa-lib was given.
51699if test "${with_alsa_lib+set}" = set; then :
51700  withval=$with_alsa_lib;
51701fi
51702
51703
51704  if test "x$NEEDS_LIB_ALSA" = xfalse; then
51705    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
51706        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
51707        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
51708      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
51709$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
51710    fi
51711    ALSA_CFLAGS=
51712    ALSA_LIBS=
51713  else
51714    ALSA_FOUND=no
51715
51716    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
51717      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
51718    fi
51719
51720    if test "x${with_alsa}" != x; then
51721      ALSA_LIBS="-L${with_alsa}/lib -lasound"
51722      ALSA_CFLAGS="-I${with_alsa}/include"
51723      ALSA_FOUND=yes
51724    fi
51725    if test "x${with_alsa_include}" != x; then
51726      ALSA_CFLAGS="-I${with_alsa_include}"
51727      ALSA_FOUND=yes
51728    fi
51729    if test "x${with_alsa_lib}" != x; then
51730      ALSA_LIBS="-L${with_alsa_lib} -lasound"
51731      ALSA_FOUND=yes
51732    fi
51733    # Do not try pkg-config if we have a sysroot set.
51734    if test "x$SYSROOT" = x; then
51735      if test "x$ALSA_FOUND" = xno; then
51736
51737pkg_failed=no
51738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
51739$as_echo_n "checking for ALSA... " >&6; }
51740
51741if test -n "$ALSA_CFLAGS"; then
51742    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
51743 elif test -n "$PKG_CONFIG"; then
51744    if test -n "$PKG_CONFIG" && \
51745    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
51746  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
51747  ac_status=$?
51748  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51749  test $ac_status = 0; }; then
51750  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
51751else
51752  pkg_failed=yes
51753fi
51754 else
51755    pkg_failed=untried
51756fi
51757if test -n "$ALSA_LIBS"; then
51758    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
51759 elif test -n "$PKG_CONFIG"; then
51760    if test -n "$PKG_CONFIG" && \
51761    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
51762  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
51763  ac_status=$?
51764  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51765  test $ac_status = 0; }; then
51766  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
51767else
51768  pkg_failed=yes
51769fi
51770 else
51771    pkg_failed=untried
51772fi
51773
51774
51775
51776if test $pkg_failed = yes; then
51777
51778if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
51779        _pkg_short_errors_supported=yes
51780else
51781        _pkg_short_errors_supported=no
51782fi
51783        if test $_pkg_short_errors_supported = yes; then
51784	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
51785        else
51786	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
51787        fi
51788	# Put the nasty error message in config.log where it belongs
51789	echo "$ALSA_PKG_ERRORS" >&5
51790
51791	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51792$as_echo "no" >&6; }
51793                ALSA_FOUND=no
51794elif test $pkg_failed = untried; then
51795	ALSA_FOUND=no
51796else
51797	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
51798	ALSA_LIBS=$pkg_cv_ALSA_LIBS
51799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51800$as_echo "yes" >&6; }
51801	ALSA_FOUND=yes
51802fi
51803      fi
51804    fi
51805    if test "x$ALSA_FOUND" = xno; then
51806      for ac_header in alsa/asoundlib.h
51807do :
51808  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
51809if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
51810  cat >>confdefs.h <<_ACEOF
51811#define HAVE_ALSA_ASOUNDLIB_H 1
51812_ACEOF
51813
51814            ALSA_FOUND=yes
51815            ALSA_CFLAGS=-Iignoreme
51816            ALSA_LIBS=-lasound
51817            DEFAULT_ALSA=yes
51818
51819else
51820  ALSA_FOUND=no
51821
51822fi
51823
51824done
51825
51826    fi
51827    if test "x$ALSA_FOUND" = xno; then
51828
51829  # Print a helpful message on how to acquire the necessary build dependency.
51830  # alsa is the help tag: freetype, cups, alsa etc
51831  MISSING_DEPENDENCY=alsa
51832
51833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51834    cygwin_help $MISSING_DEPENDENCY
51835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51836    msys_help $MISSING_DEPENDENCY
51837  else
51838    PKGHANDLER_COMMAND=
51839
51840    case $PKGHANDLER in
51841      apt-get)
51842        apt_help     $MISSING_DEPENDENCY ;;
51843      yum)
51844        yum_help     $MISSING_DEPENDENCY ;;
51845      port)
51846        port_help    $MISSING_DEPENDENCY ;;
51847      pkgutil)
51848        pkgutil_help $MISSING_DEPENDENCY ;;
51849      pkgadd)
51850        pkgadd_help  $MISSING_DEPENDENCY ;;
51851    esac
51852
51853    if test "x$PKGHANDLER_COMMAND" != x; then
51854      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51855    fi
51856  fi
51857
51858      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
51859    fi
51860  fi
51861
51862
51863
51864
51865
51866
51867# Check whether --with-libffi was given.
51868if test "${with_libffi+set}" = set; then :
51869  withval=$with_libffi;
51870fi
51871
51872
51873# Check whether --with-libffi-include was given.
51874if test "${with_libffi_include+set}" = set; then :
51875  withval=$with_libffi_include;
51876fi
51877
51878
51879# Check whether --with-libffi-lib was given.
51880if test "${with_libffi_lib+set}" = set; then :
51881  withval=$with_libffi_lib;
51882fi
51883
51884
51885  if test "x$NEEDS_LIB_FFI" = xfalse; then
51886    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
51887        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
51888        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
51889      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
51890$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
51891    fi
51892    LIBFFI_CFLAGS=
51893    LIBFFI_LIBS=
51894  else
51895    LIBFFI_FOUND=no
51896
51897    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
51898      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
51899    fi
51900
51901    if test "x${with_libffi}" != x; then
51902      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
51903      LIBFFI_CFLAGS="-I${with_libffi}/include"
51904      LIBFFI_FOUND=yes
51905    fi
51906    if test "x${with_libffi_include}" != x; then
51907      LIBFFI_CFLAGS="-I${with_libffi_include}"
51908      LIBFFI_FOUND=yes
51909    fi
51910    if test "x${with_libffi_lib}" != x; then
51911      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
51912      LIBFFI_FOUND=yes
51913    fi
51914    # Do not try pkg-config if we have a sysroot set.
51915    if test "x$SYSROOT" = x; then
51916      if test "x$LIBFFI_FOUND" = xno; then
51917        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
51918
51919pkg_failed=no
51920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
51921$as_echo_n "checking for LIBFFI... " >&6; }
51922
51923if test -n "$LIBFFI_CFLAGS"; then
51924    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
51925 elif test -n "$PKG_CONFIG"; then
51926    if test -n "$PKG_CONFIG" && \
51927    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
51928  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
51929  ac_status=$?
51930  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51931  test $ac_status = 0; }; then
51932  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
51933else
51934  pkg_failed=yes
51935fi
51936 else
51937    pkg_failed=untried
51938fi
51939if test -n "$LIBFFI_LIBS"; then
51940    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
51941 elif test -n "$PKG_CONFIG"; then
51942    if test -n "$PKG_CONFIG" && \
51943    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
51944  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
51945  ac_status=$?
51946  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51947  test $ac_status = 0; }; then
51948  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
51949else
51950  pkg_failed=yes
51951fi
51952 else
51953    pkg_failed=untried
51954fi
51955
51956
51957
51958if test $pkg_failed = yes; then
51959
51960if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
51961        _pkg_short_errors_supported=yes
51962else
51963        _pkg_short_errors_supported=no
51964fi
51965        if test $_pkg_short_errors_supported = yes; then
51966	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
51967        else
51968	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
51969        fi
51970	# Put the nasty error message in config.log where it belongs
51971	echo "$LIBFFI_PKG_ERRORS" >&5
51972
51973	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51974$as_echo "no" >&6; }
51975                LIBFFI_FOUND=no
51976elif test $pkg_failed = untried; then
51977	LIBFFI_FOUND=no
51978else
51979	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
51980	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
51981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51982$as_echo "yes" >&6; }
51983	LIBFFI_FOUND=yes
51984fi
51985      fi
51986    fi
51987    if test "x$LIBFFI_FOUND" = xno; then
51988      for ac_header in ffi.h
51989do :
51990  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
51991if test "x$ac_cv_header_ffi_h" = xyes; then :
51992  cat >>confdefs.h <<_ACEOF
51993#define HAVE_FFI_H 1
51994_ACEOF
51995
51996            LIBFFI_FOUND=yes
51997            LIBFFI_CFLAGS=
51998            LIBFFI_LIBS=-lffi
51999
52000else
52001  LIBFFI_FOUND=no
52002
52003fi
52004
52005done
52006
52007    fi
52008    if test "x$LIBFFI_FOUND" = xno; then
52009
52010  # Print a helpful message on how to acquire the necessary build dependency.
52011  # ffi is the help tag: freetype, cups, alsa etc
52012  MISSING_DEPENDENCY=ffi
52013
52014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52015    cygwin_help $MISSING_DEPENDENCY
52016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52017    msys_help $MISSING_DEPENDENCY
52018  else
52019    PKGHANDLER_COMMAND=
52020
52021    case $PKGHANDLER in
52022      apt-get)
52023        apt_help     $MISSING_DEPENDENCY ;;
52024      yum)
52025        yum_help     $MISSING_DEPENDENCY ;;
52026      port)
52027        port_help    $MISSING_DEPENDENCY ;;
52028      pkgutil)
52029        pkgutil_help $MISSING_DEPENDENCY ;;
52030      pkgadd)
52031        pkgadd_help  $MISSING_DEPENDENCY ;;
52032    esac
52033
52034    if test "x$PKGHANDLER_COMMAND" != x; then
52035      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52036    fi
52037  fi
52038
52039      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
52040    fi
52041
52042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
52043$as_echo_n "checking if libffi works... " >&6; }
52044    ac_ext=c
52045ac_cpp='$CPP $CPPFLAGS'
52046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52048ac_compiler_gnu=$ac_cv_c_compiler_gnu
52049
52050    OLD_CFLAGS="$CFLAGS"
52051    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
52052    OLD_LIBS="$LIBS"
52053    LIBS="$LIBS $LIBFFI_LIBS"
52054    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52055/* end confdefs.h.  */
52056#include <ffi.h>
52057int
52058main ()
52059{
52060
52061          ffi_call(NULL, NULL, NULL, NULL);
52062          return 0;
52063
52064  ;
52065  return 0;
52066}
52067_ACEOF
52068if ac_fn_c_try_link "$LINENO"; then :
52069  LIBFFI_WORKS=yes
52070else
52071  LIBFFI_WORKS=no
52072
52073fi
52074rm -f core conftest.err conftest.$ac_objext \
52075    conftest$ac_exeext conftest.$ac_ext
52076    CFLAGS="$OLD_CFLAGS"
52077    LIBS="$OLD_LIBS"
52078    ac_ext=cpp
52079ac_cpp='$CXXCPP $CPPFLAGS'
52080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52083
52084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
52085$as_echo "$LIBFFI_WORKS" >&6; }
52086
52087    if test "x$LIBFFI_WORKS" = xno; then
52088
52089  # Print a helpful message on how to acquire the necessary build dependency.
52090  # ffi is the help tag: freetype, cups, alsa etc
52091  MISSING_DEPENDENCY=ffi
52092
52093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52094    cygwin_help $MISSING_DEPENDENCY
52095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52096    msys_help $MISSING_DEPENDENCY
52097  else
52098    PKGHANDLER_COMMAND=
52099
52100    case $PKGHANDLER in
52101      apt-get)
52102        apt_help     $MISSING_DEPENDENCY ;;
52103      yum)
52104        yum_help     $MISSING_DEPENDENCY ;;
52105      port)
52106        port_help    $MISSING_DEPENDENCY ;;
52107      pkgutil)
52108        pkgutil_help $MISSING_DEPENDENCY ;;
52109      pkgadd)
52110        pkgadd_help  $MISSING_DEPENDENCY ;;
52111    esac
52112
52113    if test "x$PKGHANDLER_COMMAND" != x; then
52114      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52115    fi
52116  fi
52117
52118      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
52119    fi
52120  fi
52121
52122
52123
52124
52125
52126  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
52127    # Extract the first word of "llvm-config", so it can be a program name with args.
52128set dummy llvm-config; ac_word=$2
52129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52130$as_echo_n "checking for $ac_word... " >&6; }
52131if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
52132  $as_echo_n "(cached) " >&6
52133else
52134  if test -n "$LLVM_CONFIG"; then
52135  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
52136else
52137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52138for as_dir in $PATH
52139do
52140  IFS=$as_save_IFS
52141  test -z "$as_dir" && as_dir=.
52142    for ac_exec_ext in '' $ac_executable_extensions; do
52143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52144    ac_cv_prog_LLVM_CONFIG="llvm-config"
52145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52146    break 2
52147  fi
52148done
52149  done
52150IFS=$as_save_IFS
52151
52152fi
52153fi
52154LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
52155if test -n "$LLVM_CONFIG"; then
52156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
52157$as_echo "$LLVM_CONFIG" >&6; }
52158else
52159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52160$as_echo "no" >&6; }
52161fi
52162
52163
52164
52165    if test "x$LLVM_CONFIG" != xllvm-config; then
52166      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
52167    fi
52168
52169    llvm_components="jit mcjit engine nativecodegen native"
52170    unset LLVM_CFLAGS
52171    for flag in $("$LLVM_CONFIG" --cxxflags); do
52172      if echo "${flag}" | grep -q '^-[ID]'; then
52173        if test "${flag}" != "-D_DEBUG" ; then
52174          if test "${LLVM_CFLAGS}" != "" ; then
52175            LLVM_CFLAGS="${LLVM_CFLAGS} "
52176          fi
52177          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
52178        fi
52179      fi
52180    done
52181    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
52182    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
52183
52184    unset LLVM_LDFLAGS
52185    for flag in $("${LLVM_CONFIG}" --ldflags); do
52186      if echo "${flag}" | grep -q '^-L'; then
52187        if test "${LLVM_LDFLAGS}" != ""; then
52188          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
52189        fi
52190        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
52191      fi
52192    done
52193
52194    unset LLVM_LIBS
52195    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
52196      if echo "${flag}" | grep -q '^-l'; then
52197        if test "${LLVM_LIBS}" != ""; then
52198          LLVM_LIBS="${LLVM_LIBS} "
52199        fi
52200        LLVM_LIBS="${LLVM_LIBS}${flag}"
52201      fi
52202    done
52203
52204
52205
52206
52207  fi
52208
52209
52210
52211# Check whether --with-libjpeg was given.
52212if test "${with_libjpeg+set}" = set; then :
52213  withval=$with_libjpeg;
52214fi
52215
52216
52217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
52218$as_echo_n "checking for which libjpeg to use... " >&6; }
52219  # default is bundled
52220  DEFAULT_LIBJPEG=bundled
52221  # if user didn't specify, use DEFAULT_LIBJPEG
52222  if test "x${with_libjpeg}" = "x"; then
52223    with_libjpeg=${DEFAULT_LIBJPEG}
52224  fi
52225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
52226$as_echo "${with_libjpeg}" >&6; }
52227
52228  if test "x${with_libjpeg}" = "xbundled"; then
52229    USE_EXTERNAL_LIBJPEG=false
52230  elif test "x${with_libjpeg}" = "xsystem"; then
52231    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
52232if test "x$ac_cv_header_jpeglib_h" = xyes; then :
52233
52234else
52235   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
52236fi
52237
52238
52239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
52240$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
52241if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
52242  $as_echo_n "(cached) " >&6
52243else
52244  ac_check_lib_save_LIBS=$LIBS
52245LIBS="-ljpeg  $LIBS"
52246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52247/* end confdefs.h.  */
52248
52249/* Override any GCC internal prototype to avoid an error.
52250   Use char because int might match the return type of a GCC
52251   builtin and then its argument prototype would still apply.  */
52252#ifdef __cplusplus
52253extern "C"
52254#endif
52255char jpeg_CreateDecompress ();
52256int
52257main ()
52258{
52259return jpeg_CreateDecompress ();
52260  ;
52261  return 0;
52262}
52263_ACEOF
52264if ac_fn_cxx_try_link "$LINENO"; then :
52265  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
52266else
52267  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
52268fi
52269rm -f core conftest.err conftest.$ac_objext \
52270    conftest$ac_exeext conftest.$ac_ext
52271LIBS=$ac_check_lib_save_LIBS
52272fi
52273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
52274$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
52275if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
52276  cat >>confdefs.h <<_ACEOF
52277#define HAVE_LIBJPEG 1
52278_ACEOF
52279
52280  LIBS="-ljpeg $LIBS"
52281
52282else
52283   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
52284fi
52285
52286
52287    USE_EXTERNAL_LIBJPEG=true
52288  else
52289    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
52290  fi
52291
52292
52293
52294
52295
52296# Check whether --with-giflib was given.
52297if test "${with_giflib+set}" = set; then :
52298  withval=$with_giflib;
52299fi
52300
52301
52302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
52303$as_echo_n "checking for which giflib to use... " >&6; }
52304  # default is bundled
52305  DEFAULT_GIFLIB=bundled
52306  # if user didn't specify, use DEFAULT_GIFLIB
52307  if test "x${with_giflib}" = "x"; then
52308    with_giflib=${DEFAULT_GIFLIB}
52309  fi
52310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
52311$as_echo "${with_giflib}" >&6; }
52312
52313  if test "x${with_giflib}" = "xbundled"; then
52314    USE_EXTERNAL_LIBGIF=false
52315  elif test "x${with_giflib}" = "xsystem"; then
52316    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
52317if test "x$ac_cv_header_gif_lib_h" = xyes; then :
52318
52319else
52320   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
52321fi
52322
52323
52324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
52325$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
52326if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
52327  $as_echo_n "(cached) " >&6
52328else
52329  ac_check_lib_save_LIBS=$LIBS
52330LIBS="-lgif  $LIBS"
52331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52332/* end confdefs.h.  */
52333
52334/* Override any GCC internal prototype to avoid an error.
52335   Use char because int might match the return type of a GCC
52336   builtin and then its argument prototype would still apply.  */
52337#ifdef __cplusplus
52338extern "C"
52339#endif
52340char DGifGetCode ();
52341int
52342main ()
52343{
52344return DGifGetCode ();
52345  ;
52346  return 0;
52347}
52348_ACEOF
52349if ac_fn_cxx_try_link "$LINENO"; then :
52350  ac_cv_lib_gif_DGifGetCode=yes
52351else
52352  ac_cv_lib_gif_DGifGetCode=no
52353fi
52354rm -f core conftest.err conftest.$ac_objext \
52355    conftest$ac_exeext conftest.$ac_ext
52356LIBS=$ac_check_lib_save_LIBS
52357fi
52358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
52359$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
52360if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
52361  cat >>confdefs.h <<_ACEOF
52362#define HAVE_LIBGIF 1
52363_ACEOF
52364
52365  LIBS="-lgif $LIBS"
52366
52367else
52368   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
52369fi
52370
52371
52372    USE_EXTERNAL_LIBGIF=true
52373  else
52374    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
52375  fi
52376
52377
52378
52379
52380
52381# Check whether --with-libpng was given.
52382if test "${with_libpng+set}" = set; then :
52383  withval=$with_libpng;
52384fi
52385
52386
52387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
52388$as_echo_n "checking for which libpng to use... " >&6; }
52389
52390  # default is bundled
52391  DEFAULT_LIBPNG=bundled
52392  # if user didn't specify, use DEFAULT_LIBPNG
52393  if test "x${with_libpng}" = "x"; then
52394      with_libpng=${DEFAULT_LIBPNG}
52395  fi
52396
52397  if test "x${with_libpng}" = "xbundled"; then
52398      USE_EXTERNAL_LIBPNG=false
52399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52400$as_echo "bundled" >&6; }
52401  elif test "x${with_libpng}" = "xsystem"; then
52402
52403pkg_failed=no
52404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
52405$as_echo_n "checking for PNG... " >&6; }
52406
52407if test -n "$PNG_CFLAGS"; then
52408    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
52409 elif test -n "$PKG_CONFIG"; then
52410    if test -n "$PKG_CONFIG" && \
52411    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
52412  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
52413  ac_status=$?
52414  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52415  test $ac_status = 0; }; then
52416  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
52417else
52418  pkg_failed=yes
52419fi
52420 else
52421    pkg_failed=untried
52422fi
52423if test -n "$PNG_LIBS"; then
52424    pkg_cv_PNG_LIBS="$PNG_LIBS"
52425 elif test -n "$PKG_CONFIG"; then
52426    if test -n "$PKG_CONFIG" && \
52427    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
52428  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
52429  ac_status=$?
52430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52431  test $ac_status = 0; }; then
52432  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
52433else
52434  pkg_failed=yes
52435fi
52436 else
52437    pkg_failed=untried
52438fi
52439
52440
52441
52442if test $pkg_failed = yes; then
52443
52444if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52445        _pkg_short_errors_supported=yes
52446else
52447        _pkg_short_errors_supported=no
52448fi
52449        if test $_pkg_short_errors_supported = yes; then
52450	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
52451        else
52452	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
52453        fi
52454	# Put the nasty error message in config.log where it belongs
52455	echo "$PNG_PKG_ERRORS" >&5
52456
52457	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52458$as_echo "no" >&6; }
52459                 LIBPNG_FOUND=no
52460elif test $pkg_failed = untried; then
52461	 LIBPNG_FOUND=no
52462else
52463	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
52464	PNG_LIBS=$pkg_cv_PNG_LIBS
52465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52466$as_echo "yes" >&6; }
52467	 LIBPNG_FOUND=yes
52468fi
52469      if test "x${LIBPNG_FOUND}" = "xyes"; then
52470          USE_EXTERNAL_LIBPNG=true
52471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52472$as_echo "system" >&6; }
52473      else
52474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
52475$as_echo "system not found" >&6; }
52476          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
52477      fi
52478  else
52479      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
52480  fi
52481
52482
52483
52484
52485
52486# Check whether --with-zlib was given.
52487if test "${with_zlib+set}" = set; then :
52488  withval=$with_zlib;
52489fi
52490
52491
52492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
52493$as_echo_n "checking for compress in -lz... " >&6; }
52494if ${ac_cv_lib_z_compress+:} false; then :
52495  $as_echo_n "(cached) " >&6
52496else
52497  ac_check_lib_save_LIBS=$LIBS
52498LIBS="-lz  $LIBS"
52499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52500/* end confdefs.h.  */
52501
52502/* Override any GCC internal prototype to avoid an error.
52503   Use char because int might match the return type of a GCC
52504   builtin and then its argument prototype would still apply.  */
52505#ifdef __cplusplus
52506extern "C"
52507#endif
52508char compress ();
52509int
52510main ()
52511{
52512return compress ();
52513  ;
52514  return 0;
52515}
52516_ACEOF
52517if ac_fn_cxx_try_link "$LINENO"; then :
52518  ac_cv_lib_z_compress=yes
52519else
52520  ac_cv_lib_z_compress=no
52521fi
52522rm -f core conftest.err conftest.$ac_objext \
52523    conftest$ac_exeext conftest.$ac_ext
52524LIBS=$ac_check_lib_save_LIBS
52525fi
52526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
52527$as_echo "$ac_cv_lib_z_compress" >&6; }
52528if test "x$ac_cv_lib_z_compress" = xyes; then :
52529   ZLIB_FOUND=yes
52530else
52531   ZLIB_FOUND=no
52532fi
52533
52534
52535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
52536$as_echo_n "checking for which zlib to use... " >&6; }
52537
52538  DEFAULT_ZLIB=bundled
52539  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52540    # On macosx default is system...on others default is bundled
52541    DEFAULT_ZLIB=system
52542  fi
52543
52544  if test "x${ZLIB_FOUND}" != "xyes"; then
52545    # If we don't find any system...set default to bundled
52546    DEFAULT_ZLIB=bundled
52547  fi
52548
52549  # If user didn't specify, use DEFAULT_ZLIB
52550  if test "x${with_zlib}" = "x"; then
52551    with_zlib=${DEFAULT_ZLIB}
52552  fi
52553
52554  if test "x${with_zlib}" = "xbundled"; then
52555    USE_EXTERNAL_LIBZ=false
52556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52557$as_echo "bundled" >&6; }
52558  elif test "x${with_zlib}" = "xsystem"; then
52559    if test "x${ZLIB_FOUND}" = "xyes"; then
52560      USE_EXTERNAL_LIBZ=true
52561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52562$as_echo "system" >&6; }
52563    else
52564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
52565$as_echo "system not found" >&6; }
52566      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
52567    fi
52568  else
52569    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
52570  fi
52571
52572
52573
52574
52575
52576# Check whether --with-lcms was given.
52577if test "${with_lcms+set}" = set; then :
52578  withval=$with_lcms;
52579fi
52580
52581
52582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
52583$as_echo_n "checking for which lcms to use... " >&6; }
52584
52585  DEFAULT_LCMS=bundled
52586  # If user didn't specify, use DEFAULT_LCMS
52587  if test "x${with_lcms}" = "x"; then
52588      with_lcms=${DEFAULT_LCMS}
52589  fi
52590
52591  if test "x${with_lcms}" = "xbundled"; then
52592    USE_EXTERNAL_LCMS=false
52593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52594$as_echo "bundled" >&6; }
52595  elif test "x${with_lcms}" = "xsystem"; then
52596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52597$as_echo "system" >&6; }
52598
52599pkg_failed=no
52600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
52601$as_echo_n "checking for LCMS... " >&6; }
52602
52603if test -n "$LCMS_CFLAGS"; then
52604    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
52605 elif test -n "$PKG_CONFIG"; then
52606    if test -n "$PKG_CONFIG" && \
52607    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
52608  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
52609  ac_status=$?
52610  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52611  test $ac_status = 0; }; then
52612  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
52613else
52614  pkg_failed=yes
52615fi
52616 else
52617    pkg_failed=untried
52618fi
52619if test -n "$LCMS_LIBS"; then
52620    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
52621 elif test -n "$PKG_CONFIG"; then
52622    if test -n "$PKG_CONFIG" && \
52623    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
52624  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
52625  ac_status=$?
52626  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52627  test $ac_status = 0; }; then
52628  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
52629else
52630  pkg_failed=yes
52631fi
52632 else
52633    pkg_failed=untried
52634fi
52635
52636
52637
52638if test $pkg_failed = yes; then
52639
52640if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52641        _pkg_short_errors_supported=yes
52642else
52643        _pkg_short_errors_supported=no
52644fi
52645        if test $_pkg_short_errors_supported = yes; then
52646	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
52647        else
52648	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
52649        fi
52650	# Put the nasty error message in config.log where it belongs
52651	echo "$LCMS_PKG_ERRORS" >&5
52652
52653	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52654$as_echo "no" >&6; }
52655                LCMS_FOUND=no
52656elif test $pkg_failed = untried; then
52657	LCMS_FOUND=no
52658else
52659	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
52660	LCMS_LIBS=$pkg_cv_LCMS_LIBS
52661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52662$as_echo "yes" >&6; }
52663	LCMS_FOUND=yes
52664fi
52665    if test "x${LCMS_FOUND}" = "xyes"; then
52666      USE_EXTERNAL_LCMS=true
52667    else
52668      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
52669    fi
52670  else
52671    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
52672  fi
52673
52674
52675
52676
52677
52678
52679
52680
52681
52682
52683
52684  # Setup libm (the maths library)
52685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
52686$as_echo_n "checking for cos in -lm... " >&6; }
52687if ${ac_cv_lib_m_cos+:} false; then :
52688  $as_echo_n "(cached) " >&6
52689else
52690  ac_check_lib_save_LIBS=$LIBS
52691LIBS="-lm  $LIBS"
52692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52693/* end confdefs.h.  */
52694
52695/* Override any GCC internal prototype to avoid an error.
52696   Use char because int might match the return type of a GCC
52697   builtin and then its argument prototype would still apply.  */
52698#ifdef __cplusplus
52699extern "C"
52700#endif
52701char cos ();
52702int
52703main ()
52704{
52705return cos ();
52706  ;
52707  return 0;
52708}
52709_ACEOF
52710if ac_fn_cxx_try_link "$LINENO"; then :
52711  ac_cv_lib_m_cos=yes
52712else
52713  ac_cv_lib_m_cos=no
52714fi
52715rm -f core conftest.err conftest.$ac_objext \
52716    conftest$ac_exeext conftest.$ac_ext
52717LIBS=$ac_check_lib_save_LIBS
52718fi
52719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
52720$as_echo "$ac_cv_lib_m_cos" >&6; }
52721if test "x$ac_cv_lib_m_cos" = xyes; then :
52722  cat >>confdefs.h <<_ACEOF
52723#define HAVE_LIBM 1
52724_ACEOF
52725
52726  LIBS="-lm $LIBS"
52727
52728else
52729
52730      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
52731$as_echo "$as_me: Maths library was not found" >&6;}
52732
52733fi
52734
52735  LIBM=-lm
52736
52737
52738  # Setup libdl (for dynamic library loading)
52739  save_LIBS="$LIBS"
52740  LIBS=""
52741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
52742$as_echo_n "checking for dlopen in -ldl... " >&6; }
52743if ${ac_cv_lib_dl_dlopen+:} false; then :
52744  $as_echo_n "(cached) " >&6
52745else
52746  ac_check_lib_save_LIBS=$LIBS
52747LIBS="-ldl  $LIBS"
52748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52749/* end confdefs.h.  */
52750
52751/* Override any GCC internal prototype to avoid an error.
52752   Use char because int might match the return type of a GCC
52753   builtin and then its argument prototype would still apply.  */
52754#ifdef __cplusplus
52755extern "C"
52756#endif
52757char dlopen ();
52758int
52759main ()
52760{
52761return dlopen ();
52762  ;
52763  return 0;
52764}
52765_ACEOF
52766if ac_fn_cxx_try_link "$LINENO"; then :
52767  ac_cv_lib_dl_dlopen=yes
52768else
52769  ac_cv_lib_dl_dlopen=no
52770fi
52771rm -f core conftest.err conftest.$ac_objext \
52772    conftest$ac_exeext conftest.$ac_ext
52773LIBS=$ac_check_lib_save_LIBS
52774fi
52775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
52776$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
52777if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
52778  cat >>confdefs.h <<_ACEOF
52779#define HAVE_LIBDL 1
52780_ACEOF
52781
52782  LIBS="-ldl $LIBS"
52783
52784fi
52785
52786  LIBDL="$LIBS"
52787
52788  LIBS="$save_LIBS"
52789
52790  # Deprecated libraries, keep the flags for backwards compatibility
52791  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52792
52793
52794# Check whether --with-dxsdk was given.
52795if test "${with_dxsdk+set}" = set; then :
52796  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52797$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52798fi
52799
52800
52801
52802
52803# Check whether --with-dxsdk-lib was given.
52804if test "${with_dxsdk_lib+set}" = set; then :
52805  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52806$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52807fi
52808
52809
52810
52811
52812# Check whether --with-dxsdk-include was given.
52813if test "${with_dxsdk_include+set}" = set; then :
52814  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52815$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52816fi
52817
52818
52819  fi
52820
52821  # Control if libzip can use mmap. Available for purposes of overriding.
52822  LIBZIP_CAN_USE_MMAP=true
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837###############################################################################
52838#
52839# We need to do some final tweaking, when everything else is done.
52840#
52841###############################################################################
52842
52843
52844  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52845
52846
52847  # The name of the Service Agent jar.
52848  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52849  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52850    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52851  fi
52852
52853
52854
52855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52856$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52857
52858    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52859      ENABLE_INTREE_EC=yes
52860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52861$as_echo "yes" >&6; }
52862    else
52863      ENABLE_INTREE_EC=no
52864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52865$as_echo "no" >&6; }
52866    fi
52867
52868
52869
52870
52871###############################################################################
52872#
52873# Configure parts of the build that only affect the build performance,
52874# not the result.
52875#
52876###############################################################################
52877
52878
52879  # How many cores do we have on this build system?
52880
52881# Check whether --with-num-cores was given.
52882if test "${with_num_cores+set}" = set; then :
52883  withval=$with_num_cores;
52884fi
52885
52886  if test "x$with_num_cores" = x; then
52887    # The number of cores were not specified, try to probe them.
52888
52889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52890$as_echo_n "checking for number of cores... " >&6; }
52891  NUM_CORES=1
52892  FOUND_CORES=no
52893
52894  if test -f /proc/cpuinfo; then
52895    # Looks like a Linux (or cygwin) system
52896    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52897    FOUND_CORES=yes
52898  elif test -x /usr/sbin/psrinfo; then
52899    # Looks like a Solaris system
52900    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52901    FOUND_CORES=yes
52902  elif test -x /usr/sbin/system_profiler; then
52903    # Looks like a MacOSX system
52904    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52905    FOUND_CORES=yes
52906  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52907    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52908    FOUND_CORES=yes
52909  elif test -n "$NUMBER_OF_PROCESSORS"; then
52910    # On windows, look in the env
52911    NUM_CORES=$NUMBER_OF_PROCESSORS
52912    FOUND_CORES=yes
52913  fi
52914
52915  if test "x$FOUND_CORES" = xyes; then
52916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52917$as_echo "$NUM_CORES" >&6; }
52918  else
52919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52920$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52921    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52922$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52923  fi
52924
52925  else
52926    NUM_CORES=$with_num_cores
52927  fi
52928
52929
52930
52931  # How much memory do we have on this build system?
52932
52933# Check whether --with-memory-size was given.
52934if test "${with_memory_size+set}" = set; then :
52935  withval=$with_memory_size;
52936fi
52937
52938  if test "x$with_memory_size" = x; then
52939    # The memory size was not specified, try to probe it.
52940
52941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52942$as_echo_n "checking for memory size... " >&6; }
52943  # Default to 1024 MB
52944  MEMORY_SIZE=1024
52945  FOUND_MEM=no
52946
52947  if test -f /proc/meminfo; then
52948    # Looks like a Linux (or cygwin) system
52949    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52950    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52951    FOUND_MEM=yes
52952  elif test -x /usr/sbin/prtconf; then
52953    # Looks like a Solaris or AIX system
52954    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52955    FOUND_MEM=yes
52956  elif test -x /usr/sbin/system_profiler; then
52957    # Looks like a MacOSX system
52958    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52959    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52960    FOUND_MEM=yes
52961  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52962    # Windows, but without cygwin
52963    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52964    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52965    FOUND_MEM=yes
52966  fi
52967
52968  if test "x$FOUND_MEM" = xyes; then
52969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52970$as_echo "$MEMORY_SIZE MB" >&6; }
52971  else
52972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52973$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52974    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52975$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52976  fi
52977
52978  else
52979    MEMORY_SIZE=$with_memory_size
52980  fi
52981
52982
52983
52984  # Provide a decent default number of parallel jobs for make depending on
52985  # number of cores, amount of memory and machine architecture.
52986
52987# Check whether --with-jobs was given.
52988if test "${with_jobs+set}" = set; then :
52989  withval=$with_jobs;
52990fi
52991
52992  if test "x$with_jobs" = x; then
52993    # Number of jobs was not specified, calculate.
52994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52995$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52996    # Approximate memory in GB.
52997    memory_gb=`expr $MEMORY_SIZE / 1024`
52998    # Pick the lowest of memory in gb and number of cores.
52999    if test "$memory_gb" -lt "$NUM_CORES"; then
53000      JOBS="$memory_gb"
53001    else
53002      JOBS="$NUM_CORES"
53003      # On bigger machines, leave some room for other processes to run
53004      if test "$JOBS" -gt "4"; then
53005        JOBS=`expr $JOBS '*' 90 / 100`
53006      fi
53007    fi
53008    # Cap number of jobs to 16
53009    if test "$JOBS" -gt "16"; then
53010      JOBS=16
53011    fi
53012    if test "$JOBS" -eq "0"; then
53013      JOBS=1
53014    fi
53015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
53016$as_echo "$JOBS" >&6; }
53017  else
53018    JOBS=$with_jobs
53019  fi
53020
53021
53022
53023# Setup arguments for the boot jdk (after cores and memory have been setup)
53024
53025  ##############################################################################
53026  #
53027  # Specify jvm options for anything that is run with the Boot JDK.
53028  # Not all JVM:s accept the same arguments on the command line.
53029  #
53030
53031# Check whether --with-boot-jdk-jvmargs was given.
53032if test "${with_boot_jdk_jvmargs+set}" = set; then :
53033  withval=$with_boot_jdk_jvmargs;
53034fi
53035
53036
53037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
53038$as_echo_n "checking flags for boot jdk java command ... " >&6; }
53039
53040  # Disable special log output when a debug build is used as Boot JDK...
53041
53042  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
53043  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
53044  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
53045  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53046  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53047  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53048    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
53049    JVM_ARG_OK=true
53050  else
53051    $ECHO "Arg failed:" >&5
53052    $ECHO "$OUTPUT" >&5
53053    JVM_ARG_OK=false
53054  fi
53055
53056
53057  # Apply user provided options.
53058
53059  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
53060  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
53061  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
53062  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53063  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53064  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53065    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
53066    JVM_ARG_OK=true
53067  else
53068    $ECHO "Arg failed:" >&5
53069    $ECHO "$OUTPUT" >&5
53070    JVM_ARG_OK=false
53071  fi
53072
53073
53074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
53075$as_echo "$boot_jdk_jvmargs" >&6; }
53076
53077  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
53078  JAVA_FLAGS=$boot_jdk_jvmargs
53079
53080
53081
53082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
53083$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
53084
53085  # Starting amount of heap memory.
53086
53087  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
53088  $ECHO "Command: $JAVA -Xms64M -version" >&5
53089  OUTPUT=`$JAVA -Xms64M -version 2>&1`
53090  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53091  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53092  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53093    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
53094    JVM_ARG_OK=true
53095  else
53096    $ECHO "Arg failed:" >&5
53097    $ECHO "$OUTPUT" >&5
53098    JVM_ARG_OK=false
53099  fi
53100
53101
53102  # Maximum amount of heap memory.
53103  # Maximum stack size.
53104  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
53105  if test "x$BOOT_JDK_BITS" = "x32"; then
53106    if test "$JVM_MAX_HEAP" -gt "1100"; then
53107      JVM_MAX_HEAP=1100
53108    elif test "$JVM_MAX_HEAP" -lt "512"; then
53109      JVM_MAX_HEAP=512
53110    fi
53111    STACK_SIZE=768
53112  else
53113    # Running a 64 bit JVM allows for and requires a bigger heap
53114    if test "$JVM_MAX_HEAP" -gt "1600"; then
53115      JVM_MAX_HEAP=1600
53116    elif test "$JVM_MAX_HEAP" -lt "512"; then
53117      JVM_MAX_HEAP=512
53118    fi
53119    STACK_SIZE=1536
53120  fi
53121
53122  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
53123  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
53124  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
53125  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53126  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53127  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53128    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
53129    JVM_ARG_OK=true
53130  else
53131    $ECHO "Arg failed:" >&5
53132    $ECHO "$OUTPUT" >&5
53133    JVM_ARG_OK=false
53134  fi
53135
53136
53137  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
53138  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
53139  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
53140  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53141  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53142  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53143    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
53144    JVM_ARG_OK=true
53145  else
53146    $ECHO "Arg failed:" >&5
53147    $ECHO "$OUTPUT" >&5
53148    JVM_ARG_OK=false
53149  fi
53150
53151
53152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
53153$as_echo "$boot_jdk_jvmargs_big" >&6; }
53154
53155  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
53156
53157
53158
53159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
53160$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
53161
53162  # Use serial gc for small short lived tools if possible
53163
53164  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
53165  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
53166  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
53167  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53168  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53169  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53170    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
53171    JVM_ARG_OK=true
53172  else
53173    $ECHO "Arg failed:" >&5
53174    $ECHO "$OUTPUT" >&5
53175    JVM_ARG_OK=false
53176  fi
53177
53178
53179  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
53180  $ECHO "Command: $JAVA -Xms32M -version" >&5
53181  OUTPUT=`$JAVA -Xms32M -version 2>&1`
53182  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53183  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53184  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53185    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
53186    JVM_ARG_OK=true
53187  else
53188    $ECHO "Arg failed:" >&5
53189    $ECHO "$OUTPUT" >&5
53190    JVM_ARG_OK=false
53191  fi
53192
53193
53194  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53195  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53196  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53197  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53198  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53199  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53200    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53201    JVM_ARG_OK=true
53202  else
53203    $ECHO "Arg failed:" >&5
53204    $ECHO "$OUTPUT" >&5
53205    JVM_ARG_OK=false
53206  fi
53207
53208
53209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53210$as_echo "$boot_jdk_jvmargs_small" >&6; }
53211
53212  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53213
53214
53215  JAVA_TOOL_FLAGS_SMALL=""
53216  for f in $JAVA_FLAGS_SMALL; do
53217    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53218  done
53219
53220
53221
53222# Setup smart javac (after cores and memory have been setup)
53223
53224
53225# Check whether --with-sjavac-server-java was given.
53226if test "${with_sjavac_server_java+set}" = set; then :
53227  withval=$with_sjavac_server_java;
53228fi
53229
53230
53231  if test "x$with_sjavac_server_java" != x; then
53232    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53233    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53234    if test "x$FOUND_VERSION" = x; then
53235      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53236    fi
53237  else
53238    SJAVAC_SERVER_JAVA="$JAVA"
53239  fi
53240
53241
53242  if test "$MEMORY_SIZE" -gt "3000"; then
53243
53244  $ECHO "Check if jvm arg is ok: -d64" >&5
53245  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53246  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53247  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53248  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53249  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53250    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53251    JVM_ARG_OK=true
53252  else
53253    $ECHO "Arg failed:" >&5
53254    $ECHO "$OUTPUT" >&5
53255    JVM_ARG_OK=false
53256  fi
53257
53258    if test "$JVM_ARG_OK" = true; then
53259      JVM_64BIT=true
53260      JVM_ARG_OK=false
53261    fi
53262  fi
53263
53264  MX_VALUE=`expr $MEMORY_SIZE / 2`
53265  if test "$JVM_64BIT" = true; then
53266    # Set ms lower than mx since more than one instance of the server might
53267    # get launched at the same time before they figure out which instance won.
53268    MS_VALUE=512
53269    if test "$MX_VALUE" -gt "2048"; then
53270      MX_VALUE=2048
53271    fi
53272  else
53273    MS_VALUE=256
53274    if test "$MX_VALUE" -gt "1500"; then
53275      MX_VALUE=1500
53276    fi
53277  fi
53278  if test "$MX_VALUE" -lt "512"; then
53279    MX_VALUE=512
53280  fi
53281
53282  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53283  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53284  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53285  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53286  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53287  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53288    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53289    JVM_ARG_OK=true
53290  else
53291    $ECHO "Arg failed:" >&5
53292    $ECHO "$OUTPUT" >&5
53293    JVM_ARG_OK=false
53294  fi
53295
53296
53297
53298  # Check whether --enable-sjavac was given.
53299if test "${enable_sjavac+set}" = set; then :
53300  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53301else
53302  ENABLE_SJAVAC="no"
53303fi
53304
53305  if test "x$JVM_ARG_OK" = "xfalse"; then
53306    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53307$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53308    ENABLE_SJAVAC="no"
53309  fi
53310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53311$as_echo_n "checking whether to use sjavac... " >&6; }
53312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53313$as_echo "$ENABLE_SJAVAC" >&6; }
53314
53315
53316  # Check whether --enable-javac-server was given.
53317if test "${enable_javac_server+set}" = set; then :
53318  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
53319else
53320  ENABLE_JAVAC_SERVER="no"
53321fi
53322
53323  if test "x$JVM_ARG_OK" = "xfalse"; then
53324    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
53325$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
53326    ENABLE_JAVAC_SERVER="no"
53327  fi
53328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
53329$as_echo_n "checking whether to use javac server... " >&6; }
53330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
53331$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
53332
53333
53334
53335# Can the C/C++ compiler use precompiled headers?
53336
53337
53338  ###############################################################################
53339  #
53340  # Can the C/C++ compiler use precompiled headers?
53341  #
53342  # Check whether --enable-precompiled-headers was given.
53343if test "${enable_precompiled_headers+set}" = set; then :
53344  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53345else
53346  ENABLE_PRECOMPH=yes
53347fi
53348
53349
53350  USE_PRECOMPILED_HEADER=1
53351  if test "x$ENABLE_PRECOMPH" = xno; then
53352    USE_PRECOMPILED_HEADER=0
53353  fi
53354
53355  if test "x$ENABLE_PRECOMPH" = xyes; then
53356    # Check that the compiler actually supports precomp headers.
53357    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53359$as_echo_n "checking that precompiled headers work... " >&6; }
53360      echo "int alfa();" > conftest.h
53361      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53362      if test ! -f conftest.hpp.gch; then
53363        USE_PRECOMPILED_HEADER=0
53364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53365$as_echo "no" >&6; }
53366      else
53367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53368$as_echo "yes" >&6; }
53369      fi
53370      rm -f conftest.h conftest.hpp.gch
53371    fi
53372  fi
53373
53374
53375
53376
53377# Setup use of ccache, if available
53378
53379  # Check whether --enable-ccache was given.
53380if test "${enable_ccache+set}" = set; then :
53381  enableval=$enable_ccache;
53382fi
53383
53384
53385  CCACHE=
53386  CCACHE_STATUS=
53387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53388$as_echo_n "checking is ccache enabled... " >&6; }
53389  if test "x$enable_ccache" = xyes; then
53390    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53392$as_echo "yes" >&6; }
53393      OLD_PATH="$PATH"
53394      if test "x$TOOLCHAIN_PATH" != x; then
53395        PATH=$TOOLCHAIN_PATH:$PATH
53396      fi
53397
53398
53399
53400  # Publish this variable in the help.
53401
53402
53403  if [ -z "${CCACHE+x}" ]; then
53404    # The variable is not set by user, try to locate tool using the code snippet
53405    for ac_prog in ccache
53406do
53407  # Extract the first word of "$ac_prog", so it can be a program name with args.
53408set dummy $ac_prog; ac_word=$2
53409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53410$as_echo_n "checking for $ac_word... " >&6; }
53411if ${ac_cv_path_CCACHE+:} false; then :
53412  $as_echo_n "(cached) " >&6
53413else
53414  case $CCACHE in
53415  [\\/]* | ?:[\\/]*)
53416  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53417  ;;
53418  *)
53419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53420for as_dir in $PATH
53421do
53422  IFS=$as_save_IFS
53423  test -z "$as_dir" && as_dir=.
53424    for ac_exec_ext in '' $ac_executable_extensions; do
53425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53426    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53428    break 2
53429  fi
53430done
53431  done
53432IFS=$as_save_IFS
53433
53434  ;;
53435esac
53436fi
53437CCACHE=$ac_cv_path_CCACHE
53438if test -n "$CCACHE"; then
53439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53440$as_echo "$CCACHE" >&6; }
53441else
53442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53443$as_echo "no" >&6; }
53444fi
53445
53446
53447  test -n "$CCACHE" && break
53448done
53449
53450  else
53451    # The variable is set, but is it from the command line or the environment?
53452
53453    # Try to remove the string !CCACHE! from our list.
53454    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53455    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53456      # If it failed, the variable was not from the command line. Ignore it,
53457      # but warn the user (except for BASH, which is always set by the calling BASH).
53458      if test "xCCACHE" != xBASH; then
53459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53460$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53461      fi
53462      # Try to locate tool using the code snippet
53463      for ac_prog in ccache
53464do
53465  # Extract the first word of "$ac_prog", so it can be a program name with args.
53466set dummy $ac_prog; ac_word=$2
53467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53468$as_echo_n "checking for $ac_word... " >&6; }
53469if ${ac_cv_path_CCACHE+:} false; then :
53470  $as_echo_n "(cached) " >&6
53471else
53472  case $CCACHE in
53473  [\\/]* | ?:[\\/]*)
53474  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53475  ;;
53476  *)
53477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53478for as_dir in $PATH
53479do
53480  IFS=$as_save_IFS
53481  test -z "$as_dir" && as_dir=.
53482    for ac_exec_ext in '' $ac_executable_extensions; do
53483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53484    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53486    break 2
53487  fi
53488done
53489  done
53490IFS=$as_save_IFS
53491
53492  ;;
53493esac
53494fi
53495CCACHE=$ac_cv_path_CCACHE
53496if test -n "$CCACHE"; then
53497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53498$as_echo "$CCACHE" >&6; }
53499else
53500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53501$as_echo "no" >&6; }
53502fi
53503
53504
53505  test -n "$CCACHE" && break
53506done
53507
53508    else
53509      # If it succeeded, then it was overridden by the user. We will use it
53510      # for the tool.
53511
53512      # First remove it from the list of overridden variables, so we can test
53513      # for unknown variables in the end.
53514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53515
53516      # Check if we try to supply an empty value
53517      if test "x$CCACHE" = x; then
53518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
53519$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
53520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53521$as_echo_n "checking for CCACHE... " >&6; }
53522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
53523$as_echo "disabled" >&6; }
53524      else
53525        # Check if the provided tool contains a complete path.
53526        tool_specified="$CCACHE"
53527        tool_basename="${tool_specified##*/}"
53528        if test "x$tool_basename" = "x$tool_specified"; then
53529          # A command without a complete path is provided, search $PATH.
53530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53531$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53532          # Extract the first word of "$tool_basename", so it can be a program name with args.
53533set dummy $tool_basename; ac_word=$2
53534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53535$as_echo_n "checking for $ac_word... " >&6; }
53536if ${ac_cv_path_CCACHE+:} false; then :
53537  $as_echo_n "(cached) " >&6
53538else
53539  case $CCACHE in
53540  [\\/]* | ?:[\\/]*)
53541  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53542  ;;
53543  *)
53544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53545for as_dir in $PATH
53546do
53547  IFS=$as_save_IFS
53548  test -z "$as_dir" && as_dir=.
53549    for ac_exec_ext in '' $ac_executable_extensions; do
53550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53551    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53553    break 2
53554  fi
53555done
53556  done
53557IFS=$as_save_IFS
53558
53559  ;;
53560esac
53561fi
53562CCACHE=$ac_cv_path_CCACHE
53563if test -n "$CCACHE"; then
53564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53565$as_echo "$CCACHE" >&6; }
53566else
53567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53568$as_echo "no" >&6; }
53569fi
53570
53571
53572          if test "x$CCACHE" = x; then
53573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53574          fi
53575        else
53576          # Otherwise we believe it is a complete path. Use it as it is.
53577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53578$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53580$as_echo_n "checking for CCACHE... " >&6; }
53581          if test ! -x "$tool_specified"; then
53582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53583$as_echo "not found" >&6; }
53584            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53585          fi
53586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53587$as_echo "$tool_specified" >&6; }
53588        fi
53589      fi
53590    fi
53591  fi
53592
53593
53594
53595  if test "x$CCACHE" = x; then
53596    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53597  fi
53598
53599
53600      PATH="$OLD_PATH"
53601      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53602      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53603    else
53604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53605$as_echo "no" >&6; }
53606      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53607$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53608    fi
53609  elif test "x$enable_ccache" = xno; then
53610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53611$as_echo "no, explicitly disabled" >&6; }
53612    CCACHE_STATUS="Disabled"
53613  elif test "x$enable_ccache" = x; then
53614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53615$as_echo "no" >&6; }
53616  else
53617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53618$as_echo "unknown" >&6; }
53619    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53620  fi
53621
53622
53623
53624# Check whether --with-ccache-dir was given.
53625if test "${with_ccache_dir+set}" = set; then :
53626  withval=$with_ccache_dir;
53627fi
53628
53629
53630  if test "x$with_ccache_dir" != x; then
53631    # When using a non home ccache directory, assume the use is to share ccache files
53632    # with other users. Thus change the umask.
53633    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53634    if test "x$CCACHE" = x; then
53635      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53636$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53637    fi
53638  fi
53639
53640  if test "x$CCACHE" != x; then
53641
53642  if test "x$CCACHE" != x; then
53643    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53644      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53645          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53646      if test "x$HAS_BAD_CCACHE" != "x"; then
53647        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53648      fi
53649      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53650$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53651      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53652      PUSHED_FLAGS="$CXXFLAGS"
53653      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53654      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53655/* end confdefs.h.  */
53656
53657int
53658main ()
53659{
53660
53661  ;
53662  return 0;
53663}
53664_ACEOF
53665if ac_fn_cxx_try_compile "$LINENO"; then :
53666  CC_KNOWS_CCACHE_TRICK=yes
53667else
53668  CC_KNOWS_CCACHE_TRICK=no
53669fi
53670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53671      CXXFLAGS="$PUSHED_FLAGS"
53672      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53674$as_echo "yes" >&6; }
53675        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53676
53677        CCACHE_SLOPPINESS=pch_defines,time_macros
53678      else
53679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53680$as_echo "no" >&6; }
53681        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53682      fi
53683    fi
53684
53685    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53686        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53687
53688    if test "x$SET_CCACHE_DIR" != x; then
53689      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53690      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53691    fi
53692  fi
53693
53694  fi
53695
53696
53697###############################################################################
53698#
53699# And now the finish...
53700#
53701###############################################################################
53702
53703# Check for some common pitfalls
53704
53705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53706    file_to_test="$SRC_ROOT/LICENSE"
53707    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53708      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
53709    fi
53710  fi
53711
53712
53713  # Did user specify any unknown variables?
53714
53715  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53716    # Replace the separating ! with spaces before presenting for end user.
53717    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53718    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53719$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53720  fi
53721
53722
53723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53724$as_echo_n "checking if build directory is on local disk... " >&6; }
53725
53726  # df -l lists only local disks; if the given directory is not found then
53727  # a non-zero exit code is given
53728  if test "x$DF" = x; then
53729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53730      # msys does not have df; use Windows "net use" instead.
53731      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53732      if test "x$IS_NETWORK_DISK" = x; then
53733        OUTPUT_DIR_IS_LOCAL="yes"
53734      else
53735        OUTPUT_DIR_IS_LOCAL="no"
53736      fi
53737    else
53738      # No df here, say it's local
53739      OUTPUT_DIR_IS_LOCAL="yes"
53740    fi
53741  else
53742    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53743      OUTPUT_DIR_IS_LOCAL="yes"
53744    else
53745      OUTPUT_DIR_IS_LOCAL="no"
53746    fi
53747  fi
53748
53749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53750$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53751
53752
53753
53754  # Check if the user has any old-style ALT_ variables set.
53755  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53756
53757  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53758  # Since we can't properly handle the dependencies for this, warn the user about the situation
53759  if test -e $OUTPUT_ROOT/spec.gmk; then
53760    IS_RECONFIGURE=yes
53761  else
53762    IS_RECONFIGURE=no
53763  fi
53764
53765
53766# At the end, call the custom hook. (Dummy macro if no custom sources available)
53767
53768
53769# We're messing a bit with internal autoconf variables to put the config.status
53770# in the output directory instead of the current directory.
53771CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53772
53773# Create the actual output files. Now the main work of configure is done.
53774cat >confcache <<\_ACEOF
53775# This file is a shell script that caches the results of configure
53776# tests run on this system so they can be shared between configure
53777# scripts and configure runs, see configure's option --config-cache.
53778# It is not useful on other systems.  If it contains results you don't
53779# want to keep, you may remove or edit it.
53780#
53781# config.status only pays attention to the cache file if you give it
53782# the --recheck option to rerun configure.
53783#
53784# `ac_cv_env_foo' variables (set or unset) will be overridden when
53785# loading this file, other *unset* `ac_cv_foo' will be assigned the
53786# following values.
53787
53788_ACEOF
53789
53790# The following way of writing the cache mishandles newlines in values,
53791# but we know of no workaround that is simple, portable, and efficient.
53792# So, we kill variables containing newlines.
53793# Ultrix sh set writes to stderr and can't be redirected directly,
53794# and sets the high bit in the cache file unless we assign to the vars.
53795(
53796  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53797    eval ac_val=\$$ac_var
53798    case $ac_val in #(
53799    *${as_nl}*)
53800      case $ac_var in #(
53801      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53802$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53803      esac
53804      case $ac_var in #(
53805      _ | IFS | as_nl) ;; #(
53806      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53807      *) { eval $ac_var=; unset $ac_var;} ;;
53808      esac ;;
53809    esac
53810  done
53811
53812  (set) 2>&1 |
53813    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53814    *${as_nl}ac_space=\ *)
53815      # `set' does not quote correctly, so add quotes: double-quote
53816      # substitution turns \\\\ into \\, and sed turns \\ into \.
53817      sed -n \
53818	"s/'/'\\\\''/g;
53819	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53820      ;; #(
53821    *)
53822      # `set' quotes correctly as required by POSIX, so do not add quotes.
53823      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53824      ;;
53825    esac |
53826    sort
53827) |
53828  sed '
53829     /^ac_cv_env_/b end
53830     t clear
53831     :clear
53832     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53833     t end
53834     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53835     :end' >>confcache
53836if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53837  if test -w "$cache_file"; then
53838    if test "x$cache_file" != "x/dev/null"; then
53839      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53840$as_echo "$as_me: updating cache $cache_file" >&6;}
53841      if test ! -f "$cache_file" || test -h "$cache_file"; then
53842	cat confcache >"$cache_file"
53843      else
53844        case $cache_file in #(
53845        */* | ?:*)
53846	  mv -f confcache "$cache_file"$$ &&
53847	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53848        *)
53849	  mv -f confcache "$cache_file" ;;
53850	esac
53851      fi
53852    fi
53853  else
53854    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53855$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53856  fi
53857fi
53858rm -f confcache
53859
53860test "x$prefix" = xNONE && prefix=$ac_default_prefix
53861# Let make expand exec_prefix.
53862test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53863
53864# Transform confdefs.h into DEFS.
53865# Protect against shell expansion while executing Makefile rules.
53866# Protect against Makefile macro expansion.
53867#
53868# If the first sed substitution is executed (which looks for macros that
53869# take arguments), then branch to the quote section.  Otherwise,
53870# look for a macro that doesn't take arguments.
53871ac_script='
53872:mline
53873/\\$/{
53874 N
53875 s,\\\n,,
53876 b mline
53877}
53878t clear
53879:clear
53880s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53881t quote
53882s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53883t quote
53884b any
53885:quote
53886s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53887s/\[/\\&/g
53888s/\]/\\&/g
53889s/\$/$$/g
53890H
53891:any
53892${
53893	g
53894	s/^\n//
53895	s/\n/ /g
53896	p
53897}
53898'
53899DEFS=`sed -n "$ac_script" confdefs.h`
53900
53901
53902ac_libobjs=
53903ac_ltlibobjs=
53904U=
53905for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53906  # 1. Remove the extension, and $U if already installed.
53907  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53908  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53909  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53910  #    will be set to the directory where LIBOBJS objects are built.
53911  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53912  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53913done
53914LIBOBJS=$ac_libobjs
53915
53916LTLIBOBJS=$ac_ltlibobjs
53917
53918
53919
53920: "${CONFIG_STATUS=./config.status}"
53921ac_write_fail=0
53922ac_clean_files_save=$ac_clean_files
53923ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53924{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53925$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53926as_write_fail=0
53927cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53928#! $SHELL
53929# Generated by $as_me.
53930# Run this file to recreate the current configuration.
53931# Compiler output produced by configure, useful for debugging
53932# configure, is in config.log if it exists.
53933
53934debug=false
53935ac_cs_recheck=false
53936ac_cs_silent=false
53937
53938SHELL=\${CONFIG_SHELL-$SHELL}
53939export SHELL
53940_ASEOF
53941cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53942## -------------------- ##
53943## M4sh Initialization. ##
53944## -------------------- ##
53945
53946# Be more Bourne compatible
53947DUALCASE=1; export DUALCASE # for MKS sh
53948if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53949  emulate sh
53950  NULLCMD=:
53951  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53952  # is contrary to our usage.  Disable this feature.
53953  alias -g '${1+"$@"}'='"$@"'
53954  setopt NO_GLOB_SUBST
53955else
53956  case `(set -o) 2>/dev/null` in #(
53957  *posix*) :
53958    set -o posix ;; #(
53959  *) :
53960     ;;
53961esac
53962fi
53963
53964
53965as_nl='
53966'
53967export as_nl
53968# Printing a long string crashes Solaris 7 /usr/bin/printf.
53969as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53970as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53971as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53972# Prefer a ksh shell builtin over an external printf program on Solaris,
53973# but without wasting forks for bash or zsh.
53974if test -z "$BASH_VERSION$ZSH_VERSION" \
53975    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53976  as_echo='print -r --'
53977  as_echo_n='print -rn --'
53978elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53979  as_echo='printf %s\n'
53980  as_echo_n='printf %s'
53981else
53982  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53983    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53984    as_echo_n='/usr/ucb/echo -n'
53985  else
53986    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53987    as_echo_n_body='eval
53988      arg=$1;
53989      case $arg in #(
53990      *"$as_nl"*)
53991	expr "X$arg" : "X\\(.*\\)$as_nl";
53992	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53993      esac;
53994      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53995    '
53996    export as_echo_n_body
53997    as_echo_n='sh -c $as_echo_n_body as_echo'
53998  fi
53999  export as_echo_body
54000  as_echo='sh -c $as_echo_body as_echo'
54001fi
54002
54003# The user is always right.
54004if test "${PATH_SEPARATOR+set}" != set; then
54005  PATH_SEPARATOR=:
54006  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
54007    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
54008      PATH_SEPARATOR=';'
54009  }
54010fi
54011
54012
54013# IFS
54014# We need space, tab and new line, in precisely that order.  Quoting is
54015# there to prevent editors from complaining about space-tab.
54016# (If _AS_PATH_WALK were called with IFS unset, it would disable word
54017# splitting by setting IFS to empty value.)
54018IFS=" ""	$as_nl"
54019
54020# Find who we are.  Look in the path if we contain no directory separator.
54021as_myself=
54022case $0 in #((
54023  *[\\/]* ) as_myself=$0 ;;
54024  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54025for as_dir in $PATH
54026do
54027  IFS=$as_save_IFS
54028  test -z "$as_dir" && as_dir=.
54029    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
54030  done
54031IFS=$as_save_IFS
54032
54033     ;;
54034esac
54035# We did not find ourselves, most probably we were run as `sh COMMAND'
54036# in which case we are not to be found in the path.
54037if test "x$as_myself" = x; then
54038  as_myself=$0
54039fi
54040if test ! -f "$as_myself"; then
54041  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
54042  exit 1
54043fi
54044
54045# Unset variables that we do not need and which cause bugs (e.g. in
54046# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
54047# suppresses any "Segmentation fault" message there.  '((' could
54048# trigger a bug in pdksh 5.2.14.
54049for as_var in BASH_ENV ENV MAIL MAILPATH
54050do eval test x\${$as_var+set} = xset \
54051  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
54052done
54053PS1='$ '
54054PS2='> '
54055PS4='+ '
54056
54057# NLS nuisances.
54058LC_ALL=C
54059export LC_ALL
54060LANGUAGE=C
54061export LANGUAGE
54062
54063# CDPATH.
54064(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
54065
54066
54067# as_fn_error STATUS ERROR [LINENO LOG_FD]
54068# ----------------------------------------
54069# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
54070# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
54071# script with STATUS, using 1 if that was 0.
54072as_fn_error ()
54073{
54074  as_status=$1; test $as_status -eq 0 && as_status=1
54075  if test "$4"; then
54076    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
54077    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
54078  fi
54079  $as_echo "$as_me: error: $2" >&2
54080  as_fn_exit $as_status
54081} # as_fn_error
54082
54083
54084# as_fn_set_status STATUS
54085# -----------------------
54086# Set $? to STATUS, without forking.
54087as_fn_set_status ()
54088{
54089  return $1
54090} # as_fn_set_status
54091
54092# as_fn_exit STATUS
54093# -----------------
54094# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
54095as_fn_exit ()
54096{
54097  set +e
54098  as_fn_set_status $1
54099  exit $1
54100} # as_fn_exit
54101
54102# as_fn_unset VAR
54103# ---------------
54104# Portably unset VAR.
54105as_fn_unset ()
54106{
54107  { eval $1=; unset $1;}
54108}
54109as_unset=as_fn_unset
54110# as_fn_append VAR VALUE
54111# ----------------------
54112# Append the text in VALUE to the end of the definition contained in VAR. Take
54113# advantage of any shell optimizations that allow amortized linear growth over
54114# repeated appends, instead of the typical quadratic growth present in naive
54115# implementations.
54116if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
54117  eval 'as_fn_append ()
54118  {
54119    eval $1+=\$2
54120  }'
54121else
54122  as_fn_append ()
54123  {
54124    eval $1=\$$1\$2
54125  }
54126fi # as_fn_append
54127
54128# as_fn_arith ARG...
54129# ------------------
54130# Perform arithmetic evaluation on the ARGs, and store the result in the
54131# global $as_val. Take advantage of shells that can avoid forks. The arguments
54132# must be portable across $(()) and expr.
54133if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
54134  eval 'as_fn_arith ()
54135  {
54136    as_val=$(( $* ))
54137  }'
54138else
54139  as_fn_arith ()
54140  {
54141    as_val=`expr "$@" || test $? -eq 1`
54142  }
54143fi # as_fn_arith
54144
54145
54146if expr a : '\(a\)' >/dev/null 2>&1 &&
54147   test "X`expr 00001 : '.*\(...\)'`" = X001; then
54148  as_expr=expr
54149else
54150  as_expr=false
54151fi
54152
54153if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
54154  as_basename=basename
54155else
54156  as_basename=false
54157fi
54158
54159if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
54160  as_dirname=dirname
54161else
54162  as_dirname=false
54163fi
54164
54165as_me=`$as_basename -- "$0" ||
54166$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
54167	 X"$0" : 'X\(//\)$' \| \
54168	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54169$as_echo X/"$0" |
54170    sed '/^.*\/\([^/][^/]*\)\/*$/{
54171	    s//\1/
54172	    q
54173	  }
54174	  /^X\/\(\/\/\)$/{
54175	    s//\1/
54176	    q
54177	  }
54178	  /^X\/\(\/\).*/{
54179	    s//\1/
54180	    q
54181	  }
54182	  s/.*/./; q'`
54183
54184# Avoid depending upon Character Ranges.
54185as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54186as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54187as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54188as_cr_digits='0123456789'
54189as_cr_alnum=$as_cr_Letters$as_cr_digits
54190
54191ECHO_C= ECHO_N= ECHO_T=
54192case `echo -n x` in #(((((
54193-n*)
54194  case `echo 'xy\c'` in
54195  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54196  xy)  ECHO_C='\c';;
54197  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54198       ECHO_T='	';;
54199  esac;;
54200*)
54201  ECHO_N='-n';;
54202esac
54203
54204rm -f conf$$ conf$$.exe conf$$.file
54205if test -d conf$$.dir; then
54206  rm -f conf$$.dir/conf$$.file
54207else
54208  rm -f conf$$.dir
54209  mkdir conf$$.dir 2>/dev/null
54210fi
54211if (echo >conf$$.file) 2>/dev/null; then
54212  if ln -s conf$$.file conf$$ 2>/dev/null; then
54213    as_ln_s='ln -s'
54214    # ... but there are two gotchas:
54215    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54216    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54217    # In both cases, we have to default to `cp -pR'.
54218    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54219      as_ln_s='cp -pR'
54220  elif ln conf$$.file conf$$ 2>/dev/null; then
54221    as_ln_s=ln
54222  else
54223    as_ln_s='cp -pR'
54224  fi
54225else
54226  as_ln_s='cp -pR'
54227fi
54228rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54229rmdir conf$$.dir 2>/dev/null
54230
54231
54232# as_fn_mkdir_p
54233# -------------
54234# Create "$as_dir" as a directory, including parents if necessary.
54235as_fn_mkdir_p ()
54236{
54237
54238  case $as_dir in #(
54239  -*) as_dir=./$as_dir;;
54240  esac
54241  test -d "$as_dir" || eval $as_mkdir_p || {
54242    as_dirs=
54243    while :; do
54244      case $as_dir in #(
54245      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54246      *) as_qdir=$as_dir;;
54247      esac
54248      as_dirs="'$as_qdir' $as_dirs"
54249      as_dir=`$as_dirname -- "$as_dir" ||
54250$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54251	 X"$as_dir" : 'X\(//\)[^/]' \| \
54252	 X"$as_dir" : 'X\(//\)$' \| \
54253	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54254$as_echo X"$as_dir" |
54255    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54256	    s//\1/
54257	    q
54258	  }
54259	  /^X\(\/\/\)[^/].*/{
54260	    s//\1/
54261	    q
54262	  }
54263	  /^X\(\/\/\)$/{
54264	    s//\1/
54265	    q
54266	  }
54267	  /^X\(\/\).*/{
54268	    s//\1/
54269	    q
54270	  }
54271	  s/.*/./; q'`
54272      test -d "$as_dir" && break
54273    done
54274    test -z "$as_dirs" || eval "mkdir $as_dirs"
54275  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54276
54277
54278} # as_fn_mkdir_p
54279if mkdir -p . 2>/dev/null; then
54280  as_mkdir_p='mkdir -p "$as_dir"'
54281else
54282  test -d ./-p && rmdir ./-p
54283  as_mkdir_p=false
54284fi
54285
54286
54287# as_fn_executable_p FILE
54288# -----------------------
54289# Test if FILE is an executable regular file.
54290as_fn_executable_p ()
54291{
54292  test -f "$1" && test -x "$1"
54293} # as_fn_executable_p
54294as_test_x='test -x'
54295as_executable_p=as_fn_executable_p
54296
54297# Sed expression to map a string onto a valid CPP name.
54298as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54299
54300# Sed expression to map a string onto a valid variable name.
54301as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54302
54303
54304exec 6>&1
54305## ----------------------------------- ##
54306## Main body of $CONFIG_STATUS script. ##
54307## ----------------------------------- ##
54308_ASEOF
54309test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54310
54311cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54312# Save the log message, to keep $0 and so on meaningful, and to
54313# report actual input values of CONFIG_FILES etc. instead of their
54314# values after options handling.
54315ac_log="
54316This file was extended by OpenJDK $as_me jdk9, which was
54317generated by GNU Autoconf 2.69.  Invocation command line was
54318
54319  CONFIG_FILES    = $CONFIG_FILES
54320  CONFIG_HEADERS  = $CONFIG_HEADERS
54321  CONFIG_LINKS    = $CONFIG_LINKS
54322  CONFIG_COMMANDS = $CONFIG_COMMANDS
54323  $ $0 $@
54324
54325on `(hostname || uname -n) 2>/dev/null | sed 1q`
54326"
54327
54328_ACEOF
54329
54330case $ac_config_files in *"
54331"*) set x $ac_config_files; shift; ac_config_files=$*;;
54332esac
54333
54334
54335
54336cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54337# Files that config.status was made for.
54338config_files="$ac_config_files"
54339
54340_ACEOF
54341
54342cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54343ac_cs_usage="\
54344\`$as_me' instantiates files and other configuration actions
54345from templates according to the current configuration.  Unless the files
54346and actions are specified as TAGs, all are instantiated by default.
54347
54348Usage: $0 [OPTION]... [TAG]...
54349
54350  -h, --help       print this help, then exit
54351  -V, --version    print version number and configuration settings, then exit
54352      --config     print configuration, then exit
54353  -q, --quiet, --silent
54354                   do not print progress messages
54355  -d, --debug      don't remove temporary files
54356      --recheck    update $as_me by reconfiguring in the same conditions
54357      --file=FILE[:TEMPLATE]
54358                   instantiate the configuration file FILE
54359
54360Configuration files:
54361$config_files
54362
54363Report bugs to <build-dev@openjdk.java.net>.
54364OpenJDK home page: <http://openjdk.java.net>."
54365
54366_ACEOF
54367cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54368ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54369ac_cs_version="\\
54370OpenJDK config.status jdk9
54371configured by $0, generated by GNU Autoconf 2.69,
54372  with options \\"\$ac_cs_config\\"
54373
54374Copyright (C) 2012 Free Software Foundation, Inc.
54375This config.status script is free software; the Free Software Foundation
54376gives unlimited permission to copy, distribute and modify it."
54377
54378ac_pwd='$ac_pwd'
54379srcdir='$srcdir'
54380AWK='$AWK'
54381test -n "\$AWK" || AWK=awk
54382_ACEOF
54383
54384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54385# The default lists apply if the user does not specify any file.
54386ac_need_defaults=:
54387while test $# != 0
54388do
54389  case $1 in
54390  --*=?*)
54391    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54392    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54393    ac_shift=:
54394    ;;
54395  --*=)
54396    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54397    ac_optarg=
54398    ac_shift=:
54399    ;;
54400  *)
54401    ac_option=$1
54402    ac_optarg=$2
54403    ac_shift=shift
54404    ;;
54405  esac
54406
54407  case $ac_option in
54408  # Handling of the options.
54409  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54410    ac_cs_recheck=: ;;
54411  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54412    $as_echo "$ac_cs_version"; exit ;;
54413  --config | --confi | --conf | --con | --co | --c )
54414    $as_echo "$ac_cs_config"; exit ;;
54415  --debug | --debu | --deb | --de | --d | -d )
54416    debug=: ;;
54417  --file | --fil | --fi | --f )
54418    $ac_shift
54419    case $ac_optarg in
54420    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54421    '') as_fn_error $? "missing file argument" ;;
54422    esac
54423    as_fn_append CONFIG_FILES " '$ac_optarg'"
54424    ac_need_defaults=false;;
54425  --he | --h |  --help | --hel | -h )
54426    $as_echo "$ac_cs_usage"; exit ;;
54427  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54428  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54429    ac_cs_silent=: ;;
54430
54431  # This is an error.
54432  -*) as_fn_error $? "unrecognized option: \`$1'
54433Try \`$0 --help' for more information." ;;
54434
54435  *) as_fn_append ac_config_targets " $1"
54436     ac_need_defaults=false ;;
54437
54438  esac
54439  shift
54440done
54441
54442ac_configure_extra_args=
54443
54444if $ac_cs_silent; then
54445  exec 6>/dev/null
54446  ac_configure_extra_args="$ac_configure_extra_args --silent"
54447fi
54448
54449_ACEOF
54450cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54451if \$ac_cs_recheck; then
54452  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54453  shift
54454  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54455  CONFIG_SHELL='$SHELL'
54456  export CONFIG_SHELL
54457  exec "\$@"
54458fi
54459
54460_ACEOF
54461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54462exec 5>>config.log
54463{
54464  echo
54465  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54466## Running $as_me. ##
54467_ASBOX
54468  $as_echo "$ac_log"
54469} >&5
54470
54471_ACEOF
54472cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54473_ACEOF
54474
54475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54476
54477# Handling of arguments.
54478for ac_config_target in $ac_config_targets
54479do
54480  case $ac_config_target in
54481    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54482    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54483    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54484    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54485    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54486
54487  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54488  esac
54489done
54490
54491
54492# If the user did not use the arguments to specify the items to instantiate,
54493# then the envvar interface is used.  Set only those that are not.
54494# We use the long form for the default assignment because of an extremely
54495# bizarre bug on SunOS 4.1.3.
54496if $ac_need_defaults; then
54497  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54498fi
54499
54500# Have a temporary directory for convenience.  Make it in the build tree
54501# simply because there is no reason against having it here, and in addition,
54502# creating and moving files from /tmp can sometimes cause problems.
54503# Hook for its removal unless debugging.
54504# Note that there is a small window in which the directory will not be cleaned:
54505# after its creation but before its name has been assigned to `$tmp'.
54506$debug ||
54507{
54508  tmp= ac_tmp=
54509  trap 'exit_status=$?
54510  : "${ac_tmp:=$tmp}"
54511  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54512' 0
54513  trap 'as_fn_exit 1' 1 2 13 15
54514}
54515# Create a (secure) tmp directory for tmp files.
54516
54517{
54518  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54519  test -d "$tmp"
54520}  ||
54521{
54522  tmp=./conf$$-$RANDOM
54523  (umask 077 && mkdir "$tmp")
54524} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54525ac_tmp=$tmp
54526
54527# Set up the scripts for CONFIG_FILES section.
54528# No need to generate them if there are no CONFIG_FILES.
54529# This happens for instance with `./config.status config.h'.
54530if test -n "$CONFIG_FILES"; then
54531
54532
54533ac_cr=`echo X | tr X '\015'`
54534# On cygwin, bash can eat \r inside `` if the user requested igncr.
54535# But we know of no other shell where ac_cr would be empty at this
54536# point, so we can use a bashism as a fallback.
54537if test "x$ac_cr" = x; then
54538  eval ac_cr=\$\'\\r\'
54539fi
54540ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54541if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54542  ac_cs_awk_cr='\\r'
54543else
54544  ac_cs_awk_cr=$ac_cr
54545fi
54546
54547echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54548_ACEOF
54549
54550
54551{
54552  echo "cat >conf$$subs.awk <<_ACEOF" &&
54553  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54554  echo "_ACEOF"
54555} >conf$$subs.sh ||
54556  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54557ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54558ac_delim='%!_!# '
54559for ac_last_try in false false false false false :; do
54560  . ./conf$$subs.sh ||
54561    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54562
54563  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54564  if test $ac_delim_n = $ac_delim_num; then
54565    break
54566  elif $ac_last_try; then
54567    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54568  else
54569    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54570  fi
54571done
54572rm -f conf$$subs.sh
54573
54574cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54575cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54576_ACEOF
54577sed -n '
54578h
54579s/^/S["/; s/!.*/"]=/
54580p
54581g
54582s/^[^!]*!//
54583:repl
54584t repl
54585s/'"$ac_delim"'$//
54586t delim
54587:nl
54588h
54589s/\(.\{148\}\)..*/\1/
54590t more1
54591s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54592p
54593n
54594b repl
54595:more1
54596s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54597p
54598g
54599s/.\{148\}//
54600t nl
54601:delim
54602h
54603s/\(.\{148\}\)..*/\1/
54604t more2
54605s/["\\]/\\&/g; s/^/"/; s/$/"/
54606p
54607b
54608:more2
54609s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54610p
54611g
54612s/.\{148\}//
54613t delim
54614' <conf$$subs.awk | sed '
54615/^[^""]/{
54616  N
54617  s/\n//
54618}
54619' >>$CONFIG_STATUS || ac_write_fail=1
54620rm -f conf$$subs.awk
54621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54622_ACAWK
54623cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54624  for (key in S) S_is_set[key] = 1
54625  FS = ""
54626
54627}
54628{
54629  line = $ 0
54630  nfields = split(line, field, "@")
54631  substed = 0
54632  len = length(field[1])
54633  for (i = 2; i < nfields; i++) {
54634    key = field[i]
54635    keylen = length(key)
54636    if (S_is_set[key]) {
54637      value = S[key]
54638      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54639      len += length(value) + length(field[++i])
54640      substed = 1
54641    } else
54642      len += 1 + keylen
54643  }
54644
54645  print line
54646}
54647
54648_ACAWK
54649_ACEOF
54650cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54651if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54652  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54653else
54654  cat
54655fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54656  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54657_ACEOF
54658
54659# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54660# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54661# trailing colons and then remove the whole line if VPATH becomes empty
54662# (actually we leave an empty line to preserve line numbers).
54663if test "x$srcdir" = x.; then
54664  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54665h
54666s///
54667s/^/:/
54668s/[	 ]*$/:/
54669s/:\$(srcdir):/:/g
54670s/:\${srcdir}:/:/g
54671s/:@srcdir@:/:/g
54672s/^:*//
54673s/:*$//
54674x
54675s/\(=[	 ]*\).*/\1/
54676G
54677s/\n//
54678s/^[^=]*=[	 ]*$//
54679}'
54680fi
54681
54682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54683fi # test -n "$CONFIG_FILES"
54684
54685
54686eval set X "  :F $CONFIG_FILES      "
54687shift
54688for ac_tag
54689do
54690  case $ac_tag in
54691  :[FHLC]) ac_mode=$ac_tag; continue;;
54692  esac
54693  case $ac_mode$ac_tag in
54694  :[FHL]*:*);;
54695  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54696  :[FH]-) ac_tag=-:-;;
54697  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54698  esac
54699  ac_save_IFS=$IFS
54700  IFS=:
54701  set x $ac_tag
54702  IFS=$ac_save_IFS
54703  shift
54704  ac_file=$1
54705  shift
54706
54707  case $ac_mode in
54708  :L) ac_source=$1;;
54709  :[FH])
54710    ac_file_inputs=
54711    for ac_f
54712    do
54713      case $ac_f in
54714      -) ac_f="$ac_tmp/stdin";;
54715      *) # Look for the file first in the build tree, then in the source tree
54716	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54717	 # because $ac_f cannot contain `:'.
54718	 test -f "$ac_f" ||
54719	   case $ac_f in
54720	   [\\/$]*) false;;
54721	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54722	   esac ||
54723	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54724      esac
54725      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54726      as_fn_append ac_file_inputs " '$ac_f'"
54727    done
54728
54729    # Let's still pretend it is `configure' which instantiates (i.e., don't
54730    # use $as_me), people would be surprised to read:
54731    #    /* config.h.  Generated by config.status.  */
54732    configure_input='Generated from '`
54733	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54734	`' by configure.'
54735    if test x"$ac_file" != x-; then
54736      configure_input="$ac_file.  $configure_input"
54737      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54738$as_echo "$as_me: creating $ac_file" >&6;}
54739    fi
54740    # Neutralize special characters interpreted by sed in replacement strings.
54741    case $configure_input in #(
54742    *\&* | *\|* | *\\* )
54743       ac_sed_conf_input=`$as_echo "$configure_input" |
54744       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54745    *) ac_sed_conf_input=$configure_input;;
54746    esac
54747
54748    case $ac_tag in
54749    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54750      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54751    esac
54752    ;;
54753  esac
54754
54755  ac_dir=`$as_dirname -- "$ac_file" ||
54756$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54757	 X"$ac_file" : 'X\(//\)[^/]' \| \
54758	 X"$ac_file" : 'X\(//\)$' \| \
54759	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54760$as_echo X"$ac_file" |
54761    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54762	    s//\1/
54763	    q
54764	  }
54765	  /^X\(\/\/\)[^/].*/{
54766	    s//\1/
54767	    q
54768	  }
54769	  /^X\(\/\/\)$/{
54770	    s//\1/
54771	    q
54772	  }
54773	  /^X\(\/\).*/{
54774	    s//\1/
54775	    q
54776	  }
54777	  s/.*/./; q'`
54778  as_dir="$ac_dir"; as_fn_mkdir_p
54779  ac_builddir=.
54780
54781case "$ac_dir" in
54782.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54783*)
54784  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54785  # A ".." for each directory in $ac_dir_suffix.
54786  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54787  case $ac_top_builddir_sub in
54788  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54789  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54790  esac ;;
54791esac
54792ac_abs_top_builddir=$ac_pwd
54793ac_abs_builddir=$ac_pwd$ac_dir_suffix
54794# for backward compatibility:
54795ac_top_builddir=$ac_top_build_prefix
54796
54797case $srcdir in
54798  .)  # We are building in place.
54799    ac_srcdir=.
54800    ac_top_srcdir=$ac_top_builddir_sub
54801    ac_abs_top_srcdir=$ac_pwd ;;
54802  [\\/]* | ?:[\\/]* )  # Absolute name.
54803    ac_srcdir=$srcdir$ac_dir_suffix;
54804    ac_top_srcdir=$srcdir
54805    ac_abs_top_srcdir=$srcdir ;;
54806  *) # Relative name.
54807    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54808    ac_top_srcdir=$ac_top_build_prefix$srcdir
54809    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54810esac
54811ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54812
54813
54814  case $ac_mode in
54815  :F)
54816  #
54817  # CONFIG_FILE
54818  #
54819
54820_ACEOF
54821
54822cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54823# If the template does not know about datarootdir, expand it.
54824# FIXME: This hack should be removed a few years after 2.60.
54825ac_datarootdir_hack=; ac_datarootdir_seen=
54826ac_sed_dataroot='
54827/datarootdir/ {
54828  p
54829  q
54830}
54831/@datadir@/p
54832/@docdir@/p
54833/@infodir@/p
54834/@localedir@/p
54835/@mandir@/p'
54836case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54837*datarootdir*) ac_datarootdir_seen=yes;;
54838*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54839  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54840$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54841_ACEOF
54842cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54843  ac_datarootdir_hack='
54844  s&@datadir@&$datadir&g
54845  s&@docdir@&$docdir&g
54846  s&@infodir@&$infodir&g
54847  s&@localedir@&$localedir&g
54848  s&@mandir@&$mandir&g
54849  s&\\\${datarootdir}&$datarootdir&g' ;;
54850esac
54851_ACEOF
54852
54853# Neutralize VPATH when `$srcdir' = `.'.
54854# Shell code in configure.ac might set extrasub.
54855# FIXME: do we really want to maintain this feature?
54856cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54857ac_sed_extra="$ac_vpsub
54858$extrasub
54859_ACEOF
54860cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54861:t
54862/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54863s|@configure_input@|$ac_sed_conf_input|;t t
54864s&@top_builddir@&$ac_top_builddir_sub&;t t
54865s&@top_build_prefix@&$ac_top_build_prefix&;t t
54866s&@srcdir@&$ac_srcdir&;t t
54867s&@abs_srcdir@&$ac_abs_srcdir&;t t
54868s&@top_srcdir@&$ac_top_srcdir&;t t
54869s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54870s&@builddir@&$ac_builddir&;t t
54871s&@abs_builddir@&$ac_abs_builddir&;t t
54872s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54873$ac_datarootdir_hack
54874"
54875eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54876  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54877
54878test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54879  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54880  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54881      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54882  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54883which seems to be undefined.  Please make sure it is defined" >&5
54884$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54885which seems to be undefined.  Please make sure it is defined" >&2;}
54886
54887  rm -f "$ac_tmp/stdin"
54888  case $ac_file in
54889  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54890  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54891  esac \
54892  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54893 ;;
54894
54895
54896
54897  esac
54898
54899done # for ac_tag
54900
54901
54902as_fn_exit 0
54903_ACEOF
54904ac_clean_files=$ac_clean_files_save
54905
54906test $ac_write_fail = 0 ||
54907  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54908
54909
54910# configure is writing to config.log, and then calls config.status.
54911# config.status does its own redirection, appending to config.log.
54912# Unfortunately, on DOS this fails, as config.log is still kept open
54913# by configure, so config.status won't be able to write to it; its
54914# output is simply discarded.  So we exec the FD to /dev/null,
54915# effectively closing config.log, so it can be properly (re)opened and
54916# appended to by config.status.  When coming back to configure, we
54917# need to make the FD available again.
54918if test "$no_create" != yes; then
54919  ac_cs_success=:
54920  ac_config_status_args=
54921  test "$silent" = yes &&
54922    ac_config_status_args="$ac_config_status_args --quiet"
54923  exec 5>/dev/null
54924  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54925  exec 5>>config.log
54926  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54927  # would make configure fail if this is the last instruction.
54928  $ac_cs_success || as_fn_exit 1
54929fi
54930if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54931  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54932$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54933fi
54934
54935
54936# After AC_OUTPUT, we need to do final work
54937
54938
54939  # Try to move config.log (generated by autoconf) to the configure-support directory.
54940  if test -e ./config.log; then
54941    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54942  fi
54943
54944  # Rotate our log file (configure.log)
54945  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54946    $RM -f "$OUTPUT_ROOT/configure.log.old"
54947  fi
54948  if test -e "$OUTPUT_ROOT/configure.log"; then
54949    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54950  fi
54951
54952  # Move configure.log from current directory to the build output root
54953  if test -e ./configure.log; then
54954    echo found it
54955    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54956  fi
54957
54958  # Make the compare script executable
54959  $CHMOD +x $OUTPUT_ROOT/compare.sh
54960
54961
54962# Finally output some useful information to the user
54963
54964  # Finally output some useful information to the user
54965
54966  printf "\n"
54967  printf "====================================================\n"
54968  if test "x$no_create" != "xyes"; then
54969    if test "x$IS_RECONFIGURE" != "xyes"; then
54970      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54971    else
54972      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54973    fi
54974  else
54975    if test "x$IS_RECONFIGURE" != "xyes"; then
54976      printf "A configuration has been successfully checked but not created\n"
54977    else
54978      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54979    fi
54980  fi
54981  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54982    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54983  else
54984    printf "using default settings.\n"
54985  fi
54986
54987  printf "\n"
54988  printf "Configuration summary:\n"
54989  printf "* Debug level:    $DEBUG_LEVEL\n"
54990  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54991  printf "* JDK variant:    $JDK_VARIANT\n"
54992  printf "* JVM variants:   $with_jvm_variants\n"
54993  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54994
54995  printf "\n"
54996  printf "Tools summary:\n"
54997  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54998    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54999  fi
55000  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
55001  if test "x$TOOLCHAIN_VERSION" != "x"; then
55002    print_version=" $TOOLCHAIN_VERSION"
55003  fi
55004  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
55005  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
55006  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
55007
55008  printf "\n"
55009  printf "Build performance summary:\n"
55010  printf "* Cores to use:   $JOBS\n"
55011  printf "* Memory limit:   $MEMORY_SIZE MB\n"
55012  if test "x$CCACHE_STATUS" != "x"; then
55013    printf "* ccache status:  $CCACHE_STATUS\n"
55014  fi
55015  printf "\n"
55016
55017  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
55018    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
55019    printf "will result in longer build times.\n"
55020    printf "\n"
55021  fi
55022
55023  if test "x$FOUND_ALT_VARIABLES" != "x"; then
55024    printf "WARNING: You have old-style ALT_ environment variables set.\n"
55025    printf "These are not respected, and will be ignored. It is recommended\n"
55026    printf "that you clean your environment. The following variables are set:\n"
55027    printf "$FOUND_ALT_VARIABLES\n"
55028    printf "\n"
55029  fi
55030
55031  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
55032    printf "WARNING: Your build output directory is not on a local disk.\n"
55033    printf "This will severely degrade build performance!\n"
55034    printf "It is recommended that you create an output directory on a local disk,\n"
55035    printf "and run the configure script again from that directory.\n"
55036    printf "\n"
55037  fi
55038
55039  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
55040    printf "WARNING: The result of this configuration has overridden an older\n"
55041    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
55042    printf "proper build. Failure to do so might result in strange build problems.\n"
55043    printf "\n"
55044  fi
55045
55046  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
55047    printf "WARNING: The result of this configuration was not saved.\n"
55048    printf "You should run without '--no-create | -n' to create the configuration.\n"
55049    printf "\n"
55050  fi
55051
55052
55053
55054  # Locate config.log.
55055  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
55056    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
55057  elif test -e "./config.log"; then
55058    CONFIG_LOG_PATH="."
55059  fi
55060
55061  if test -e "$CONFIG_LOG_PATH/config.log"; then
55062    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
55063    if test $? -eq 0; then
55064      printf "The following warnings were produced. Repeated here for convenience:\n"
55065      # We must quote sed expression (using []) to stop m4 from eating the [].
55066      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
55067      printf "\n"
55068    fi
55069  fi
55070
55071